Keyword

Possible Template Conflict?

More
17 years 1 month ago #48 by johnm
Possible Template Conflict? was created by johnm
Hi, first I want to congratulate you on a great plugin. Works a treat. However, I am having a few problems getting it to work properly with a Rocket Template - Sporticus. The plugin works great with latest Firefox & Opera browers, but breaks intermittenly with with Internet Explorer7(Internet Explorer cannot open Internet Site). The problem seems to be related to either the template, the mod_rt_slideshow, or mod_rt_scoller. Unplublished and republished com,mods,ect to try to tracked it down. I think its the template. Embeded videos "Youtube" seem to cause the same problems.

From reading various forums, I know that it is probably a template conflict. Any ideas on "work arounds" so that I can use the Allvideos plugin. I really would like to use it. Love the new forum.

Please Log in or Create an account to join the conversation.

More
17 years 1 month ago #49 by JoomlaWorks
Replied by JoomlaWorks on topic Re: Possible Template Conflict?
When IE "throws" such errors, it's most definetely a javascript conflict, which forces the browser to crash/abort page loading.

AllVideos uses a small javascript snippet to bypass the EOLAS issue in IE. You could remove this javascript code to make sure it's not the AllVideos that's conflicting with other extensions. If it actually conflicts, then take this javascript code out permanently. Either way, your IE users will need to click on the videos to watch them :)

The code to remove is this (file mambots/content/plugin_jw_allvideos.php - line 641):
// This is the excellent "EOLAS - no click to activate" fix/patch
// from Gero Zahn, for IE and Opera browsers, which is already
// implemented for Joomla as a seperate plugin.

/*
* @version v 1.0
* @author: Gero Zahn, [email protected] www.gerozahn.de/bot_gznoclicktoactivate
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

$_MAMBOTS->registerFunction( 'onPrepareContent', 'botgznoclicktoactivate' );

function botgznoclicktoactivate( $published, &$row, $mask=0, $page=0 ) {
	global $mosConfig_absolute_path, $mosConfig_live_site;
	if (!$published) { # not published?
		return;
	} else { # Work just if published
	  # All tag areas or tags to be processed. Important: Start with <object ...>...</object> areas
	  # as it could contain an <embed ...>..</embed> area or (perhaps) an unclosed <embed ...> tags
	  $tags=array('`<object[^>]*>(.*)</object>`isU', # <object ...>...</object> areas
	              '`<applet[^>]*>(.*)</applet>`isU', # <applet ...>...</applet> areas
	              '`<embed[^>]*>(.*)</embed>`isU',   # <embed ...>..</embed> areas
	              '`<embed[^>]*>`isU');              # single, unclosed <embed ...> tags outsite object areas
	  $replacements=array(); # Storage for the elements found to be processed
	  foreach(array_keys($tags) as $idx) { # Handle all kings of tag areas and tags, one by one
	    $tmptags=array(); # Storage for the found occurrences
	    preg_match_all($tags[$idx],$row->text,$tmptags); # And here they are
	    if ($tmptags) { # Found some?
	      foreach(array_keys($tmptags[0]) as $secidx) { # Deal with them, one by one
	        # We have to move them apart -- especially <object ...>...</object> areas with an internal
	        # <embed ...>..</embed> area or an unclosed <embed ...> tag -- otherwise they'd be found again.
	        $tagval=$tmptags[0][$secidx]; # This is the current occurrence to be processed later on
	        //$tagkey="replacetag_".$idx."_".$secidx; # Temporarily replace it by "replacetag_x_y"
			$tagkey="replacetag_".$idx."_".$secidx."_end"; // JW fix
	        # ... where x is 0..3 (object/applet/embed/s.embed) and y is the corresponding number.
	        $replacements[$tagkey]=$tagval; # Store the occurrence beside it's unique key ...
	        $row->text=str_replace($tagval,$tagkey,$row->text); # ... and actually replace the occurrence with the key
	      }
	    }
	    unset($tmptags); # A bit of dirty work
	  }
	  foreach($replacements as $tagkey => $tagval) { # Handle all occurrences, one by one
	    $jsval=addslashes($tagval); # Handle special characters properly
	    $jsval=str_replace(chr(13),"",$jsval); # remove CRs - all in one line
	    $jsval=str_replace(chr(10),"",$jsval); # remove LFs - all in one line
	    # 1. Embed that tiny little external JS to work as actual embedder.
	    # 2. Embed the original occurrence inside a JS variable -- 
	    # 3. Call the tiny little embedder to dynamically output the variable
	    # 4. Embed the original, unchanged occurrence in a <noscript>...</noscript> area as fall-back
$jsval= "<script src=\"$mosConfig_live_site/mambots/content/plugin_jw_allvideos/gz_eolas_fix.js\" type=\"text/javascript\"></script>\n".
		"<script language=\"JavaScript\">\n".
		"<!--\n".
		"var jsval = '$jsval';\n".
		# "//document.write(jsval);". # This doesn't work as it's an internal document.write(...)
		"writethis(jsval);". # So: Use the external one-liner function to perform the trick
		"//-->\n".
		"</script>\n".
		"<noscript>$tagval</noscript>";
	    # The original occurrence has been replaced with its unique "key" beforehanded,
		# now replace this stored key with is JS wrapper and noscript fallback.
	    $row->text=str_replace($tagkey,$jsval,$row->text);
	  }
	  unset($replacements); # A bit of dirty work
		return true; # Done!
	}
}

Delete this code, clear your browser's cache and reload. Report back...

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
17 years 1 month ago #50 by pmcnamara
Replied by pmcnamara on topic Re: Possible Template Conflict?
That fix didn't help me.

www.communityracingchallenge.com

Please Log in or Create an account to join the conversation.

More
17 years 1 month ago #51 by johnm
Replied by johnm on topic Re: Possible Template Conflict?
Thanks for your quick reply. Unbelievable service!

First, I tried your work-around. Unfortunately, it didn't work. I restored the original script and published everything. I then tried it using the default template - Solar Flare. Everything worked! Therefore, I concluded it is probably a template problem. As you pointed to a probable js conflict. I removed "<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/js/mootools.release.83.js"></script>" from the template.

It seems to have solved the problem, but being a newbie I am not quite sure what the the full implications are on template functioning. Basically,I can live without Live Search, but I really want to retain the Allvideos plugin feature. It's great.

Please Log in or Create an account to join the conversation.

More
17 years 1 month ago #52 by pmcnamara
Replied by pmcnamara on topic Re: Possible Template Conflict?
Oh My God !!  Halleluiah !!!    You fixed the problem for me too !!

JohnM, you are my HERO !!

Please Log in or Create an account to join the conversation.

More
17 years 2 days ago #53 by ccriativo
Replied by ccriativo on topic Re: Possible Template Conflict?
Man.. if i was women i gave to you... you solved my problem. LOL

Thanks!

Please Log in or Create an account to join the conversation.

More
16 years 9 months ago #54 by aspagarino
Replied by aspagarino on topic Re: Possible Template Conflict?
I had the same problem with IE. In my case the famous dynActiveX.js (IE 6 patch) was messing up  :P the template.

Review all the js files!

Please Log in or Create an account to join the conversation.

More
16 years 9 months ago #55 by azenis
Replied by azenis on topic Re: Possible Template Conflict?
I have the same thing happening on my site with Rocket Themes elemental on it.  Pages wont load if there is AllVideo on them, in Internet Explorer.  Firefox works fine as does Safari.

I found a similar line of code to above and removed that but it seemed to stop the moomenu working, which is not idea, as i need that to work for my site! :(  Anyone got any other fixes at all?  I really want this to work and I dont want to have to go to a different template to do so...

TIA

Please Log in or Create an account to join the conversation.

More
16 years 9 months ago #56 by neolier
Replied by neolier on topic Re: Possible Template Conflict?
I have the same problem... I dont have that line of code in my template:

""<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/js/mootools.release.83.js"></script>""

But i have this:

<script type="text/javascript" src="lacuria.com/movieworld/_jgfw_/js/prototype.js">
<script type="text/javascript" src="lacuria.com/movieworld/_jgfw_/js/jgfw_functions.js">
<link rel="stylesheet" type="text/css" href="lacuria.com/movieworld/_jgfw_/css/jgfw_css.css" media="all" />

But thoses lines are not in my template but they appear on the page source....

I dont know what component, mambot or plugin is calling those javascripts on that very strage folder on my joomla site...  :(

Can somebody help me????

Please Log in or Create an account to join the conversation.

More
16 years 9 months ago #57 by neolier
Replied by neolier on topic Re: Possible Template Conflict?
O.k... it wasnt that... i got rid of those lines of code and still not working...

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum