xoops forums

FreddyH

Just popping in
Posted on: 2013/7/16 15:13
FreddyH
FreddyH (Show more)
Just popping in
Posts: 18
Since: 2013/7/1 1
#11

Re: Publisher Random Item

I guess maybe I have an outdated version... Is this the latest? and how can I dl it? http://xuups.googlecode.com/svn/trunk/modules/publisher/

Mamba

Moderator
Posted on: 2013/7/16 15:18
Mamba
Mamba (Show more)
Moderator
Posts: 10375
Since: 2004/4/23
#12

Re: Publisher Random Item

in the /publisher folder

The latest version is here

Please support XOOPS & DONATE
Use 2.5.8 | Debug | Requests | Bugs

FreddyH

Just popping in
Posted on: 2013/7/16 15:21
FreddyH
FreddyH (Show more)
Just popping in
Posts: 18
Since: 2013/7/1 1
#13

Re: Publisher Random Item

Oh, thanks.. :)

Mamba

Moderator
Posted on: 2013/7/16 15:22
Mamba
Mamba (Show more)
Moderator
Posts: 10375
Since: 2004/4/23
#14

Re: Publisher Random Item

I am not sure, I understand you. The link that I gave you was to a Zip file.
Please support XOOPS & DONATE
Use 2.5.8 | Debug | Requests | Bugs

FreddyH

Just popping in
Posted on: 2013/7/16 15:23
FreddyH
FreddyH (Show more)
Just popping in
Posts: 18
Since: 2013/7/1 1
#15

Re: Publisher Random Item

Yeah, sorry... :)

FreddyH

Just popping in
Posted on: 2013/7/25 9:10
FreddyH
FreddyH (Show more)
Just popping in
Posts: 18
Since: 2013/7/1 1
#16

Re: Publisher Random Item

I almost got it to work... I made a new/extra block, but the image will not output 100% quality... I changed to 100% in thumb.php but that didn't do much... Atm it looks like it's set to 50% quality... help! i'm stuck...

FreddyH

Just popping in
Posted on: 2013/7/26 10:39
FreddyH
FreddyH (Show more)
Just popping in
Posts: 18
Since: 2013/7/1 1
#17

Re: Publisher Random Item

Found it... If you want a larger pic you have to change line 531/532 in thumb.php

LioMJ

Just popping in
Posted on: 3/20 22:02
LioMJ
LioMJ (Show more)
Just popping in
Posts: 31
Since: 2012/4/10
#18

Re: Publisher Random Item

Quote:

sabahan wrote:
ok i think got it..add featured image for random article

in items_random_item.php

$mainImage $itemsObj->getMainImage();
        
// check to see if GD function exist
        
if (!function_exists('imagecreatetruecolor')) {
            
$block['item_image'] = $mainImage['image_path'];
        } else {
            
$block['item_image'] = PUBLISHER_URL '/thumb.php?src=' $mainImage['image_path'] . '&w=' $imgwidth// No $imgheight for autoheight option
        
}


template publisher_items_random_item.html



<img src="<{$block.item_image}>" alt="" width="100" height="100" align="left" style="padding:5px;"/>


at first i got blank page because of this warning
//CAREFUL!! with many items this will exhaust memory
remove $block['lang_fullitem'] = _MB_PUBLISHER_FULLITEM;
notw its ok




How do i show more than 1 random item other than cloning this block ?

Zap_English

Quite a regular
Posted on: 5/6 4:34
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 337
Since: 2016/5/24
#19

Re: Publisher Random Item

I'm not getting an image, just a blank image placeholder

the only change I made to the code was PUBLISHER_URL to RECIPES_URL and BEVERAGES_URL because I'm using clones of publisher

Is there something else that needs to be defined? image_path maybe?

Help!

Zap_English

Quite a regular
Posted on: 5/6 5:50
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 337
Since: 2016/5/24
#20

Re: Publisher Random Item

ok, now it's working but it's not showing my default image