vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   passing variables from showthread.php to postbit_legacy (https://vborg.vbsupport.ru/showthread.php?t=100533)

MrGeeK 11-10-2005 09:25 AM

passing variables from showthread.php to postbit_legacy
 
Hi,

Excuse me if this is a stupid question, I'm not an experience vb or php coder.

I'm trying to get an old vb 3.0x (adsense revenue share) mod working in 3.5 and I just about have it right (I think), the only issue is that I need to be able to pass 2 values from showthread.php that are then used in postbit_legacy.

Following the old instructions for the mod I placed the relevant code in showthread.php at the correct location (for 3.0.x), and the variables are defined correctly if I print them at that point.

By the time it gets to interpreting/displaying postbit_legacy the variables are gone.

Just after line 1054 in showthread.php I put the data into $post[ad_client_id] and $post[ad_channel], at that point they display correctly, until the while loop loops. (which is understandable)

I'm assuming this method that worked in 3.0.x is no longer suitable in 3.5.x, so my question is, how do I pass none standard variables into postbit_legacy from showthread.php?

Any help would be greatly appreciated.

Marco van Herwaarden 11-10-2005 09:29 AM

Try using a custom named array instead of $post. It might get reset for each itteration of the loop.

MrGeeK 11-10-2005 09:50 AM

It actually only gets used for the first post of the page, I tried setting it to just a couple of plain old variables but it still didn't come through. Which I find really confusing because $post[postid] gets throgh for example.

I'm probably missing something really obvious..

Hemanth 04-18-2006 04:19 AM

Hi,

Any progress in this work..


All times are GMT. The time now is 10:26 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.01104 seconds
  • Memory Usage 1,708KB
  • 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
  • (4)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