- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 72 guest(s) and 0 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Banner position [ ]
Author
Message
jbsarma
Corporal
Joined: Feb 16, 2003
Posts: 59
Location: UK
Posted:
Tue Jun 17, 2003 11:19 am
Hello
Would anybody tell me how I can get the 'banner' to the left of the site logo instead of at the top of the homepage e.g., in the Karate theme. What modification does it involve. The relevent block of the code is, I think,
Quote:
function themeheader() {
global $user, $banners, $sitename, $slogan, $cookie, $prefix;
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">\n"
."<br>\n";
if ($banners) {
include("banners.php");
}
echo "<br>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
."<tr>\n"
."<td bgcolor=\"#ffffff\" width=\"306\">\n"
."<a href=\"index.php\"><img src=\"themes/Karate/images/logo.gif\" align=\"left\" alt=\""._WELCOMETO." $sitename\" border=\"0\"></a></td>\n"
."</tr>\n"
."</table><br>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
."<tr>\n"
."<td bgcolor=\"#F3E1AF\">\n"
."<img src=\"themes/Karate/images/tophighlight.gif\"></td>\n"
."</tr>\n"
."</table>\n"
oaklid
Corporal
Joined: May 30, 2003
Posts: 56
Posted:
Tue Jun 17, 2003 3:00 pm
More specifically, the relevant bit of code is
Code:
if ($banners) {
include("banners.php");
}
Take a careful look at the table structure in themeheader. You want to put the above code into the table cell next to the one that has the logo.
In this theme, that means you'll need to add another <td> next to the one that contains the logo, since that row only has one.
_________________ Kristen
http://www.mediatinker.com/
jbsarma
Corporal
Joined: Feb 16, 2003
Posts: 59
Location: UK
Posted:
Tue Jun 17, 2003 3:04 pm
Thanks. I tried that. Does not work- gives error message. Perhaps somebody experienced in theme modification will find this interesting.
oaklid
Corporal
Joined: May 30, 2003
Posts: 56
Posted:
Tue Jun 17, 2003 3:44 pm
The above is what I did for my theme and it worked.
What error message does it give? Don't expect good help if you don't give all the details.
This has been discussed numerous times by those who are "experienced in theme modification" and I'm sure they are tired of answering it by now. Try a search for 'banner' and read through the results.
_________________ Kristen
http://www.mediatinker.com/
nathanraymond
Premium
Joined: Jan 17, 2003
Posts: 121
Location: Rhode Island
Posted:
Thu Jul 31, 2003 7:58 pm
well you wanted logo right banner left
here is the opposite it was a little more than the code above
Quote:
function themeheader() {
global $user, $banners, $sitename, $slogan, $cookie, $prefix;
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<br>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
."<tr>\n"
."<td bgcolor=\"#ffffff\" width=\"306\">\n"
."<a href=\"index.php\"><img src=\"themes/Karate/images/logo.gif\" align=\"left\" alt=\""._WELCOMETO." $sitename\" border=\"0\"></a></td>\n"
."<td bgcolor=\"#FFFFFF\" align=\"center\">";
if ($banners) {
echo "<br>";
include("banners.php");
echo "<br>";
}
echo "</td>\n"
."</tr>\n"
."</table><br>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
."<tr>\n"
."<td bgcolor=\"#F3E1AF\">\n"
."<img src=\"themes/Karate/images/tophighlight.gif\"></td>\n"
."</tr>\n"
."</table>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
."<tr valign=\"middle\">\n"
."<td width=\"400\" bgcolor=\"#F3E1AF\" align=\"left\">\n"
."&</td>\n"
."<td bgcolor=\"#F3E1AF\" align=\"center\">\n"
."<form action=\"modules.php?name=Search\" method=\"post\"><font class=\"content\" color=\"#000000\"><b>"._SEARCH." </b>\n"
."<input type=\"text\" name=\"query\" size=\"14\"></font></form></td>\n"
."<td bgcolor=\"#F3E1AF\" align=\"center\">\n"
."<form action=\"modules.php?name=Search\" method=\"get\"><font class=\"content\"><b>"._TOPICS." </b>\n";
$toplist = mysql_query("select topicid, topictext from $prefix"._topics." order by topictext");
echo "<select name=\"topic\"onChange='submit()'>\n"
."<option value=\"\">"._ALLTOPICS."</option>\n";
while(list($topicid, $topics) = mysql_fetch_row($toplist)) {
if ($topicid==$topic) { $sel = "selected "; }
echo "<option $sel value=\"$topicid\">$topics</option>\n";
$sel = "";
}
echo "</select></font></form></td>\n"
."</tr></table>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#fefefe\">\n"
."<tr>\n"
."<td bgcolor=\"#000000\" colspan=\"4\"><IMG src=\"themes/Karate/images/pixel.gif\" width=\"1\" height=1 alt=\"\" border=\"0\" hspace=\"0\"></td>\n"
."</tr>\n"
."<tr valign=\"middle\" bgcolor=\"#EFCE6B\">\n"
."<td width=\"15%\" nowrap><font class=\"content\" color=\"#363636\">\n";
if ($username == "Anonymous") {
echo "&&<font color=\"#363636\"><a href=\"modules.php?name=Your_Account\">"._LOGINCREATE."</a></font>\n";
} else {
echo "&&"._HELLO." $username! &&<a href=\"modules.php?name=Your_Account&op=logout\">logout</a>";
}
echo "</font></td>\n"
."<td align=\"center\" height=\"20\" width=\"60%\"><font class=\"content\">\n"
."&\n"
."</td>\n"
."<td align=\"right\" width=\"25%\"><font class=\"content\">\n"
."<script type=\"text/javascript\">\n\n"
."<!-- // Array ofmonth Names\n"
."var monthNames = new Array( \"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\");\n"
."var now = new Date();\n"
."thisYear = now.getYear();\n"
."if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n"
."document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);\n"
."// -->\n\n"
."</script></font></td>\n"
."<td>&</td>\n"
."</tr>\n"
."<tr>\n"
."<td bgcolor=\"#000000\" colspan=\"4\"><IMG src=\"themes/Karate/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" hspace=\"0\"></td>\n"
."</tr>\n"
."</table>\n"
."<!-- FIN DEL TITULO -->\n"
."<table width=\"750\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\" align=\"center\">\n"
."<tr valign=\"top\">\n"
."<td bgcolor=\"#F3E1AF\"><img src=\"themes/Karate/images/pixel.gif\" width=\"1\" height=\"3\" border=\"0\" alt=\"\"></td>\n"
."</tr>\n"
."<tr valign=\"top\">\n"
."<td bgcolor=\"#ffffff\"><img src=\"themes/Karate/images/pixel.gif\" width=\"1\" height=\"5\" border=\"0\" alt=\"\"></td>\n"
."</tr>\n"
."</table>\n"
;
$public_msg = public_message();
echo "$public_msg<br>";
echo "<table width=\"750\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\" align=\"center\"><tr valign=\"top\">\n"
."<td bgcolor=\"#eeeeee\" width=\"150\" valign=\"top\">\n";
blocks(left);
echo "</td><td><img src=\"themes/Karate/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td width=\"100%\">\n";
}
that gives you for the karate theme the logo left and the banner right
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