[CDB] Topic 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!
Get Involved
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: 4863
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

[CDB] Topic Preview

Post by VSE » Thu Nov 07, 2013 7:21 pm

Image Topic Preview

Description:
This is an extension for phpBB 3.1 that will display a short excerpt of text from the first post in a tooltip while the mouse hovers over a topic’s title. It supports displaying user avatars and a preview of the last post's text.

This extension is a port of my MOD from phpBB 3.0.x.

Features:
  • Let your visitors peek at what's inside a topic before they click on it
  • Admin options to display user avatars and text previews from the first and last posts
  • Admin option to set the length of text shown in the preview
  • Admin option to define BBcodes whose contents you want removed from the topic preview
  • Admin options to customize the appearance and assign different themes to board styles
  • Ships with two themes. Additional custom themes can be added using css files.
  • User option allows users to disable topic previews
  • Previews are smart: They are aware of browser window edges and they are responsive
  • The last word in the topic preview will be followed by an ellipsis and is not cut off
  • BBcode tags and URL links are removed for a cleaner text-only appearance
  • Smileys are displayed as text :)
  • Supports right-to-left languages
  • Does not significantly impact server load (no additional db queries)
  • Built-in support for integration with the "Precise Similar Topics II" extension
Requirements:
  • phpBB 3.1.0-RC2 or higher
  • PHP 5.3.3 or higher
Repository: https://github.com/VSEphpbb/topicpreview

Installation:
  • Download the latest release and unzip it.
  • Copy the entire contents from the unzipped folder to phpBB/ext/vse/topicpreview/
  • Navigate in the ACP to Customise -> Extension Management -> Extensions.
  • Find Topic Preview under "Disabled Extensions" and click Enable.
Screenshot:
Image

Important: This Extension can only be installed on phpBB 3.1. Do NOT use this on a live board. It should only be installed for testing purposes or just to check it out. No support will be provided.
Last edited by VSE on Thu Mar 20, 2014 8:09 pm, edited 10 times in total.
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.

User avatar
Raul [ThE KuKa]
Style Customisations
Style Customisations
Posts: 6062
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: [DEV] Topic Preview

Post by Raul [ThE KuKa] » Thu Nov 07, 2013 8:39 pm

Works perfectly!!! nice work. ;)
All unsolicited PMs will be ignored.
:warning: Knowledge Base | Documentation | Board rules | phpBB Styles Rules & Policies :warning:


If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate with Image
:flag_es: phpBB Spain - Online Since 2003 :heart:



User avatar
Patrick W.
Registered User
Posts: 110
Joined: Wed Sep 26, 2007 9:02 pm

Re: [DEV] Topic Preview

Post by Patrick W. » Fri Nov 08, 2013 2:02 am

Looks great and functions as it should.

Is it possible to change the time that it takes for the preview to show? I would like it to show about .5 seconds after the rollover happens. Can this be built into the settings or would a manual change have to occur?
Always use the Support Board for phpBB support. One PM answers one. One post answers many.

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

Re: [DEV] Topic Preview

Post by VSE » Fri Nov 08, 2013 6:20 am

Patrick W. wrote:Looks great and functions as it should.

Is it possible to change the time that it takes for the preview to show? I would like it to show about .5 seconds after the rollover happens. Can this be built into the settings or would a manual change have to occur?
Yes! You can edit the file located at /ext/vse/topicpreview/styles/all/template/event/overall_footer_after.html

In there you will see the following editable settings. You can edit any of these blue variables to your liking:

theme: "light", // use "light" or "dark"
delay: 1500, // the delay before showing topic previews (in milliseconds)
width: 360, // the width of topic previews (in pixels)
left: 35, // the position offset from the left (in pixels)
top: 25, // the position offset from the top (in pixels)
drift: 15, // sets the amount of vertical animation, use negative values to change direction (in pixels)


You can also set them to different values for different styles, creating unique topic previews for each style, but that requires creating a new folder for each style, with a copy of this file and its custom settings for that specific style.

For example, to make a unique look for subsilver2, you'll need to create/add this:
/ext/vse/topicpreview/styles/subsilver2/template/event/overall_footer_after.html
where overall_footer_after.html is a copy of the original version from the /all/ folder, edited with your new style specific settings for subsilver2.
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.

User avatar
Raul [ThE KuKa]
Style Customisations
Style Customisations
Posts: 6062
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: [DEV] Topic Preview

Post by Raul [ThE KuKa] » Fri Nov 08, 2013 9:29 pm

Spanish language complete for this Extension. ;)
All unsolicited PMs will be ignored.
:warning: Knowledge Base | Documentation | Board rules | phpBB Styles Rules & Policies :warning:


If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate with Image
:flag_es: phpBB Spain - Online Since 2003 :heart:



aleha
Code Contributor
Posts: 61
Joined: Wed Dec 19, 2012 10:42 pm

Re: [DEV] Topic Preview

Post by aleha » Sat Nov 09, 2013 12:43 am

On a A1 board, in the ACP when I enable the extension I get the info:

Code: Select all

The extension was enabled successfully
            Return

So when I press return I get an empty page. Is it a bug? (well not)

edit: Actually this made by board unusable possible because I had the path
vse/topicpreview/topic_preview-extension/* instead of vse/topicpreview/*

I had to manually disable the extension from the db, purge it and install it again.
Last edited by aleha on Sat Nov 09, 2013 1:41 am, edited 1 time in total.

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

Re: [DEV] Topic Preview

Post by VSE » Sat Nov 09, 2013 1:33 am

aleha wrote:On a A1 board, in the ACP when I enable the extension I get the info:

Code: Select all

The extension was enabled successfully
            Return

So when I press return I get an empty page. Is it a bug?
Nope. You need to follow the explicit instructions:
Copy the entire contents from the unzipped folder to phpBB/ext/vse/topicpreview/
Read this: viewtopic.php?f=461&t=2209916
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.

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

Re: [DEV] Topic Preview

Post by VSE » Sat Nov 09, 2013 1:34 am

Raul [ThE KuKa] wrote:Spanish language complete for this Extension. ;)
Thanks Raul!
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.

aleha
Code Contributor
Posts: 61
Joined: Wed Dec 19, 2012 10:42 pm

Re: [DEV] Topic Preview

Post by aleha » Sat Nov 09, 2013 1:45 am

VSE wrote:
aleha wrote:On a A1 board, in the ACP when I enable the extension I get the info:

Code: Select all

The extension was enabled successfully
            Return

So when I press return I get an empty page. Is it a bug?
Nope. You need to follow the explicit instructions:
Copy the entire contents from the unzipped folder to phpBB/ext/vse/topicpreview/
Read this: viewtopic.php?f=461&t=2209916
Yes, I didn't see your post when I made my edit.
This isn't related to this extension but if you don't follow the installation instruction shouldn't we allow somehow access to the ACP to disable the ext, thus not making the board unusable?

User avatar
Patrick W.
Registered User
Posts: 110
Joined: Wed Sep 26, 2007 9:02 pm

Re: [DEV] Topic Preview

Post by Patrick W. » Sat Nov 09, 2013 2:10 am

VSE wrote:
Patrick W. wrote:Looks great and functions as it should.

Is it possible to change the time that it takes for the preview to show? I would like it to show about .5 seconds after the rollover happens. Can this be built into the settings or would a manual change have to occur?
Yes! You can edit the file located at /ext/vse/topicpreview/styles/all/template/event/overall_footer_after.html

In there you will see the following editable settings. You can edit any of these blue variables to your liking:

theme: "light", // use "light" or "dark"
delay: 1500, // the delay before showing topic previews (in milliseconds)
width: 360, // the width of topic previews (in pixels)
left: 35, // the position offset from the left (in pixels)
top: 25, // the position offset from the top (in pixels)
drift: 15, // sets the amount of vertical animation, use negative values to change direction (in pixels)


You can also set them to different values for different styles, creating unique topic previews for each style, but that requires creating a new folder for each style, with a copy of this file and its custom settings for that specific style.

For example, to make a unique look for subsilver2, you'll need to create/add this:
/ext/vse/topicpreview/styles/subsilver2/template/event/overall_footer_after.html
where overall_footer_after.html is a copy of the original version from the /all/ folder, edited with your new style specific settings for subsilver2.
Awesome, thanks VSE! Is there a chance to get these settings in the ACP for those who are not comfortable editing the core files? Maybe for a 1.1 release or something latter. :) I am fine editing the core to make the changes necessary but I'm sure others are not.
Always use the Support Board for phpBB support. One PM answers one. One post answers many.

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

Re: [DEV] Topic Preview

Post by VSE » Sat Nov 09, 2013 2:11 am

aleha wrote:Yes, I didn't see your post when I made my edit.
This isn't related to this extension but if you don't follow the installation instruction shouldn't we allow somehow access to the ACP to disable the ext, thus not making the board unusable?
I've already made a bug report for this very issue.
http://tracker.phpbb.com/browse/PHPBB3-12009
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.

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

Re: [DEV] Topic Preview

Post by VSE » Sat Nov 09, 2013 2:13 am

Patrick W. wrote:Awesome, thanks VSE! Is there a chance to get these settings in the ACP for those who are not comfortable editing the core files? Maybe for a 1.1 release or something latter. :) I am fine editing the core to make the changes necessary but I'm sure others are not.
I'm trying to figure that out, because it would need to be on a per-style basis.
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.

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

Re: [DEV] Topic Preview

Post by VSE » Sun Nov 10, 2013 4:25 am

Patrick W. wrote:Awesome, thanks VSE! Is there a chance to get these settings in the ACP for those who are not comfortable editing the core files? Maybe for a 1.1 release or something latter. :) I am fine editing the core to make the changes necessary but I'm sure others are not.
Here's an update on what I'm working on. Moving all Topic Preview tooltip theme settings in to the ACP.
Image
It will display all styles your board has (I only have prosilver and subsilver2 right now) so you can choose a different theme stylesheet for any style installed on your board!

Especially cool is it will support adding more Topic Preview themes than just the default "light" and "Dark" themes. users can create their own Topic Preview theme CSS files, and just drop them in the "themes" folder. They will automatically show up as additional theme options in the list. This will allow theme creators to share their custom themes with other users of this extension!
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.

User avatar
Raul [ThE KuKa]
Style Customisations
Style Customisations
Posts: 6062
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: [DEV] Topic Preview

Post by Raul [ThE KuKa] » Sun Nov 10, 2013 9:00 am

You doing a great job VSE.
It's very interesting these new features. :)
All unsolicited PMs will be ignored.
:warning: Knowledge Base | Documentation | Board rules | phpBB Styles Rules & Policies :warning:


If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate with Image
:flag_es: phpBB Spain - Online Since 2003 :heart:



User avatar
Patrick W.
Registered User
Posts: 110
Joined: Wed Sep 26, 2007 9:02 pm

Re: [DEV] Topic Preview

Post by Patrick W. » Tue Nov 12, 2013 3:03 am

VSE wrote:<snip>
Awesome, that looks great VSE! I will be testing the ACP options once it is updated for sure. :)
Always use the Support Board for phpBB support. One PM answers one. One post answers many.

Locked

Return to “Extensions in Development”