The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Currently, after updating profile, its redirect to usercp.php right? i want to make it redirect to another page, for example to forum home, some other members should need this too
i tried create a simple plugin, using profile_start hook the page are redirected, but the profile are not saved Quote:
i already tried change the Execution Order to 99999999, but still same please help make it still redirected, but can saved the profile, what i need to change or use? |
#2
|
||||
|
||||
![]()
Are you sure you want that hook? maybe profile_updateprofile
![]() |
#3
|
||||
|
||||
![]() Quote:
- i already tried the hook profile_updateprofile and the code just like this : Quote:
- i already tried profile_complete hook too, but its not redirected and the profile not saved - the other alternative maybe using if referrer page condition, like this Quote:
please help guys to make this works, its should be easy enough, how is the code need to used actually |
#4
|
||||
|
||||
![]()
up, please help guys if you have the information
current vbulletin url code are $vbulletin->url but what is the code for vbulletin url referrer? is this right : $vbulletin->urlreferrer |
#5
|
||||
|
||||
![]() Quote:
Referrer : $referer so i tried this in bold Quote:
Quote:
the profile are saved, but after the not redirected to http://domain.com/forum/index.php please help guys if you know to make in the bold works why this if condition works if ($vbulletin->url == 'http://domain.com/forum/profile.php?do=editprofile') { } but this one not if ($vbulletin->referer == 'http://domain.com/forum/profile.php?do=editprofile') { } |
#6
|
||||
|
||||
![]() Quote:
anyone if you have suggestion please post it its looks like easy, but i am still cant get the working code or hook the question is basic enough in the first post |
#7
|
|||
|
|||
![]()
If you look in profile.php for all the places where $vbulletin->url is set to user.php, you'll see a number of them. If you wanted to change it in that file you'd either need to edit the file and change them all, or else have a number of plugins that set $vbulletin->url and then did everything else the code does before exiting.
But another approach that might work is to use the hooks redirect_generic and header_redirect to try to catch it just before the redirect happens. (Those hooks are both in includes/functions.php so it might help to look in there to see what's going on). For the redirect_generic plugin you'd need to do some sort of replace on the variables $js_url, $url, and $formfile to replace usercp.php with something else (and if you need parameters in the url, it will be more complicated). For instance you might be able to do something like this: Code:
if (THIS_SCRIPT == 'private') { $find = "usercp.php"; $replace = "index.php"; $url = str_replace($find, $replace, $url); $js_url = str_replace($find, $replace, $js_url); $formfile = str_replace($find, $replace, $formfile); } and in the header_redirect plugin, something like this: Code:
if (THIS_SCRIPT == 'private') { $find = "usercp.php"; $replace = "index.php"; $url = str_replace($find, $replace, $url); } Warning: I haven't tried this code at all. |
#8
|
||||
|
||||
![]()
Many many thanks, the plugin code is works
so basically its using replacement methode, in redirect hook, so this things is exist, awesome i am really helped, thank you very much for vb staff, i recommend increase kh99 salary, or promote him ![]() |
#9
|
|||
|
|||
![]()
There's one thing I forgot - you really should check for THIS_SCRIPT == 'private' so that the str_replace is only done for private.php (unless there *are* other pgaes where you want it done). I've added it to my above post above.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|