Yootheme Zoo – Modifying the Frontend submission editor
A quick note to let you know how I hacked Yootheme Zoo 2.3. I wanted to have a wysiwyg editor while my users were submitting article in frontend with ZOO. Usually you can activate the "trusted mode" to have this wysiwyg editor. But you will also have several other fields which are too much for normal users. In order to have a wysiwyg editor, even in the non-trusted mode, here is the modification you should implement.
Here is the trick. Activate the trusted mode, but then, made a code modification to hide the "administration" panel in frontend. Here is the code you have to change on line 40 in /joomla_base_dir/components/com_zoo/partials/_submission.php
1 | echo $this->partial('administration'); |
should be commented :
1 | // echo $this->partial('administration'); |
[Edit] The old hack was the following
Here is the line you have to change on line 265 in /joomla_base_dir/administrator/components/com_zoo/elements/textarea/textarea.php
1 | if ($trusted_mode) { |
should be transformed to
1 | if ($trusted_mod || !$trusted_mode) { |
Or some other modification on the "if" instruction.That's it, you are done with the hack.














July 1st, 2011 at 15:06
Thanks for this useful shortcode, maybe i will use joomla pretty soon, so i keep that in my bookmarks
Dernier [type] de Portail Economie : In N Out, une chaîne de fast food
July 1st, 2011 at 17:08
Come back soon to read my next post if you use yootheme zoo in addition to joomla.
Bye
August 4th, 2011 at 17:04
thank you, Jean-Christoph, for this useful post, Do you know how to change the Wysi in Zoo to jCE for front and back end editing? Thanks again
Greg Correll
November 3rd, 2011 at 08:35
I already solve this trouble for ZOO 2.4.17, if you want to have the joomla default editor for ZOO textarea element but without exposing the trusted mode options, what you have to do is the next:
open media/zoo/elements/textarea/textarea.php and search in line 263. All you have to do is replace the code that shows bellow with this: $html[] = $this->app->system->editor->display('elements[' . $this->identifier . '][' . $index . '][value]', htmlspecialchars( $value, ENT_QUOTES, 'UTF-8' ), null, null, self::COLS, self::ROWS, array('pagebreak', 'readmore', 'article'));
-------- Begin Code to be replaced------- for ZOO 2.4.17 is from line 263 to 268
if ($trusted_mode) {
$html[] = $this->app->system->editor->display('elements[' . $this->identifier . '][' . $index . '][value]', htmlspecialchars( $value, ENT_QUOTES, 'UTF-8' ), null, null, self::COLS, self::ROWS, array('pagebreak', 'readmore', 'article'));
} else {
$html[] = $this->app->html->_('control.textarea', 'elements[' . $this->identifier . '][' . $index . '][value]', $value, 'cols='.self::COLS.' rows='.self::ROWS);
}
----End-------------------------------
November 8th, 2011 at 22:17
@Alberto : PERFECT !
Nice job. I probably found it after writing my article since I saw such a modification in one of my textarea.php versions.
But you got the award, your code does not change the core, and so is better than mine.
May 10th, 2012 at 22:16
Hi, thanks for this great information, we are using the latest version of ZOO (2.5.17) on our website and we are trying to find a solution for this issue, our website is some kind of community classified ads portal and our users need to subscribe to be able to post ads through our ZOO representation, we use some kind of moderation system to validate ads since ads are not published automatically.
Hence, when a user submit an ad, he needs to receive an email to inform him that we have well received his ad submission and such will be published after validation, same for after validation, we would like that when we publish the ad after validation, the user receives an email informing him that his ad is published and live and also the link when he can view the ad, in fact, such tools should be already present in ZOO as it is a perfect CCK system for Joomla, by the way we are using Joomla 2.5 and we also have a great connection with Jomsocial for the community side. So, could anyone here please guide us through a proper solution to solve this issue please?