[3.2][BETA] 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
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4482
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

[3.2][BETA] Topic Image Preview

Post by VSE » Sat Feb 11, 2017 4:39 pm

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-b1

Requirements: phpBB 3.2.0

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).
  • 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://github.com/VSEphpbb/TopicImageP ... 0.0-b1.zip
Repository: https://github.com/VSEphpbb/TopicImagePreview

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.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
Dictated but not read.

User avatar
lopoto
Registered User
Posts: 65
Joined: Thu Feb 12, 2015 3:13 pm

Re: [3.2][ALPHA] Topic Image Preview

Post by lopoto » Sat Feb 11, 2017 4:51 pm

thx :)

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

Re: [3.2][ALPHA] Topic Image Preview

Post by ViolaF » Sat Feb 11, 2017 9:39 pm

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
Registered User
Posts: 59
Joined: Wed Nov 09, 2016 5:49 pm

Re: [3.2][ALPHA] Topic Image Preview

Post by kim902 » 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.
Hardest thing in life is accepting some one else has done it better.

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

Re: [3.2][ALPHA] Topic Image Preview

Post by ViolaF » Sat Feb 11, 2017 9:58 pm

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
Registered User
Posts: 59
Joined: Wed Nov 09, 2016 5:49 pm

Re: [3.2][ALPHA] Topic Image Preview

Post by kim902 » Sat Feb 11, 2017 10:08 pm

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
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4482
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [3.2][ALPHA] Topic Image Preview

Post by VSE » Sat Feb 11, 2017 11:33 pm

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.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
Dictated but not read.

kim902
Registered User
Posts: 59
Joined: Wed Nov 09, 2016 5:49 pm

Re: [3.2][ALPHA] Topic Image Preview

Post by kim902 » Sun Feb 12, 2017 8:34 pm

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 » Mon Feb 13, 2017 5:42 am

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: 1433
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [3.2][ALPHA] Topic Image Preview

Post by Stoker 4.0 » Mon Feb 13, 2017 6:54 am

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 ;)

User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4482
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [3.2][ALPHA] Topic Image Preview

Post by VSE » Mon Feb 13, 2017 9:00 am

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.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
Dictated but not read.

User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4482
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [3.2][ALPHA] Topic Image Preview

Post by VSE » Wed Feb 15, 2017 2:11 am

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.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
Dictated but not read.

User avatar
JoshyPHP
Code Contributor
Posts: 753
Joined: Mon Jul 11, 2011 12:28 am

Re: [3.2][ALPHA] Topic Image Preview

Post by JoshyPHP » 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()) . ')';
I wrote the thing that does the BBCodes in 3.2. Unless it broke yours, in which case it was somebody else with a similar name.

User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4482
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [3.2][ALPHA] Topic Image Preview

Post by VSE » Wed Feb 15, 2017 7:53 am

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.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
Dictated but not read.

User avatar
JoshyPHP
Code Contributor
Posts: 753
Joined: Mon Jul 11, 2011 12:28 am

Re: [3.2][ALPHA] Topic Image Preview

Post by JoshyPHP » Wed Feb 15, 2017 12:27 pm

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 thing that does the BBCodes in 3.2. Unless it broke yours, in which case it was somebody else with a similar name.

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: dmzx, oBot and 31 guests