miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

How can I mark a special link exclusively for members

 
Author Jaime
Partaker
#1 | Posted: 9 Jun 2012 10:16 
The code here make links in posts global only for members.

Is there a way, as an admin or mod, mark a special link in an article exclusively for members ?.
This special link will then be visible only to members.

Author Paul
Lead Developer 
#2 | Posted: 9 Jun 2012 12:18 
Jaime:
Is there a way, as an admin or mod, mark a special link in an article exclusively for members ?.
This special link will then be visible only to members.
There is such way, but the implementation of it is not that quick. First of all, we need to introduce a special [url] tag which would contain at least a special ID or something like this (that way we could recognize the "special" links from "regular" links). Then the function you have mentioned, would be extended to replace such links only.

Author Jaime
Partaker
#3 | Posted: 8 Dec 2012 10:27 
I've now solved for me like this: I define in the setup options: $adminHTML=TRUE; Now I can use HTML in posts.

Will i now make a special link only to members, i create the link code into a span tag :)

if($GLOBALS['user_id']==0) {
$GLOBALS['posterText']=preg_replace("#<span class=\"hidelinkforguests\"><a href=\"(.+?)>(.*?)</a></span>#is", '[Available to Members only]', $GLOBALS['posterText']);
}
[Available to Members only] can be omitted, then a guest sees nothing from the link.

Author Paul
Lead Developer 
#4 | Posted: 8 Dec 2012 16:23 
I think it's a bit wrong solution. The script will save the code straight, so this rule works only at the stage of posting the message.
As far as I understood from your post, you want to display some certain link to members, and do not display it to guests (or by some other rule).
This is possible only if in the database you already have stored this link.
But parseMessage function, when displaying a message, and regarding who's logge in, could apply a certain formatting operation to this text.

Author Jaime
Partaker
#5 | Posted: 9 Dec 2012 08:31 
Thank you Paul, for this helpful information. And, I do not really need.

Specific miniBB Support Forums / Specific /
 How can I mark a special link exclusively for members
 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 forum rules; otherwise it could be locked or removed 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
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑