Scorpion
Noobie
Posts: 33
|
|
[Done 1.5.4] Change YaBB Info Colors
« on: August 25, 2003, 11:51:08 PM » |
|
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; }
?>
|