News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

colour changing

Started by syphergaming, July 14, 2010, 05:32:59 AM

Previous topic - Next topic

syphergaming

I am trying to change the colour where it say shows unread posts since last visit.
i know it in css but when i change it.
it also changes the Started by Simple Machines the topic name and who started >:( it and i dont want that changed
any one know how i could change it  ???

thanks ;)

CapadY

Make a new identifier for it in the css-file and edit the template with the new identifier
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

ɔɔɔɔɔɔuɥoɾ

Quote from: syphergaming on July 14, 2010, 05:32:59 AM
I am trying to change the colour where it say shows unread posts since last visit.
i know it in css but when i change it.
it also changes the Started by Simple Machines the topic name and who started >:( it and i dont want that changed
any one know how i could change it  ???

thanks ;)

If you only want to change the color for that specific sentence, you would have to ad a new class to index/style.css file and change in (index.template.php) which class is used.


<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

The above code is where that is in index.template.php, play around with it :)


Thats exactly what capady said, but more easily explained lol


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

syphergaming


syphergaming

i tryed doing what u said but this keep over riding it
a:link, a:visited
{
color: #a2a2a2;
text-decoration: none;
}


im new to css and php


ɔɔɔɔɔɔuɥoɾ

Quote from: syphergaming on July 17, 2010, 09:37:11 AM
i tryed doing what u said but this keep over riding it
a:link, a:visited
{
color: #a2a2a2;
text-decoration: none;
}


im new to css and php



What you do is add a new class completely, thus not overriding anything.

for example, you want to change only the unred topics text so..


a:link, a:visited
{
   color: #a2a2a2;
   text-decoration: none;
}

Then add another class below that to get



a:link, a:visited
{
   color: #a2a2a2;
   text-decoration: none;
}
.unreadtopics{
   color: your color here;
   text-decoration: none;
}

Then go to the index.template.php file and...

            <ul class="reset">
               <li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
               <li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
               <li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

The bold parts are classes, mess around with that and you will see then, that will change the styles for unread and unread replies.
You would put unreadtopics in place of the current classes above in bold.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

syphergaming

arrrrr ok i just changed the reset not the 2nd one that what i was doing wrong :o
i do this right now

ɔɔɔɔɔɔuɥoɾ

Quote from: syphergaming on July 17, 2010, 12:00:20 PM
arrrrr ok i just changed the reset not the 2nd one that what i was doing wrong :o
i do this right now
Make sure you add the class to your CSS file, I don't know which SMF version you have but css/index.css or style.css in the current theme you are using


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

syphergaming

#8
i did what you said and I'm using smf 2.0RC3

but it still not changing it staying the link color!
and i get little white dots witch u can see in attchment

this is what i did in index.css

/* Normal, standard links. */
a:link, a:visited
{
color: #a2a2a2;
text-decoration: none;
}
.toplinks{
   color: #000000;
   text-decoration: none;
}
a:hover
{
text-decoration: underline;
}


this is what in index.template.php
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="toplinks">
<li class="toplinks">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';


ɔɔɔɔɔɔuɥoɾ

#9
Oh Doh, I see my error, the class closes, it needs to be opened again, let me code it up right now, brb

Just restore the index.template the way it was before for now.

EDIT leave your CSS file the way it is and use this in index.template.php


echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li class="toplinks"><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li class="toplinks"><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';


Put the greeting and reset class back the way they were :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

syphergaming

not working still   :(

index.css
a:link, a:visited
{
color: #a2a2a2;
text-decoration: none;
}
.toplinks {
color: #000000;
text-decoration: none;
}
a:hover
{
text-decoration: underline;
}


index.template.php
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li class="toplinks"><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li class="toplinks"><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';



ɔɔɔɔɔɔuɥoɾ

Quote from: syphergaming on July 18, 2010, 02:43:12 AM
not working still   :(

index.css
a:link, a:visited
{
   color: #a2a2a2;
   text-decoration: none;
}
.toplinks {
   color: YOUR COLOR GOES HERE;
   text-decoration: none;
}
a:hover
{
   text-decoration: underline;
}


index.template.php
            <ul class="reset">
            <li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
            <li class="toplinks"><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
            <li class="toplinks"><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';




Now change the color to whichever color you want, check above :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

syphergaming

i done that all ready i enter in
#000000
witch is black

ɔɔɔɔɔɔuɥoɾ

Quote from: syphergaming on July 18, 2010, 11:02:29 PM
i done that all ready i enter in
#000000
witch is black

Your saying its black that you want and your not getting that?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

CapadY

css is cached, so, empty your forum cache before testing this
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

syphergaming

Quote from: ♪ JohnCcCcCc ♫ on July 19, 2010, 12:52:15 AM
Quote from: syphergaming on July 18, 2010, 11:02:29 PM
i done that all ready i enter in
#000000
witch is black

Your saying its black that you want and your not getting that?

yep that what im saying it not doing it

syphergaming

Quote from: capady on July 19, 2010, 04:32:12 AM
css is cached, so, empty your forum cache before testing this
how do i do that by refreshing the page?
if so i do that all the time

CapadY

Admin - Maintenance - Forum Maintenance - Routine.

Then activate "Empty the file cache" at the bottom end.
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

ɔɔɔɔɔɔuɥoɾ

I'm pretty sure the CSS is not in the forums cache, possibly your browsers cache though

Could you please post a link and details to a regular members temporary account so we can see?

Also, just to be sure, You are changing the index.css for the theme your currently using right?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

syphergaming

that seems like it will change the bacground color not the text color

Advertisement: