Forum Replies Created

Viewing 15 replies - 1 through 15 (of 27 total)
  • Thread Starter miruru

    (@miruru)

    Thats good news. I will wait for the next release.

    I have tried what was written in this thread and it works to a degree.

    However when I use:

    <?php $letter = $_GET['letter'];
    if ($letter=="") echo "No Entries Found!";
    else
    $loop = new WP_Query( array( 'post_type' => 'glossary', 'meta_key'=> 'first-letter', 'meta_value' => $letter, 'posts_per_page' => 10 ) ); ?>

    I cannot seem to have the “No Entries Found” message, it just does not display anything but a blank page.

    I have the following code in my template

    <?php $letter = $_GET['letter'];
    if ($letter=="") echo "No Entries Found!";
    else
    $loop = new WP_Query( array( 'post_type' => 'glossary', 'meta_key'=> 'first-letter', 'meta_value' => $letter, 'posts_per_page' => 10 ) ); ?>
    
    <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
    <div id="post-<?php the_ID(); ?>" class="jglossary">
    
    <li><a class="fancybox" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>
    
    </div>
    
    <?php endwhile; // end of the loop. ?>

    Am I doing something wrong?

    Thread Starter miruru

    (@miruru)

    Thats ok. Thank you.

    Thread Starter miruru

    (@miruru)

    Wow that was fast. I was just going to mention about the new tab style breaking the horizontal tabs.

    Thread Starter miruru

    (@miruru)

    Thank you. It’s looks fantastic!!!

    Thread Starter miruru

    (@miruru)

    Thank you again for speedy response.

    Also thank you for pointing out the stray . and quotes, they have been removed.

    I have now managed to get this working with the following:

    <?php
    $return = '[gn_tabs style="2"]';
    $return .= '[gn_tab title="table"] [table] [/gn_tab]';
    
    if ( fs_get_meta('field1') !== ''  ) {
       $return .= ' [gn_tab title="field1"][field1][/gn_tab] ';
    }
    if ( fs_get_meta('field2') !== ''  ) {
       $return .= '	[gn_tab title="field2"][field2][/gn_tab]';
    }
    if ( fs_get_meta('field3') !== ''  ) {
       $return .= '	[gn_tab title="field3"][field3][/gn_tab]';
    }
    
    $return .= '[/gn_tabs]';
    
    // Now, variable has complete code, and we can execute it
    echo do_shortcode( $return );
    ?>

    Thank you for this fantastic plugin.

    Thread Starter miruru

    (@miruru)

    Hu gn_themes, thank you for the speedy response.

    I’ve tried the following:

    <?php
    
    $return .= '[gn_tabs style="2"]';
    $return .= '[gn_tab title="table"] [table] [/gn_tab]';
    $return .= '[gn_tab title="field1"] [field1] [/gn_tab]';
    
    if ( !empty( $c ) ) {
       $return .= '	[gn_tab title="field2"][field2"][/gn_tab]';
    }
    
    if ( !empty( $c ) ) {
       $return .= '	[gn_tab title="field3"][field3][/gn_tab]';
    }
    
    $return .= '[/gn_tabs]';
    
    // Now, variable has complete code, and we can execute it
    echo do_shortcode( $return );
    ?>

    However this only displayed the first tab only. I’m not sure what i’m doing wrong. I’m not PHP efficient but I am learning. Any help would be most appreciated.

    Thread Starter miruru

    (@miruru)

    thank you. That worked perfectly!!!

    Another quick question re the above code.

    How would I use the IF / ELSE statement with the above code? The content is displayed in a custom field.

    For example:

    1. Tab A and Tab B will always be displayed.
    2. If not empty, display Tab C, however do not display.
    3. If not empty, display Tab D, however do not display.

    Is this possible?

    Thank you again for a great plugin!

    Thread Starter miruru

    (@miruru)

    After posting my query, I started playing around and have managed to work this out but only for a single tab. I entered the shortcodes for the tabs in one do_shortcodecommand rather than split them up:

    <?php echo do_shortcode( '[gn_tabs][gn_tab title="TEST"][SHORTCODE FOR CONTENT][/gn_tab][/gn_tabs]' ) ?>

    How would this work if I have multiple tabs? As it still only display one tab.

    Thread Starter miruru

    (@miruru)

    Thank you Diogo15 and Michael, using hide_empty worked.

    Thread Starter miruru

    (@miruru)

    I managed to get the plugin working:

    I used:

    $terms = apply_filters( 'taxonomy-images-get-terms', '', array('taxonomy'=> 'tax-name'));
    if ( ! empty( $terms ) ) {
    	foreach( (array) $terms as $term ) {
    		print '<a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'thumb' ) . '</a>' ;
    	}
    }

    as opposed to:

    $terms = apply_filters( 'taxonomy-images-get-terms', '') );
    if ( ! empty( $terms ) ) {
    	foreach( (array) $terms as $term ) {
    		print '<a>taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'thumb' ) . '</a>' ;
    	}
    }

    The main difference was where I added array('taxonomy'=> 'tax-name')
    Also, thank you for a fantastic plugin.

    Thread Starter miruru

    (@miruru)

    Hi Michael, thank you for replying.

    The shortcode does not work. I’m using [taxonomy_image_plugin_list taxonomy="nameoftaxonomy" template="grid" size="thumbnail"] unless this is incorrect.

    Also, i am trying to display a taxonomy.

    When i’m using the first code, nothing is displayed. I’ve even substituted the word taxonomy with the name of the taxonomy. The errors I tend to get are the syntax errors where the coding is incorrect, that is when i’m using the second code, which you have now clarify what it does. I’m putting this into Shortcode EXEC PHP so that I can simply add the shortcode into a widget. I’ve tried using:

    <?php $terms = apply_filters( 'taxonomy-images-get-terms', '' );
    if ( ! empty( $terms ) ) {
        print '<ul>';
        foreach( (array) $terms as $term ) {
            print '<li><a href="' . esc_url( get_term_link( $term, $term->anime-series) ) . '">' . wp_get_attachment_image( $term->image_id, 'detail' ) . '</li>';
        }
        print '</ul>';
    }?>

    in a php widget but get a syntax error about the < being unexpected.

    I just don’t know what else to try.

    I found a way that you can do this.

    You will need to create an album in an album, that is how i have set it up.

    Example:
    I have 3 albums; 2 of which contains a number of galleries. The third album contains the 2 albums (with galleries).

    Like so:

    Album 1
    >Galleries

    Album 2
    >Galleries

    Album 3 (Main Gallery)
    >Album 1
    >Album 2

    So on the page which you will display the albums, I used the ID of Album 3 which will display Album 1 and 2. So when you click onto the Albums, you will see the galleries that belongs to that album.

    Hope that makes sense.

    Thread Starter miruru

    (@miruru)

    hmmm, thank you for all your help.

    I couldn’t find anything in the forum. In the end, I’ve decided to re-upload those images that did not have the controls as it would be quicker than to work out what is wrong.

    Thread Starter miruru

    (@miruru)

    ok, i’m getting one step closer to the controls actually working.

    I have commented out:

    if(!$filename || !file_exists($filename))
    return $string;

    and

    if($width <= 0 || $height <= 0)
    return $string;

    then i got the following error:

    Warning: getimagesize(url) [function.getimagesize]: failed to open stream: No such file or directory in myurl/plugins/scissors/scissors.php on line 805
    
    Warning: Division by zero in myurl/plugins/scissors/scissors.php on line 876

    I commented out line 805 which is:

    list($width, $height) = getimagesize($filename);

    This removed the first warning message and left me with the Division by Zero message on line 876. To remove the Division by Zero message, I commented out:

    $string .= "<input type='hidden' id='scissorsFullAspectRatio-$postId' value='" . ($width / $height) . "' />";

    and it has removed all warning messages and the controls actually appeared.

    I was able to click on the controls and when selecting “Apply”, I get the progress bar as though it is actually doing something but then I get an error message saying, “Invalid post-id”

    I hope the above helps with diagnosing this problem.

    Thank you for all your help so far.

Viewing 15 replies - 1 through 15 (of 27 total)