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.
Project blogโโ Docsโโ Twitterโโ Mastodonโโ Forum RSS feedโโ Project blog RSS feedโโ Donate
FlatPress 1.3 "Andante" is released!
How to rework your themes and plugins for FlatPress 1.3 / Smarty 4
FlatPress 1.3 "Andante" is released!
How to rework your themes and plugins for FlatPress 1.3 / Smarty 4
Re: last entries Thumbnail
well, at least I know it's possible somehow
Who is online
Users browsing this forum: No registered users and 15 guests