What should my header.php look like? What should my header.php look like?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

What should my header.php look like?

Started by ronronmx, July 02, 2008, 12:00:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ronronmx

Hi,
I have been doing some research on the board about including a custom header, and i found a couple threads that helped me get started. But i am not sure i'm doing this right, so let me try to explain!

I want to include my Joomla dynamic header, here's the index.php code that generates it:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4494577-2");
pageTracker._initData();
pageTracker._trackPageview();
</script>

<link rel="shortcut icon" href="<?php echo $this->baseurl?>/images/favicon.ico" />
<?php if($mtype=="moomenu" or $mtype=="suckerfish") :?>
<link href="<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/css/rokmoomenu.css" rel="stylesheet" type="text/css" />
<?php endif; ?>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link href="<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/css/template.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/css/<?php echo $tstyle?>.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/css/rokslidestrip.css" rel="stylesheet" type="text/css" />
<?php if($enable_rokzoom=="true") :?>
<link href="<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/rokzoom/rokzoom.css" rel="stylesheet" type="text/css" />
<?php endif; ?>
<style type="text/css">
div.wrapper { <?php echo $template_width?>padding:0;}
td.sidebar { width: <?php echo $sidebar_width?>px;}
</style>
<?php if (rok_isIe7()) :?>
<!--[if IE 7]>
<link href="<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/css/template_ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->
<?php endif; ?>
<?php if (rok_isIe6()) :?>
<!--[if lte IE 6]>
<link href="<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/css/template_ie6.css" rel="stylesheet" type="text/css" />
<style type="text/css">
img { behavior: url(<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/css/iepngfix.htc); }
</style>
<![endif]-->
<?php endif; ?>
<?php if($enable_rokzoom=="true") :?>
<script type="text/javascript" src="<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/rokzoom/rokzoom.js"></script>
<?php endif; ?>
<?php if($mtype=="moomenu") :?>
<script type="text/javascript" src="<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/js/rokmoomenu.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/js/mootools.bgiframe.js"></script>
<script type="text/javascript">
window.addEvent('domready', function() {
new Rokmoomenu($E('ul.menu'), {
bgiframe: <?php echo $moo_bgiframe?>,
delay: <?php echo $moo_delay?>,
animate: {
props: ['opacity', 'width', 'height'],
opts: {
duration:<?php echo $moo_duration?>,
fps: <?php echo $moo_fps?>,
transition: Fx.Transitions.<?php echo $moo_transition?>
}
}
});
});
</script>
<?php endif; ?>
<?php if($mtype=="suckerfish" or $mtype=="splitmenu") :
echo "<!--[if IE]>\n";
echo "<script type=\"text/javascript\" src=\"" $this->baseurl "/templates/" $this->template "/js/ie_suckerfish.js\"></script>\n";
echo "<![endif]-->\n";
endif; ?>

<?php if($enable_rokzoom=="true") :?>
<script type="text/javascript">
window.addEvent('load', function() {
RokZoom.init({
imageDir: '<?php echo $this->baseurl?>/templates/<?php echo $this->template?>/rokzoom/images/',
resizeFX: {
duration: <?php echo $zoom_resize_duration?>,
transition: Fx.Transitions.<?php echo $zoom_transition?>,
wait: true
},
opacityFX: {
duration: <?php echo $zoom_opacity_duration?>,
wait: false
}
});
});
</script>
<?php endif; ?>
</head>
<body class="<?php echo $fontstyle?> <?php echo $tstyle?>">
<!-- start overall frame -->
<div id="overall-frame">

<!-- begin wrapper -->
<div class="wrapper">
<!-- begin header -->
<div id="header">
<div id="header2">
<div id="header3">
<!--<a href="<?php echo $this->baseurl;?>" class="nounder"><img src="<?php echo $this->baseurl;?>/images/blank.png" border="0" alt="" id="logo" /></a>-->
<!--Removed link from header logo-->

<!-- AddThis Button BEGIN -->
<div class="img-button">
<script type="text/javascript">addthis_pub  = 'ronronmx';</script>
<a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s9.addthis.com/button1-share.gif" width="125" height="16" border="0" alt="" /></a>
<script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script></div>
<!-- AddThis Button END -->

<img src="<?php echo $this->baseurl;?>/images/blank.png" border="0" alt="" id="logo" />
<div id="banner">
<jdoc:include type="modules" name="banner" style="none" />
</div>
</div>
</div>
</div>
<div id="primary-nav">
<div id="primary-nav2">
<div id="primary-nav3">
<div id="horiz-menu" class="<?php echo $mtype?>">
<?php if($mtype != "module") :
echo $mainnav;
else: ?>

<jdoc:include type="modules" name="toolbar" style="none" />
    <?php endif; ?>
</div>
</div>
</div>
</div>
<!-- end header -->


I tried to put that code in my header.php file ( I removed all the "head" and "body" tags ) but I keep getting different syntax errors because I am not sure how to start the file, do I first put "<?php" at the beginning and end it with "?>" or use the "<<<EOT" text or is it something else? I am very new to php, so i am lost....

So i would like to know what my header.php file would look like with the above code inserted in it the right way? Because the only way i was able to get it to work was by inserting the "Generated source code" i got by viewing my page's source, but i don't think this is the right way, am i right?

Stephane

ronronmx

I have been looking around but i am still stuck...can anyone point me in the right direction?
Thx... :)

Nibbler

Wishful thinking. You can't simply grab code from Joomla and stick it in Coppermine like that.

ronronmx

Quote from: Nibbler on July 03, 2008, 08:04:19 PM
Wishful thinking. You can't simply grab code from Joomla and stick it in Coppermine like that.

That's what i'm starting to figure out  :D
Can it be done, or should i just forget it, being a noob and all?