e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
322 stars 214 forks source link

Forum templates wrappers not working? #2023

Closed rica-carv closed 8 years ago

rica-carv commented 8 years ago

I've tryed severallforum_template.php shortcodes wrappers variations, but it seems they don't work:

$FORUM_TEMPLATE_WRAPPER['THREADSX'] = "==={---}===";

$SC_WRAPPER['THREADSX'] = "==={---}===";

$FORUM_TEMPLATE_WRAPPER['main']['forum']['THREADSX'] = "==={---}===";

Anyone has this same issue?

CaMer0n commented 8 years ago

Enable Debug Mode : "Bbcode + Shortcodes" - Can you find a wrapper in the list? (in the footer)

rica-carv commented 8 years ago

No, there's no wrapper in the list. More weird is that i know that on another page (forum_viewforum) there's a wrapper (for viewable_by shortcode), and also when debugging it there's no wrapper listed.... Real weird...

CaMer0n commented 8 years ago

I have added some for the main forum page. (I believe thisscript is using your upgraded code you submitted) Please try with my changes and see how it goes now. Keep in mind that if there is no shortcode in the template, it won't display in the list.
eg. If you look at the 'track' page with DEBUG enabled, you won't find forum/track/end in the list of wrappers, because $FORUM_TEMPLATE['track']['end'] does NOT contain any shortcodes, therefor the shortcode handler is never called.

rica-carv commented 8 years ago

@CaMer0n Sorry, but with your changes it still doesn't works....

CaMer0n commented 8 years ago

Should be fixed now. For v2.x shortcode wrappers to function correctly, the template files also need to be loaded in the v2.x fashion using e107::getTemplate(); ie. require/include will fail to handle the v2.x wrapper format.

CaMer0n commented 8 years ago

Closing this, but please re-open if necessary.