Post color for administrators and moderators - PunBB

Go down

Solved Post color for administrators and moderators - PunBB

Post by Centesimus on Sat Oct 29, 2011 1:57 am

Okay, first of all, hey. I'm trying to make a clean, professional forum and i've seen a layout that i really like and that looks pretty neat.

Here it is



THis might seem like a lot to ask, but i really need help with this, i've been trying to figure out how to do this for quite a while so i hope any of you guys know. I'd also like the admistrators to have a yellow post layout like on the picture and the members brown.


Forum version is PunBB


Last edited by Centesimus on Mon Oct 31, 2011 5:14 pm; edited 1 time in total
avatar
Centesimus
Forumember

Posts : 25
Reputation : 0
Language : Dutch,English

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by LGforum on Sat Oct 29, 2011 3:50 am

I don't see an image..?
Is this just me?
avatar
LGforum
Hyperactive

Male Posts : 2263
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Mike on Sat Oct 29, 2011 3:58 am

It'd be helpful if you posted the image hehe..

LGForum, it's not just you Smile
avatar
Mike
Hyperactive

Male Posts : 4251
Reputation : 468
Language : English, HTML, CSS
Location : Loveland, Colorado

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Centesimus on Sat Oct 29, 2011 5:01 pm

can't you guys see the picture? It works fine for me , one second i'll upload the link aswell.


Edit : here's the link, hope it works now

http://images1.wikia.nocookie.net/__cb20111026121813/runescape/images/a/ae/Onepiercingnote.png
avatar
Centesimus
Forumember

Posts : 25
Reputation : 0
Language : Dutch,English

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by FrozenX on Sat Oct 29, 2011 5:02 pm

404 not found, please upload the image, on a different website, such as..

Tinypic.com
avatar
FrozenX
Forumember

Male Posts : 69
Reputation : 8
Language : English, Dutch

http://www.lordslegends.forumotion.net

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Centesimus on Sat Oct 29, 2011 5:02 pm

@FrozenX wrote:404 not found, please upload the image, on a different website, such as..

Tinypic.com

This is so weird, i have no problem at all viewing the picture, does the link work?
avatar
Centesimus
Forumember

Posts : 25
Reputation : 0
Language : Dutch,English

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Base on Sat Oct 29, 2011 5:05 pm

For those that need it, here's the image:



I can see it just fine. Smile
avatar
Base
Forumaster

Male Posts : 10386
Reputation : 1693
Language : English and French
Location : United Kingdom, England

http://forumotionhub.net

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Centesimus on Sat Oct 29, 2011 7:35 pm

@ Base : Thanks, i also had no problems viewing it, might be browser based.

avatar
Centesimus
Forumember

Posts : 25
Reputation : 0
Language : Dutch,English

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Mike on Sat Oct 29, 2011 9:56 pm

Pretty sure this isn't possible, since you'd need to make the code to have just the admin posts show the highlighted background.
avatar
Mike
Hyperactive

Male Posts : 4251
Reputation : 468
Language : English, HTML, CSS
Location : Loveland, Colorado

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by LGforum on Sat Oct 29, 2011 10:03 pm

It is possible through a javascript put its pretty nasty and slow.

Nera knows it, so i'll let her share it because i know very little about PunBB versions class names and ID's.
avatar
LGforum
Hyperactive

Male Posts : 2263
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Nera. on Sun Oct 30, 2011 1:51 am

Hi,

Go to your viewtopic_body template and find this

Code:
{postrow.displayed.POST_SUBJECT}</a> {postrow.displayed.POST_DATE_NEW}

After it add this

Code:
<span class="novo" style="display:none;">{postrow.displayed.POSTER_RANK}</span>

Save and publish your template on the green cross.

You must have the special ranks assigned to users, without it it wont work.

Now go to Users and groups > Rank administration & edit the rank you want to add color to.

In the rank title instead only the word "Administrator" add this

Code:
<span class="admin1">Administrator</span>

Now go to your AP > Modules > JS managment and add this there

Code:
$(document).ready(function() {
$('.postmain:has(".admin1"),.post:has(".admin1"),.posthead:has(".admin1")').css('background-color', 'purple');
});

If you would like to add an other color for mods too you'd go to the mods rank title and wrap it with a span class named for example "mod2" and than in your script (the same one you added before) add an other line, like this

Code:
$('.postmain:has(".mod2"),.post:has(".mod2"),.posthead:has(".mod2")').css('background-color', 'pink');

So the script in the end would look like this:

Code:
$(document).ready(function() {
$('.postmain:has(".admin1"),.post:has(".admin1"),.posthead:has(".admin1")').css('background-color', 'purple');
$('.postmain:has(".mod2"),.post:has(".mod2"),.posthead:has(".mod2")').css('background-color', 'pink');
});

Example of it working on punBB
Spoiler:
avatar
Nera.
Energetic

Female Posts : 7078
Reputation : 2015
Language : English
Location : -

http://webartzforum.com

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Centesimus on Sun Oct 30, 2011 11:36 pm

thanks, this solved part of it, but i also need help with the boxes and the profile in the center of the right side, i found the code before but i can't seem to find it again.

I want to do the whole style like the image, not just the colors.
avatar
Centesimus
Forumember

Posts : 25
Reputation : 0
Language : Dutch,English

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by LGforum on Sun Oct 30, 2011 11:41 pm

I want to do the whole style like the image, not just the colors.

You can't just take and copy someones design completely. Take inspiration from it and create something of your own.
avatar
LGforum
Hyperactive

Male Posts : 2263
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Centesimus on Mon Oct 31, 2011 12:28 am

i know LG, but i want that border like on that forum, and the post profile in the center, that's all i'm asking ;l
avatar
Centesimus
Forumember

Posts : 25
Reputation : 0
Language : Dutch,English

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Nera. on Mon Oct 31, 2011 4:41 am

Hi,

Viewtopic_body template and find this:

Code:
{postrow.displayed.POSTER_AVATAR}

Replace it with this:

Code:
<span class="avic">{postrow.displayed.POSTER_AVATAR}</span>

Save and publish your template on the green cross.

Than add this to CSS:

Code:
.pun .user-ident .user-basic-info {
    text-align: center;
}
.pun .user-ident .username {
    position: relative !important;
    text-align: center;
}
.avic img {
  border: 3px solid black;
}

Example of it working on punBB:

avatar
Nera.
Energetic

Female Posts : 7078
Reputation : 2015
Language : English
Location : -

http://webartzforum.com

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Centesimus on Mon Oct 31, 2011 5:14 pm

thanks, Nera ! You really helped me with this, i'll mark this as solved Smile
avatar
Centesimus
Forumember

Posts : 25
Reputation : 0
Language : Dutch,English

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Sanket on Mon Oct 31, 2011 7:59 pm

Since this thread is marked solved, I will archive this thread.


Sanket Smile

avatar
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2829
Language : English
Location : Mumbai

http://webartzforum.com

Back to top Go down

Back to top


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