vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Contextual menu: how can I find out in the hook ?parse_templates? where is the user ? (https://vborg.vbsupport.ru/showthread.php?t=162670)

mihai11 11-14-2007 07:58 AM

Contextual menu: how can I find out in the hook ?parse_templates? where is the user ?
 
Hi,


I am trying to create a contextual menu that will display specific information relating to the page where is user is currently located. The problem is that I need to display that information in the header template. I need this because I created a new column for my forum in the header template. In this particular forum I need to put the contextual information.

For example, if the user is browsing the main page the contextual menu should say ?You are browsing the main page?. If the user is browsing the forum with ID 7, the contextual menu should say ?You are browsing forum no. 7?.

Normally, in order to achieve that you would need to work with the hooks forumhome_start and forumdisplay_start but this is not working because the ?header? is displayed earlier (before those hooks are called).

It looks like that hook ?parse_templates? is call just before displaying the template ?header?. If I put my code in there it will be called. The problem is that in this hook I don't know how to find out what the user is doing.

How can I find out in the hook ?parse_template? what the user is doing ? How can I find out if the user is browsing the main page or if he is in a certain forum ?



Regards,
Razvan

--------------- Added [DATE]1195037373[/DATE] at [TIME]1195037373[/TIME] ---------------

Nevermind, I found the solution.... in parse_templates I can find out eveything I need because this is called *after* global_start !!


All times are GMT. The time now is 06:22 AM.

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.01138 seconds
  • Memory Usage 1,706KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete