miniBB Support Forums | 16 years on The Web
miniBB ®


 | Begin | Register | Reply | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Custom Profile URL in messages

Author Pari
#1 | Posted: 12 Mar 2010 18:27 
I have your forum on my website and first let me tell you it is AWESOME!! So easy to modify and blend into my main site. I have it integrated with my site's user database perfectly. My question is this, is it possibly to change the Profile URLs to point to my main site's profile page?

I have the profile page on the minibb disable, because I don't want any users edting their profiles through the forum. So I'd like to set it up where whenever someone clicks on the Forum member's link it takes them the their profile page on my main site.

Any assistance is greatly appreicated.

Author kuopassa
#2 | Posted: 13 Mar 2010 05:15 
Maybe you could put in forum's .htaccess file something like this:

RewriteRule ^main/site/user-([0-9]+)\.html$ ./index.php?action=userinfo&user=$1

Author Paul
Lead Developer
#3 | Posted: 13 Mar 2010 10:03 | Edited by: Paul 
Thanks for your kind words. We are glad you like it! :-)

It depends on how your users are synchronized with miniBB database, i.e. how to follow them in the code. I hope it is done by user_id field, right?

Then, you may use parseMessage() function of bb_plugins.php to generate a custom URL instead of the present {$pLink1} and {$pLink2} tags available by default in templates/main_posts_cell.html template. For example:

function parseMessage(){

/* Custom profile links */
$GLOBALS['pLink1']="<a href=\"http://here_come_your_URL_where_you_may_use/?user_id_which_is={$GLOBALS['cc']}\" title=\"{$GLOBALS['l_about']} &quot;{$GLOBALS['posterName']}&quot;\">";
else {
/* --Custom profile links */


The code in bold works like a condition for guests. I.e. if you have forums for registered users only, you may minimize the code and make it a *bit* smaller ;-)

Let me know if it will work for you...

I think we need a clockwise solution, because miniBB profiles are disabled, as the author states ;-)

Author Pari
#4 | Posted: 15 Mar 2010 13:25 
Thank you for your response Kuopassa, and trying to help me :) Paul you were right on the money, your little coding worked perfectly. Thank you so, so much :) The user/profile urls are now redirected to the profile pages on my main site. THANK YOU!!!!!

Author Pari
#5 | Posted: 16 Mar 2010 11:24 
Works perfectly thank you so very much!!

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Custom Profile URL in messages
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.


miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.