1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need help with header! How can I write text and put a logo in my header?

Discussion in 'PHP' started by Ckrismoney, Aug 5, 2007.

Thread Status:
Not open for further replies.
  1. #1
    I need to put some text and a logo in my header. My site is here , is the first blue strip with links in it my header, or is it just below the header?
     
    Ckrismoney, Aug 5, 2007 IP
  2. lggmaster

    lggmaster Peon

    Messages:
    233
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is this a pre-made script that you recently acquired? If, so do you have an 'inc' or 'include' directory, and inside would be the files for the header.

    Other than that you may need to provide the code for the page for us to find where your header is.
     
    lggmaster, Aug 5, 2007 IP
  3. Ckrismoney

    Ckrismoney Well-Known Member

    Messages:
    1,550
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Here it is.

    header-inc.php
    File Type: PHP script text

    --------------------------------------------------------------------------------

    <?php
    //
    // vBulletin Integration header file
    //
    // If Classifieds has an odd background color or squished width, you will need to edit
    // vbulletin's default "header" style input box / template and change "{pagebgcolor}"
    // and "{tablewidth}" (near the bottom) to your preferred background color and table
    // width, respectively.
    //

    require "config-intc.php";

    $vboptions = array();
    unset($vbuserid);

    if ( VB3_INTEGRATION == "on" )
    {
    if ( THIS_SCRIPT == "comments" && VB3_ENHANCEDINT == "on" )
    {
    // ################### PRE-CACHE TEMPLATES AND DATA ######################
    // get special phrase groups
    //$phrasegroups = array('threadmanage', 'posting', 'PhotoPost_PopUp');
    $phrasegroups = array('threadmanage', 'posting');

    // get special data templates from the datastore
    $specialtemplates = array(
    'smiliecache',
    'bbcodecache',
    'attachmentcache'
    );

    // pre-cache templates used by all actions
    $globaltemplates = array(
    'newpost_attachment',
    'newpost_attachmentbit',
    'newthread'
    );
    }
    elseif ( THIS_SCRIPT == "showproduct" && VB3_ENHANCEDINT == "on" )
    {
    // ################### PRE-CACHE TEMPLATES AND DATA ######################
    // get special phrase groups
    $phrasegroups = array('posting', 'postbit', 'showthread');

    // get special data templates from the datastore
    $specialtemplates = array();

    // pre-cache templates used by all actions
    $globaltemplates = array();
    }
    else
    {
    // ################### PRE-CACHE TEMPLATES AND DATA ######################
    // get special phrase groups
    $phrasegroups = array();

    // get special data templates from the datastore
    $specialtemplates = array();

    // pre-cache templates used by all actions
    $globaltemplates = array();
    }

    chdir($vbpath);
    require("./global.php");
    unset($date);

    if ( isset($bbuserinfo['userid']) )
    {
    $vbuserid = $bbuserinfo['userid'];
    define( "VB35", 'off' );
    }
    else
    {
    // vB3.5 uses $vbulletin
    $vbuserid = $vbulletin->userinfo[userid];
    $vboptions[bburl] = $vbulletin->options[bburl];
    $vboptions[forumhome] = $vbulletin->options[forumhome];
    $vboptions['storecssasfile'] = $vbulletin->options['storecssasfile'];
    $vboptions['avatarenabled'] = $vbulletin->options['avatarenabled'];
    $vboptions['usefileavatar'] = $vbulletin->options['usefileavatar'];
    $vboptions[avatarurl] = $vbulletin->options['avatarurl'];

    define( "VB35", 'on' );

    if ($vboptions['storecssasfile'])
    {
    $styleinclude = str_replace("clientscript", "$vboptions[bburl]/clientscript", $style['css']);
    }

    $styleinclude = process_replacement_vars($styleinclude);
    }

    if ($vbulletin->cron <= TIMENOW)
    {
    $cronimage = '<img src="' . $vbulletin->options['bburl'] . '/cron.php?' . $vbulletin->session->vars['sessionurl'] . '&amp;rand=' . vbrand(1, 1000000) . '" alt="" width="1" height="1" border="0" />';
    }
    else
    {
    $cronimage = '';
    }

    eval('$navbar = "' . fetch_template('navbar') . '";');

    $headinclude = process_replacement_vars($headinclude);
    $header = process_replacement_vars($header);
    $navbar = process_replacement_vars($navbar);

    $vbheader = "$stylevar[htmldoctype]
    <html dir=\"$stylevar[textdirection]\" lang=\"$stylevar[languagecode]\">
    <head>
    $headinclude";

    if ( VB35 == "off" )
    {
    require_once('./includes/functions_showthread.php');
    }
    else
    {
    require_once('./includes/class_postbit.php');
    }

    if ( THIS_SCRIPT == "comments" && VB3_ENHANCEDINT == "on" && VB3_COMMWYSIWYG == "on" )
    {
    require_once('./includes/functions_newpost.php');
    require_once('./includes/functions_editor.php');
    require_once('./includes/functions_bigthree.php');
    //require_once('./includes/functions_wysiwyg.php');

    $textareacols = fetch_textarea_width();

    if ( !isset($_POST['WYSIWYG_HTML']) )
    {
    $editorid = construct_edit_toolbar('{ppcode}', 0, 0, 1);
    if ( VB35 == "on" )
    {
    $messagearea = str_replace( "\"client", "\"". $vbulletin->options['bburl'] ."/client", $messagearea );
    $messagearea = str_replace( "\"images", "\"". $vbulletin->options['bburl'] ."/images", $messagearea );
    }
    else
    {
    $messagearea = str_replace( "\"client", "\"$vboptions[bburl]/client", $messagearea );
    $messagearea = str_replace( "\"images", "\"$vboptions[bburl]/images", $messagearea );
    }
    }

    if ( VB35 == "off" )
    {
    $body = "<body onload=\"editInit();\">";
    }
    else
    {
    $body = "<body>";
    }

    $vbheader .= <<<VBHEADER
    {ppheader}
    </head>
    $body
    $header
    $navbar
    <div align="center">
    VBHEADER;
    }
    elseif ( (THIS_SCRIPT == "showproduct" && VB3_ENHANCEDINT == "on") ||
    (THIS_SCRIPT == "comments" && VB3_ENHANCEDINT == "on") ||
    (THIS_SCRIPT == "search" && VB3_ENHANCEDINT == "on") ||
    (THIS_SCRIPT == "showmembers" && VB3_ENHANCEDINT == "on") )
    {

    // We need these functions, too...
    require_once('./includes/functions_newpost.php');
    require_once('./includes/functions_editor.php');

    $istyles_js = construct_editor_styles_js();

    $vbheader .= <<<VBHEADER
    <!-- set up CSS for the editor -->
    <link rel="stylesheet" type="text/css" href="$vboptions[bburl]/clientscript/vbulletin_editor.css" />
    <style type="text/css">
    <!--
    #vBulletin_editor {
    background: {$istyles[pi_button_normal][0]};
    padding: $stylevar[cellpadding]px;
    }
    #controlbar, .controlbar {
    background: {$istyles[pi_button_normal][0]};
    }
    .imagebutton {
    background: {$istyles[pi_button_normal][0]};
    color: {$istyles[pi_button_normal][1]};
    padding: {$istyles[pi_button_normal][2]};
    border: {$istyles[pi_button_normal][3]};
    }
    -->
    </style>
    {ppheader}
    </head>
    <body>
    $header
    $navbar
    <div align="center">
    VBHEADER;
    }
    else
    {
    $vbheader .= <<<VBHEADER
    {ppheader}
    </head>
    <body>
    $header
    $navbar
    <div align="center">
    VBHEADER;
    }

    $headvars = array( "\"clientscript", "url(images/", "\"search", "\"profile", "\"#usercp", "\"private", "\"member",
    "\"subscription", "\"online", "\"misc", "\"forumdisplay", "action=\"login", "\"faq", "\"register",
    "\"{$vboptions[forumhome]}.php", "\"#usercptools", "\"usercp.php", "\"login.php", "'misc.php",
    "\"calendar.php", "\"images/misc", "\"admincp.php" );
    $headrepl = array( "\"{$vboptions['bburl']}/clientscript", "url({$vboptions['bburl']}/images/", "\"{$vboptions['bburl']}/search",
    "\"{$vboptions['bburl']}/profile", "\"{$vboptions['bburl']}/#usercp", "\"{$vboptions['bburl']}/private",
    "\"{$vboptions['bburl']}/member", "\"{$vboptions['bburl']}/subscription", "\"{$vboptions['bburl']}/online",
    "\"{$vboptions['bburl']}/misc", "\"{$vboptions['bburl']}/forumdisplay", "action=\"{$vboptions['bburl']}/login",
    "\"{$vboptions['bburl']}/faq", "\"{$vboptions['bburl']}/register",
    "\"{$vboptions['bburl']}/{$vboptions[forumhome]}.php", "\"{$vboptions['bburl']}/#usercptools",
    "\"{$vboptions['bburl']}/usercp.php", "\"{$vboptions['bburl']}/login.php", "'{$vboptions['bburl']}/misc.php",
    "\"{$vboptions['bburl']}/calendar.php", "\"{$vboptions['bburl']}/images/misc", "\"{$vboptions['bburl']}/admincp.php" );
    $vbheader = str_replace( $headvars, $headrepl, $vbheader );

    eval('$vbfooter = "' . fetch_template('footer') . '";');
    $vbfooter = process_replacement_vars($vbfooter);
    $vbfooter = "</div>$vbfooter";

    $footvars = array("\"$admincpdir", "\"$modcpdir", "\"archive", "\"sendmessage.php", "\"profile.php", "\"cron.php");
    $footrepl = array("\"{$vboptions['bburl']}/$admincpdir","\"{$vboptions['bburl']}/$modcpdir","\"{$vboptions['bburl']}/archive", "\"{$vboptions['bburl']}/sendmessage.php", "\"{$vboptions['bburl']}/profile.php", "\"{$vboptions['bburl']}/cron.php");
    $vbfooter = str_replace( $footvars, $footrepl, $vbfooter );

    // One header with no navbar or such
    $vbnoheader = <<<VBHEADER
    $stylevar[htmldoctype]
    <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
    <head>
    $styleinclude
    $headinclude
    {ppheader}
    </head>
    <body>
    <div align="center">
    VBHEADER;

    $vbnoheader = str_replace( $headvars, $headrepl, $vbnoheader );

    if ( VB35 == "on" )
    {
    // And save the session....
    $vbulletin->session->save();
    }
    }

    //
    // VB2 CODE
    //

    if ( VB2_INTEGRATION == "on" )
    {
    chdir($vbpath);
    require("global.php");
    ob_start();
    eval("dooutput(\"".gettemplate('headinclude')."\",0);");
    $bodytag="<body>";
    echo dovars($bodytag,0);
    $vbheader="<head>";
    $vbheader.=ob_get_contents();
    $vbheader.="{ppheader}</head>";
    ob_end_clean();
    ob_start();
    eval("dooutput(\"".gettemplate('header')."\",0);");
    $vbheader.=ob_get_contents();
    ob_end_clean();
    ob_start();
    eval("dooutput(\"".gettemplate('footer')."\",0);");
    $vbfooter=ob_get_contents();
    ob_end_clean();
    chdir($pppath);
    }

    // vBPortal Integration
    // If you want to include the vBPortal header, footer, and left menu, remove
    // the "//" slashes from the beginning of the 16 lines of code below, and change
    // "/home/public_html/vbportal" to your actual path to vbportal's main directory,
    // and change "/home/public_html/classifieds" to your actual path to PhotoPost Classifieds
    // directory. This will override the default header and footer variables set in the
    // PhotoPost Classifieds admin panel.

    if ( VBP2_INTEGRATION == "on" )
    {
    chdir($vbportal . "/");
    require("mainfile.php");
    $index = 0;
    global $Pmenu,$Pheader;
    $Pheader="P_themeheader";
    $Pmenu="P_thememenu_photopost";
    require("header.php");
    $vbheader = ob_get_contents();
    ob_end_clean();
    ob_start();
    require("footer.php");
    $vbfooter = ob_get_contents();
    ob_end_clean();
    chdir($pppath . "/");
    }

    ?>

    What can I do with that?
     
    Ckrismoney, Aug 6, 2007 IP
Thread Status:
Not open for further replies.