as the title reads...
Is it possible to add a thumbnail to show per last entries if an image is present in the topic ?
last entries Thumbnail
Re: last entries Thumbnail
Hi,
this would make a nice new plugin, say "LastEntriesWithThumbnails"
My thoughts: Take the original LastEntries plugin, rename it, and then:
this would make a nice new plugin, say "LastEntriesWithThumbnails"

My thoughts: Take the original LastEntries plugin, rename it, and then:
- Set the fullparse parameter in the new FPDB_Query() call to true (line 29) to retrieve not only the metadata of the entries, but also their contents.
- In the while ($q->hasmore()) loop (line 39), you then have access to each entry's content via $entry ['content'] - parse the content for the first "img" tag and read its "src" parameter, and you have your thumbnail image path.
- Add the image path to the $string variable within a html <img> tag to actually display the image in the widget output.

Helpful FlatPress links: Project blog
- FlatPress wiki
- FlatPress@Twitter
- FlatPress@Mastodon 
Stay up to date with our feeds: Forum RSS feed
- Project blog RSS feed 
Feel free to say Thank you: Donate
How to rework your themes and plugins for FlatPress 1.3 / Smarty 4 
Stay up to date with our feeds: Forum RSS feed
Feel free to say Thank you: Donate
Re: last entries Thumbnail
well, at least I know it's possible somehow 

Who is online
Users browsing this forum: No registered users and 0 guests