View Full Version : Template Name
Last_Zero
03-05-2011, 10:12 AM
Iam Still Beginner Coder
I Made My First Mod Here
https://vborg.vbsupport.ru/showthread.php?t=259636
It Show Important Links In Navbar
I Used The Template (( navbar_end )) And Hook Location (( Global_Setup_Complete ))
Now I Need To make A Product Show Something In The End Of (( Header )) Template
What Is The Template I Should Use And What Hook Location Is Suitable ?
Sadikb
03-05-2011, 01:18 PM
I would suggest open the header template and see if there is any template hook available where you want to insert your code.
Last_Zero
03-05-2011, 01:21 PM
I would suggest open the header template and see if there is any template hook available where you want to insert your code.
I Opened The Header Ok How Can I Know If Any Hook Available ?
Lynne
03-05-2011, 03:31 PM
There is only one template_hook in that template. Did you look to see if it was placed where you want to insert your html? (Template hooks are different than plugin hooks. Template_hooks are using to insert html into a template. Plugin hooks are used to insert php into the code.)
As for the plugin hook, it is it used on every page, then usually you want to use a global_* one. It really depends on what you are doing.
Last_Zero
03-05-2011, 03:50 PM
There is only one template_hook in that template. Did you look to see if it was placed where you want to insert your html? (Template hooks are different than plugin hooks. Template_hooks are using to insert html into a template. Plugin hooks are used to insert php into the code.)
As for the plugin hook, it is it used on every page, then usually you want to use a global_* one. It really depends on what you are doing.
Aha I Created Plugin And Tamplate Contain Html Code Not Php
Need To Show It In End Of Header
What template I Should Use And What Is The Hook Location ?
Lynne
03-06-2011, 03:45 PM
I really don't understand what you are trying to do. How about an image? And post the code you have written so far (please use code tags and post the hook location and template names).
I would assume you are writing these mods on your test site. If so, you should go into debug mode and then you will see a list of all the plugin hooks being called on the bottom right of the page. That makes it easier to pick which plugin hook you want to use.
Last_Zero
03-06-2011, 03:53 PM
Ok In My First Hack I used (( Global Setup Complete )) And Template (( Navbar_End ))
Now I Need To Show This Photo
<img src="images/Lynne.jpg">
In The End Of Header Template
Whats The Hook I Use ?
Lynne
03-06-2011, 04:52 PM
How do you plan to add it to the end of the header template? You can just modify the template and add in that line. If you are going to do a str_replace, you'd be better off putting it at the top of the navbar template since that has a unique string to do a find/replace on.
It is not always best to do automatic template edits. Sometimes it is easier to just add the code.
Last_Zero
03-06-2011, 05:13 PM
How do you plan to add it to the end of the header template? You can just modify the template and add in that line. If you are going to do a str_replace, you'd be better off putting it at the top of the navbar template since that has a unique string to do a find/replace on.
It is not always best to do automatic template edits. Sometimes it is easier to just add the code.
Iam Making It Auto Template Coz Its Product
Ok What I need Not Important To Show In the End Of Header
I need It To Show In The Upper Section Of The Forum
Header Or Navbar
Whats The hook I Can use And the Name Of Template
iam Sorry I Feel I Wasting Your Time :)
But I have A Power To Coding And I Need Some Tutorials To make My Way
Lynne
03-06-2011, 05:30 PM
Do a str_replace near the bottom of the navbar template ($find = '<!-- closing div for above_body -->';) . Or, wherever else you can find a unique line to do a str_replace. If you do a str_replace, just use parse_templates for the hook.
You should NOT use global_start for any plugins. That hook is deprecated and could disappear at any time.
Last_Zero
03-07-2011, 05:53 AM
That hook is deprecated and could disappear at any time.
Aha This Added Many Info For Me That I Wasn't Realize
Thanks So Much Lynne For Your Help :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.