vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   see referal url in whos online (https://vborg.vbsupport.ru/showthread.php?t=100574)

Marco van Herwaarden 11-18-2005 05:59 AM

PHP Code:

global $myvar;
$myvar "Whatever i want in this variable"


dreamer81 11-18-2005 06:52 AM

Quote:

Originally Posted by MarcoH64
PHP Code:

global $myvar;
$myvar "Whatever i want in this variable"


But

When a user enteres my page, the global_start hook is run. I save the referrer url in a global variable for each user. The variable is named the same though, but should contain different values for each user.

When I click on whosonline, the whosonlinebit template is run. Here i want to print out the referal url for each user. That is not possible because the whosonlinebit template doesn't print out my global variable. Plus how does it know which global variable belongs to which user?

I also posted this at vb.com
http://www.vbulletin.com/forum/showthread.php?t=163168

Marco van Herwaarden 11-18-2005 03:51 PM

Sorry to say, but the way you are trying it will never work. You will at least have to store the information for each user in a table.

I suggest you ask someone else if they can make something for you.

dreamer81 11-19-2005 07:46 AM

I can do it, if someone will just tell me how.

I tried this instead. I modified the userinfo class to contain one more string called ref.
and i fill it in index.php

but it wont print it in the whosonlinebit...??

Marco van Herwaarden 11-19-2005 08:27 AM

The session table sounds more suitable for this to me.


All times are GMT. The time now is 08:07 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.02249 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete