The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Quote:
How about a link on how to do it in PHP? |
#12
|
||||
|
||||
I'll take it you didn't bother to search for it yourself and expect it handed on a silver platter? (You would have found the answer very quickly.)
http://www.php.net/manual/en/reserve...les.server.php |
#13
|
|||
|
|||
Sorry but don't you think to be more explicit when you talk in terminology or just leave some random links? I'm not asking to write the code for me here. Otherwise I just keep bumping this thread asking what you mean, I don't think it is productive for neither of us.
I did not understand first what the HTTP referrer was about in your wiki, it only explain what the terminology mean, keeping me more confused on what you were refering to until i saw your HTTP_referer array which is where I started to understand and do more research on this. Let me develop on this, and I'll post back my findings. *EDIT* The server I am working on doesn't allow HTTP_referer. Is there another way of getting it? in the meanwhile, I look for the DB formula to change the style for the non-members who are switching themes in my IF condition. Any ideas how? (is it something like this? $vbulletin->userinfo['styleid']) |
#14
|
|||
|
|||
I've been having a play around with this to see if I can make it do what you want, but at the moment my stumbling block is that I cannot get your original code to actually change the style...until that works, there isn't much point me tweaking the rest to make it do as you describe.
It seems to call the file ok as it redirects to ../index.php afterwards, but it's not actually changing the style. |
#15
|
|||
|
|||
Quote:
I have this behavior too when I'm not logged to the forum, were you logged on when you tried it? I haven't found the formula for guests to update the style yet. |
#16
|
|||
|
|||
Yes, I was logged on. It just didn't change anything. Not sure what's wrong though.
|
#17
|
|||
|
|||
Hmm, that's mean that the condition of the if is not TRUE and exit it, or the condition inside just don't work. One way to know it is to comment out the exec_header_redirect(); and write echo ('this condition is true'); under $userdata->save(); If the blank page is white, the first if ($show['member'])) is not TRUE.
If it echoing, try the other if above, move the echo under $userdata->set('styleid', $vbulletin->GPC['newstyleset']);. If it still not echoing then try it on else{}. Also, which version of vB please you have? |
#18
|
|||
|
|||
I got it...I had got it sat next to the orginal method but that sits a form inside another form...think I have it working now. Just going to play about with conditionals....
|
#19
|
|||
|
|||
Are you sure myprofile.php is on the same location of your html portion? It not supposed to load anywhere else than myprofile.php.
Oh and make sure your html portion reside inside of a .php file (ie index.php), otherwise your browser would not interpret the php commands. replace the securitytoken value by this: <?=$vbulletin->userinfo['securitytoken']?> ( my original token value was specified elsewhere). if you commented out or removed the exec_header_redirect(); (there's both 2 of them) the webpage would stop loading and leave a blank page. EDIT: oh, I got your edit message. Glad you got it working. |
#20
|
|||
|
|||
Yes, working now. However the bit I'm struggling with is the same bit you were struggling with, but for different reasons.
I'm having trouble making the conditional work due to having to mess about with the location of the <form> tags...I shall keep playing with this and come back to it at some point. --------------- Added [DATE]1239651438[/DATE] at [TIME]1239651438[/TIME] --------------- What would also be useful is if there is a URL equivalent to that form...eg: myprofile.php?do=updateoptions&newstyleset=xxx That would allow clickable links to styles (which currently just set a cookie like the normal stylechooser) to alter the user's settings too. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|