Custom Header Custom Header
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Custom Header

Started by Feckie, November 26, 2006, 08:38:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Feckie

I Am trying to set up a custom header,

1: I set up a php file.
2: Coppermine Reads The File But Finds Errors All the Time
3: The Code in the php file is as follows.

<?php


<table border="0" width="90%">
    <
tr align="center" valign="middle">
        <
td width="441">
            <
p align="left"><img src="http://www.kellysbestofoldies.com/forum/images/misc/Logoleft.gif" width="250" height="120" border="0"></p>
        </
td>
        <
td width="441" align="center" valign="middle">
            <
table border="3" width="255" align="center" cellspacing="0" bordercolor="#CCCCCC">
                <
tr align="center" valign="middle">
                    <
td width="245" valign="middle" align="center">
                        <
p align="center"><img src="http://www.kellysbestofoldies.com/forum/images/misc/Admins.gif" border="0"></p>
                    </
td>
                </
tr>
            </
table>
        </
td>
        <
td width="441">
            <
p align="right"><img src="http://www.kellysbestofoldies.com/forum/images/misc/logoright.gif" border="0"></p>
        </
td>
    </
tr>
</
table>
<
p align="center">&nbsp;</p>


?>


How can I Make This Work

Any help would be helpful thanks

Sami

just remove php's delimiters ( start tag <?php and end tag ?>) from your code and you'll be fine
something like this could work

<table border="0" width="90%">
    <tr align="center" valign="middle">
        <td width="441">
            <p align="left"><img src="http://www.kellysbestofoldies.com/forum/images/misc/Logoleft.gif" width="250" height="120" border="0"></p>
        </td>
        <td width="441" align="center" valign="middle">
            <table border="3" width="255" align="center" cellspacing="0" bordercolor="#CCCCCC">
                <tr align="center" valign="middle">
                    <td width="245" valign="middle" align="center">
                        <p align="center"><img src="http://www.kellysbestofoldies.com/forum/images/misc/Admins.gif" border="0"></p>
                    </td>
                </tr>
            </table>
        </td>
        <td width="441">
            <p align="right"><img src="http://www.kellysbestofoldies.com/forum/images/misc/logoright.gif" border="0"></p>
        </td>
    </tr>
</table>
<p align="center">&nbsp;</p>
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

Sami's advice is of course correct. However, he posted while I was typing my reply, so I'll post it anyway:

That's just plain HTML, so why do you try to add it as a custom header?

You have two options:
1) Edit your custom template.html (This is the recommended option)
Insert the stuff you want to see added (without the starting and ending PHP tags) to themes/yourtheme/template.html.

2) Use proper PHP code
Create proper PHP syntax if you must use PHP. Your can't just add HTML directly into PHP like that. The following code does NOT work: <?php
<p>Some text wrapped inside HTML</p>
?>
You instead have to either use this code:<?php
print '<p>Some text wrapped inside HTML</p>';
?>
or you have to use PHP's heredoc syntax:<?php
print <<< EOT
<p>Some text wrapped inside HTML</p>
EOT;
?>
Both methods have advantages as well as disadvantages.

Don't use PHP if you don't need it - use what you're familiar with instead: plain HTML. Particularly if you don't need to use PHP.

Feckie

Thanks for your help

went the " echo " way

much obliged