Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
thumpn8974
Worker
Worker



Joined: Feb 09, 2011
Posts: 188
Location: US

PostPosted: Sat Jun 30, 2012 1:55 pm Reply with quote

I am trying to change the color of my shout box text. I tried changing the settings of the shout box theme console, but all it does is highlight the text, not change the color of the text itself. Is there a way to change just the text color of the shout box without changing the text color of the rest of the site?
 
View user's profile Send private message Visit poster's website Yahoo Messenger
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1513

PostPosted: Sat Jun 30, 2012 2:53 pm Reply with quote

Before the JS call with document.write(SBtxt); you have an div container. The container have a attribute with align="left". Add in this container a new a attribute - called class="shouttext":

open: blocks/block-Shout_Box.php:

Code:
$content .= "<div align=\"left\" class=\"shouttext\"><script type=\"text/javascript\">document.write(SBtxt);</script></div>\n";


open your style.css of your theme and add at the end of the file:

Code:
.shouttext {color:#fff;}


with this class you can change the color of your box!
 
View user's profile Send private message
neralex







PostPosted: Sat Jun 30, 2012 3:10 pm Reply with quote

or an alternative way is, you can set classes for names and comments.

find in the same block file:

Code:
         if (($rowN) AND ($row['name'] != "Anonymous")) {

            $tempContent[$i] .= "<b><a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$row[name]\">$row[name]</a>:</b> $ShoutComment";
         } else {
            $tempContent[$i] .= "<b>$row[name]:</b> $ShoutComment";
         }


change it to:

Code:
         if (($rowN) AND ($row['name'] != "Anonymous")) {

            $tempContent[$i] .= '<span class="thick shoutname"><a href="modules.php?name=Your_Account&amp;op=userinfo&amp;username=' . $row[name] . '">' . $row[name] . '</a>:</span> <span class="shouttext">' . $ShoutComment .'</span>';
         } else {
            $tempContent[$i] .= '<span class="thick shoutname">' . $row[name] . ':</span>  <span class="shouttext">' . $ShoutComment . '</span>';
         }


add this two classes at the end to your style.css of your theme:

Code:
.shoutname {color:#fff;}

.shouttext {color:#fff;}


now you can change the color of the usernames and of the comments.
 
thumpn8974







PostPosted: Sun Jul 01, 2012 12:18 am Reply with quote

I could only get the text color to change, but I can't seem to change the color of the username.
 
neralex







PostPosted: Sun Jul 01, 2012 3:57 am Reply with quote

do have used the first way or the alternative? If you use the alternative way, then you have the problem only if you are logged in?

you can try this:

Code:
.shoutname, .shoutname a {color:#fff;}

.shouttext {color:#fff;}
 
thumpn8974







PostPosted: Sun Jul 01, 2012 9:27 am Reply with quote

Thank you so much, that worked. I hate to ask though, but is there a way to change the text size?
 
neralex







PostPosted: Sun Jul 01, 2012 9:59 am Reply with quote

Fine!

Its the same way. You must add font-size to the classes:

Code:
.shoutname, .shoutname a {color:#fff; font-size:11px;}

.shouttext {color:#fff; font-size:11px;}


Smile
 
thumpn8974







PostPosted: Sun Jul 08, 2012 10:30 am Reply with quote

Thank you so much. I will try this and let you know how it worked.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©