The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Post color for administrators and moderators - PunBB

View previous topic View next topic Go down

Solved Post color for administrators and moderators - PunBB

Post by Centesimus on October 28th 2011, 7:57 pm

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 October 31st 2011, 10:14 am; edited 1 time in total

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 October 28th 2011, 9:50 pm

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

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
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 October 28th 2011, 9:58 pm

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

LGForum, it's not just you Smile

Mike
Hyperactive

Male Posts : 4242
Reputation : 466
Language : English, HTML, CSS
Location : Bozeman, Montana

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Centesimus on October 29th 2011, 11:01 am

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

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 October 29th 2011, 11:02 am

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

Tinypic.com

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 October 29th 2011, 11:02 am

@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?

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 October 29th 2011, 11:05 am

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



I can see it just fine. Smile

Base
Forumaster

Male Posts : 10386
Reputation : 1687
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 October 29th 2011, 1:35 pm

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


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 October 29th 2011, 3: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.

Mike
Hyperactive

Male Posts : 4242
Reputation : 466
Language : English, HTML, CSS
Location : Bozeman, Montana

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by LGforum on October 29th 2011, 4: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.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
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 October 29th 2011, 7:51 pm

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:

Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Centesimus on October 30th 2011, 4: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.

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 October 30th 2011, 4: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.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
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 October 30th 2011, 5:28 pm

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

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 October 30th 2011, 9:41 pm

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:


Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

Solved Re: Post color for administrators and moderators - PunBB

Post by Centesimus on October 31st 2011, 10:14 am

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

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 October 31st 2011, 12:59 pm

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


Sanket Smile


Sanket
ForumGuru

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

http://webartzforum.com

Back to top Go down

View previous topic View next topic Back to top


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