The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Right now the links to the profile settings are like this:
Code:
http://example.com/profile.php?do=editprofile Code:
$cmd = $_GET['cmd']; switch($cmd) { case "extrasettings": @include('profile_extra.php'); break; } Code:
http://example.com/profile.php?cmd=extrasettings My question is, how do I make the link show up as the other Profile Setting Links? How can I make the link show up like this: "?do=extrasettings" instead of "?cmd=extrasettings" . I would like to change the "cmd" to "do" like the other profile links. Example: Code:
http://example.com/profile.php?do=extrasettings |
#2
|
|||
|
|||
![]()
Use the profile_start hook and then just do something like:
PHP Code:
|
#3
|
||||
|
||||
![]() Quote:
Thank you for helping me. But where would I add that code? Should I make a new plugin? Or should I just add the code to Profile.php? |
#4
|
||||
|
||||
![]()
As Dave said, you would use a plugin and use the profile_start hook for the plugin.
|
#5
|
||||
|
||||
![]() Quote:
Plugin Code: Code:
if($_REQUEST['do'] == "extrasettings") { @include('profile_extra.php'); } EDIT: Im sorry, when I use the hook "profile_start", I get a "500 - Internal Server Error", when I use the hook "profile_editoptions_start", I get the blank/white page. I can access the custom setting's page fine with "mysite.com/profile.php?cmd=extrasettings". I just cant get it to work like this: "mysite.com/profile.php?do=extrasettings" |
#6
|
|||
|
|||
![]()
We need to see the "extrasettings" code in order to assist. If you are using a proper editor and have not created a BOM, then the problem rests in your included code, not the hook location. The hook as you probably already know selects the point of entry where your code will be eval'ed.
![]() If for some (security reason -- only) you cannot post your code to receive global assistance you can use a private message. What @Dave suggested is the correct method and there is nothing wrong with the hook locations. ![]() |
#7
|
||||
|
||||
![]() Quote:
There is one more problem though, after I edit my profile setting and go to "Save", it saves the changes, but it redirects to "profile.php?do=editoptions" and not back to the previous page "profile.php?do=extrasettings" Should I copy and paste my entire profile.php code? Edit: I fixed it. I found out that the function "updateoptions" was being used twice, so the code I added, was using the first "updateoptions" function and redirecting the extra settings page to the EditOptions page on Submit. I simply just had to use a different function, such as "do=updatesettings", and of course add the redirect code " exec_header_redirect('profile.php?do=extrasettings '); " . All seems to be working correctly now. Thank you all for helping me out, I really do appreciate it. |
Благодарность от: | ||
Lynne |
#8
|
|||
|
|||
![]()
Just paste your addon code and let us know where you pasted it the profile.php.
Either method is fine: ------------------------ 1. Provide us with a unique search string where you placed your code. 2. If profile.php was previously unmodified, then provide us with the vbulletin version you are using and a line number where you placed the code. If it is off a few lines, don't worry, we will figure it out. ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|