any help appreciated.
I've got a chunk of php code that looks up values from a table on the db and displays a banner image based on the forum that the code is being shown on. (in the table there are entries for image src, banner link, image alt text, image title text)
I have got this code to work on a new php page that I uploaded to the server (well I got the displaying of a banner from the table - but at this point I didn't have the conditionals of which forum, because it was a php file separate to the forum.)
When I paste this code (and try different edits) into the 'header' template the banners aren't appearing and not only that but often when I make the changes in the header template inside the admincp, i'm told:
Quote:
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/domain1/public_html/domain2/forums/includes/adminfunctions_template.php(3596) : eval()'d code on line 29
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
|
I can't figure out whats wrong but only have limited php knowledge.
When I edit the header template with conditionals and simple html links, titles, alts etc, then it works. And different forums show me different banners.
But I really need each of the
image url
image hyperlink
image alt text
image title text
...to be variables sourced from a mysql table that I have created
Can anyone help me with this?
I think that it is because the 'header template' doesn't like to deal with external php code in there.
Is there a way that I can make this work?
Thanks in advance