oldwizard Posted December 15, 2013 Share Posted December 15, 2013 Hi guys, i´m having trouble to change the text header for a logo on my simple ecard site, but so far i only tried to change it on the css, with no acceptable results. I think the awser is on the php code, i don´t no, i need your help, please. class pagebuilder { var $relpath; // relative path to the main directory var $windowtitle; var $pagetitle; var $bodyargs; var $headervalues; var $languageredirect; var $langargs; var $langdir = 'ltr'; function pagebuilder($relpath = '', $languageredirect='') { global $defaultLang; $this->relpath = $relpath; $this->windowtitle = $GLOBALS['siteName']; $this->pagetitle = $GLOBALS['siteName']; $this->languageredirect = ($languageredirect != '') ? $languageredirect : $_SERVER['PHP_SELF']; if (!isset($_SESSION['setLang'])) $_SESSION['setLang'] = $defaultLang; } function showHeader($pagetitle = '') { Any idea in how to take site name from there and put site logo? Change it from this: To this: Quote Link to comment https://forums.phpfreaks.com/topic/284777-changing-title-for-logo/ Share on other sites More sharing options...
Ch0cu3r Posted December 15, 2013 Share Posted December 15, 2013 Post the code for the showHeader method this is code you'll probably need to modify. Quote Link to comment https://forums.phpfreaks.com/topic/284777-changing-title-for-logo/#findComment-1462383 Share on other sites More sharing options...
oldwizard Posted December 15, 2013 Author Share Posted December 15, 2013 (edited) Is it this piece of code? session_start(); include_once('inc/adodb/adodb.inc.php'); include_once('config.php'); include_once('inc/UIfunctions.php'); include_once('inc/pager.php'); $row = (isset($_GET['row'])) ? (int)$_GET['row'] : 0; $catSearch = (isset($_GET['catSearch'])) ? (int)$_GET['catSearch'] : false; deleteFromSession('to_email, cardtext, music'); if (isset($_GET['reply'])) $_SESSION['reply'] = $_GET['reply']; $page = new pagebuilder; include_once('inc/setLang.php'); $page->langargs = "&row=$row&catSearch=$catSearch"; $page->showHeader(); $limit = $rowsPerPage * $cardsPerRow; $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; $conn = &ADONewConnection('mysql'); if (!$conn->Connect($dbhost,$dbuser,$dbpass,$dbdatabase)) { echo "Error: Could not connect to database"; $page->showFooter(); exit; } Edited December 15, 2013 by oldwizard Quote Link to comment https://forums.phpfreaks.com/topic/284777-changing-title-for-logo/#findComment-1462392 Share on other sites More sharing options...
Ch0cu3r Posted December 15, 2013 Share Posted December 15, 2013 What I meant was post the code for this method (from the pagebuilder class). function showHeader($pagetitle = '') { Quote Link to comment https://forums.phpfreaks.com/topic/284777-changing-title-for-logo/#findComment-1462395 Share on other sites More sharing options...
oldwizard Posted December 15, 2013 Author Share Posted December 15, 2013 This is all the code from page builder: class pagebuilder { var $relpath; // relative path to the main directory var $windowtitle; var $pagetitle; var $bodyargs; var $headervalues; var $languageredirect; var $langargs; var $langdir = 'ltr'; function pagebuilder($relpath = '', $languageredirect='') { global $defaultLang; $this->relpath = $relpath; $this->windowtitle = $GLOBALS['siteName']; $this->pagetitle = $GLOBALS['siteName']; $this->languageredirect = ($languageredirect != '') ? $languageredirect : $_SERVER['PHP_SELF']; if (!isset($_SESSION['setLang'])) $_SESSION['setLang'] = $defaultLang; } function showHeader($pagetitle = '') { global $lang; if ($pagetitle != '') $this->pagetitle = $pagetitle; if (isset($GLOBALS['langdir'])) $this->langdir = $GLOBALS['langdir']; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html dir="<? echo $this->langdir;?>"> <head> <? echo $this->headervalues;?> <title><? echo $this->windowtitle;?></title> <link href="<? echo $this->relpath;?>css/style.css" rel="stylesheet" type="text/css"> <body <? echo $this->bodyargs;?>> <table width="100%"> <tr> <td><span class="title"><? echo $this->pagetitle;?></span></td> <td align="right"> <? if (isset($_SESSION['auth_user'])) { echo $GLOBALS['uifunc01'].$_SESSION['auth_user']?> <a href="<? echo $this->relpath;?>admin/admin.php">[<? echo $GLOBALS['nav05'];?>]</a> <a href="<? echo $this->relpath;?>admin/changePass.php">[<? echo $GLOBALS['nav06'];?>]</a> <a href="<? echo $this->relpath;?>logout.php">[<? echo $GLOBALS['nav07'];?>]</a><? } else { if ($GLOBALS['showLoginLink'] == 'yes') { ?><a href="login.php">[<? echo $GLOBALS['nav08'];?>]</a><? } else echo " "; } ?> </td> </tr> <tr> <td colspan="2"><? $this->drawLine(); ?></td> </tr> <? // Display flags for each language if more than one language file is setup in config.php if (count($lang) > 1) { ?><tr><td colspan="2" align="right"><? foreach($lang as $langid=>$langvalue) { ?> <a href="<? echo $this->languageredirect;?>?setLang=<? echo $langid.$this->langargs;?>"><img src="<? echo $this->relpath;?>images/siteImages/flags/<? echo $langvalue['flag']?>" border="0" title="<? echo $langvalue['desc']?>"></a> <? } ?></td></tr></table><? } else { ?></table><br><? } } function showFooter() { ?> <br><br> <table width="100%"> <tr> <td colspan="2"><? $this->drawLine();?></td> </tr> <tr> <td><? echo $GLOBALS['nav09'];?> <a href="http://www.oldwizardnetwork.com">Oldwizard Network</a> v<? echo $GLOBALS['gCardsVersion'];?></td><td align="right"><? $this->showLink($this->relpath.'index.php','['.$GLOBALS['siteName'].' '.$GLOBALS['nav03'].']');?></td> </tr> </table> </body> </html> <? } function drawLine() { ?> <table cellspacing="0" cellpadding="0" width="100%"> <tr> <td class="horizontalLine"><img src="<? echo $this->relpath;?>images/siteImages/shim.gif" border="0" height="2" width="1"></td> </tr> </table> <? } function showLink($link, $linktext, $target='') { if ($target) $target = "target=\"$target\""; echo "<a href=\"$link\" $target>$linktext</a>"; } } /* Quote Link to comment https://forums.phpfreaks.com/topic/284777-changing-title-for-logo/#findComment-1462396 Share on other sites More sharing options...
Ch0cu3r Posted December 15, 2013 Share Posted December 15, 2013 Change <td><span class="title"><? echo $this->pagetitle;?></span></td> to <td><img src="url/to/site/logo.jpg" alt="<? echo $this->pagetitle;?>" /></td> to apply the site logo. Quote Link to comment https://forums.phpfreaks.com/topic/284777-changing-title-for-logo/#findComment-1462398 Share on other sites More sharing options...
oldwizard Posted December 15, 2013 Author Share Posted December 15, 2013 No, didn`t change a thing, maybe the css is blocking it. Quote Link to comment https://forums.phpfreaks.com/topic/284777-changing-title-for-logo/#findComment-1462401 Share on other sites More sharing options...
oldwizard Posted December 15, 2013 Author Share Posted December 15, 2013 Don´t i have to change something here? global $defaultLang; $this->relpath = $relpath; $this->windowtitle = $GLOBALS['siteName']; $this->pagetitle = $GLOBALS['siteName']; $this->languageredirect = ($languageredirect != '') ? Quote Link to comment https://forums.phpfreaks.com/topic/284777-changing-title-for-logo/#findComment-1462402 Share on other sites More sharing options...
Solution oldwizard Posted December 15, 2013 Author Solution Share Posted December 15, 2013 Sorry it worked allright, thank you so much for your help. Now all i need is to put a background on it. Quote Link to comment https://forums.phpfreaks.com/topic/284777-changing-title-for-logo/#findComment-1462403 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.