WordPress.org

Ready to get started?Download WordPress

Forums

Top 10 - Popular posts plugin for WordPress
[Plugin: Top 10] Patch: Option for thumbnail after title (4 posts)

  1. Daedalon
    Member
    Posted 2 years ago #

    Ajay: Please incorporate this patch after incorporating my previous patch :)

    This adds the option to display thumbnail after the title. Very handy when you want to just display a title and image or you want the image to be in between the title and excerpt. The following applies after my previous patch. Without it the change would by slightly different but still easy to do based on the following.

    In admin.inc.php find from line 238

    <input type="radio" name="post_thumb_op" value="inline" id="post_thumb_op_0" <?php if ($tptn_settings['post_thumb_op']=='inline') echo 'checked="checked"' ?> />
    		<?php _e('Display thumbnails inline with posts',TPTN_LOCAL_NAME); ?></label>
    		<br />
    		<label>
    		<input type="radio" name="post_thumb_op" value="thumbs_only" id="post_thumb_op_1" <?php if ($tptn_settings['post_thumb_op']=='thumbs_only') echo 'checked="checked"' ?> />
    		<?php _e('Display only thumbnails, no text',TPTN_LOCAL_NAME); ?></label>
    		<br />
    		<label>
    		<input type="radio" name="post_thumb_op" value="text_only" id="post_thumb_op_2" <?php if ($tptn_settings['post_thumb_op']=='text_only') echo 'checked="checked"' ?> />

    and replace it with

    <input type="radio" name="post_thumb_op" value="inline" id="post_thumb_op_0" <?php if ($tptn_settings['post_thumb_op']=='inline') echo 'checked="checked"' ?> />
    		<?php _e('Display thumbnails inline with posts, before title',TPTN_LOCAL_NAME); ?></label>
    		<br />
    		<label>
    		<input type="radio" name="post_thumb_op" value="after" id="post_thumb_op_1" <?php if ($tptn_settings['post_thumb_op']=='after') echo 'checked="checked"' ?> />
    		<?php _e('Display thumbnails inline with posts, after title',TPTN_LOCAL_NAME); ?></label>
    		<br />
    		<label>
    		<input type="radio" name="post_thumb_op" value="thumbs_only" id="post_thumb_op_2" <?php if ($tptn_settings['post_thumb_op']=='thumbs_only') echo 'checked="checked"' ?> />
    		<?php _e('Display only thumbnails, no text',TPTN_LOCAL_NAME); ?></label>
    		<br />
    		<label>
    		<input type="radio" name="post_thumb_op" value="text_only" id="post_thumb_op_3" <?php if ($tptn_settings['post_thumb_op']=='text_only') echo 'checked="checked"' ?> />

    and on top-10.php find line 168

    if (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='thumbs_only')) {

    and replace it with

    if ($tptn_settings['post_thumb_op']=='after') {
    					$output .= $title; // Add title now if thumbnail comes after it
    				}
    				if ($tptn_settings['post_thumb_op']=='after' || $tptn_settings['post_thumb_op']=='inline' || $tptn_settings['post_thumb_op']=='thumbs_only') {

    and finally change line 191 from $output .= $title; to $output .= $title; // Add title if thumbnail inline before text or no thumbnail.

    http://wordpress.org/extend/plugins/top-10/

  2. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    I am implementing this in v1.8

  3. Daedalon
    Member
    Posted 2 years ago #

    Great news. I'm working next on an option that allows the shortcode output to be columnized and to make sure the formatting is in line with usual post and page layouts.

    We had Top 10 in the sidebar so far and am now moving it to its separate page as I seek to have related or random videos displayed on the sidebar. On the current theme there's space for two posts displayed next to each other, possibly even three. It should also be feasible to add support for as many columns as the user desires or especially for fluid layouts let them flow freely to use as much space as the post area has.

    Another addition I'm thinking of is random posts below most popular ones.

  4. Daedalon
    Member
    Posted 2 years ago #

    The CSS solution for columnizing the manually placed list.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags