Welcome, Guest
Username: Password: Remember me

TOPIC: Avoiding the DONE message

Avoiding the DONE message 06 Jan 2012 12:57 #898

  • molenwal1
  • molenwal1's Avatar
  • Offline
  • Senior Member
  • Posts: 63
  • Thank you received: 17
  • Karma: 3
I think there is a very simple solution for this.

In my front end i have a form, and when this form is saved, i redirect to Thank You page. In that page i don't want to display the system-message DONE.

In my template i have the code:
<jdoc:include type="message" />

I want to keep that, because i want to view other messages.

How can i ignore or not process the message DONE on safe?
Molenwal1 Webdesign
www.molenwal1.nl
Last Edit: 06 Jan 2012 14:45 by molenwal1.
The administrator has disabled public write access.

Avoiding the DONE message 06 Jan 2012 16:17 #900

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Those "Done" message or "Error" message are produced in the controller in the save() and apply() methods of the concerned table.

The only thing you have to do is to remove the call of the raising message.

If you want only for a particular layout, you can test wich layout is in use and that's all.

Hope it helps.

you can then share your source code for others users ;-)
Coding is now a piece of cake
Last Edit: 06 Jan 2012 16:21 by admin.
The administrator has disabled public write access.

Avoiding the DONE message 09 Jan 2012 13:00 #913

  • molenwal1
  • molenwal1's Avatar
  • Offline
  • Senior Member
  • Posts: 63
  • Thank you received: 17
  • Karma: 3
Sorry, but i cannot find the moment that the "Done" message is produced. In the save() and apply() methods in controller no enqueuemessage or RaiseError function is used. In for example the check() method in the table RaiseWarnings are used. But also there i cannot find an enqueuemessage of other messagefunction for 'Done' when saving of the record is succesfull.

Could you please help a little more. I do not have much experience with coding for Joomla.
Molenwal1 Webdesign
www.molenwal1.nl
The administrator has disabled public write access.

Avoiding the DONE message 09 Jan 2012 14:06 #915

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Sorry I gave you an incorrect answer.

You can find it in :
classes/jcontroller.php

This code is common to all tables.
So for your project, you can pass a parameter to decide if you want the result message or not.
Coding is now a piece of cake
The administrator has disabled public write access.

Avoiding the DONE message 10 Jan 2012 07:07 #923

  • molenwal1
  • molenwal1's Avatar
  • Offline
  • Senior Member
  • Posts: 63
  • Thank you received: 17
  • Karma: 3
Thank you. I only want the message in the backend, this is my solution in classes/jcontroller.php on several places:
if ($app->isAdmin()) $app->enqueueMessage('DONE');
Molenwal1 Webdesign
www.molenwal1.nl
The administrator has disabled public write access.

Avoiding the DONE message 10 Jan 2012 08:59 #926

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Yes, correct.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.664 seconds

Get Started