< Browse > Home / Informatique / Blog article: Yootheme Zoo – Modifying the Frontend submission editor

| Mobile | RSS

Yootheme Zoo – Modifying the Frontend submission editor

March 16th, 2011 | 6 Comments | Posted in Informatique

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-&gt;partial('administration');

should be commented :

1
// echo $this-&gt;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.

Be Sociable, Share!
Leave a Reply 7679 views, 5 so far today |
Tags: ,
Follow Discussion

6 Responses to “Yootheme Zoo – Modifying the Frontend submission editor”

  1. Portail Economie Says:

    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

  2. Jice Says:

    Come back soon to read my next post if you use yootheme zoo in addition to joomla.
    Bye

  3. Greg Correll Says:

    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

  4. Alberto Hernández Says:

    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------------------------------- 
     

  5. Jice Says:

    @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.

  6. Tomy Says:

    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? 

Leave a Reply

CommentLuv badge

Additional comments powered by BackType


CarroCarro - Mars 2011Street ArtFirenze - Ponte VecchioBergerieBergerie2Citadelle de CalviParc enfantManègeÔ la vache!