I'm trying to get this module working on a local server on a Mac. I followed the instructions, but all I get is a broken image in the header. The logos are displayed correctly in the "Logotool Logos" tab of the script administration. Checking the HTML source code of any page the header looks like this:
<div id="branding">
<img src="/logo.php" alt="" id="logo" />
</div>
Obviously, the path isn't being replaced, although I set the "Path to custom logo" to logo.php. Caching is set to normal. What am I doing wrong?
Comments
Comment #1
pobster commentedTell me more, when the logos are displayed correctly what does the source tell you the path to the logo.php file is?
Thanks,
Pobster
--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------
Comment #2
Anonymous (not verified) commentedAll my images are called image1.jpg, image2.jpg,... On the Logotool image list, they are all show up correctly linked with:
and so on for each one, yet in the header they won't show up. In the "Path to custom logo" I indeed only have to write "logo.php", without any slashes and other things?
Comment #3
pobster commentedHmmm... It seems strange that
<img src="/logo.php?logo=image1.jpg">should work, yet<img src="/logo.php">doesn't... What happens if you simply type http://www.yoursite.com/logo.php - do you get a logo (random or whatever you've set)??It sounds like you're doing everything correctly, I'm wondering whether your theme is at fault.
Pobster
--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------
Comment #4
Anonymous (not verified) commentedAs I wrote, I'm testing this locally on a Mac with Apache. Maybe something isn't set up properly. This is what I get when I call the script directly:
Notice: Undefined index: logo in /Applications/MAMP/htdocs/logo.php on line 26
Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/logo.php:26) in /Applications/MAMP/htdocs/logo.php on line 50
And then a huge amount of cryptic binary code follows, which probably is the image. Maybe there's a problem with the MIME-type as well next to the header already sent, although it's strange that the logos are displayed correctly in the list.
Comment #5
Anonymous (not verified) commentedOh yeah, I'm using the Barlow theme.
Comment #6
pobster commentedChange line 26 of the logo.php file to this;
$logo = isset($_GET['logo']) ? $_GET['logo'] : variable_get('logotool_logo', '');And let me know if that fixes it...
Thanks,
Pobster
--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------
Comment #7
Anonymous (not verified) commentedYes, now it works :)
Comment #8
Anonymous (not verified) commentedOk, it works, but I noticed that in the HTML source code, it still says "
" even though all the logos are displayed correctly. Furthermore, in the logo list it lists a file called "logo.php" which says "Unsupported filetype". This seems a bit confusing.
Comment #9
Anonymous (not verified) commentedSorry, the HTML wasn't displayed in the message before. In the source code it says
Comment #10
pobster commentedThe path was always correct that wasn't the problem, the problem was one which was pointed out to me several weeks ago and I failed to take any notice because I didn't think it'd cause anyone any problems unless someone perhaps had very strict php settings... Yes, that's you ;o)
I'm a bit confused about why the logo.php file is appearing in your logo settings screen, you said that it's in your top level folder hence the path "/logo.php" - where are your logos, are they in the top level folder as well?
Thanks,
Pobster
--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------
Comment #11
Anonymous (not verified) commentedNo, the logos are in "files/logos".
Comment #12
pobster commentedThen remove the logo.php file from "files/logos" - you must have copied it there by accident. It's impossible for there to be any another explanation as to why it's being displayed in your list of logos.
Pobster
--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------
Comment #13
Anonymous (not verified) commentedSorry, I forgot that I copied logo.php into the logo folder too when fiddling around with the script %)
Everything works how it should now, the "isset" command was the only thing that was missing.
Comment #14
pobster commentedNo worries! Glad you got sorted.
Thanks,
Pobster
--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------
Comment #15
pobster commented