Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2005, 06:21 PM
dtarrance dtarrance is offline
 
Join Date: Sep 2004
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Pass variables in register.php?

Okay, I'm thinking this would be pretty easy to implement, but for some reason I just can't get it to work. Here's the situation:

I want to be able to have a variable (called subid) passed to register.php, and have it carry over thru the various pages that it generates. Here is an example:

link: register.php?subid=3

So when that link is followed, the variable subid is "remembered" thru all of the pages. Essentially that variable will be passed to a different page after the registration is completed. The user need not be aware of this number to keep things simple.

Could the register.php file be modded, or would using a custom profile field that is auto populated with the correct value be the best way to do this?

Hope that I was clear enough in this post so you can understand what I'm trying to do!

Many thanks in advance to anyone who can help!!!

David
Reply With Quote
  #2  
Old 06-17-2005, 08:03 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What you are trying could create a potential security risk where someone could become an Administrator.

Maybe you can better explain what you want to achieve, so we can give you the best advice.
Reply With Quote
  #3  
Old 06-17-2005, 09:27 PM
dtarrance dtarrance is offline
 
Join Date: Sep 2004
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, I already figured it out, and it works like a charm.

Here's what I'm doing. I'm making this mod for a site that has subscriptions to various sub-forums about video games. For each game, there are two subscriptions: 1 month, and 1 year. Also, there is an "all access pass" that gives you access to all of the forums.

Essentially, I needed a way to make the subscriptions list relevent to which game the user is interested in. For example, the user clicks on an advertisement banner from blahblahblah.com which then takes them to an information page about that specific game on the forum site. They read all about it, and if they decide to register & subscribe to that game, the "subid" variable is passed along thru the registration process. After the registration is complete, they are automatically forwarded to the subscriptions.php file, which in turn parses the list of subscriptions based on which game they were trying to sign up for. Now, instead of seeing a list of more than 12 subscriptions, they see 3 options: monthly, yearly, and an all access pass. All of those pertain to the specific game they were originally interested in.

Note that I'm not allowing any variable to be passed on the URL. Only the subid variable will be recognized, and if it is "out of range" from my switch statement, it just displays the original subscription page with all 12 options. Also, if you omit the subid variable, you see the original page as well.

It was actually pretty easy, and only entails about 50 lines of code. If anyone is interested, I have a copy of the "hack" with detailed instructions on how to implement it. It's not as clean as it possibly could be, but it does the trick and I haven't had any errors in my testing thus far.

Thanks for replying, and reading this far!

David
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:39 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.03499 seconds
  • Memory Usage 2,173KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete