vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Enhanced Thread Preview (https://vborg.vbsupport.ru/showthread.php?t=323048)

MarkFL 07-17-2016 09:00 PM

Enhanced Thread Preview
 
1 Attachment(s)
Overview:

In certain areas of vBulletin 4.x, when you hover your mouse over a thread title, you see a tooltip that displays a truncated version of the first post content. This simple product allows you to designate areas in which the tooltip will also contain a truncated version of the last post.

https://vborg.vbsupport.ru/attachmen...1&d=1468820031

The product settings allow you to enable/disable the product, set how guests are handled, and select the areas in which the product is active. When deciding how to handle guests, you may select for thread previews to be hidden in all areas whether they are selected as active or not, to hide them in the active areas only, to display the default preview or to allow guests to see the enhanced thread preview. I recommend not allowing guests to see the enhanced thread previews to reduce server load, as additional queries are required to get the last post content. Truncation of the last post follows the same setting affecting the default preview.

Updates:

Version 1.1:
  • Strip BB Codes from preview content.

Version 1.2:
  • Resolved fetch_array issue present for some.
  • Phrased the format of the new preview tooltip.

Version 1.2.1:
  • Ignore thread redirects.

Compatibility:

Tested and working on VB 4.2.x and may work on all 4.x versions of vBulletin.

Backup/Warning:

This product does not alter your database, however it is always good practice to make regular backups and you should make a backup before installing ANY new mod.

As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.

To Install:
  • Download and extract the attached .zip file.
  • Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
  • Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  • Click "Import."
  • You MUST enable the product in the settings before it will function.
  • Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.

https://vborg.vbsupport.ru/attachmen...1&d=1468820031

Support for this product can be found here:

Stratis 07-20-2016 04:37 PM

Tested in vb4.2.0 pl4, works with only issue for me, that when I hover and if text field includes bbcodes I see them to.

example:

PHP Code:

Hi [b]Mark[b], does this supposed to be like thiseven I see [attach=config]xxxxxx[attach] and all other bbcodes 

Thank you

MarkFL 07-20-2016 05:19 PM

Hello Stratis,

I will fix that tonight. Thank you for alerting me to this issue. :)

MarkFL 07-20-2016 05:44 PM

It turns out vBulletin has an intrinsic function for stripping BB Codes. :D

Update - Version 1.1:
  • Strip BB Codes from preview content.

Stratis 07-20-2016 06:19 PM

Yes its ok now, Thank you very much.

MarkFL 07-20-2016 06:42 PM

Quote:

Originally Posted by Stratis (Post 2573497)
Yes its ok now, Thank you very much.

As always, thank you my friend for letting me know when I have overlooked some detail...this is very helpful to me and the vBorg community at large. :up:

Stratis 07-21-2016 03:31 AM

Nice of you, and double nice for you :)

Please check, if you get error 500
in (search.php?do=getdaily)

Thank you

MarkFL 07-21-2016 03:56 AM

Quote:

Originally Posted by Stratis (Post 2573513)
Nice of you, and double nice for you :)

Please check, if you get error 500
in (search.php?do=getdaily)

Thank you

No, I don't get an error there. :)

Stratis 07-21-2016 05:16 AM

I identified the issue for me.
Check "Search Results" in Active Areas and test please.
thank you

MarkFL 07-21-2016 05:31 AM

I had that checked. :)

Stratis 07-21-2016 05:36 AM

Ok and sorry for fuss, i will use it without checking that field :)

MarkFL 07-21-2016 06:02 AM

Well, I don't want you to be left out of a feature, it's just that unless I can duplicate the issue I can't do much to fix it. :)

babyv0x 07-23-2016 05:38 AM

Test with vBulletin 4.2.2 pl4

Forum Display/Subscriptions --> work fine but some threads the last post only ...

Search Results --> I get Fatal error: Call to a member function fetch_array() on a non-object in /opt/lampp/htdocs/packages/vbforum/search/result/thread.php(197) : eval()'d code on line 27

Who's Online/Profile (Current Activity) --> Not work

please fix !

babyv0x 07-23-2016 05:46 AM

in tooltip, if you change "lastpost" become "lastpost -----------------------------" i think it look like better.

Thank you & sorry for my bad English

MarkFL 07-23-2016 05:54 AM

Quote:

Originally Posted by babyv0x (Post 2573670)
Test with vBulletin 4.2.2 pl4

Forum Display/Subscriptions --> work fine but some threads the last post only ...

Search Results --> I get Fatal error: Call to a member function fetch_array() on a non-object in /opt/lampp/htdocs/packages/vbforum/search/result/thread.php(197) : eval()'d code on line 27

Who's Online/Profile (Current Activity) --> Not work

please fix !

I just now installed this on a vB 4.2.2 site (which your profle says you are using) and ran the product through all of the areas where thread previews are affected, and everything checked out.

What version of PHP are you running?

In the first line of the product's plugin hooked at "search_results_threadbit" try changing it to:

PHP Code:

global $vbulletin$vbphrase$db

Does that fix the fatal error?

babyv0x 07-23-2016 06:11 AM

Quote:

Originally Posted by MarkFL (Post 2573673)
In the first line of the product's plugin hooked at "search_results_threadbit" try changing it to:

PHP Code:

global $vbulletin$vbphrase$db

Does that fix the fatal error?

Search Results is OK now :up:

MarkFL 07-23-2016 06:17 AM

Quote:

Originally Posted by babyv0x (Post 2573677)
Search Results is OK now :up:

Okay, I will include that in the next update. I will also use phrasing for the format of the tooltip so you can make it whatever you want.

Look for this update within 24 hours. :D

babyv0x 07-23-2016 06:35 AM

New bug ?

When i quote short post , "Last post" in tooltip will show both, i mean i will see quote & last post

ex:
when i quote short post
Quote:

Last post z
Last post z
Last post z
Last post z"
This is my post my post My post my post My post my post My post my post

----------------------
i will see in tooltip

First post :
....
.....

Last Post:

Last post z
Last post z
Last post z
Last post z

This is my post my post My post my post ...

babyv0x 07-23-2016 06:45 AM

Quote:

Originally Posted by babyv0x (Post 2573680)
New bug ?

When i quote short post , "Last post" in tooltip will show both, i mean i will see quote & last post

ex:
when i quote short post


This is my post my post My post my post My post my post My post my post

----------------------
i will see in tooltip

First post :
....
.....

Last Post:

Last post z
Last post z
Last post z
Last post z

This is my post my post My post my post ...

when i quote long post, i still get this error. I think your mod conflict with quote BBCODE

MarkFL 07-24-2016 12:51 AM

Update - Version 1.2:
  • Resolved fetch_array issue present for some.
  • Phrased the format of the new preview tooltip.

MarkFL 07-24-2016 02:44 AM

Quote:

Originally Posted by babyv0x (Post 2573683)
when i quote long post, i still get this error. I think your mod conflict with quote BBCODE

I just ran several tests on my dev site with quotes of various lengths, and didn't have any issues.

Please try version 1.2 of this product, and let me know if the error you are experiencing still exists. :)

bosanci28 07-24-2016 11:51 AM

So if someone hoovers over and sees the post ,will that count as viewed posts? (stats)

Thanks

MarkFL 07-24-2016 02:48 PM

Quote:

Originally Posted by bosanci28 (Post 2573738)
So if someone hoovers over and sees the post ,will that count as viewed posts? (stats)

Thanks

No, previewing a thread via the tooltip doesn't count as actually viewing the thread. :)

Stratis 07-24-2016 04:47 PM

Quote:

Originally Posted by Stratis (Post 2573518)
I identified the issue for me.
Check "Search Results" in Active Areas and test please.
thank you

With the update, confirm error is gone. Thanks

bosanci28 07-24-2016 10:14 PM

Quote:

Originally Posted by MarkFL (Post 2573836)
No, previewing a thread via the tooltip doesn't count as actually viewing the thread. :)

Thanks for that info.

babyv0x 07-24-2016 11:28 PM

Quote:

Originally Posted by MarkFL (Post 2573730)
I just ran several tests on my dev site with quotes of various lengths, and didn't have any issues.

Please try version 1.2 of this product, and let me know if the error you are experiencing still exists. :)

That error still exists when i quote :mad:

New issue
With Forum Display: When I hover Redirect thread, i see tooltip with content is "First Post Last Post" . VBB default not show tooltip when hover redirect thread.

MarkFL 07-25-2016 12:09 AM

Quote:

Originally Posted by babyv0x (Post 2573851)
...New issue
With Forum Display: When I hover Redirect thread, i see tooltip with content is "First Post Last Post" . VBB default not show tooltip when hover redirect thread.

That was just an oversight and very easy to fix...I will upload an update soon. :)

MarkFL 07-25-2016 12:15 AM

Update - Version 1.2.1:
  • Ignore thread redirects.

alessi 07-27-2016 07:31 PM

nice mod, i try this

Kane@airrifle 08-14-2016 01:13 PM

Thanks Mark. Good mod, especially when used in conjunction with https://vborg.vbsupport.ru/showthread.php?t=318467 as that one does not hide BBcodes in thread previews.


All times are GMT. The time now is 08:45 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04230 seconds
  • Memory Usage 1,816KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (30)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete