1
sabahan
Publisher: Add Image for other articles listed under article ?
  • 2013/3/23 13:47

  • sabahan

  • Quite a regular

  • Posts: 317

  • Since: 2006/3/4 5


Hi

Need some help with the Publisher Module by Trabis

i have set the "Other articles display type: All articles" in preferences

how do I add the item image of all of the "other articles" listed

Now it is displaying Title, Hits, Date submission, i need to add image for the respective article

i know we have have to edit the file item.php somewhere line 118 and in the template publisher_item.html


but i have limited php knowledge..


2
sabahan
Re: Publisher: Add Image for other articles listed under article ?
  • 2013/3/24 10:51

  • sabahan

  • Quite a regular

  • Posts: 317

  • Since: 2006/3/4 5


i manage to find the solution

in item.php somewhere in line 118 add this

$mainImage $theitemObj->getMainImage();
            
// check to see if GD function exist
            
$theitem['item_image'] = $mainImage['image_path'];
            if (!empty(
$mainImage['image_path']) && function_exists('imagecreatetruecolor')) {
                
$theitem['item_image'] = ARTIKEL_URL '/thumb.php?src=' $mainImage['image_path'] . '&w=100';
            }




in publisher_item.html

use this to call the image
<{if $item.item_image != ''}> <a href="<{$item.itemurl}>" title="<{$item.title}>">
           
                    <
img src="<{$item.item_image}>" alt="<{$item.title}>" align="left" width="100" /> 
a><{/if}>

3
Cesagonchu
Re: Publisher: Add Image for other articles listed under article ?

Thank you sabahan, maybe we'll add it to publisher module

Login

Who's Online

242 user(s) are online (149 user(s) are browsing Support Forums)


Members: 0


Guests: 242


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits