miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Custom Profile URL in messages

Author Pari
Registered
#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
Registered
#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 */
if($GLOBALS['cols'][0]!=0){
$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;\">";
$GLOBALS['pLink2']='</a>';
}
else {
$GLOBALS['pLink1']='';
$GLOBALS['pLink2']='';
}
/* --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...

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

Author Pari
Registered
#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
Registered
#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 Top

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

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


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 ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB