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 /   

Disable hyperlink on "Administrator" or "Moderator" or "Forum Member" titles, and add it to Username

Author JeremyM
#1 | Posted: 8 Jan 2009 11:20 
I want to make it so the "Administrator" or "Moderator" or "Forum Member" titles are there, but in text and not links. I want to be able to have it so I click on a user's name and instead of that pasting into the reply box, it goes to that user's profile.

I've searched and tried my own testing. I just can't find where the $viewReg variable is set (which file?). Once I have that, I can do the rest on my own.

So, which file is it?


Author Paul
Lead Developer
#2 | Posted: 9 Jan 2009 03:30 
Here is how to find where to edit this and that.

But anyway, if you edit a core file, it's bad for further updates, because you will need to roll back your own modifications each time.

What you would like to achieve, could be done also with non-destructive methods. For example, we may use parseMessage() function of bb_plugins.php file. Such function may be used by other add-ons, in that case you need to paste the block of code provided below, before the return; statement. If function is not available, just paste the code as shown below. Do not duplicate that function, else it will stop the forums.

function parseMessage(){

/* Member link on the nickname */

if ($GLOBALS['cols'][0]!=0) {
$GLOBALS['viewRegURL1']="<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=userinfo&amp;user={$GLOBALS['cc']}\">";


/* --Member link on the nickname */


Then modify templates/main_posts_cell.html and replace default code which looks like this:

<span class="username"><a href="JavaScript:paste_strinL('{$posterNameJs}',2)">{$posterName}</a><br /></span><span class="txtSm">{$viewReg}</span>

to this:

<span class="username">{$viewRegURL1}{$posterName}{$viewRegURL2}<br /></span><span class="txtSm">{$viewRegClear}</span>

That 100% works as I already have tested it. Enjoy!

Author kuopassa
#3 | Posted: 14 Mar 2009 08:39 | Edited by: kuopassa 
This code works for those regular posts, but it would be great if also private message addon's single messages would have link to sender's profile page. (Name of the user who sent PM would be link to his/hers profile page.) I believe that this would be possible to create, so how much money would it take to do that?

Author Paul
Lead Developer
#4 | Posted: 16 Mar 2009 03:37 | Edited by: Paul 
For Private Messages add-on, you could achieve that modifying templates/addon_pmail_viewmsg.html and putting the following code:

<a href="{$indexphp}action=userinfo&amp;user={$cc}"{$nof} target="_blank">{$userfromnick}</a>

I suppose in that case you would need to remove the code containing {$viewReg} and {$userfromnick} in the same template for not duplicating them.

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Disable hyperlink on "Administrator" or "Moderator" or "Forum Member" titles, and add it to Username
 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
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.