[Plugin: Top 10] Patch: Option for thumbnail after title
-
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
.
- The topic ‘[Plugin: Top 10] Patch: Option for thumbnail after title’ is closed to new replies.