![]() |
User profile settings - How to add a link to Profile.php
Right now the links to the profile settings are like this:
Code:
Code:
Code:
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:
|
Use the profile_start hook and then just do something like:
PHP Code:
|
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? |
As Dave said, you would use a plugin and use the profile_start hook for the plugin.
|
Quote:
Plugin Code: Code:
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" |
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. :) |
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. |
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. :) |
All times are GMT. The time now is 01:19 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|