GetSimple Support Forum
Plugin shortcodes problem - Printable Version

+- GetSimple Support Forum (
+-- Forum: GetSimple (
+--- Forum: Developer Discussions (
+--- Thread: Plugin shortcodes problem (/showthread.php?tid=3402)

Plugin shortcodes problem - bogyvet - 2012-08-05

I'm finish TIDEngine News/Blog Version 2.0. But......

Just one more problem that I can not solve. No idea. I add shortcodes and you can use PHP functions to add menus etc.

<?php tide_news_breadcrumbs(); ?>


I use this function:

if ($general_settings['shortcodes_use'] == 'checked') {
        add_filter('content', 'tide_shortcodes');
    } else {
        add_filter('content', 'tide_evaluate_php');
When I add shortcodes to page Shortcodes are working. When I add them to theme.php nothing happened.
In other hand when I call function from template everything is OK.

When I output content I get just page content not whole page.

I try with index-pretemplate and index-posttemplate, nothing happeneds.

Thanks in advance.

I get this solution, not the best I must change core (index.php)

# include the template and template file set within theme.php and each page
if ( (!file_exists(GSTHEMESPATH .$TEMPLATE."/".$template_file)) || ($template_file == '') ) { $template_file = "template.php"; }

include(GSTHEMESPATH .$TEMPLATE."/".$template_file);
$data = ob_get_contents();
exec_filter('page-content', $data);

And I call function :
add_filter('page-content', 'FUNCTION_TO_CALL');

I think this is cleanest solution, and could be implemented in core. In this way and caching system can be implemented. And base functionality is not changed.