WordPress.org

Ready to get started?Download WordPress

Forums

Contextual Related Posts
[resolved] Changes in code breaks Related Posts styles (14 posts)

  1. ChowKaiDeng
    Member
    Posted 2 years ago #

    Hi! Today I updated to the new version of CRP in one of my sites, but apparently you changed the way the plugin prints the .crp_title.

    In the old version, there was a separate <a> for the img and another for the title, but now the two of them, image and title, are inside of the same <a>. I think that printing .crp_thumb and .crp_title inside .crp_link it's an unnecessary change, and for me, means that I would have to change styles for all my sites using CRP (usually I put the image thumb on the left, and the title and excerpt floating to the right of the image).

    If that's the new way, there's nothing I can do except changing my styles for every, site before my clients make a mess of it when they update the plugins, but I just wanted to give you my feedback as designer and fan of your plugin, because I feel I'm not the only one who'll be affected by this.

    Please correct me if I'm wrong, I haven't checked the CRP php files to make sure about this. All I can see is what one of my websites is printing right now.

    Greetings!
    Dan

    http://wordpress.org/extend/plugins/contextual-related-posts/

  2. ChowKaiDeng
    Member
    Posted 2 years ago #

    After a few attempts, I've realized that It's worst than I thought. I just symply cannot work with this structure:

    <a class="crp_link">
     <img class="crp_thumb" />
     <span class="crp_title"></span>
    </a>
    <span class="crp_excerpt"></span>

    The way the <a> tag encloses the thumb and title makes a dependency that I can't visually break using CSS the way I used to do before, which was something like:

    <a class="crp_thumb"><img /></a>
    <a class="crp_title"></a>
    <span class="crp_excerpt"></span>

    Will you consider un-doing that change in future versions?

    Greetings!
    Dan

  3. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    Dan,

    The previous code used to result in:

    <a><img class="crp_thumb" /></a>
    <a class="crp_title"></a>
    <span class="crp_excerpt"></span>

    In order to reduce the number of <a>, I created the new set of code.

    Could you let me know how severe this change has resulted in? If this is really bad, I can push up a quick update to bring it back to the original piece of code.

  4. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    Also, can you let me know the CSS code you are using? And, the result that you expect (screenshot)

  5. ChowKaiDeng
    Member
    Posted 2 years ago #

    Hi Ajay!

    Thanks for your quick reply.
    You can check how I use CRP at the bottom of any of the posts in my blog, like this one: Lego R2D2

    I haven't updated the plugin there yet.

    Here is the screenshot.

    I use that particular configuration, and almost the same CSS, in at least 4 more sites. I use CRP without images in about 4 other sites (like this one Zipper).

    This is a sample of my CSS in Camionetica.com (just the important parts). I always print CRP using
    <ul> (sometimes <dl>):

    img.crp_thumb {
    	width:65px;
    	height:65px;
    	display:block;
    	float:left;
    	clear:left;
    	margin-right:10px;
    	padding:3px;
    	border:1px #CCCCCC solid;
    }
    
    #crp_related ul li {
    	clear:both;
    	list-style:none;
    	margin-bottom:15px;
    	display:block;
    	height:70px;
    }
    
    #crp_related .crp_title {
    	font-weight:bold;
    	font-size:14px;
    	display:block;
    	padding-bottom:5px;
    	text-decoration:none;
    }

    I understand the idea of reducing <a> tags, but in my opinion there's not too much code being reduced, and those separate blocks for titles, images, and excerpts, are necessary in order to give it styles in more different ways.

    Please let me know what do you think about it. As I said before, I'm a big fan of CRP (it's definitely the best to do this particular job)!

    Greetings!
    Dan

  6. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    Dan,

    Firstly, I love the way you display the posts. A lot of users have requested to display it in this manner, and if it works for you, I'd like to share this code with them (plus include it in a future version of the package)

    Secondly, I think I understand the problem. I am going to release a new version later today that will role back the code to the previous version.

  7. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    Dan,

    I just released the update. Can you let me know if it works fine now?

  8. ChowKaiDeng
    Member
    Posted 2 years ago #

    Hi Ajay!

    Sorry for the late reply, I've had tons of work this last two days.

    Thanks for your comments! I think that the CSS styles could be greatly improved but they always have worked fine in all my projects, so I keep using them as they are.

    If you want to include it on the documentation, I could fix a couple of examples that could work 100% with TewntyTen , using <ul> or <dl>, as well as improving the SEO by using something like <h3> for the titles and <p> for the excerpts. We could even create a short tutorial for users with no XHTML/CSS expertise. What do you think?

    The updated version works perfect with my old styles. THANK YOU so much for taking note of my sugestions and updating the plugin so fast!

    BTW, I'll be making a donation during the next few weeks, but as in my contry we have serious restrictions for accessing purchases/donations in foreign currency, it won't be too much... But I'll be more than happy to collaborate as a designer in anything you need.

    Thanks again!

    PS: do you see my email address in my profile? If so, drop me a line whenever you need anything. If you can't see it, let me know and i'll write it down here... or just google my nickname and you'll find me everywhere :)

  9. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you! I've been able to apply this code on my blog http://sirconandoyle.com

    I plan on (in a future version) create a set of ready styles that can be used by users since most have asked me about the image on the left etc, so that users can just pick their styles instead of digging in the CSS

  10. ChowKaiDeng
    Member
    Posted 2 years ago #

    Hi Ajay,

    Great! I'm a big fan of Conan Doyle myself since I was 8. Let me know if you need anything for the CSS ready styles.

    I was trying to make a donation to your PayPal account using the "donate" button inside the plugin settings windows, but it seems the account has been closed. This is the message i get:

    We cannot process this transaction because this PayPal account has been closed. For more information, please contact the seller.

    Let me know if you fix it to proceed.

    Cheers!

  11. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    Wow. Thanks for informing me about that one. I'll push up an update to fix this.

    I had to close a PayPal account and reopen it. Seems like that broke things.

    You can send it to me directly at me AT ajaydsouza DOT com

    Thanks once again :)

  12. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    Just pushed out a new release. The form should work now

  13. ChowKaiDeng
    Member
    Posted 2 years ago #

    Hi Ajay! Now it's working great. I've just made a small donation :) I hope everyone makes a contribution.

    I recommend you this article about AdBlock's creator Michael Gundlach, on Flatter, and some of his advices for sustainability on the development of "free" projects.

    BTW, AdBlock is awesome.

    I've been working in an article about 10 essential plugins which i use in any WordPress site, and I'm definitely including CRP.

    Cheers!

  14. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic