Blank line in code probably causes margin above images

Phoca Gallery modules - modules for Phoca Gallery extension
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Blank line in code probably causes margin above images

Post by Jan »

Hi, I have tested it, checked the encoding, removed the spaces between the tags, but found nothing there :idea:

Jan
If you find Phoca extensions useful, please support the project
kwindo
Phoca Member
Phoca Member
Posts: 11
Joined: 14 Aug 2011, 16:17

Re: Blank line in code probably causes margin above images

Post by kwindo »

I know, I did all that too. I've seen a lot of issues (I'm sure you have too) but this must be one of the most mysterious.

The Joomla 1.5 module on you demo site doesn't have this white line. Are there a lot of differences in the coding between the Joomla 1.5 version and the Joomla 1.6 version? I mean other then the changes in the language files and the install xml file.
kwindo
Phoca Member
Phoca Member
Posts: 11
Joined: 14 Aug 2011, 16:17

Re: Blank line in code probably causes margin above images

Post by kwindo »

I FOUND IT!!!

There is something wrong with the "mod_phocagallery_image.php" file.

I copied all the content from that file to a new fresh one I created in Dreamweaver and replaced the old file with the new one. That solved the problem.

8)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Blank line in code probably causes margin above images

Post by Jan »

Ok (yes, then it maybe there can be problems with some hidden characters :idea:)

Jan
If you find Phoca extensions useful, please support the project
Raged
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 12 Sep 2011, 14:01

Re: Blank line in code probably causes margin above images

Post by Raged »

Hi guys,

I'm having the same issue, I've allready tried kwindo's solution but it didn't work for me.
Using Joomla 1.7 and having the same whitespace below my h3 title in the moduletable.

Hope someone can help me!
(Will try and look for unwanted characters in the 'mod_phocagallery_image.php' file)

EDIT:
Ok guys just posting the solution here, since i've seen this problem before with PHP and it is often caused by a white line after closing a php tag ('?>').
The problem here was due to a white line after a closing tag in the 'tmpl/default.php' file

Look for line 10

Code: Select all

?>
<div id ="phocagallery-module-ri" style="text-align:center;<?php echo $pgWidth;?>">
<center><?php
change it to:

Code: Select all

?><div id ="phocagallery-module-ri" style="text-align:center;<?php echo $pgWidth;?>">
<center><?php
placing the div after the php closing tag.

I hope this helped some people in the future and now.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Blank line in code probably causes margin above images

Post by Jan »

Hi, thank you for the guide, I have updated the file.

Jan
If you find Phoca extensions useful, please support the project
samuelmf
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 24 Aug 2010, 23:19

Re: Blank line in code probably causes margin above images

Post by samuelmf »

I have the same problem on my joomla 1.7
http://www.sinelconperu.com/last/index.php

i get the "i>? ", i changed the mod_phocagallery_image.php to a new file and uploaded it again, and nothing works.

:s
samuelmf
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 24 Aug 2010, 23:19

Re: Blank line in code probably causes margin above images

Post by samuelmf »

I'm done a temporal solution with css
Assing a css class to the module and set the class attributes to:

.moduletable_patch{
line-height: 0px;
color: #fff;
font-size: 0px;
}

Is not a good solution, but works...
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Blank line in code probably causes margin above images

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
mohsho
Phoca Member
Phoca Member
Posts: 19
Joined: 11 Nov 2010, 23:39
Location: Hamilton, ON, Canada
Contact:

Re: Blank line in code probably causes margin above images

Post by mohsho »

It would be appreciated if you could create a new copy of mod_phocagallery_image.php and include it in the download. Would've saved me a good chunk of my evening tracking this down.
Post Reply