vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Links to external (https://vborg.vbsupport.ru/showthread.php?t=258281)

doubleclick 02-03-2011 12:43 PM

Links to external
 
Hello -

I've been trying to learn how to use templates outside the forum directory by duplicating the online.php page, and putting it a level up.
  • I added chdir('forum'); to the top of the page.
  • I created a new template in the admincp for the WHOSONLINE and added /forum/ in front of all links there.
  • Added eval('print_output("' . fetch_template('WHOSONLINE-external') . '");'); to the end of the externalonline.php file.

All links and data are working correctly except the location link, which refuses to add "forum" to the path. This comes from the $onlinebits which is in the copy of the template I made, and I've tried a number of ways to point to a level down to the forum directory, but no luck.

Interestingly enough, when I hover over a user's location, the alt-text correctly shows the correct information.

THis is probably a very simple fix, but I've tried and errored a fix for too long. Any ideas?

Thanks,
dc

BirdOPrey5 02-03-2011 03:52 PM

My guess would be a plugin the runs on an "online" hook that uses THIS_SCRIPT to see if its being run from the external file and if so, modify the variable holding the path to manually add /forum/ to it...

That is if i understand what you are tying to do...

doubleclick 02-03-2011 04:54 PM

In a nutshell, I'm just trying to get a copy of the online.php file to work above the forum directory. Is that how you understood it?

BirdOPrey5 02-03-2011 05:03 PM

Basically, but I guess since it's it's own file you don't need a plugin you could just edit the code directly.

doubleclick 02-03-2011 06:15 PM

I've tried everything, but can't find what to change or where to change it. What really drives me nuts is that every other link on the page works.

Do you know what to do to make this work as it should?

BirdOPrey5 02-03-2011 07:33 PM

Looking more closely this is being controlled by the template: whosonlinebit and I believe the location and associated link is stored in the variable: $userinfo[where]

In your custom php page I think you need code to read in the data in $userinfo[where] and alter it to add /forums/ to the link.


All times are GMT. The time now is 08:21 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.00982 seconds
  • Memory Usage 1,716KB
  • 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
  • (6)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