vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do you get the Current URL Page Location, in footer template? (https://vborg.vbsupport.ru/showthread.php?t=260271)

nintendo 03-12-2011 09:24 PM

How do you get the Current URL Page Location, in footer template?
 
I want to put this in the footer template for logs.

<iframe src="http://www.domain.com/cgi-bin/logs.cgi?url=**Page URL**" width="1%" height="1"></iframe>

What do you put in the ***Page URL*** part so the iframe src has the current page URL in the iframe?

BirdOPrey5 03-13-2011 08:24 PM

I don't know of any way to get the exact URL of the page you are on in the footer...

I know when I need to get a URL I have to use a few conditionals depending on what page I'm on, and by a few, I mean a lot if every page really needs it...

For example:


Code:

<if condition="THIS_SCRIPT=='showthread'">
  <iframe src="http://www.domain.com/cgi-bin/logs.cgi?url=$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]" width="1%" height="1"></iframe>
</if>

<if condition="THIS_SCRIPT=='forumdisplay'">
  <iframe src="http://www.domain.com/cgi-bin/logs.cgi?url=$vboptions[bburl]/forumdisplay.php?f=$foruminfo[forumid]" width="1%" height="1"></iframe>
</if>

<if condition="THIS_SCRIPT=='index'">
  <iframe src="http://www.domain.com/cgi-bin/logs.cgi?url=$vboptions[bburl]/index.php" width="1%" height="1"></iframe>
</if>

and so on for each page option... such a "register", "calendar", "usercp", and so on...

It would be nice if there was a better way.

EDIT- I did some searching and this looks pretty close to what you need:


Code:

http://www.yourdomain.com/$_SERVER[PHP_SELF]?<if condition="$_SERVER['QUERY_STRING']">$_SERVER[QUERY_STRING]&amp;</if>
edited from this post: https://vborg.vbsupport.ru/showthread.php?t=241277

nintendo 03-16-2011 05:54 AM

Thanks. The if conditions worked just fine. I'm not that worried about the other smaller stuff getting tracked. Manly the index, threads, and forums.


All times are GMT. The time now is 02:42 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.00961 seconds
  • Memory Usage 1,713KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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