Would you like to react to this message? Create an account in a few clicks or log in to continue.

Admin posts different color

3 posters

Go down

Admin posts different color Empty Admin posts different color

Post  zebadee_19 Mon Apr 09, 2012 12:37 pm

Hi Smile
So far I have got.

Go to Admin Panel > Users & Groups > Ranks > Rank
Administration > Modify

Code:
<span class="specialpost"><font color="red">Senile!!!</font> (+ other things I forget)</span>

Go to Admin Panel > Modules > JavaScript Codes Management > Create new > Titlle "Color" >
Select in the topics only.

Code:
$(function() {
$('div.post:has(".specialpost")').css('background-color','#610E0E');
});

The above gives a solid color.
I would like graduated.
Tried image instead of color.
( https://i.servimg.com/u/f49/14/49/28/83/gradie10.jpg )
Nothing.
Not sure what color I really want.
As long as it matches current forum layout.
Just want the gradual fading effect.
zebadee_19
zebadee_19

Posts : 4
Join date : 2012-02-12

http://knowledgetree.forumotion.com

Back to top Go down

Admin posts different color Empty Re: Admin posts different color

Post  David B Mon Apr 09, 2012 7:15 pm

Yeah, I have been experimenting with doing something very similar to what you are doing here, although I never did master it. The difference is that when I tried doing it, I was using CSS, whereas you seem to be using JavaScript. Somewhere along the way I came across a tutorial that was posted somewhere. I will have to find it and post the link to it here.

Also, what is this?:

zebadee_19 wrote:
Code:
<span class="specialpost"><font color="red">Senile!!!</font> (+ other things I forget)</span>

I remember seeing it in your forum profile on the forum that you own, but what does it have to do with background colors?
Edit: Make that not your account, but the founder's account (which I know you own too, but don't go by your username on). Actually, the founder's posts have a different background color set, so you obviously got it to work.

Admin posts different color Admin10 Admin posts different color Zebade10 Admin posts different color David_13

__________________________________


Thread moved from, "Java → Help" forum to, "Web Development → JavaScript → Help" forum.


Last edited by David B on Mon Apr 09, 2012 8:19 pm; edited 1 time in total (Reason for editing : Added comment included in the, "Edit:" tag and added post profile screenshots.)
David B
David B
Administrator
Administrator

Posts : 618
Join date : 2011-07-20
Location : The Twilight Zone!

https://programmingforums.forumotion.com/

Back to top Go down

Admin posts different color Empty Re: Admin posts different color

Post  LGforum Mon Apr 09, 2012 11:42 pm

Try changin this line:
css('background-color','#610E0E')

to this:
css('background-image','url(YOUR IMAGE URL HERE)')
LGforum
LGforum
Technical Support
Technical Support

Posts : 12
Join date : 2011-10-07

Back to top Go down

Admin posts different color Empty Re: Admin posts different color

Post  David B Tue Apr 10, 2012 11:14 am

LGforum wrote:Try changin this line:
Code:
css('background-color','#610E0E')

to this:
Code:
css('background-image','url(YOUR IMAGE URL HERE)')
I am going to test this out, and will let you know how it goes. If I understand this correctly, this is only supposed to work for members that are in that group, correct? (And I think I understand the first code. It is the HTML code that you put in the rank, right?)
David B
David B
Administrator
Administrator

Posts : 618
Join date : 2011-07-20
Location : The Twilight Zone!

https://programmingforums.forumotion.com/

Back to top Go down

Admin posts different color Empty Re: Admin posts different color

Post  zebadee_19 Sun Apr 15, 2012 7:45 am

Hi Smile
Much of what is in the "Rank title" is to get mixed color.
Also use an image for rank title.
So best of both worlds.

Yes I have it working.

Rank title :
Code:
<span class="st-rang"><font color="red">Senile!!!</font> (+ other things I forget)</span>

Javascript :
Code:
$(function(){$('.st-rang').closest('.post').addClass('st-answer')});

CSS :
Code:
.post.st-answer {
  background: url(http://i49.servimg.com/u/f49/14/49/28/83/gradie21.jpg)}
ul.topiclist dfn {
display: initial!important;
}
zebadee_19
zebadee_19

Posts : 4
Join date : 2012-02-12

http://knowledgetree.forumotion.com

Back to top Go down

Admin posts different color Empty Re: Admin posts different color

Post  David B Sun Apr 15, 2012 2:46 pm

I still fail to understand how the HTML code that you used in your custom rank affects the CSS and JavaScript. Could you please explain it to me?
David B
David B
Administrator
Administrator

Posts : 618
Join date : 2011-07-20
Location : The Twilight Zone!

https://programmingforums.forumotion.com/

Back to top Go down

Admin posts different color Empty Re: Admin posts different color

Post  zebadee_19 Mon Apr 16, 2012 4:51 pm

Hi Smile
The Rank post stuff really applies to the use of split color & added info.
So rank + Senile (in red) +other things I forget (in normal text).
The st-rang links rank to javascript.
It is a hotchpotch of different things I was trying.
Somehow it works.
zebadee_19
zebadee_19

Posts : 4
Join date : 2012-02-12

http://knowledgetree.forumotion.com

Back to top Go down

Admin posts different color Empty Re: Admin posts different color

Post  David B Mon Apr 16, 2012 5:34 pm

zebadee_19 wrote:Somehow it works.
But you are not sure how?

I love this!

Post Liked!
David B
David B
Administrator
Administrator

Posts : 618
Join date : 2011-07-20
Location : The Twilight Zone!

https://programmingforums.forumotion.com/

Back to top Go down

Admin posts different color Empty Re: Admin posts different color

Post  LGforum Mon Apr 16, 2012 8:02 pm

It works by including an element within the rank. (Aka a staff rank).
If a post contains that element Aka the staff rank Aka the post is a staff post... then the background is changed.
LGforum
LGforum
Technical Support
Technical Support

Posts : 12
Join date : 2011-10-07

Back to top Go down

Admin posts different color Empty Re: Admin posts different color

Post  David B Mon Apr 16, 2012 8:28 pm

LGforum wrote:It works by including an element within the rank. (Aka a staff rank).
If a post contains that element Aka the staff rank Aka the post is a staff post... then the background is changed.
I just did a comparison of what you said against the code. It appears to make sense.
David B
David B
Administrator
Administrator

Posts : 618
Join date : 2011-07-20
Location : The Twilight Zone!

https://programmingforums.forumotion.com/

Back to top Go down

Admin posts different color Empty Re: Admin posts different color

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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