Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 04-13-2009, 07:02 PM
JonZ JonZ is offline
 
Join Date: Apr 2009
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that ?styleid query is captured somewhere in the requested files, I have no idea which one is treating the '?styleid' since there's so many things happening in global.php. It would be logical to think it somewhere in global.php since it requested in all files, but by my experiments, it may not be in this file. If I can identify where the query is treated I could extract the formula where the theme change and refresh in the browser.



Meanwhile, I found an exchange solution for my redirect URL problem. In my form I replaced the "s" value:
HTML Code:
<input type="hidden" name="s" value="index.php" />
This way I have control of the user redirection.

in myprofile.php, I replaced the exec_header_redirect(); with this:
PHP Code:
exec_header_redirect($_POST['s']); 
This way, myprofile.php is recyclable in any forms I put with the "s" id.


I'm going to re-edit my original code on post #1 on this effect.
Reply With Quote
  #22  
Old 04-13-2009, 07:13 PM
Mark.B Mark.B is offline
Senior Member
 
Join Date: Feb 2004
Posts: 1,354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AH yes...I did the redirect by changing the redirect line to this:
Code:
exec_header_redirect($_SERVER['HTTP_REFERER']);
That sends you back to the page you were already on, thus replicating almost exactly the behaviour of the default style chooser.

If anybody knows how to pull the URL out of this please let me know.
Reply With Quote
  #23  
Old 04-13-2009, 07:22 PM
JonZ JonZ is offline
 
Join Date: Apr 2009
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mark.B View Post
AH yes...I did the redirect by changing the redirect line to this:
Code:
exec_header_redirect($_SERVER['HTTP_REFERER']);
That sends you back to the page you were already on, thus replicating almost exactly the behaviour of the default style chooser.

If anybody knows how to pull the URL out of this please let me know.
You can just echo it echo($_SERVER['HTTP_REFERER']);


Anyway I tried that already by the suggestion of Dismounted. Unfortunately, my server block this HTTP_REFERER requests and it not reliable on some browsers (IE from what I've read). Hence the workaround I've found on post #21.
Reply With Quote
  #24  
Old 04-14-2009, 04:01 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JonZ View Post
Unfortunately, my server block this HTTP_REFERER requests and it not reliable on some browsers (IE from what I've read).
Why does your server do this - there is no need to. It is not "reliable" in IE when users decide to ramp up the "security" level in IE options, which also breaks many other things (not only in vBulletin), so you may as well use it. By the way, vBulletin already defines an easy variable to fetch the referrer, $vbulletin->url.
Quote:
Originally Posted by JonZ View Post
Hence the workaround I've found on post #21.
Whatever you do, don't use s. It is used by vBulletin to determine a user's session hash (if cookies are disabled).
Reply With Quote
  #25  
Old 04-14-2009, 04:15 AM
JonZ JonZ is offline
 
Join Date: Apr 2009
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
Why does your server do this.
Firewalls blocks it.
Reply With Quote
  #26  
Old 10-31-2010, 02:03 AM
Mark.B Mark.B is offline
Senior Member
 
Join Date: Feb 2004
Posts: 1,354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

An old thread...but...does anyone know what changes would have to be made to myprofile.php to get this to work in vB4? Got the template side done but the form just reloads index.php.
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:50 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03992 seconds
  • Memory Usage 2,222KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete