Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

how can i center logo

Asked Modified Viewed 2,297 times
P
pjevs
P
pjevs 10
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
asked
Newbie

hi

someone who can help me with this code so my topbanner always i centerred.

CUT......


/************************/
/* Theme Settings      */
/************************/

$body_text = "#000000";
$body_bg = "#ECF0F6";
$theme_width = "100%";
$theme_width_l = "180";
$theme_width_r = "180";

function render_header($header_content) {

global $theme_width,$settings,$userdata;

   echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>";
   echo "<tr><td valign='top'>";
   echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td height='14' width='25' nowrap='nowrap' class='ul'><span class='vsmall'> </span></td>";
   echo "<td width='100%' colspan='2' class='uc'><span class='vsmall'> </span></td>";
   echo "<td width='25' nowrap='nowrap' class='ur'><span class='vsmall'> </span></td></tr>";
   echo "<tr><td class='headl'><span class='vsmall'> </span></td>";
   echo "<td align='left' class='row3' colspan='2'>";
   echo "[color=red]<center>[/color]<a href='index.php'><img src='".THEME."images/logo.gif' border='0' title='".$settings[sitename]."'/></a>[color=red]</center>[/color]</td>";
   echo "<td class='headr'><span class='vsmall'> </span></td></tr>";
   echo "<tr valign='bottom'><td rowspan='3' class='tul'><span class='vsmall'> </span></td>";
   echo "<td height='30' class='tuc'>";
   $result = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' ORDER BY link_order");
      if (dbrows($result) != 0) {
      $i = 0;
   while($data = dbarray($result)) {
      if (checkgroup($data['link_visibility'])) {
      if ($data['link_url']!="---") {
      if ($i != 0) { echo " <font color='FFFFFF'>•</font>\n"; } else { echo "\n"; }
   $link_target = ($data['link_window'] == "1" ? " target='_blank'" : "");
      if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
   echo "<a href='".$data['link_url']."'".$link_target." class='navbar'>".$data['link_name']."</a>";
   } else {
   echo "<a href='".BASEDIR.$data['link_url']."'".$link_target." class='navbar'>".$data['link_name']."</a>";
}
   }
$i++;
      }
   }
}
   echo ($i == 0 ? " " : "")."</td>";
   echo "<td align='right' nowrap='nowrap' class='tuc'><font class='navbar'>".ucwords(showdate($settings['subheaderdate'], time()))."</font></td>";
   echo "<td rowspan='3' class='tur'><span class='vsmall'> </span></td></tr>";
   echo "<tr><td height='10' colspan='2' class='row5'><img src='".THEME."images/spacer.gif' border='0' height='1' width='1'></td></tr>";
   echo "<tr valign='top'><td align='center' height='30' nowrap='nowrap' class='tlc'><span class='navbar'>";
   echo "<td nowrap='nowrap' align='right' class='tlc'></td></tr>";
   echo "<tr><td class='left'><span class='vsmall'> </span></td>";
   echo "<td colspan='2' class='row2'><br />";
   echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
   echo "<tr valign='top'><td valign='top' width='1'>";
}

function render_footer($license=false) {
   
global $theme_width,$settings,$locale;

   echo "</td></table></td>";
   echo "<td class='right'><span class='vsmall'></span></td></tr>";
   echo "<tr><td class='left'><span class='vsmall'> </span></td>";
   echo "<td colspan='2' class='row2'>";
   echo "<div align='center'>".stripslashes($settings['footer'])."</div>";
   echo "<div align='center'><b>".$settings['counter']." </b></font>".($settings['counter'] == 1 ? $locale['140']."\n" : $locale['141']."</div><br>\n");
   echo "<div align='center'>";
      if ($license == false) {
   echo "Powered by <a target='_blank' href='http://www.php-fusion.co.uk'><img src='".THEME."images/fusion.gif' title='PHPFusion' style='vertical-align:top;'></a> v".$settings['version']." © 2003-2005";
   }
   echo " | Original <b>DAJ Glass</b> Theme by: <a target='_blank' href='http://www.dumbassjones.com/'>Dustin Baccetti</a> : Ported for PHPFusion by: <a target='_blank' href='http://phpfusion.org'><img title='PHPFusion Themes' src='".THEME."images/fthemes.gif' style='vertical-align:top;'></a></div></td>";
   echo "<td class='right'><span class='vsmall'></span></td></tr>";
   echo "<tr><td height='27' class='ll'><span class='vsmall'></span></td>";
   echo "<td colspan='2' class='lc'><span class='vsmall'></span></td>";
   echo "<td class='lr'><span class='vsmall'></span></td></tr></table>\n";
        echo "</td><tr><td colspan='6' align='center'>Siden dannet på ";
$load = microtime();
print (number_format($load,2));
echo " sekunder";
echo "</td></tr></table>";
}


function render_news($subject, $news, $info) {
   
global $locale;
   
   echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>";
   echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td class='panel-cellpic' width='100%' height='25' align='center'>$subject</td></tr></table>";
   echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td bgcolor='#F5F5F5'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='1'>";
   echo "<tr><td bgcolor='#FFFFFF'><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
   echo "<tr><td class='main-body'>$news</td></tr></table>";
   echo "<tr><td height='30' class='news-footer'><div align='center'>";
   echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
   echo "".$locale['041'].showdate("longdate", $info['news_date'])." ";
      echo "<br />";
   echo "".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."";
   if ($info['news_allow_comments'])
   echo "<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> · ";
   echo "".$info['news_reads'].$locale['044']." ";
   echo "| <a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a>";
   echo "</div>";
   echo "<table width='100%' border='0' cellspacing='0' cellpadding='4'>";
   echo "</td></tr></table></td></tr></td></tr></table></td></tr>";
   echo "</table></td></tr></table></td></tr></table>";
}

function render_article($subject, $article, $info) {
   
global $locale;
   
   echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>";
   echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td class='panel-cellpic' width='100%' height='25' align='center'>$subject</td></tr></table>";
   echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td bgcolor='#F5F5F5'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='1'>";
   echo "<tr><td bgcolor='#FFFFFF'><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
   echo "<tr><td class='main-body'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td></tr></table>";
   echo "<tr><td height='30' class='news-footer'><div align='center'>";
   echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
   echo "".$locale['041'].showdate("longdate", $info['article_date'])." ";
   echo "<br />";
   if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']." · ";
   echo "".$info['article_reads'].$locale['044']." ";
   echo " | <a href='print.php?type=A&item_id=".$info['article_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a>";
   echo "</div>";
   echo "<table width='100%' border='0' cellspacing='0' cellpadding='4'>";
   echo "</td></tr></table></td></tr></td></tr></table></td></tr>";
   echo "</table></td></tr></table></td></tr></table>";
}

// Open table begins
function opentable($title) {

   echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'><tr>";
   echo "<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td class='panel-cellpic' width='100%' align='center'>$title</td></tr></table>";
   echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='0'>";
   echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
   echo "<tr><td class='main-body'>";
}

// Close table end
function closetable() {
   echo "</td></tr></table></td></tr></table></td></tr></table></td></tr></table>";
   echo "<table border='0' cellspacing='0' cellpadding='0' width='100%'>";
   echo "</table></td></tr></table>\n";
}

function openside($title) {

   echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'><tr>";
   echo "<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td align='center' class='panel-cellpic' width='100%'>$title</td></tr></table>";
   echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='0'>";
   echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
   echo "<tr><td class='side-body'>";
}

function closeside() {
   echo "</td></tr></table></td></tr></table></td></tr></table></td></tr></table>";
   echo "<table border='0' cellspacing='0' cellpadding='0' width='100%'>";
   echo "</table></td></tr></table>\n";
}

function opensidex($title,$open="on") {
$box_img = ($open=="on" ? "off" : "on");

   echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'><tr>";
   echo "<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td align='center' class='panel-cellpic' width='100%'>";
   echo "<img valign='middle' align='right'onclick=\"javascript:flipBox('$title')\" name='b_$title' alt='$box_img' border='0' src='".THEME."images/panel_$box_img.gif'>$title</td></tr></table>";
   echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
   echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='0'>";
   echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
   echo "<tr><td class='side-body'>";
   echo "<div id='box_$title'".($open=="off" ? "style='display:none'" : "").">\n";
}


function closesidex() {

   echo "</td></tr></table></td></tr></table></td></tr></table></td></tr></table>";
   echo "<table border='0' cellspacing='0' cellpadding='0' width='100%'>";
   echo "</table></td></tr></table>\n";
}

// Table functions
function tablebreak() {
   echo "<table width='100%' cellspacing='0' cellpadding='0'><tr><td height='8'></td></tr></table>\n";
}
?>
Edited by Sveinungs on 04-04-2007 21:22,
0 replies

5 posts

S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

Hi, I updated your file with a <center></center> tag. You can try that!

Also: next time, try the search function, this is a common question my friend! :)
0 replies
J
jms1989
J
Michael's Computer Lab - We help. You learn.
Michael's Web - My personal wibsite.
JWN Media - 500MB of space, 1500MB of bandwidth, Ad-Free, and easy-to-use control panel, and much more and it's all free.
  • Junior Member, joined since
  • Contributed 33 posts on the community forums.
  • Started 6 threads in the forums
answered
Junior Member

1. Open subheader.php
2. Find
 render_header("<img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' title='".$settings['sitename']."'>");

3. Replace with
render_header("<center><img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' title='".$settings['sitename']."'></center>");


And your banner will be centered.
0 replies
B
BBK
B
BBK 10
{{{
var yo= 'BBK!'
window.alert(yo)
}}}
  • Member, joined since
  • Contributed 105 posts on the community forums.
  • Started 4 threads in the forums
answered
Member

some themes dosnt support this! it need to be edited in the theme.php!
0 replies
— 2 months later —
M
Mex
M
Mex 10
  • Junior Member, joined since
  • Contributed 12 posts on the community forums.
  • Started 5 threads in the forums
answered
Junior Member

Any help would be appreciated

Fatal error: Call to undefined function render_header() in /mounted-storage/home45a/sub007/sc33134-YQAK/www/phpf/subheader.php on line 31


Here is the Current Code giving me the Error.
<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location: index.php"); exit; }

require_once THEME."theme.php";

if ($settings['maintenance'] == "1" && !iADMIN) fallback(BASEDIR."maintenance.php");
if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_lastvisit='".time()."', user_ip='".USER_IP."' WHERE user_id='".$userdata['user_id']."'");

echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<title>".$settings['sitename']."</title>
<meta http-equiv='Content-Type' content='text/html; charset=".$locale['charset']."'>
<meta name='description' content='".$settings['description']."'>
<meta name='keywords' content='".$settings['keywords']."'>
<link rel='stylesheet' href='".THEME."styles.css' type='text/css'>
<script type='text/javascript' src='".INCLUDES."jscript.js'></script>
</head>
<body bgcolor='$body_bg' text='$body_text'>\n";

render_header("<img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' title='".$settings['sitename']."'>");



?>
Edited by Mex on 14-06-2007 03:02,
0 replies
M
Mex
M
Mex 10
  • Junior Member, joined since
  • Contributed 12 posts on the community forums.
  • Started 5 threads in the forums
answered
Junior Member

please need help here asap :o
0 replies

Category Forum

General Discussion

Labels

None yet

Statistics

  • Views 0 views
  • Posts 5 posts
  • Votes 0 votes
  • Topic users 5 members

5 participants

S
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
P
P
pjevs 10
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
B
B
BBK 10
{{{
var yo= 'BBK!'
window.alert(yo)
}}}
  • Member, joined since
  • Contributed 105 posts on the community forums.
  • Started 4 threads in the forums
J
J
Michael's Computer Lab - We help. You learn.
Michael's Web - My personal wibsite.
JWN Media - 500MB of space, 1500MB of bandwidth, Ad-Free, and easy-to-use control panel, and much more and it's all free.
  • Junior Member, joined since
  • Contributed 33 posts on the community forums.
  • Started 6 threads in the forums
M
M
Mex 10
  • Junior Member, joined since
  • Contributed 12 posts on the community forums.
  • Started 5 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet