The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
header template
where in the WORLD is this thing......... I even tried renaming it and it looks like it got "recreated" if it wasn't there.
I was trying to get the {vb:raw header} thingy so I could make my own custom header... I really really really want to do my own custom header. I REALLY dont want to go into each template on the dang thing and remove {vb:raw header} and replace with the WHOLE entire "header template code"... That's the only way i can get my customizations in the header to appear anywhere on the board.. That's what I did for FORUMHOME template and it works fine only on the main page |
#2
|
|||
|
|||
It should just be the header template - are you sure you're editing the right one for the style you're using?
|
#3
|
|||
|
|||
lol.. ok answer me this then. How do you make your own custom header and still able to use {vb:raw mycustomheader} so the header shows up in templates.
|
#4
|
|||
|
|||
You lost me...maybe. I'm not sure why 'lol', did I answer the wrong question? If you want to make a custom header you should just be able to edit the header template.
I was about to answer the above question about using {vb:raw mycustomheader} by refering you to the article on templates, but I see you found that already. BirdOfPrey5 asked what hook you used for your plugin - that's a good question because the header is rendered kind of early on, so if you don't choose a hook before that then you won't see anything. ETA: hook parse_templates is just before where the header template is rendered, so that might be a good one. --------------- Added [DATE]1311178575[/DATE] at [TIME]1311178575[/TIME] --------------- OK, I saw what you posted in the other thread, and I guess you're not using plugins. Instead, create a plugin in the adminCP by going to Plugins & Products -> Add New Plugin. Select hook location parse_templates from the dropdown and paste your code in the box. Put a title in so you'll remember what this does, and select the "Yes" radio button to enable the plugin (you should be able to leave the other fields as they are). ETA...oh yeah, and then press "Save" or "Save and Reload". BTW, what I posted about it being too late to affect the header after global.php was wrong (I was thinking vb3), but you still want to use a plugin so that you don't have to change the php for every page. |
#5
|
|||
|
|||
Code:
//apth_p.php has my connection info require_once("apth_p.php"); if(!$connection) { die("Database connection failed:: connection: " . mysql_error()); } $db_select = mysql_select_db("Tim", $connection); if (!$db_select) { die("Database selection failed to select: " . mysql_error()); } $eventlist = mysql_query("SELECT * FROM thread WHERE forumid = 8 ORDER BY dateline DESC", $connection); if (!$eventlist) { die("Database selection failedquery:eventlist: " . mysql_error()); } while ($row = mysql_fetch_array($eventlist)) { $zthreadid .= $row["threadid"]; $zdateline .= $row["dateline"]."<br />"; $zlink .= "<a href='showthread.php?{$row["threadid"]}'>" . $row["title"]."</a>" . "<br />"; } mysql_close($connection); $templater->register('zlink', $zlink); $templater->register('zthreadid', $zthreadid); $templater->register('zdateline', $zdateline); |
#6
|
|||
|
|||
In the code you just posted, you're never initializing $templater. So you either want to go back to the code you had (using a 'threads' template), or else use preRegister like:
PHP Code:
then use {vb:raw zlink} etc in the header template. |
#7
|
|||
|
|||
elaborate on initializing $templater?
i added that and still doesn't work. white page. closest i had was, but it looked all jacked up $templater = vB_Template::create('header'); it displayed some data but forum looked jacked up |
#8
|
|||
|
|||
In the code you originally posted in the article thread you had:
PHP Code:
Quote:
Are you using a plugin or still working in forum.php? |
#9
|
|||
|
|||
LOL looks like i had it all along.... dunno what i did wrong the first time tho. it works now like a champ. probably the hook....... thanks man!
--------------- Added [DATE]1311184884[/DATE] at [TIME]1311184884[/TIME] --------------- works, but now all my external php page database stuff is all messed up --------------- Added [DATE]1311188053[/DATE] at [TIME]1311188053[/TIME] --------------- There has to be another method than parse_template hook. this hook just screws up all my coding for the forum. No doubt this does work. But it really is nasty to the rest of the board. --------------- Added [DATE]1311189606[/DATE] at [TIME]1311189606[/TIME] --------------- i had my database code in the header plugin i made closing the database connection.. that was the fault. so before my other pages opend up to call up database info, it would fail.. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|