Hide links in code from guest?
4 posters
Page 1 of 1
Hide links in code from guest?
My englesh is not so good I understand and know how to read English, but I do not know grammar and writing very well So,my problem its... How to hide links in code tags,For example url links from guests? I put it in the control panel links can only be seen by members and visitors again see the this links? I use a version of phpbb2! If you need somewhere to put the script please clarify it easier because I'm new at this
And how do I remove the text from sticky and Global announcement???
My forum adress: http://bedazzledupload.serbianforum.info/
And how do I remove the text from sticky and Global announcement???
My forum adress: http://bedazzledupload.serbianforum.info/
Last edited by bedazzled on August 6th 2014, 3:28 pm; edited 1 time in total
Re: Hide links in code from guest?
You will need to use the hide tags.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Hide links in code from guest?
I've tried hiding it but then they do not see for registered members? How should I put the url link? Maybe I'm mistaken here?
or?
- Code:
[hide]Url link[/hide]
or?
Re: Hide links in code from guest?
- Code:
<!-- BEGIN switch_user_logged_in -->
Put in code that you wish to hide from guests here. This tag actually means that it's only visible to logged-in users.
<!-- END switch_user_logged_in -->
Put this code in your template and it should work like a charm.
Re: Hide links in code from guest?
I want to not see any link to the forum! Since I do not know where exactly to copy this code... Whether you can tell me where exactly do I copy this? I'm sorry but I have no idea where to go, I just started to learn this...
Re: Hide links in code from guest?
You're actually wanting to hide links that are posted by your users in posts right?
Re: Hide links in code from guest?
So you want only the links you posted to be hidden?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Hide links in code from guest?
Hmm... If so, then you can try this.
Every time you post a certain link, add a class to it, like this.
Then add this to your javascript. Unselect all the placements, as we will be grabbing the link of the js manually.
Then add this to your overall_header template.
This would make the javascript file be loaded and ran if the user isn't logged in.
It should now hide your link every time but you'll have to remember adding that particular class to it.
This also has another advantage. If you decide that you can publish the link for guests, then just don't add in the class.
Every time you post a certain link, add a class to it, like this.
- Code:
<a href="url" class="your_class">Link</a>
Then add this to your javascript. Unselect all the placements, as we will be grabbing the link of the js manually.
- Code:
$(document).ready(function(){
$('.your_class').parent().append('You must be logged in to view this link.').end().remove();
});
Then add this to your overall_header template.
- Code:
<!-- BEGIN switch_user_logged_out -->
<script type="text/javascript" src="JS_LINK_HERE" />
<!-- END switch_user_logged_out -->
This would make the javascript file be loaded and ran if the user isn't logged in.
It should now hide your link every time but you'll have to remember adding that particular class to it.
This also has another advantage. If you decide that you can publish the link for guests, then just don't add in the class.
Re: Hide links in code from guest?
try my code
- Code:
jQuery(function(a){
msg = 'Your guest message ! \b You have a not logged account !';
if(_userdata.session_logged_in == '0')
return a('.codebox dd code').html(msg);
});
Re: Hide links in code from guest?
Tell me exactly where to put this? Because I do not understand where that to copy?
Re: Hide links in code from guest?
Administration Panel > Modules > HTML/JavaScript > JavaScript Management
Make sure that it is activated.
Make sure that it is activated.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» hide code for guest
» is this legal to use this css code to hide some links
» How to hide member list from the guest?
» Hide Code? or Post to See Content Code?
» Border hide account Guest And member
» is this legal to use this css code to hide some links
» How to hide member list from the guest?
» Hide Code? or Post to See Content Code?
» Border hide account Guest And member
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum