Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-05-2011, 10:12 AM
Last_Zero's Avatar
Last_Zero Last_Zero is offline
 
Join Date: Jan 2011
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Template Name

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 ?
Reply With Quote
  #2  
Old 03-05-2011, 01:18 PM
Sadikb's Avatar
Sadikb Sadikb is offline
 
Join Date: Aug 2008
Location: Internet
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would suggest open the header template and see if there is any template hook available where you want to insert your code.
Reply With Quote
  #3  
Old 03-05-2011, 01:21 PM
Last_Zero's Avatar
Last_Zero Last_Zero is offline
 
Join Date: Jan 2011
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sadikb View Post
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 ?
Reply With Quote
  #4  
Old 03-05-2011, 03:31 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 03-05-2011, 03:50 PM
Last_Zero's Avatar
Last_Zero Last_Zero is offline
 
Join Date: Jan 2011
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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 ?
Reply With Quote
  #6  
Old 03-06-2011, 03:45 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 03-06-2011, 03:53 PM
Last_Zero's Avatar
Last_Zero Last_Zero is offline
 
Join Date: Jan 2011
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok In My First Hack I used (( Global Setup Complete )) And Template (( Navbar_End ))

Now I Need To Show This Photo

Code:
<img src="images/Lynne.jpg">
In The End Of Header Template

Whats The Hook I Use ?
Reply With Quote
  #8  
Old 03-06-2011, 04:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 03-06-2011, 05:13 PM
Last_Zero's Avatar
Last_Zero Last_Zero is offline
 
Join Date: Jan 2011
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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
Reply With Quote
  #10  
Old 03-06-2011, 05:30 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04742 seconds
  • Memory Usage 2,259KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete