|
إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...
انضم الينا
#1
| ||
| ||
I have a script that runs, for the most part, independent from the forums but it is integrated with the forum's users and styles. Since the upgrade to 4.0, fetch_template is no longer used. I need to convert the old code to the new variables so the script will work again. This is what the old code looks like... partial code that refers to the templates. OLD: Part 1 near the top of the main page of the script: PHP Code: $phrasegroups = array(); $specialtemplates = array(); $globaltemplates = array(); define('THIS_SCRIPT', 'TEST'); require_once('./global.php'); $pagetitle = "Test Page"; //Changes the page title $navbits = array(); $navbits[$parent] = 'TestArea'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); NEW: I changed Part 1 to this: PHP Code: error_reporting(E_ALL & ~E_NOTICE); define('THIS_SCRIPT', 'TEST'); define('CSRF_PROTECTION', true); $phrasegroups = array(); $specialtemplates = array(); $globaltemplates = array(); $actiontemplates = array(); require_once('./global.php'); $navbits = construct_navbits(array('' => 'TestArea')); $navbar = render_navbar_template($navbits); $pagetitle = "My page Title"; OLD: Part 2 near the end on the page: PHP Code: eval('print_output("' . fetch_template('GENERIC_SHELL') . '");'); NEW: And I changed part 2 to this: PHP Code: $templater = vB_Template::create('GENERIC_SHELL'); $templater->register_page_templates(); $templater->register('navbar', $navbar); $templater->register('pagetitle', $pagetitle); print_output($templater->render()); There a nice article at vbulletin.org but for the life of me, I have not been successful making the page work. I can get the header / footer to work, but no content from the page will display. I know I'm missing something, but I don't know what it is. Any help will be much appreciated ![]() |
مواقع النشر (المفضلة) |
| |
![]() | ||||
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
Forum fetch_template warning | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 07-19-2010 03:30 AM |
Forum Removed all plugins and still a fetch_template problem - please help if you can | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 02-19-2010 04:50 AM |
Forum Warning: fetch_template | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 02-18-2010 03:30 AM |
Forum Warning: fetch_template() calls .... | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 12-28-2009 03:50 PM |
Forum Warning: fetch_template() calls .... | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 12-28-2009 12:20 PM |