Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter boots

    (@boots)

    I dug around a bit and got this to work by trial and error. I’m not the sharpest pencil in the pack. This a great feature for proper change management.

    The javascript tests if the hostname is not my production site, and if not it adds noindex, nofollow.

    Of course this goes in the <head> section where other meta calls are made.

    <script language="JavaScript">
    if (!(location.hostname == "www.example.com")) {
      document.write ('<meta name="robots" content="noindex,nofollow">')
    }
    </script>

    Enjoy

    Boots

    Thread Starter boots

    (@boots)

    Here’s the solution I came up with pulling together a number of various elements including using BitsOnTheRun video hosting.

    <div class="video">
    
    <SCRIPT language=JavaScript>
    
    var htext=new Array()
    var flvid=new Array()
    
    //insert first variables here where htext[xy]
    
    htext[0]='More To The Show';
    htext[1]='Here's Today's Feature;
    htext[2]='Encore Presentation';
    htext[3]='That's All Folks';
    
    //insert second variables here where flvid[xy]
    
    flvid[0]='jTKE0HYF-9572';
    flvid[1]='FsgRMDZ2-9572';
    flvid[2]='YeONpx87-9572';
    flvid[3]='SZgxeJnD-9572';
    
    var xy = Math.floor(Math.random()*4); ); //generates a random whole digit
    
    // test code
    // var xy= 1
    // document.write(' "'+[xy]+'" ' );
    // document.write(' "'+flvid[xy]+'" ' );
    
    document.write('<h2>'+htext[xy]+' </h2>');
    
    document.write('<embed src="http://content.bitsontherun.com/players/'+flvid[xy]+'.swf" wmode="transparent" width="300" height="245" />');
    
    </SCRIPT>
    </div>
    Thread Starter boots

    (@boots)

    Note:

    Without WP Super Cache, this routine works:

    <?php   $randompick = mt_rand(1, 4);
        if ( $randompick == "1" ) {
            include("content1-flv.php"); }
        if ( $randompick == "2" ) {
            include("content2-flv.php"); }
        if ( $randompick == "3" ) {
            include("content3-flv.php"); }
        if ( $randompick == "4" ) {
            include("content4-flv.php"); }
    ?>

    Thanks

    -Boots

    Thread Starter boots

    (@boots)

    Hey Otto – Paying attention paid off. Thanks. Boots

    <?php
    IF   ( in_category(5) || in_category (6) )
    {
    IF  ($todays_date < $expired)
    {
    sharethis_button(); echo '<br /> . <br />' ;
    } else {
    echo 'add your 2 cents...';> . <br /> . <br />' ;
    }
    } else {
    ;
    }
    ?>
    Thread Starter boots

    (@boots)

    Otto42: I had read the in_categoy function. Note I am operating in the loop. What else am I missing?

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                    <h1><?php the_title(); ?></h1>
                <?php $expired = get_post_meta($post->ID, 'expdate', $single = true); $todays_date = date("Y-m-d"); ?>
    
    test for category:
    <?php
    $category = get_the_category();
    echo $category[0]->cat_name;
    ?>
    
        <?php if (in_category == '2008' || '2009' ) { ?>
        <?php if( $todays_date < $expired ) { ?>
            <!-- do nothing -->
        <?php } else { ?>
            <?php echo '<span style="color:#334D84;font-weight:bold">The Party is Over...&nbsp;&nbsp;did you have GOOD time?</span> ' . ' <span style="color:#666666";> ' ; ?>  <br /><br />
        <?php } ?>
        <?php } ?>
    
                <?php the_content(__('Read more'));?><div style="clear:both;"></div>
    
        <?php if (in_category == '2008' || '2009' ) { ?>
        <?php if( $todays_date < $expired ) { ?>
            <?php if (function_exists('sharethis_button')) { sharethis_button(); } ?>  <br />    <br />
        <?php } else { ?>
            <?php echo '<span style="color:#334D84;font-weight:bold">add your 2 cents below...</span> ' . ' <span style="color:#666666";> '; ?>    <br />    <br />
        <?php } ?>
        <?php } ?>
    
                <div class="postmeta">
                    <p><!--  Written by <?php the_author(); ?> &middot; Filed Under <?php the_category(', ') ?>&nbsp;<?php edit_post_link('(Edit)', '', ''); ?><br />Tagged: <?php the_tags('') ?> --> </p>
                </div>
    
                <?php endwhile; else: ?>
    
                <p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    Thread Starter boots

    (@boots)

    I tried adding the is_category test and closing arg below without success. It provides the same functionality as before. I tested with an echo that I have the right category, 2008 or 2009, in memory. Even on posts from other categories my code with ‘sharethis_button’ and echo ‘The Party is Over…’ is executing while discriminating on $todays_date < $expired.

    <?php $expired = get_post_meta($post->ID, 'expdate', $single = true); $todays_date = date("Y-m-d"); ?>  <!-- from custom field -->
    
        <?php if (is_category == '2008' || '2009' ) { ?>
    
        <?php if( $todays_date < $expired ) { ?>
            <?php if (function_exists('sharethis_button')) { sharethis_button(); } ?>
        <?php } else { ?>
            <?php echo 'The Party is Over...' ; ?>
    
        <?php } ?>
    
        <?php } ?>
    
        <?php the_content(__('Read more'));?><div style="clear:both;"></div>

    Milo says:

    Works, but not with the new_query string,
    just the simple loop and then
    add tag by name instead of cat by ID

    Could you provide a simple loop with tag example please?

    Thanks

    -boots

    Here’s the solution. It solved the problem for me.

    http://www.hongkiat.com/blog/wordpress-25-image-upload-error-wordpress-fix/

    Hey All: I was successful in using kimili + Simple Viewer in pages and posts. I use Breeze Browser Pro to generate my images, thumbs, and imageData.xml. I started with a template from Peter Berger and then modified the template (or you can just rename index2.html to imageData.xml.) Peter’s template made this a piece o’ cake.

    I am also using iBox. It’s the easiest of LightBox/ThickBox/etc. displays to implement.

    When I put an iBox and a SimpleViewer display on the same page/post, iBox does not dim the SimpleViewer display. I suppose I would not expect it to without some special magic. Also the iBox display slides under the SimpleViewer display.

    Can anyone think of some special magic to dim Simpleviewer when an iBox is up while at the same time having the iBox be in front of the SimpleViewer display?

    See my dev page.

    Thanks.

    Boots

Viewing 9 replies - 1 through 9 (of 9 total)