Welcome, Guest. Please Login or Register.
June 26, 2024, 10:05:40 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.4] Change YaBB Info Colors « previous next »
Pages: [1] Reply Ignore Print
Author Topic: [Done 1.5.4] Change YaBB Info Colors  (Read 1820 times)
Scorpion
Noobie
*
Posts: 33


WWW
[Done 1.5.4] Change YaBB Info Colors
« on: August 25, 2003, 11:51:08 PM »
Reply with quote

This is hard to explain so, you might not know what I'm talking about. In the admin center, on the "yabb info" where it shows the latest news on yabb. If you change your forum template, the colors of the news won't match with your new template. You would have to manually change it in "Forum preferences and settings".
This mod changes the style and colors of the news to match whatever your template's style and background is. I had originally made this for the skins mod so the yabb news would match my other skins. However, this code will not work with the skins mods, if anyones interested in the code, just ask.

Edit Admin.php:

Find:
function showYaBBInfo()
{
   global $color, $txt, $imagesdir;
   echo '
      <html>
         <head>
            <style type="text/css">
            td {font-size: 12px; color: #000000; font-family: verdana, arial, helvetica, serif}
            </style>
         </head>
         <body bgcolor="' . $color['windowbg'] . '" style="background-color: ' . $color['windowbg'] . ';margin: 0px 0px 0px 0px;">
         <table width="100%" bgcolor="' . $color['windowbg'] . '" cellpadding="0" cellspacing="0">';
   $yabbinfo = getYaBBinfo();
   if (!$yabbinfo)
      echo "<tr><td colspan=\"2\">$txt[lfyi]</td></tr>";
   foreach ($yabbinfo as $info)
   {
      echo "<tr><td colspan=\"2\"><font size=\"1\"><a href=\"$info[url]\" target=\"_blank\">$info[subject]</a> | $info[author] | " . timeformat($info['logTime']) . "</font></td></tr>\n";
      echo "<tr><td><font size=\"1\">    </font></td><td><font size=\"1\">$info[details]</font></td></tr>\n";
      echo "<tr><td colspan=\"2\"><img src=\"$imagesdir/blank.gif\" height=\"6\" width=\"4\" alt=\"\" /></td></tr>\n";
   }
   echo "</table>\n</body>\n</html>";
   exit;
}

?>


Replace With:
function showYaBBInfo()
{
   global $color, $txt, $imagesdir, $boarddir;
echo '
<html>
<head>
<body style="margin: 0px 0px 0px 0px;">
<style type="text/css">';
$GrabURL = "$boarddir/template.php";
$GrabStart = '<style type="text/css">';
$GrabEnd = "</style>";
$OpenFile = fopen("$GrabURL", "r");
$RetrieveFile = fread($OpenFile, 200000);
$GrabData = eregi("$GrabStart(.*)$GrabEnd", $RetrieveFile, $DataPrint);
fclose($OpenFile);
echo $DataPrint[1];
print <<<EOT
</style>
EOT;
 echo '
   <table width=100% height=100% cellpadding=0 cellspacing=0 class=windowbg>';
   $yabbinfo = getYaBBinfo();
   if (!$yabbinfo)
      echo "<tr><td colspan=\"2\">$txt[lfyi]</td></tr>";
   foreach ($yabbinfo as $info)
   {
      echo "<tr><td colspan=\"2\"><font size=\"1\"><a href=\"$info[url]\" target=\"_blank\">$info[subject]</a> | $info[author] | " . timeformat($info['logTime']) . "</font></td></tr>\n";
      echo "<tr><td><font size=\"1\">    </font></td><td><font size=\"1\">$info[details]</font></td></tr>\n";
      echo "<tr><td colspan=\"2\"><img src=\"$imagesdir/blank.gif\" height=\"6\" width=\"4\" alt=\"\" /></td></tr>\n";
   }
   echo "</table>\n</body>\n</html>";
   exit;
}

?>
« Last Edit: August 25, 2003, 11:54:32 PM by Scorpion » Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Done 1.5.4] Change YaBB Info Colors
« Reply #1 on: August 26, 2003, 12:11:23 AM »
Reply with quote

Actually, if you changed the settings properly in Forum Preferences and Settings *and* the css, this would not be a problem.

-[Unknown]
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.4] Change YaBB Info Colors « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.033 seconds with 20 queries.