Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Ajay

    (@ajay)

    mariomb,

    Custom styles on my sites haven’t been impacted too much. I’ve changed the way the HTML elements are generated so as to give even more classes that help users style.

    If the style broke, a small tweak in the CSS should ideally fix the result.

    Ideally, you should be styling these elements as a base:
    img.tptn_thumb and .tptn_posts_daily .tptn_title, .tptn_posts .tptn_title

    You also have new class for all content after the image: tptn_after_thumb

    Thread Starter mariomb

    (@mariomb)

    I had custom styles to fix positioning of the thumbnail inline with text, and now after I updated the script, the text and thumbnail are with the link separately and not together as I used to have.

    Plugin Author Ajay

    (@ajay)

    Can you post the CSS code. Maybe I can help modify it to get the result

    Thread Starter mariomb

    (@mariomb)

    .tptn_thumb { float:left; margin-right:px; }
    .tptn_link { clear:both; min-height:px; margin:px 0px 5px 0px; display:inline-block; }

    Plugin Author Ajay

    (@ajay)

    Can you try if this works?

    .tptn_thumb { float:left; margin-right:px; }
    .tptn_posts ul li, .tptn_posts_daily ul li { clear:both; min-height:px; margin:px 0px 5px 0px; display:inline-block; }

    I’ve just replaced tptn_link which used to earlier wrap the img and a tags with the li which wraps the same

    Thread Starter mariomb

    (@mariomb)

    Sorry about my delay – there was a problem in your code, on the top10.php

    there are at least two lines (as much as I’ve noticed) that are repeated and that are therefore not allowing the custom CSS styles to work

    Do check it out when you can.

    Plugin Author Ajay

    (@ajay)

    Which lines are you are referring to specifically?

    Thread Starter mariomb

    (@mariomb)

    }
    				if ($post_thumb_op=='inline' || $post_thumb_op=='after' || $post_thumb_op=='thumbs_only') {
    					$output .= '<a>ID).'" rel="bookmark'.$rel_attribute.'" '.$target_attribute.'class="tptn_link">'; // Add beginning of link
    					$output .= tptn_get_the_post_thumbnail('postid='.$result->ID.'&thumb_height='.$thumb_height.'&thumb_width='.$thumb_width.'&thumb_meta='.$thumb_meta.'&thumb_html='.$thumb_html.'&thumb_default='.$thumb_default.'&thumb_default_show='.$thumb_default_show.'&thumb_timthumb='.$thumb_timthumb.'&scan_images='.$scan_images.'&class=tptn_thumb&filter=tptn_postimage');
    					$output .= '</a>'; // Close the link
    				}
    				if ($post_thumb_op=='inline' || $post_thumb_op=='text_only') {
    					$output .= '<span class="tptn_after_thumb">';
    					$output .= '<a>ID).'" rel="bookmark'.$rel_attribute.'" '.$target_attribute.'class="tptn_link">'; // Add beginning of link
    					$output .= '<span class="tptn_title">' . $title . '</span>'; // Add title when required by settings
    					$output .= '</a>'; // Close the link

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Placing the $post_thumb_op==’inline’ on the first line leads to custom styles CSS not being able to place it inline as it should.

    Plugin Author Ajay

    (@ajay)

    mariomb,

    I don’t see duplicate code there, the way that is built is that if the case is inline i.e. the thumbnail is before the post title option, then it creates a structure like this:

    <ul class="crp_related" id="crp_related">
    <li>
    <a class="tptn_link"><img src="POST THUMB URL" class="tptn_thumb" /></a>
    <span class="tptn_after_thumb">
    <a class="tptn_link"><span class="tptn_title">[POST TITLE]</span></a>
    [OTHER OPTIONAL CONTENT e.g. AUTHOR, EXCERPT etc.]
    </span>
    </li>
    </ul>

    As you can see the post thumb sits in its own a tag and the rest of the content sits within its own span tag.

    Thread Starter mariomb

    (@mariomb)

    The problem is that the <a class="tptn_link"> causes the image and the title to appear in diferent lines.
    I even tried to make a css hack, but wasn’t able to. That is why i came up with that ‘hack’ and now it works like a charm.

    Plugin Author Ajay

    (@ajay)

    I think the forum parser code messed up the code. Could you please repost this here or alternatively at http://snipt.org/ for me to take a look.

    Also, could you please post your CSS.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Custom styles’ is closed to new replies.