[CDB] Topic Image Preview

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5982
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

[CDB] Topic Image Preview

Post by MattF »

Extension Name: Topic Image Preview
Author: VSE

Extension Description: This is an extension that will display thumbnail previews of images in a topic when hovering the mouse over the topic. It's like my Topic Preview extension, except it only shows a preview of the images posted. It will preview either the oldest images posted, or the most recent images posted (they do not have to be in the first or last posts).

This should be useful for boards that focus on posting image galleries. I made this extension just to see if it could be done easily in an efficient way. Not sure what exactly users may be looking for, so please comment if you like.

Configuration settings can be found in ACP -> Post Settings

Extension Version: 1.0.0

Requirements: phpBB 3.2.1 or newer

Features:
  • Previews images posted using the IMG bbcode (attachments are not supported)
  • Set the number images to show in a preview
  • Set the size of the preview images
  • Preview either the first images posted (oldest), or the last images posted (newest).
  • Users have preference to disable image previews if they want
  • Admin can use forum-based permissions to allow the forums and usergroups they want to see image previews
  • Image previews work in search results (as topics), and they will respect any forum/usergroup permissions.
  • Image previews work with Precise Similar Topics, and they will respect any forum/usergroup permissions.
  • Images are extracted from all posts from all topics on the page in 1 single SQL query, so it's very low impact on performance and resource usage.
Screenshots:
tip.jpg

Extension Download: https://www.phpbb.com/customise/db/exte ... e_preview/
Repository: https://github.com/iMattPro/TopicImagePreview

IMPORTANT: If you are updating from any BETA release to the RC release, you MUST FULLY DISABLE, PURGE and DELETE the BETA version of this extension. Then you should install the RC version as a fresh install.

Note: The preview effect is handled by a 3rd party tooltip plug in. For best results, the default settings are what I recommend. Of course you're free to make images bigger or smaller and as many or few as you like, but the preview tooltip could have undesirable results if you go too extreme with the settings.
You do not have the required permissions to view the files attached to this post.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
lopoto
Registered User
Posts: 111
Joined: Thu Feb 12, 2015 3:13 pm

Re: [3.2][ALPHA] Topic Image Preview

Post by lopoto »

thx :)
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: [3.2][ALPHA] Topic Image Preview

Post by ViolaF »

Thx to this very great 2-FI-Clone :D
Designed and inspired by 4seven (full credit)
Last edited by DavidIQ on Sun Feb 12, 2017 3:31 pm, edited 1 time in total.
Reason: Sanitized post (removed link to notorious MOD developer website)
kim902
I've Been Banned!
Posts: 59
Joined: Wed Nov 09, 2016 5:49 pm

Re: [3.2][ALPHA] Topic Image Preview

Post by kim902 »

ViolaF wrote: Sat Feb 11, 2017 9:39 pm Thx to this very great 2-FI-Clone :D
Designed and inspired by 4seven (full credit)
Designed and inspired by 4seven but rewrote to come into ext form and that means alot of changes.
Hardest thing in life is accepting some one else has done it better.
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: [3.2][ALPHA] Topic Image Preview

Post by ViolaF »

Oh yes, you're the greatest programmer in the world
and you can do all the things on your own.
I love you, you are great and awesome :D
kim902
I've Been Banned!
Posts: 59
Joined: Wed Nov 09, 2016 5:49 pm

Re: [3.2][ALPHA] Topic Image Preview

Post by kim902 »

Not at all i'm new to phpbb but did use it a few years ago just getting fed up with seeing 4seven this 4seven that hey he/she is banned :lol: If 4seven want full credit then get him to port a mod.

Is there ever going to be a ext thats not going to be linked to 4seven site claiming everything was written by 10seven?
Hardest thing in life is accepting some one else has done it better.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5982
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: [3.2][ALPHA] Topic Image Preview

Post by MattF »

kim902 wrote: Sat Feb 11, 2017 9:49 pm
ViolaF wrote: Sat Feb 11, 2017 9:39 pm Thx to this very great 2-FI-Clone :D
Designed and inspired by 4seven (full credit)
Designed and inspired by 4seven but rewrote to come into ext form and that means alot of changes.
Image

Never heard of 4seven or that MOD. And frankly, it's quite insulting when one sits down and takes the time to figure out an extension that does not exist, and have someone else try to claim they had something to do with themselves. I built this extension for the challenge. And because I was able to pull it off I decided to share it.

This was inspired only by the requests I get to do images only in my topic preview extension.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
kim902
I've Been Banned!
Posts: 59
Joined: Wed Nov 09, 2016 5:49 pm

Re: [3.2][ALPHA] Topic Image Preview

Post by kim902 »

Just as i was trying to say :lol:

It would seem just about every ext ViolaF is linking to 4seven site and in some cases screaming credit

Either way thankyou for this ext it's nice.
Hardest thing in life is accepting some one else has done it better.
User avatar
Louis7777
Registered User
Posts: 247
Joined: Sat Apr 21, 2012 9:22 pm

Re: [3.2][ALPHA] Topic Image Preview

Post by Louis7777 »

Would it be possible to use this functionality for your Precise Similar Topics extension?

Imo it would be appealing to show the first image pulled from the first post along with the title and some of the text (and maybe the author's name and the date), just like blogs do it. If there isn't any image, then show a default "no image" image.

Image
User avatar
Stoker 4.0
Registered User
Posts: 1504
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen

Re: [3.2][ALPHA] Topic Image Preview

Post by Stoker 4.0 »

I think its great when someone takes time to convert an old mod of mine and make it as an ext.
Its rare that we inspire people. Be proud when it happens ;)
Regards Stoker
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5982
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: [3.2][ALPHA] Topic Image Preview

Post by MattF »

Not a MOD conversion. Far as I know, there has never been a MOD that does what this extension can do.
Louis7777 wrote: Mon Feb 13, 2017 5:42 am Would it be possible to use this functionality for your Precise Similar Topics extension?
Eventually. But Precise Sim Topics needs some rewriting to make it happen.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5982
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: [3.2][ALPHA] Topic Image Preview

Post by MattF »

I can no longer recommend installaing this extension on any board.

It worked great on my test board, but when I tried it on a board with almost a million posts, it brought the board to a screeching halt.

I may re-examine this extension if there is enough interest.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
JoshyPHP
Code Contributor
Posts: 1291
Joined: Mon Jul 11, 2011 12:28 am

Re: [3.2][ALPHA] Topic Image Preview

Post by JoshyPHP »

Can't you rewrite the query to join the posts table using topic_first_post_id/topic_last_post_id? I haven't tested it, probably worth a try.

Code: Select all

$sql = 'SELECT t.topic_id, p.post_text
	FROM ' . TOPICS_TABLE . ' t
	JOIN ' . POSTS_TABLE . ' p ON p.post_id = t.topic_' . ($this->config->offsetGet('vse_tip_new') ? 'last' : 'first') . '_post_id
	WHERE ' . $this->db->sql_in_set('t.topic_id', $topic_list) . '
		AND p.post_text ' . $this->db->sql_like_expression($this->db->get_any_char() . '<IMG ' . $this->db->get_any_char()) . ')';
I wrote the library that handles markup in phpBB 3.2+.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5982
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: [3.2][ALPHA] Topic Image Preview

Post by MattF »

JoshyPHP wrote: Wed Feb 15, 2017 3:29 am Can't you rewrite the query to join the posts table using topic_first_post_id/topic_last_post_id? I haven't tested it, probably worth a try.

Code: Select all

$sql = 'SELECT t.topic_id, p.post_text
	FROM ' . TOPICS_TABLE . ' t
	JOIN ' . POSTS_TABLE . ' p ON p.post_id = t.topic_' . ($this->config->offsetGet('vse_tip_new') ? 'last' : 'first') . '_post_id
	WHERE ' . $this->db->sql_in_set('t.topic_id', $topic_list) . '
		AND p.post_text ' . $this->db->sql_like_expression($this->db->get_any_char() . '<IMG ' . $this->db->get_any_char()) . ')';
Thats what my topic preview ext basically does. The goal with this one was to not be stuck with only the first or last post, however. Otherwise, this just won't work if somebody replies without posting images, for example. So it needed to search all the posts to find the first-most or last-most posts with images.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
JoshyPHP
Code Contributor
Posts: 1291
Joined: Mon Jul 11, 2011 12:28 am

Re: [3.2][ALPHA] Topic Image Preview

Post by JoshyPHP »

Oh ok, I understand now, both the purpose and why the query will end up being slow if topics get a bit too big. (assuming this isn't an issue with the query plan)

If you resume work on that extension you may want to try replacing the subquery with a derived table that you would join to the posts table using post_id. MySQL generally handles derived tables better.
I wrote the library that handles markup in phpBB 3.2+.

Return to “Extensions in Development”