Sorry, the forums are locked while I handle some maintenance.

 
This Forum is Currently Locked – Access is Read Only
You must be logged in to post Login


Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

thumbnail images

UserPost

8:10 pm
August 4, 2010


drkknght

New Member

posts 2

is it possible to add thumbnail image functionality to the related post links?  that would be ideal, having the image accompany the hyper link of the posts' title

7:55 am
February 11, 2011


maggidan@gmail.com

New Member

posts 2

Agreed.

7:34 pm
March 3, 2011


Whiskey Jim

New Member

posts 1

I see this capability is added to the plug-in.  For those of us who do not wish to change templates, is there a plan to add the thumbnail as an option on the settings screen?

6:59 am
March 4, 2011


AaronCampbell

Admin

posts 242

That will probably eventually be an option.  I just need to get some more time to work on it.

Upset at my slow responses recently? Please read my explanation.

9:02 am
May 7, 2011


galerio@gmail.com

Member

posts 4

I've seen you have added the line

if ( function_exists('get_the_post_image') ) {                            $related_post->post_image = get_the_post_image($related_post->ID);

But post_image is not used anywhere to call an image with a <img.

I tried myself adding at line 300:

$p = array(
'ID' => $related_post->ID,
'post_title' => $related_post->post_title,
'permalink' => get_permalink($related_post->ID)
'post_image' => get_the_post_image($related_post->ID)
);
}
$link = "".wptexturize($p['post_title']).'';

But it results in a general error.

 

Can you help me?

11:57 am
July 31, 2011


y.noumaan@gmail.com

Member

posts 3

Thank you for the great plugin. 

 

I would also like to see the post thumbnail functionality into ERP. 

4:48 pm
July 31, 2011


y.noumaan@gmail.com

Member

posts 3

@galerio : I have figured out why you were unable to get the images. Actually there is no such function defined (neither in wordpress or the ERP) as get_the_post_image. The correct function is get the post thumbnail. So I used this on line 409: 

 

if ( function_exists('get_the_post_thumbnail') ) { 
$related_post->post_image = get_the_post_thumbnail($related_post->ID,thumbnail);
}

 

and I was able to get thumbnails. I just need to stylize them now. I think to stylize them I need to edit $output at line 300. 

6:53 am
August 4, 2011


galerio@gmail.com

Member

posts 4

Thanks y.noumaan, I have changed the code but no thumbnail is showed. When you have something more to share, please let us know!!!

 

Thanks!

2:02 pm
September 15, 2011


eightclicks

New Member

posts 1

Post edited 2:09 pm – September 15, 2011 by eightclicks


galerio@gmail.com said:

Thanks y.noumaan, I have changed the code but no thumbnail is showed. When you have something more to share, please let us know!!!

 

Thanks!

The following should work for you.

 

Edit: the editor messed up my code, and does not seem to respect either code or pre tags.

 

Here's a link to the code: http://pastebin.com/wxxDc93j

 

Relevant changes are on line 304-308 and line 410-413. Of course, you should be careful, and verify no other lines have changed before using this code.

 

Also, I've added the erp-link class to the text link, and the erp-thumbnail class to the thumbnail link. That should help in styling the related posts with the thumbnail.


About the Xavisys Forum

Forum Timezone: America/Phoenix

Most Users Ever Online: 50

Currently Online:
1 Guest

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 3
Forums: 26
Topics: 410
Posts: 1034

Membership:

There are 808 Members
There has been 1 Guest

There are 2 Admins
There is 1 Moderator

Top Posters:

lkmweb@me.com – 9
Brayne – 8
Xarzu – 8
Aaron Fineman – 8
Iain – 8
checox7@yahoo.com – 6

Recent New Members: jane@janeparkinson.com, waimalao@hotmail.com, Raffael, esparkinfo@esparkinfo.com, hgof520@hotmail.com, neunkirchen@gmail.com

Administrators: AaronCampbell (242 Posts), Imported Questions (1 Post)

Moderators: nancy@mequoda.com (0 Posts)