Forum Replies Created

Viewing 10 replies - 46 through 55 (of 55 total)
  • Thread Starter klogan2

    (@klogan2)

    Figured it out,, yea ?? Sometimes I just don’t know what to google for, but I woke up this morning, and it popped into my brain, I want to do a conditional statement. SO (maybe not prettiest code, but works):

    <?php if ( is_page('12') ) {
          echo do_shortcode('[fbcomments]');
          } else {
          }	 ?>

    where the #12 is, is the page ID. It can also be the page title, slug, etc… Turns out there are a bunch of possibilities
    I came across this article that explained it well & simply enough that I was able to accomplish what I wanted, FB comments in the footer, on the home page only!!! ??

    Thread Starter klogan2

    (@klogan2)

    So I decided I like this lightbox so much, and since this is a brand new site, I am empirically starting from scratch: deleted WP (3.3.1)+ its Database.
    Reinstalled WP, fresh new DB. So far, all I have installed or done (via settings) & using Twenty Eleven.
    1. askimet
    2. jQuery ColorBox
    3. Set Permalinks to POST.
    Results, so far Jquery Colorbox is working AOK.
    Here’s my guess as to what the problem was. I had been using a different lightbox, and I have been testing today other lightboxes. Somehow, somehwere, some conflict occurred.
    But now I am going to reinstall all the other plugins that I need for this site, and see how it goes.

    So, to followup, I have successfully reinstalled all the plugins that I had on my previous WP, AND Jquery Colorbox is STILL working,,, YEA.
    It really is a very nice lightbox, with iFrame support, which is why I was looking at it in the beginning.
    To reiterate, my theory is that one, or several, or all of the several lightboxes I tried (and deleted, as fully as I could), left something behind, or altered something in the WP core (that even a re-install of WP over the existing install didn’t resolve) caused the problem I experienced with this lightbox not working. I’d say, if it’s possible, the devleoper might try further tests, and amend his plugin to check for the offending files, and do something about it. I realize this is very complicated stuff, but from my reading there are quite a few people having trouble installing this lightbox.
    As best I can remember, the lightboxes I tried were: LightBox 3, Lightbox-Plus 2.4.6, Easy FancyBox 1.3.4.9 & lastly, JQuery Colorbox 4.3. An ignorant first bet (on my part) offender would be FancyBox, but I’m just gut-guessing with no evidence to offer at all.
    On my fresh istall of WP 3.3.1, I installed JQuery Colorbox 4.3 and ONLY JQuery Colorbox 4.3, and all is well.
    Laslty, one feature request: if the lightbox could remain centered, if the background page mistakingly (or intentially) gets scrolled, that would be terrific. I do find that some people (site viewers) get confused with the multiple scroll bars, and/or if they scroll the background and then the lightbox goes up, possibly even off the page.
    All in all, great work with this plugin. I am going to enjoy using it ??

    Thread Starter klogan2

    (@klogan2)

    Don’t think that was/is the problem, unless I am missing your point. All my thumbnail links are in this format: https://domain.com/wp-content/uploads/2012/04/filename.jpg

    Thread Starter klogan2

    (@klogan2)

    So I decided I like this lightbox so much, and since this is a brand new site, I am empirically starting from scratch: deleted WP (3.3.1)+ its Database.
    Reinstalled WP, fresh new DB. So far, all I have installed or done (via settings) & using Twenty Eleven.
    1. askimet
    2. jQuery ColorBox
    3. Set Permalinks to POST.
    Results, so far Jquery Colorbox is working AOK.

    Here’s my guess as to what the problem was. I had been using a different lightbox, and I have been testing today other lightboxes. Somehow, somehwere, some conflict occurred.
    But now I am going to reinstall all the other plugins that I need for this site, and see how it goes.

    Thread Starter klogan2

    (@klogan2)

    Cheers Premiumwp,, but I figured it out. Just a couple of “first times” that got me and had me chasing my tail.
    The first “first time issue”: is I am doing this site including a shopping cart (Jigoshop) which turned out to be the MAIN issue. Jigoshop templates override the “overall” theme themplates for quite a few of the pages. For example (within Jigoshop) the archive-product.php file is basically serving as the Home Page, and as far as I have seen so far, single-product.php is serving as the body template for pretty much everythng else.
    The second “first time issue” was that this was the first time I used TwentyEleven as a “child” theme. To be honest, I really don’t get the point of using a child theme, why not just rebrand the parent theme (LEAVING TwentyEleven as it is of course for WordPresses sake), then uploading the new version that has a completely different name, with no reliance on the parent TwentyEleven, with 1 caveat of course, if Twenty Eleven does come out with a revision, my “new” version of twenty eleven (with new name) will not get updated. Get what I mean? Anyway, I find the idea of a child theme, confusing.
    In any event, cheers, and thanks for your reply.
    Kevin

    Cool, did not know that. In any event, easy enough to prevent iFrame tags from getting stripped out, either by inserting the code into the functions.php file or by installed TinyMCE advanced and ticking the box. Works for me, don’t know how others feel.

    @ Chip.
    Oh, sorry for the confusion. TinyMCE ADVANCED plugin (by ANdrew Ozz) has the option in its settings page to allow iFrame tags just by ticking a box.
    I didn’t know the default WP editor was also called TinyMCE. In any event, the code above (basically same as yours??) does the trick for the default editor that comes with WP

    This seems to work for the WP default editor (without having TinyMCE installed & active). Code inserted into the theme’s functions.php file.

    function fb_change_mce_options($initArray) {
        // Comma separated string od extendes tags
        // Command separated string of extended elements
        $ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]';
        if ( isset( $initArray['extended_valid_elements'] ) ) {
        $initArray['extended_valid_elements'] .= ',' . $ext;
        } else {
        $initArray['extended_valid_elements'] = $ext;
        }
        // maybe; set tiny paramter verify_html
        //$initArray['verify_html'] = false;
        return $initArray;
        }
        add_filter('tiny_mce_before_init', 'fb_change_mce_options');

    It must have a “hook”. Their is a default editor, somewhere ??

    TinyMCE (at least the newest version) has a setting not to strip iFrame tags in its settings configuration page. Seems to work fine.
    But for non TinyMCE users, I want to try Chip Bennet’s code for the default WP editor. Anyone know what WP calls its own editor? So I can replace “tinymce” with that name in Chip’s code?

    function mytheme_WP default editor??????_config( $init ) {
    
    // Add IFRAME to list of valid HTML elements (so they don't get stripped)
    
    	// IFRAME
    	$valid_iframe = 'iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]';
    
    	// Add to extended_valid_elements if it alreay exists
    	if ( isset( $init['extended_valid_elements'] ) ) {
    		$init['extended_valid_elements'] .= ',' . $valid_iframe;
    	} else {
    		$init['extended_valid_elements'] = $valid_iframe;
    	}
    
    // Pass $init back to WordPress
    	return $init;
    }
    add_filter('WP default editor?_before_init', 'mytheme_tinymce_config');

    Thanks, Kevin

Viewing 10 replies - 46 through 55 (of 55 total)