SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 35
  1. #1
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Editing WordPress Add-on

    I'm trying to get this wordpress add-on to load HTML pages. I've been informed that I have to load it into a iFrame it currently loads images without a problem all done within WordPress, but I'm stuck.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Refer to the Fancybox documentation:
    http://fancybox.net/howto

    Skip steps 1 and 2 as they are what the plugin did for you.

    You do not need to edit the addon, just add the javascript snippet to your head to attach the fancybox function to the link you want it to show.

  3. #3
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just add the javascript snippet to your head to attach the fancybox function to the link you want it to show
    Which snippet if I'm suppose to skip steps 1 & 2 ?

    What fancybox function ?

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Step 3 & 4...

  5. #5
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dan I'm suppose to put the code in Step 4 with in my head ? And then the iFrame for the link so that it loads FancyBox ? Sorry I have to make sure because the code in Step 4 seems a bit odd to be placing in the head, but if I run it within a script code?

  6. #6
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It goes in a script tag in the head. It is JavaScript code.

  7. #7
    SitePoint Zealot agarcia831's Avatar
    Join Date
    Nov 2009
    Location
    California
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried any of the example links in the Content Demos section of the plugin homepage to see if it works without having to make any changes? According to that page, once the plugin is activated it should be ready to use.

  8. #8
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Agarcia831 - What you see on that page works perfectly without any changes if your only working with images. I want FancyBox to load a HTML page, in which I have to put the script into the head of the page. I'm going to get some test page whipped together hopefully in a day or two and try it out !

  9. #9
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Actually the page he linked has examples for webpages not just images. You should give those a try, looks like it is already be set up.

    HTML Code:
    <a class="fancybox iframe" href="http://www.google.com/">This link opens another page in an Iframe</a>

  10. #10
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dan - I'm suppose to take this code and put it in a <script> tag ? Then turn a anchor link using this code:

    <a href="http://www.example?iframe">This goes to iframe</a>
    In that code you see above this sentence I don't see where it would tell fancy box to load the anchor link as a HTML file within FancyBox ?



    <script>$(document).ready(function() {

    /* This is basic - uses default settings */

    $("a#single_image").fancybox();

    /* Using custom settings */

    $("a#inline").fancybox({
    'hideOnContentClick': true
    });

    $("a.group").fancybox({
    'speedIn' : 600,
    'speedOut' : 200,
    'overlayShow' : false
    });
    });</script>

  11. #11
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Just make a normal link, in your page, and put class="fancybox iframe" on it. That's all.

  12. #12
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I must be doing something wrong, because I put that code as a anchor on my blog post and the anchor link does not call up FancyBox as in there example ??

  13. #13
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <a class="fancybox iframe"=http://www.google.com>This link</a>
    What I'm doing, the post shows the code rather then the link.

  14. #14
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Try a properly formed href attribute:

    <a class="fancybox iframe" href="http://www.google.com">This link</a>

  15. #15
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That doesn't work either. I'm beginning to wonder that's it's not as straight forward as it's made out to be.

  16. #16
    SitePoint Zealot agarcia831's Avatar
    Join Date
    Nov 2009
    Location
    California
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SiberianHuskey View Post
    What I'm doing, the post shows the code rather then the link.
    when editing your post, make sure you're entering the code with the HTML tab selected and not the Visual tab.

  17. #17
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <a class="fancybox iframe" href="http://www.google.com">This link</a>
    That worked but it's not loading the page in FancyBox and I do have it enabled it's just loading it in the same window.

  18. #18
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Can you post a link to the trial page you're working on?

  19. #19
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All I'm doing is a simple test whereas I'm creating a link that should load Google within fancy box but as I mentioned the link works but it doesn't load it within FancyBox.

  20. #20
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    It may be only a minor error preventing Fancybox from working. Providing a link to the page is the quickest way to get effective help.

  21. #21
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SiberianHuskey View Post
    All I'm doing is a simple test whereas I'm creating a link that should load Google within fancy box but as I mentioned the link works but it doesn't load it within FancyBox.
    Quote Originally Posted by Victorinox View Post
    It may be only a minor error preventing Fancybox from working. Providing a link to the page is the quickest way to get effective help.
    Indeed, if you can post a link we might be able to spot the error.

  22. #22
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the link to a testing blog post when you click on the link Google will load up instead of Google loading within FancyBox

  23. #23
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    That page is filled with JavaScript errors.

    You have jQuery loading twice, once before Fancybox and once after, but neither is version 1.3+ which Fancybox uses.

    You have Prototype/Scriptaculous and jQuery on the same page, which is always a mess -- you should choose one framework for your blog and stick with it.

    And you have two lightbox plugins (lightbox/fancybox) on the same page -- you should choose one for your blog and stick with it.

    Lightbox is throwing errors as well.

    The mess might not be why the link doesn't work right, but it's hard to pick things apart like this.
    Attached Images Attached Images

  24. #24
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dan the Fancy Box plug-in is a WordPress plug-in all I had done is the usually "activate" the plug-in in WordPress. I have deactivated the lightbox plug-in but the results are the same what do you suggest I do ?

  25. #25
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    jQuery still loads twice. The second instance is related to the tabs function that's part of the theme you're using.

    To test whether this is causing the problem, try removing the following line in the file creativesheepblog/wp-content/themes/Maginoo3/header.php

    Code:
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.js"></script>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •