How can I hide forum categories from guests like this?
5 posters
Page 1 of 1
How can I hide forum categories from guests like this?
Hi dear all,
How can I hide some forum categories from guests like this http://prntscr.com/3je8uq ?
Best Regards,
Dark-Avenger
How can I hide some forum categories from guests like this http://prntscr.com/3je8uq ?
Best Regards,
Dark-Avenger
Last edited by Dark-Avenger on May 17th 2014, 12:54 am; edited 1 time in total
Re: How can I hide forum categories from guests like this?
Thats a good question, id ask the same but i lost the link from this forum lets wait
Re: How can I hide forum categories from guests like this?
Hi
Check JScript's profile, he distributed his code for that
Regards,
Pizza Boi
Check JScript's profile, he distributed his code for that
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: How can I hide forum categories from guests like this?
Hi all,
Ok I found the codes for PunBB
Javascript: [In the homepage]
CSS:
How can I add multiple categories?
Ok I found the codes for PunBB
Javascript: [In the homepage]
- Code:
$(function() {
if (document.getElementById('logout') == null) {
var sCategory = 'POSITION OF THE CATEGORY';
$('.main-content:eq(' + sCategory + ')').addClass('hanckiprotected');
}
});
CSS:
- Code:
.hanckiprotected:after {
background: none repeat scroll 0px 0px rgba(255, 255, 255, 0.7);
bottom: 0px;
content: "Forum Protected";
font-size: 30px;
left: 0px;
line-height: 310px;
position: absolute;
right: 0px;
text-align: center;
top: 0px;
z-index: 10;
}
.hanckiprotected {
position: relative;
}
How can I add multiple categories?
Re: How can I hide forum categories from guests like this?
Just copy the same js but change the category id.
<i>what did u put in 'position of category??</i>
<i>what did u put in 'position of category??</i>
Re: How can I hide forum categories from guests like this?
I think if i copy-paste the js code it should be reaches the request limit due firing the server port but I am not sure for that. I think the better solution is to declare the sCategory variable as an array. In the number just put the number of forum category by start count them from the beginning the categories.
Re: How can I hide forum categories from guests like this?
I want to hide my second category. I tried these codes but didnt work. I put "/c2" ...
Re: How can I hide forum categories from guests like this?
yeah..
if u type myplanet.forumgreek.com/c2-category
u see its the correct link but the codes from SocialAcademy arent working for me :S
if u type myplanet.forumgreek.com/c2-category
u see its the correct link but the codes from SocialAcademy arent working for me :S
Re: How can I hide forum categories from guests like this?
So modify the js like this:
- Code:
$(function() {
if (document.getElementById('logout') == null) {
var sCategory = '2';
$('.main-content:eq(' + sCategory + ')').addClass('hanckiprotected');
}
});
Re: How can I hide forum categories from guests like this?
Good
now its working but its getting 'hidden' when im logged in aswell :S
now its working but its getting 'hidden' when im logged in aswell :S
Re: How can I hide forum categories from guests like this?
Are you sure? Probably another js conflict it. I try it on my forum and its working. Try to clear the cookies on your browser.
Re: How can I hide forum categories from guests like this?
To me also works fine. Probably its an other js making the error to you Jok3R^
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: How can I hide forum categories from guests like this?
Try to check your js console for errors or warnings in js.
Ok I found how to protect more than one forum categories.
Problem solved.
Ok I found how to protect more than one forum categories.
Problem solved.
Re: How can I hide forum categories from guests like this?
Topic Solved & Archived
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 links from guests
» Categories hide/show
» How can I hide an Admin Link from Guests and Members?
» help me to hide topics with guests
» Hide user posts from guests
» Categories hide/show
» How can I hide an Admin Link from Guests and Members?
» help me to hide topics with guests
» Hide user posts from guests
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum