popup is not working =(

Phoca Gallery - image gallery extension
M2_
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 14 Jun 2010, 17:29

popup is not working =(

Post by M2_ »

Hello, everybody!
I have a nasty problem - if i choose any type of popup in settings of gallery and then click on an image in the gallery it openes this image in the same window. If i choose 'modal box' it also shows html navigation. Exactly the same problem is in the Phoca Gallery image module - I can't get popup working

Don't know what to try

I use version 2.7.2

I'll really appreciate any help
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48689
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: popup is not working =(

Post by Jan »

Hi, try to check your site, if there is no conflict between different javascript libraries, search more info in this forum.

Jan
If you find Phoca extensions useful, please support the project
M2_
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 14 Jun 2010, 17:29

Re: popup is not working =(

Post by M2_ »

Thanks for response, Jan!

Well, i have jQuery inculded in template, but i use 'noConflict' method
that is the actual code

Code: Select all

<scrifpt type="text/javascript" src="<? echo $this->baseurl?>/templates/<? echo $this->template; ?>/jq.js"></script>
	<script type="text/javascript">
		jQuery.noConflict();
		
		jQuery(document).ready( function () {
			jQuery('.item2').mouseenter( function () {
				jQuery('.menu_nails').show('300');
				jQuery('.menu_hair').hide('100');
			});
			jQuery('.item3').mouseenter( function () {
				jQuery('.menu_hair').show('300');
				jQuery('.menu_nails').hide('100');
			});
		
		});
	</script>
And if i comment it, it changes nothing. I have cleaned cache in Joomla!'s admin panel, and in browser, but nothing changes. I still select different popup styles, and they open images in the same window.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48689
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: popup is not working =(

Post by Jan »

Hi, if you are running not conflict script, it does not mean, there is no other error - in Joomla! more the same libraries which can be in conflict can be loaded on the site, so it does not mean, the conflict can be caused by only mootools vs. jquery library :-(

So really no idea what kind of conflict can be occured on the site :idea: :(
If you find Phoca extensions useful, please support the project
montemedia
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 17 Jul 2010, 00:52

Re: popup is not working =(

Post by montemedia »

Hello M2, any solution about this?
M2_
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 14 Jun 2010, 17:29

Re: popup is not working =(

Post by M2_ »

Hi there, montemedia!

Just today i managed with it. In my case the problem was in string "<jdoc:include type="head" />", I just hadn't got it in my own template. As i suppose, all the scripts from different modules and components are being written in that tag.
montemedia
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 17 Jul 2010, 00:52

Re: popup is not working =(

Post by montemedia »

Thanks for prompt answer!
Well, I have that line in my template (commercial, http://osc4.template-help.com/joomla_28743/)
If I rename /templates/template/script folder (and I guess -- disable loading externals scripts) I still can not preview images in popup window.

This is the beginning of template's index.php. Any idea?
(Phoca works well with default Joomla's template)

Code: Select all

defined('_JEXEC') or die('Restricted access');
$url = clone(JURI::getInstance());
$path = $this->baseurl.'/templates/'.$this->template;

$showrightColumn = $this->countModules('right');
$showSliderColumn = $this->countModules('user1');





if(JRequest::getCmd('task') != 'edit') $Edit = false; else $Edit = true;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
<head>
<jdoc:include type="head" />
<?php
$user =& JFactory::getUser();  
if ($user->get('guest') == 1) {  
$headerstuff = $this->getHeadData();  
$headerstuff['scripts'] = array();  
$this->setHeadData($headerstuff); }  
?>





<script src="<?php echo $path ?>/scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="<?php echo $path ?>/scripts/kwicks-1.5.1.pack.js" type="text/javascript"></script>
<script src="<?php echo $path ?>/scripts/script.js" type="text/javascript"></script>



<script type="text/javascript" src="<?php echo $path ?>/scripts/jquery.js"></script>
<script type="text/javascript" src="<?php echo $path ?>/scripts/maxheight.js"></script>

<script type="text/javascript">
	var $j = jQuery.noConflict();
		$j(document).ready(function(){
		$j('.menu-nav li').hover(
			function() {
				$j(this).addClass("active");
				$j(this).find('.ulwrapper').stop(false, true).slideDown();
				$j(this).find('.ulwrapper .ulwrapper').stop(false, true).slideUp('fast');
			},
			function() {
				$j(this).removeClass("active");        
				$j(this).find('div').stop(false, true).slideUp('fast');
			}
		);
		$j('.ulwrapper').hover(
			function() {
				$j('.parent').addClass("active_tab");
			},
			function() {
				$j('.parent').removeClass("active_tab");        
			}
		);
	});
	</script>





<script type="text/javascript" src="<?php echo $path ?>/scripts/cufon-yui.js"></script>
<script type="text/javascript" src="<?php echo $path ?>/scripts/Swis721_Th_BT_400.font.js"></script>
<script type="text/javascript" src="<?php echo $path ?>/scripts/Swiss_721_400.font.js"></script>
<script type="text/javascript" src="<?php echo $path ?>/scripts/cufon-replace.js"></script>



<!--[if IE 6]><script type="text/javascript" src="http://info.template-help.com/files/ie6_warning/ie6_script_other.js"></script><![endif]-->

<link rel="stylesheet" href="<?php echo $path ?>/css/constant.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $path ?>/css/template.css" type="text/css" />
</head>
Thanks in advance!
montemedia
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 17 Jul 2010, 00:52

Re: popup is not working =(

Post by montemedia »

I saw that lot of posters indicated problem with gallery if they are not registered to frontend of Joomla.
I guess that this is problem here, too.
Here is part of code in template's index.php file which I changed and get Phoca to work properly.
Change:

Code: Select all

if ($user->get('guest') == 1) {  
To:

Code: Select all

if ($user->get('Guest') == 1) {  
Although, one problem still remains.
In this template, I use jQuerry:

Code: Select all

<script src="<?php echo $path ?>/scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
If I delete/comment this row in template's index.php, Phoca gallery works normally.
But, by this, I disable some other "effects" that are built in template.

How to "call" jQuery without conflict with Phoca?
Where to disable jQuery in Phoca since I already "called" it in index.php?

Thanks.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48689
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: popup is not working =(

Post by Jan »

Hi, Phoca Gallery does not use any jquery library. So it depends on used popup window method if it will conflict with jquery. E.g. the default popup window is a modal box window (mootools). But this modal box is called from Joomla! framework - it is a default part of Joomla! - so then you need to see joomla.org forum and search for mootools vs. jquery problems in Joomla! :idea: :(

Jan
If you find Phoca extensions useful, please support the project
M2_
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 14 Jun 2010, 17:29

Re: popup is not working =(

Post by M2_ »

joomla native js libs seem to work well with jQuery if jQuery is defined with 'no conflict'

I think you should use firebug (if Firefox) or default debug panel in Chrome to check warnings and errors in different variants of using differents js libs.
It may depend on the order of including scripts, i don't really know. Maybe the right way is to compare well-working template and yours, collect the differences and dig in them

Cheers!
Post Reply