<?php ob_start(); show_menu2(0, SM2_CURR+1, SM2_CURR+1); $childmenu = ob_get_contents(); ob_end_clean();?>
I put the PHP info in the test area as well. I was able to get the php version, but wow it is running slow.
Is there any way that this pagination feature could be integrated into AnyNews?
... one question is it possible to truncate the title?
'TITLE' => substr(($strip_tags) ? strip_tags($row['title']) : $row['title'], 0, X),
{{ news.TITLE | slice(0,X) }}
Thanks for the update of anynews, one question is it possible to truncate the title?
<?php // ignore opening tag$loader = new Twig_Loader_Filesystem(array(WB_PATH.'/templates/' .TEMPLATE. '/anynews', dirname(__FILE__) . '/templates'));
<?php // ignore opening tag/** * Load Anynews Twig template specified via $display_mode */ if (file_exists(WB_PATH.'/templates/' .TEMPLATE. '/anynews/display_mode_' . $display_mode . '.htt')) { $tpl = $twig->loadTemplate('display_mode_' . $display_mode . '.htt'); }elseif (file_exists(dirname(__FILE__) . '/templates/display_mode_' . $display_mode . '.htt')) { $tpl = $twig->loadTemplate('display_mode_' . $display_mode . '.htt'); } else { $tpl = $twig->loadTemplate('display_mode_1.htt'); }
suggestion:Code: [Select]<?php // ignore opening tag$loader = new Twig_Loader_Filesystem(array(WB_PATH.'/templates/' .TEMPLATE. '/anynews', dirname(__FILE__) . '/templates'));// and 83 ff./** * Load Anynews Twig template specified via $display_mode */ if (file_exists(WB_PATH.'/templates/' .TEMPLATE. '/anynews/display_mode_' . $display_mode . '.htt')) { $tpl = $twig->loadTemplate('display_mode_' . $display_mode . '.htt'); }elseif (file_exists(dirname(__FILE__) . '/templates/display_mode_' . $display_mode . '.htt')) { $tpl = $twig->loadTemplate('display_mode_' . $display_mode . '.htt'); } else { $tpl = $twig->loadTemplate('display_mode_1.htt'); }
<?php // ignore opening tag$loader = new Twig_Loader_Filesystem(array(WB_PATH.'/templates/' .TEMPLATE. '/anynews', dirname(__FILE__) . '/templates'));// and 83 ff./** * Load Anynews Twig template specified via $display_mode */ if (file_exists(WB_PATH.'/templates/' .TEMPLATE. '/anynews/display_mode_' . $display_mode . '.htt')) { $tpl = $twig->loadTemplate('display_mode_' . $display_mode . '.htt'); }elseif (file_exists(dirname(__FILE__) . '/templates/display_mode_' . $display_mode . '.htt')) { $tpl = $twig->loadTemplate('display_mode_' . $display_mode . '.htt'); } else { $tpl = $twig->loadTemplate('display_mode_1.htt'); }
<?php $loader = new Twig_Loader_Filesystem(array(WB_PATH.'/templates/'.TEMPLATE.'/anynews', dirname(__FILE__).'/templates')); // throws an exception if a given directory not exists// and 83 ff. try{ $tpl = $twig->loadTemplate('display_mode_'.$display_mode.'.htt'); }catch(Twig_Error_Loader $e){ // if first loadTemplate() fails, catch exception and try to load default template $tpl = $twig->loadTemplate('display_mode_1.htt'); }
<?php // ignore opening php tag/** * Create Twig template object and configure it */require_once (WB_PATH.'/include/Twig/Twig/Autoloader.php');Twig_Autoloader::register();$aLoaderDir = array(dirname(__FILE__) . '/templates');if(file_exists(WB_PATH.'/templates/' .TEMPLATE. '/anynews')){ // put TEMPLATE.'/anynews' Directory at the beginning of array if it exists array_unshift($aLoaderDir, WB_PATH.'/templates/' .TEMPLATE. '/anynews');}$loader = new Twig_Loader_Filesystem($aLoaderDir);
<?php // ignore opening php tag/** Create Twig template object and configure it *//* from WB2.8.x Rev.1687 the Twig_autoloader ist activated by default so it [u][b]never[/b][/u] should be loaded or registered explicite! // require_once (WB_PATH.'/include/Twig/Twig/Autoloader.php'); // Twig_Autoloader::register();*/ try{ $loader = new Twig_Loader_Filesystem(WB_PATH.'/templates/'.TEMPLATE.'/anynews'); $loader->addPath(dirname(__FILE__).'/templates'); }catch(Twig_Error_Loader $e) { $loader = new Twig_Loader_Filesystem(dirname(__FILE__).'/templates'); }
Have a look inside the class documentation (or the classes itself). You will find an endless bunch of possibilities
It seems the AnyNews module/snippet is becoming more advanced and complex than the News module itself...
It seems the AnyNews module/snippet is becoming more advanced and complex than the News module itself.
It's great to see AnyNews being developed.
I really meant that the News module input/backend options and flexibility are getting less attention than output/frontend options