Forum Replies Created

Viewing 15 replies - 46 through 60 (of 273 total)
  • Hmm where exactly is the link that’s not working on https://www.richmondbiznews.com/? Lot of content over there oO

    I don’t know why the ” are escaped in the widget settings, this did not happen to me yet. Anyways, allowscriptaccess is a parameter (p={}), not an attribute (o={}). It’s also set to “always” by default. So you can delete that line.

    There are no problems know with WordPress 2.7 – except that the admin panel settings appear a bit ugly. With the upcoming v1.5.1 it will look way better.

    Some information please:

    1. A screenshot of the widget settings or detail information
    2. Is the .swf created by yourself?
    3. Where does and should the link goto? (“not working”)
    4. An URL to an example would be very helpful

    What versions of WordPress and pb-embedFlash are you using?

    I don’t get any errors with pb-embedFlash v1.5.0.3 and WordPress 2.7.

    Thanks! But… uhm… I don’t get any JavaScript errors on that blog – neither in IE 7, nor in Firefox 3.

    Did you change something?

    <?php if (is_home()) { ?>
    <script type="text/javascript">
    var openShadowbox = function(){Shadowbox.open({
            content:'https://www.martinbennett.com/uploads/portfolio/index.html',
            type:	'iframe',
            title:	'Martin Bennett - Photographer'
        })};
    if(window.onload) {
      var temp = window.onload;
      window.onload=function(e) {
        temp(e);
        openShadowbox();
      };
    }
    else{
      window.onload=function(e) {
        openShadowbox();
      };
    }
    </script>
    <?php } ?>

    This should automatically load the shadowbox only on your index/home page, not on pages or posts. A simple PHP condition. ??

    As always, I need the URL to that error / the blog.

    For that specific error, a list of your active plugins would be helpful, too.

    Of course you should paste the code only on pages where it should be. Currently, the script is loaded on each page/post.

    You could check via php if it’s is_home() or something like that.

    Loading the Layer only once a session would also be possible, but is beyond my plugin and requires some programming skills.

    I could now test the thing and there is basically one change: It’s type: 'iframe' instead of player: 'html'.

    Anyways, I simplified the code a bit:

    <script type="text/javascript">
    	var openShadowbox = function(){Shadowbox.open({
    	        content:    'https://www.martinbennett.com/uploads/portfolio/index.html',
    	        type:     	'iframe',
    	        title:      'Martin Bennett - Photographer'
    	    })};
    	if(window.onload) {
    	  var temp = window.onload;
    	  window.onload=function(e) {
    	    temp(e);
    	    openShadowbox();
    	  };
    	}
    	else{
    	  window.onload=function(e) {
    	    openShadowbox();
    	  };
    	}
    </script>

    Just copy the bunch anywhere after calling wp_head();.

    Worked fine for me.

    You need to call that option “onload”, means after the page has finnished loading.

    So I suggest to try the second code snippet from my prior post:

    function callOpenShadowbox() {
      openShadowbox('https://www.martinbennett.com/uploads/portfolio/index.html', 'html', 'Martin Bennett - Photographer');
    }
    
    if(window.onload) {
      var temp = window.onload;
      window.onload=function(e) {
        temp(e);
        callOpenShadowbox();
      };
    }
    else{
      window.onload=function(e) {
        callOpenShadowbox();
      };
    }

    Maybe I was a bit unclear. The following script should be copied “as is” to your header.php:

    <script type="text/javascript">
    var openShadowbox = function(content, player, title){
        Shadowbox.open({
            content:    content,
            player:     player,
            title:      title
        });
    };
    </script>

    Afterwards, you can use the function to load something:
    openShadowbox('https://www.martinbennett.com/uploads/portfolio/index.html', 'html', 'Martin Bennett - Photographer');

    But how should the parser know, when exactly to load the function. Well… that’s really a bit tricky.

    function callOpenShadowbox() {
      openShadowbox('https://www.martinbennett.com/uploads/portfolio/index.html', 'html', 'Martin Bennett - Photographer');
    }
    
    if(window.onload) {
      var temp = window.onload;
      window.onload=function(e) {
        temp(e);
        callOpenShadowbox();
      };
    }
    else{
      window.onload=function(e) {
        callOpenShadowbox();
      };
    }

    The window.onload method can only be applied once, so we need to re-apply the old script (load the Shadowbox script) and add the new script (open the box directly onload).

    I couldn’t test anything yet, but basically, the code should work.

    — below this, there’s a bit offtopic stuff —

    Everything would be alot easier, but Microsoft does not implement the standard way “addEventListener” and has its own function “attachEvent”. Loading only two scripts, it would a bunch too much code to do it the “nice” way:

    /* for Mozilla/Safari(?)/Opera9*/
    if (document.addEventListener) {
      document.addEventListener("DOMContentLoaded", init, false);
    }
    
    /* for Internet Explorer */
    /*@cc_on @*/
    /*@if (@_win32)
      document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
      var script = document.getElementById("__ie_onload");
      script.onreadystatechange = function() {
        if (this.readyState == "complete") {
          init(); // call the onload handler
        }
      };
    /*@end @*/
    /* fallback for other browsers */
    window.onload = init;

    (init = function to load)

    See? ??

    The flashvars listed in the flashvar section of the admin panel are only applying on the JW FLV Media Player – like the text in the admin panel says.

    If you want to stop “normal” SWFs from autoplaying and repeating, you either have to a) ask the creator for a version without that features or b) use flashvars that MAY be available by default.

    In case b), you can pass flashvars to that (and any other) file by using a syntax like [flash https://path.to/your/file.swf?autoplay=false&repeat=false]

    How does the [flash …] tag you use in your post look like?

    Well… what about the width w= and the height h=?

    It seems that I was wrong. Using fs=1 with the players URL, the fullscreen option will be enabled.

    To use it with pb-embedFlash, please download the new version 1.5.0.3 and use the flashvar syntax f={fs=1} withtin the [flash …] tag.

Viewing 15 replies - 46 through 60 (of 273 total)