We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17883
    • 1,039 Posts
    hmmm, no I don´t. And it is working now:

    http://www.mademyday.de/neu/

    Here is the current plugin code (perhaps I changed something, take a look):

    /*
    Plugin Name: WebSnprX
    Plugin URI: http://www.mademyday.de/neu/
    Description: WebSnprX simply integrates <a href="http://www.websnapr.com">WebSnapr</a>-Script in your MODx content. Adds preview bubble to all external links.
    Version: 0.6 - 03.04.07
    Author: Marc Hinse (based on a Wordpress plugin by XSized - http://tagg.selfip.com/blog/wordpress-plugin-snapr/
    Author URI: http://www.mademyday.de/neu/
    */
    
    /*
    Javascript for Preview-Bubbles by WebSnapr - http://www.websnapr.com
    */
    
     $e= & $modx->Event;
    switch ($e->name) {
    	case "OnWebPagePrerender":	
    	$text = $modx->documentOutput;
    	// search and replace external Links in document	
    	        $modx->documentOutput = str_replace('base href="http://','basehref="http://',$modx->documentOutput);
    		$modx->documentOutput = str_replace(' href="http://',' class="previewlink" href="http://',$modx->documentOutput);
                    $modx->documentOutput = str_replace('basehref="http://','base href="http://',$modx->documentOutput);
    		// $modx->documentOutput = str_replace('class="previewlink" href="'.$modx->config['site_url'],'href="'.$modx->config['site_url'],$text);
    		break;	
    
    	case "OnParseDocument":
    	// generate JS for the header
    	
    		$WebSnprX_pluginpath = $modx->config['site_url']."assets/plugins/WebSnprX/";
    		$SnaprHead = "\n<!-- Snapr Plugin -->\n";
    		$SnaprHead.= "<script type=\"text/javascript\">var bubbleImagePath=\"".$WebSnprX_pluginpath ."bg.png\"</script>\n";
    		$SnaprHead.= "<script type=\"text/javascript\" src=\"". $WebSnprX_pluginpath ."previewbubble.js\"></script>\n";
    		$SnaprHead.= "<!-- /Snapr Plugin -->\n";	
    		$modx->regClientScript($SnaprHead);
                 break;
    
    	    default:
    		return; // stop here - this is very important. 
            break;
    }


    AFAIK I didn´t change something in the JS file.
      • 8790
      • 526 Posts
      Hi,


      Still having IE stucks.

      I installed the MODx plugin (and not directly the js only).

      still a warning in the status bar of ie.

      Again some interference between different js ...?
      phpMyvisit2
      Google analytics
        Schtroumpf Grognon - Grouchy Smurf
        ---------------------------------
        Faites pas attention.. - Don&#39;t pay attention
        http://www.dzi-neo.net
        • 17883
        • 1,039 Posts
        What does firebug display? No errors? Since I don´t have any errors in IE, I think it´s really a conflict with googleanalytics. phpmv2 is not the reason imho, since I have it, too.
          • 8790
          • 526 Posts
          I just tooke off my g-analytic chunk from the tpl.

          may be you can tell me if here (for example) the link click-immo display the snapshot ..or not in your ie ?

          here ...always the same..
          (http://www.neo-tekk.com/click-immo.html)

          Thank you
            Schtroumpf Grognon - Grouchy Smurf
            ---------------------------------
            Faites pas attention.. - Don&#39;t pay attention
            http://www.dzi-neo.net
            • 4041
            • 788 Posts
            The only thing I could see that might be an improvement to make to the plugin is a way to allow some sort of if/else condition to add to be able to specify which links to add the preview class to. For example the Social Bookmarks all show Forbidden Request in the bubble on hover.... defeats the purpose in my opinion.

            Adding a specific tag somehow to the links you want changed perhaps?
              xforum
              http://frsbuilders.net (under construction) forum for evolution
              • 4041
              • 788 Posts
              looking at the source code of your page the link you refer to has two sets of class="previewlink"....

              <p>
              <a class="previewlink" class="previewlink" href="http://www.click-immo.com" target="_blank">
              www.click-immo.com </a>
              </p>


              maybe that has something to do with IE bugging out with this error:

              Line:4
              Char:2
              Code:0
              Error:’document.getElementById(...)’ is null or not an object
              URL:http://www.neo-tekk.com/click-immo.html
                xforum
                http://frsbuilders.net (under construction) forum for evolution
                • 8790
                • 526 Posts
                I definitively dont understand this.

                I just edit this content, saw the html : there’is ONLY one class declaration!!

                How can we have 2 into the rendered code huh

                (there’s 2 times the class"previewlink" declaration huh ?!

                [edit]
                I unchecked one of the 2 calling event for the pluggin (I left only Onparsedocument)

                Now the Html has only one time the class previewlink ..but same issue in IE...

                  Schtroumpf Grognon - Grouchy Smurf
                  ---------------------------------
                  Faites pas attention.. - Don&#39;t pay attention
                  http://www.dzi-neo.net
                  • 17883
                  • 1,039 Posts
                  Yes, the plugin definitely need some parameters and other improvements (better replacement via regex e.g.). Unfortunately I don´t have time for this at the moment.

                  @elz: Doesn´t work here, too sad

                  But: What if you disable the plugin? I think the JS error is not caused by the plugin because in its JS there is no getElementById...
                    • 4041
                    • 788 Posts
                    Don’t know if this has anything to do with it, and it may just be that I don’t know much about conditionals... what are these characters in the following in bold for?

                    <!--[if !IE]><-->
                    <link media="screen, projection" type="text/css" href="/" rel="stylesheet" />
                    <link media="screen, projection" type="text/css" href="/" rel="stylesheet" />

                    <!--><![endif]-->
                      xforum
                      http://frsbuilders.net (under construction) forum for evolution
                      • 8790
                      • 526 Posts
                      hum.;

                      Dont remember ! I’m really sorry

                      It’s a standard we setup, some time ago and I’m sur without those caracters it wont works...

                      Check on CSS oriented site plz. I’ll try to get back some info too
                        Schtroumpf Grognon - Grouchy Smurf
                        ---------------------------------
                        Faites pas attention.. - Don&#39;t pay attention
                        http://www.dzi-neo.net