Page 1 of 1

The Phoca Gallery Plugin didnt work

Posted: 19 Aug 2012, 21:29
by dfsoftware
Hi, guys!

I have a problem with using this plugin. I make changes in one Joomla project (which was developed by other man). It (project) work under Joomla 1.5.22 and use next Phoca Gallery components:
- PhocaGallery v2.8.1
- PhocaMaps v1.0.5
- mod_phocagallery_image v2.7.5
- Phoca Gallery Plugin v2.7.7
- Phoca Gallery Slideshow Plugin v2.7.1
- Phoca Maps Plugin v1.1.0
- Button - Phoca Gallery v2.7.1

In articles i try to view image from one of galleries with Phoca Gallery Plugin help. I use next command:
{phocagallery view=category|categoryid=41|imageid=569}
And in article in front-end side i see simple white box with name of image. Mouse over function work fine (background of box change color), but clicking function dont work (simple nothing do not happen ). When i look at code with Firebug help on the image place in article (front-end side), i see next:

Code: Select all

	<div class="phocagallery">
		<div class="phocagallery-box-file pgplugin1" style="height:138px; width:120px;margin: 5px;padding: 5px;">
			<center>
				<div class="phocagallery-box-file-first" style="background: url('/components/com_phocagallery/assets/images/shadow1.gif') 0px 0px no-repeat;height: 118px; width: 118px;">
					<div class="phocagallery-box-file-second">
						<div class="phocagallery-box-file-third">
							<center>
								<a class="highslide" title="trgovina" href="/images/phocagallery/krpanke/thumbs/phoca_thumb_l_trgovina.jpg" onclick="return hs.expand(this, { slideshowGroup: 'groupPl1',  wrapperClassName: 'rounded-white', outlineType : 'rounded-white', dimmingOpacity: 0,  align : 'center',  transitions : ['expand', 'crossfade'], fadeInOut: true });">
									<br>
								</a>
							</center>
						</div>
					</div>
				</div>
			</center>
			<div class="name" style="color: #7a2136 ;font-size:14px;margin-top:5px;text-align:center;">trgovina</div>
		</div>
	</div>
So, how you can see instead of image between "<a href=...." and "</a>" is writen "<br>" HTML tag!!! Where is "<img href...."? :x

I was try to find the way to solve this problem in Internet (on Phoca Gallery forums including) and cant to do it.

I was check all images in this category, it all have created thumbals (s,m, l) and i write correct IDs of image and gallery, also directory with images have needed permitions (777). But just in case for test i was create new category and upload new images, and was create needed thumbals - all checked by manualy. And was try to view one of the images from this category into article:
{phocagallery view=category|categoryid=45|imageid=572}
And againe all the same. :x

Then i try to view all galleries:
{phocagallery view=categories}
All work fine. I enter on my test created category and i was see my images. I was click on every of it and it was viewed as more big images in pop-up window. Its ok. :twisted:

Then i was try to do next:
{phocagallery view=category|categoryid=45|limitstart=0|limitcount=3|enableswitch=1}
And in article from front-end on that place i see in one row three white boxes (in my test category 3 images) with names of images at bottom. And again dont work click function... :x

Also i dont use on this project "F...content" (forgot the name) module about which is warn on this forum. :!:

May be some conflict with other jQuery or Mootools components? I was try to disable one by one used modules in Joomla admin zone - but nothing not changed. :idea:

So, please, help me find how to solve this problem. :?:

Best regards,
Dmitry

Re: The Phoca Gallery Plugin didnt work

Posted: 19 Aug 2012, 21:57
by dfsoftware
One more... Browser view 1 error and 1 warn, then i try view needed article with image:

Resource interpreted as Image but transferred with MIME type application/octet-stream: "http://www.(my domain)/components/com_phocagallery/assets/js/highslide/graphics/zoomout.cur". highslide-full.js:257
hs.extend highslide-full.js:257
hs.createElement highslide-full.js:249
hs.preloadImages highslide-full.js:900


GET _ttp://www.(my domain)/undefined 404 (Not Found) undefined:1
predictad_preloadImages
predictad_teaser_mnger
(anonymous function)
PredictadWindowAddLoadPEvnt.window.onload


May be it can be help to solve my problem?

Re: The Phoca Gallery Plugin didnt work

Posted: 20 Aug 2012, 10:45
by dfsoftware
I was find a new problem which not give ability to normal work for click function (<a href="....... " <br> </a>). The fact is that what when i made mouse over under white box with shadow (where must be placed image), cursor dont accept "pointer" view (its happen when mouse pointer over link ). Its mean (i think) what DIV layer with Phoca Gallery Plugin link on image can have more small z-index as other DIV layer which overlap with it.

I was check CSS styles (with Firebug help) and experiment with CSS rule "z-index: 1000;" for earch DIV layout of Phoca Gallery Plugin (with Firebug help), but cursor didnt accept "pointer" view... :x

Fact - click on image function didnt work, because is not available in front-end. :!:

Any idea? :idea:

Re: The Phoca Gallery Plugin didnt work

Posted: 21 Aug 2012, 16:40
by dfsoftware
Hi, guys! :)

I found the cause of my problem and fix it. :twisted: I think its will be interesting and useful for all Joomla developers that using Phoca Gallery Plugin.

In my current Joomla project (which was made by other man) is some strange, suspect plugin (i think so), which replace all images in articles without 'alt' attribute on '<br>' HTML tag (do you remember the '<br>' HTML tag between '<a href=....' and '</a>' in code above?). I found this with help of numerous experiments in try display image in article with IMG HTML tag help and changing alt attribute in it (order and value).

Attention!!! :!: For succesfull display image in article - the alt attribute (in IMG tag) must be present and must be the first attribute at once after IMG tag.

Example: <img alt="something" href="somelink" />

After that all, i understand what Phoca Gallery Plugin do not write alt attribute inside img HTML tag. That is why instead of image in article, Phoca Gallery Plugin was display white box without image inside.

I was try to make right settings in 'Parameters' -> 'Global Configuration' -> 'General Settings' -> 'ALT Value' (experiment with this options), but this dont work and dont help me in solve my problem. :roll:

When i was decided to make changes directly in Phoca Gallery Plugin main php file ('plugins\content\phocagallery.php'). I did search for '<img' in all file (its finded 6-8 lines) and in every finded line added 'alt="" ' attribute on first place (!!!) at once after img tag.

And after save changes Phoca Gallery Plugin start work normaly in articles! :twisted:

I think this thing will be rewarding experience for every Joomla developer.

Best regards,
Dmitry

Re: The Phoca Gallery Plugin didnt work

Posted: 26 Aug 2012, 18:40
by Jan
Hi, thank you very much for your info, I will take a look at it.

Jan

Re: The Phoca Gallery Plugin didnt work

Posted: 06 Jun 2015, 18:13
by lucas3001
Hey thank you for this post!

it helped me in identifying where to change the alt value for plugin, which does not follow the setting of phocagallery main component.
In my case I found the alt parameter not in first position, but later, and worked anyway.

My purpose was to not showing the title, but description.
I found the expression:

Code: Select all

alt="'.$image->title.'"
and changing in

Code: Select all

alt="'.$image->description.'"
I had to try all the <img occurency in order to find the one related to my detail view, but at the end I did It.

thank you again dfsoftware!

Re: The Phoca Gallery Plugin didnt work

Posted: 10 Jun 2015, 00:53
by Jan
Ok, thank you for the info.

Jan