PDA


View Full Version : Display only one thumbnail with your news


Lionel
08-21-2005, 08:37 PM
So you allow for many attachments in your threads and they all display on your portal news page?

This ought to be the easiest hack in vbadvanced history.

In news.php module, replace

eval('$news[\'attachment\'] .= "' . fetch_template('postbit_attachmentthumbnail') . '";');

with

eval('$news[\'attachment\'] = "' . fetch_template('postbit_attachmentthumbnail') . '";');

That's it! It will display only one thumbnail, the last one.
To display the first one, try changing the order by with
ORDER BY attachmentid DESC

See images for before and after.

sean
09-02-2005, 03:26 AM
Thank you Lionel, I will definetly find this useful for my site. :)

Fiber
09-10-2005, 08:47 PM
How does one even get the images to show up in the news? All I get is just the file name show to click on.

Collectors
09-15-2005, 01:42 PM
How does one even get the images to show up in the news? All I get is just the file name show to click on.

I would like to know that to.

UPDATE:

It works.

comez
09-18-2005, 06:26 AM
So you allow for many attachments in your threads and they all display on your portal news page?

This ought to be the easiest hack in vbadvanced history.

In news.php module, replace

eval('$news[\'attachment\'] .= "' . fetch_template('postbit_attachmentthumbnail') . '";');

with

eval('$news[\'attachment\'] = "' . fetch_template('postbit_attachmentthumbnail') . '";');

That's it! It will display only one thumbnail, the last one.
To display the first one, try changing the order by with
ORDER BY attachmentid DESC

See images for before and after.

I don't understand.
news.php in

eval('$news[\'attachment\'] .= "' . fetch_template('postbit_attachmentthumbnail') . '";');
unavailable.

giver directions detalied please.

thanks.

Scribbller
09-19-2005, 02:51 PM
Hmm I dont see any difference in the two codes, is that for everyone or just my eyes playing tricks on me?

Lionel
09-19-2005, 02:55 PM
I simply removed one dot "." before the equal sign.