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.

Sticky / Pinned text background codes

Page 1 of 2 1, 2  Next

View previous topic View next topic Go down

Sticky / Pinned text background codes

Post by APE on November 11th 2015, 10:12 pm

Hi all Hello

i have this code i got from some place and it all works fine but i make a change to the Word Sticky to pinned now the pinned don't have a color background like it did when it was as sticky

i made a change to the code but still not showing


CSS Files:

Code:
  vertical-align:middle
}
a.topictitle {
  vertical-align:bottom
    padding-top:10px;
}
.an, .g-a,.sticky{
background-color: #3689D1;
background-image: url("http://i55.servimg.com/u/f55/14/73/12/96/highli10.png");
background-position: 0 -1px;
background-repeat: repeat-x;
border-radius: 3px;
color: #FFFFFF;
display: inline-block;
font-family: Verdana,Geneva,sans-serif !important;
font-size: 9px;
font-weight: bold;
height: 16px;
line-height: 16px;
padding: 0 5px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
text-transform: uppercase;
vertical-align: middle;
  border: 1px solid #CCC !important;
}

.p-l {
background-color: #00E600;
background-image: url("http://i55.servimg.com/u/f55/14/73/12/96/highli10.png");
background-position: 0 -1px;
background-repeat: repeat-x;
border-radius: 3px;
color: #FFFFFF;
display: inline-block;
font-family: Verdana,Geneva,sans-serif !important;
font-size: 9px;
font-weight: bold;
height: 16px;
line-height: 16px;
padding: 0 5px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
text-transform: uppercase;
vertical-align: middle;
border: 1px solid #CCC !important;
}

.M-L{
background-color: #660000;
background-image: url("http://i55.servimg.com/u/f55/14/73/12/96/highli10.png");
background-position: 0 -1px;
background-repeat: repeat-x;
border-radius: 3px;
color: #FFFFFF;
display: inline-block;
font-family: Verdana,Geneva,sans-serif !important;
font-size: 9px;
font-weight: bold;
height: 16px;
line-height: 16px;
padding: 0 5px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
text-transform: uppercase;
vertical-align: middle;
  border: 1px solid #CCC !important;
}
.P-D {
background-color: #00E600;
background-image: url("http://i55.servimg.com/u/f55/14/73/12/96/highli10.png");
background-position: 0 -1px;
background-repeat: repeat-x;
border-radius: 3px;
color: #FFFFFF;
display: inline-block;
font-family: Verdana,Geneva,sans-serif !important;
font-size: 9px;
font-weight: bold;
height: 16px;
line-height: 16px;
padding: 0 5px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
text-transform: uppercase;
vertical-align: middle;
border: 1px solid #CCC !important;
}
span.corners-bottom span {
    border-radius: 10px;
-webkit-border-radius: 10px;
-o-border-radius: 10px;
-khtml-border-radius: 10px;
}

Java Code:

Code:
//Sticky box code
$(document).ready(function() {
$('dd.dterm strong:contains("Sticky")').each(function(){
$(this).addClass('sticky');
});
});
$(document).ready(function() {
$('dd.dterm strong:contains("Announcement")').each(function(){
$(this).addClass('an');
});
});
$(document).ready(function() {
$('dd.dterm strong:contains("Global announcement")').each(function(){
$(this).addClass('g-a');
});
});
$(document).ready(function() {
$('dd.dterm strong:contains("Poll")').each(function(){
$(this).addClass('p-l');
});
});
$(document).ready(function() {
$('dd.dterm strong:contains("Moved")').each(function(){
$(this).addClass('M-L');
});
});
$(document).ready(function() {
$('dd.dterm strong:contains("Pinned")').each(function(){
$(this).addClass('P-D');
});
});

//END OF CODE

P-D is the code for Pinned Wink

what am i doing wrong ?

Much thanks to anyone that can help Wink

APE





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 13th 2015, 1:08 am






APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 13th 2015, 2:08 pm

Hey @APE,

Could you send us a link of a forum that contains a pinned topic to see what's wrong? Confused Smile

Luffy






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 16th 2015, 12:38 am

its in my profile Wink





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by SLGray on November 16th 2015, 12:45 am

When I check the CSS, I only see a background image.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35667
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 16th 2015, 12:49 am

This is what i Dont get lol it works for all the rest but not for that one Sad the full code is in the top post lol





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by SLGray on November 16th 2015, 1:03 am

Did you change this part:
Code:

$(document).ready(function() {
$('dd.dterm strong:contains("Sticky")').each(function(){
$(this).addClass('sticky');
});
});


To:
Code:
$(document).ready(function() {
$('dd.dterm strong:contains("Pinned")').each(function(){
$(this).addClass('pinned');
});
});


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35667
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 16th 2015, 1:07 am

Yes
it has a code for sticky and one for pinned
i removed the sticky code but still nothing Sad





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by SLGray on November 16th 2015, 1:10 am

Change this:
Code:
.an, .g-a,.sticky{
To:
Code:
.an, .g-a,.pinned{


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35667
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 16th 2015, 1:33 am

This is the Code for Pinned
Java.....
Code:
$(document).ready(function() {
        $('dd.dterm strong:contains("Pinned")').each(function(){
        $(this).addClass('P-D');
        });
        });

CSS.......
Code:
.P-D {
background-color: #00E600;
background-image: url("http://i55.servimg.com/u/f55/14/73/12/96/highli10.png");
background-position: 0 -1px;
background-repeat: repeat-x;
border-radius: 3px;
color: #FFFFFF;
display: inline-block;
font-family: Verdana,Geneva,sans-serif !important;
font-size: 9px;
font-weight: bold;
height: 16px;
line-height: 16px;
padding: 0 5px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
text-transform: uppercase;
vertical-align: middle;
border: 1px solid #CCC !important;
}





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 16th 2015, 2:25 am

@APE the pinned is not with bold letters. Try either making it bold or try replacing the javascript with this one:
Code:
$(document).ready(function() {
        $('dd.dterm:contains("Pinned")').each(function(){
        $(this).addClass('P-D');
        });
        });
I am not sure it'll work like this but you can change it if it's wrong! Very Happy






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 16th 2015, 6:24 pm

@Luffy wrote:@APE the pinned is not with bold letters. Try either making it bold or try replacing the javascript with this one:
Code:
$(document).ready(function() {
  $('dd.dterm:contains("Pinned")').each(function(){
  $(this).addClass('P-D');
  });
  });
I am not sure it'll work like this but you can change it if it's wrong! Very Happy
it sort of worked lol it worked as putting the background on like it should do but now the Box is going right across the page


Not sure why as its the same Code as the rest i am using just colour change thats it Sad





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 12:32 am

bump





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 12:57 am

Hey @APE,

Try the default one you used to have before and try making the text Pinned with bold letters and see if it works. I think that's why it is not working.






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 1:04 am

Sad I have done and still nothing
i made it bold by CSS but still come out with no background at all.

The only time the background come up was when i removed the code and added yours but then the background become big and i could not change it Sad





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 1:06 am

Can you make it with the background as you showed above to give it a look via element?






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 1:10 am

lol Don't know how to lol still trying to work all this code stuff out my self.... just cant get my little head round it all Wink





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 1:12 am

@APE wrote:
@Luffy wrote:@APE the pinned is not with bold letters. Try either making it bold or try replacing the javascript with this one:
Code:
$(document).ready(function() {
  $('dd.dterm:contains("Pinned")').each(function(){
  $(this).addClass('P-D');
  });
  });
I am not sure it'll work like this but you can change it if it's wrong! Very Happy
it sort of worked lol it worked as putting the background on like it should do but now the Box is going right across the page


Not sure why as its the same Code as the rest i am using just colour change thats it Sad
Add this code once more to give the result a look and see what's wrong with it! Very Happy






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 1:29 am

ive added it again but i still can't work out why its messing up Sad





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 1:32 am

I cannot see it as the image. :/






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 1:36 am

sorry i was playing with the code's lol

http://www.achatworld.com/f28-site-news-updates





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 1:44 am

It makes the whole line like that because the code adds the class to the dterm element and that's the line.
May i ask what do you have when you go to
ACP(Admin Control Panel) > General > Messages and e-mails > Configuration > Messages
where it says about the Pinned and for the rest?






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 1:49 am

That are blank all but the pinned one that was sticky renamed pinned





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 1:53 am

The field you have for your pinned can you change it to:
Code:
<strong>Pinned</strong>
and retry adding your default code to see if it works?






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 1:58 am

lol nope now it puts the word <strong> in the box to lol





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 2:04 am

Ok remove that lol.
Go to:
Admin Panel > Display > Templates > topic_list_box
and search for:
Code:
{topics_list_box.row.topic.table_sticky.L_TITLE}

and replace it with:
Code:
<strong>{topics_list_box.row.topic.table_sticky.L_TITLE}</strong>

Save and publish it and lets hope it'll work! Very Happy






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 2:13 am

Nope lol still nothing Sad





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 2:19 am

Silly me. The Pinned field must be a sceditor field. Try adding in the sticky field
Code:
[b]Pinned:[/b]

and try it out. I think now it'll work..

Edit: Nah it doesn't! Hehe just give me some moments to give it one more look cause i am writing the first thing that comes to my head! Razz






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 2:27 am

Sad Nope still nothing





APE
Manager
Manager

Male Posts : 8333
Reputation : 718
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 2:29 am

Did you empty the field and for the word sticky it worked?






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Page 1 of 2 1, 2  Next

View previous topic View next topic Back to top


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