Summary of images posted in a topic

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Anti-Spam Guide
Post Reply
konzy
Registered User
Posts: 1
Joined: Thu Jun 29, 2017 11:27 am

Summary of images posted in a topic

Post by konzy » Thu Jun 29, 2017 11:40 am

Hello!
Here is my issue: my forum is dedicated to photography, and members can have their own topics, where they post their pictures. Other members can comment pictures, give advice, etc. There are also community topics with a theme (landscape, portrait, night photography...) where anyone can contribute.

The thing is, however, some topics have now reached 50 or 100 pages, with hundreds of images posted, either as links (Flickr or similar) or uploads. Sometimes, you just want to browse through all the pictures posted in a topic, without searching all the pages one by one (some of which don't have any image inside).

To your knowledge, do you know any mod that could allow members to do it?

If there is no mod to do that, do you have any idea how it could be done? What would you advise: a dedicated page, an Ajax lightbox..?

Thanks for your input! :)

Konzy

User avatar
Toxyy
Registered User
Posts: 700
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Summary of images posted in a topic

Post by Toxyy » Fri Jun 30, 2017 9:07 pm

Maybe create a div above or below the topic header or footer, run an sql query to select posts with attachments, and populate the div with a list of the post links or the attachment links.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][BETA] Sticky Ad || [3.2][RC] Show User Activity ||
[3.2][DEV] User Delete Topics

User avatar
ViolaF
Registered User
Posts: 1456
Joined: Tue Aug 14, 2012 11:52 pm

Re: Summary of images posted in a topic

Post by ViolaF » Sat Jul 01, 2017 12:13 pm


User avatar
Ger
Recognised Extension Developer
Posts: 1880
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Summary of images posted in a topic

Post by Ger » Tue Jul 04, 2017 12:39 pm

konzy wrote:
Thu Jun 29, 2017 11:40 am
The thing is, however, some topics have now reached 50 or 100 pages, with hundreds of images posted, either as links (Flickr or similar) or uploads. Sometimes, you just want to browse through all the pictures posted in a topic, without searching all the pages one by one (some of which don't have any image inside).
So te recap: you want to search per topic for all posts with either attachments or embedded images, display all those images in a summary page. Correct?

Now I don't have an extension for you, but you can simply query the database for all attachments in a topic:

Code: Select all

SELECT * FROM phpbb_attachments
JOIN phpbb_extensions USING(extension)
WHERE group_id = 1 # images extension group
AND topic_id = 762; # your topic_id
For embedded images, it's a tad harder. You can of course take a LIKE query like such:

Code: Select all

SELECT * FROM phpbb_posts 
WHERE topic_id = 762
AND post_visibility = 1
AND post_text LIKE '%<IMG src="%">%'
However, for larger topics with ± 100 pages (e.g. 2000 posts) with many images, this might turn into a slow query. Also, you might get some false positives. You should definitely test this with real world data from your board. Run this query for a large topic with many embedded images, see how long it takes.

After that, you need to also check if the requesting user has permissions to view the topics and extensions. For instance: in above query I added post_visibility = 1 but a moderator might also want to check on unapproved / hidden posts.
What would you advise: a dedicated page, an Ajax lightbox..?
I wouldn't make this directly available on a topic page, since this would without any doubt cause your board to slow down, resulting in complaining users. I would make a nice button at the top and bottom of your viewtopic page that opens a dedicated page with all the found images (paginated/lazy loaded). Adding a lightbox to such a page is child's play and makes it much more accessible for your users to I would add that indeed.
ViolaF wrote:
Sat Jul 01, 2017 12:13 pm
this should work, also today..

info: viewtopic.php?f=70&t=2137700

download: https://github.com/digioz/phpbb-mods/tr ... ttachments
1. It's a MOD, not an extension.
2. It never came further then early development stage.
3. It doesn't install properly for phpBB 3.2.
4. It's not intended for what the OP is asking for.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

Havym
Registered User
Posts: 48
Joined: Sun Jan 29, 2017 3:50 pm
Location: Netherlands
Name: Marco

Re: Summary of images posted in a topic

Post by Havym » Thu Mar 22, 2018 7:58 pm

Im looking for some kind of extension too ;)

Post Reply

Return to “Extension Requests”