Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Solved] [How to] Members only Note



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  decru

decru
Punbb Rookie
Punbb Rookie
[Solved] [How to] Members only Note Untitl18

How to do the members only text mates.? thanks in advance.

Powered by PunBB
Currently 0 users have thanked decru for this post:

2
Offline

  Guest

Anonymous
Guest
I found tutorial by Hancki

Hancki wrote:To PunBB
JS:
$(function() {
if (document.getElementById('logout') == null) {
var sCategory = 'POSITION OF THE CATEGORY';
$('.main-content:eq(' + sCategory + ')').addClass('hanckiprotected');
}
});
In red, that's the number of your category. Imagine that the category that you want to protect is the third in your board, so you put the number 3.

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;
}

Cheers

Powered by PunBB
Currently 0 users have thanked Guest for this post:

3
Offline

  decru

decru
Punbb Rookie
Punbb Rookie
Rapid wrote:I found tutorial by Hancki

Hancki wrote:To PunBB
JS:
$(function() {
  if (document.getElementById('logout') == null) {
      var sCategory = 'POSITION OF THE CATEGORY';
      $('.main-content:eq(' + sCategory + ')').addClass('hanckiprotected');
  }
});
In red, that's the number of your category. Imagine that the category that you want to protect is the third in your board, so you put the number 3.

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;
}

Cheers




Thanks for the response but it does nothing. is there something be set up on the categories and forums settings? or should it be remain  this set up  

[Solved] [How to] Members only Note Untitl20

Powered by PunBB
Currently 0 users have thanked decru for this post:

4
Offline

  Guest

Anonymous
Guest
Ofcourse no, you just need to change the red text with number of category which you want to hide.

Powered by PunBB
Currently 0 users have thanked Guest for this post:

5
Offline

  decru

decru
Punbb Rookie
Punbb Rookie
this is what happend [Solved] [How to] Members only Note Untitl21

and It shows even when I Logged in. it's supposed to be just for guest.


Powered by PunBB
Currently 0 users have thanked decru for this post:

6
Offline

  Guest

Anonymous
Guest
I've just tested on demo forum and it works, then it must be some kind of template errors in your forum.

Powered by PunBB
Currently 0 users have thanked Guest for this post:

7
Offline

  decru

decru
Punbb Rookie
Punbb Rookie
Rapid wrote:I've just tested on demo forum and it works, then it must be some kind of template errors in your forum.

its okay now man. please mark this solved.

Powered by PunBB
Currently 0 users have thanked decru for this post:

8
Offline

  nanako

nanako
Punbb Guru
Punbb Guru
Solved and Locked.

Powered by PunBB
Currently 0 users have thanked nanako for this post:

9
Offline

  Sponsored content



Powered by PunBB
Currently 0 users have thanked Sponsored content for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

Permissions in this forum:
You cannot reply to topics in this forum