PDA

View Full Version : Improved Thread Preview 1.5


TCattitude
10-27-2005, 10:00 PM
New version HERE:
https://vborg.vbsupport.ru/showthread.php?t=153835

Just a port of this:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=91180
...now for vb 3.5.
jrofosho ask to port it, and... here it is. Thanks to him for the help on testing the mod.

Improved Thread Preview 1.5: 6 template mods, 1 plugin, 2 new javascripts files (to clientscript folder)

akanevsky
10-28-2005, 05:18 PM
Nice hack, but you should use the OVERLIB (http://www.bosrup.com/web/overlib/) library for this, as it's much more customizable and sophisticated ;)

Lea Verou
10-28-2005, 05:27 PM
How do I change the tcats to theads? I couldn't do it via the templates...
Apart from that exellent hack! :)

Elmer
10-28-2005, 09:08 PM
You can change that in the tcthreadpreview_main.js in line 7..

You can change several things about style editing the variables in lines 7 to 14 ;)

Lea Verou
10-29-2005, 01:25 AM
You can change that in the tcthreadpreview_main.js in line 7..

You can change several things about style editing the variables in lines 7 to 14 ;)

That worked :) Thanks a lot!

jrofosho
10-29-2005, 02:42 AM
great to see this has made it's way over :)

Mr Chad
10-29-2005, 03:28 AM
nice.

Lea Verou
10-29-2005, 09:51 AM
How can I make this work for the vbadvanced block as well? I can't find a pattern to the template changes to apply it on the block's template...

mvigod
10-30-2005, 08:44 PM
Nice hack, but you should use the OVERLIB (http://www.bosrup.com/web/overlib/) library for this, as it's much more customizable and sophisticated ;)

I wouldn't be so fast to use overlib on an active forum. Last check it was about 32k or so in filesize. too big.

akanevsky
10-30-2005, 08:46 PM
I wouldn't be so fast to use overlib on an active forum. Last check it was about 32k or so in filesize. too big.
Yeah, didn't think about it :)

mvigod
10-30-2005, 09:06 PM
Yeah, didn't think about it :)

I think this one is only 17kb or so and has lots of functionality.

http://migoicons.tripod.com/demo.htm

akanevsky
10-30-2005, 09:59 PM
Yea that one's cool :)

Lea Verou
11-01-2005, 01:36 AM
Can I configure it so that ALL the tooltips of my page are like these?

rossco_2005
11-01-2005, 11:56 PM
Thanks, Great mod! :)

Just one suggestion, fix the instructions at the template edits...the <script> tags and <div> tags in some places are capatalized when they shouldn't be...proper xhtml. :P

yinyang
11-09-2005, 02:57 PM
tcat - thanks for this. i suggest just cutting and pasting the description of this hack from your other thread so others don't have to click on the link. it seems short enough.

Gizmo5h1t3
11-09-2005, 03:23 PM
nice addition, but WAY too many template edits for me...dont like editing too many.....

bashy
01-19-2006, 09:53 PM
Hi

I have installed a while back was working great but i have upgraded VB and now i have 2 previews, yours and the standard, how do i get rid of the standard 1 and just use yours please?

bashy
01-20-2006, 05:22 PM
Does anyone know the answer to my question please?

TCattitude
01-23-2006, 08:43 PM
You miss this edit:
## Template threadbit

Find:
<td class="alt1" id="td_title_$thread[realthreadid]" title="$thread[preview]">

Replace with:
<!-- TCattitude's improved thread preview -->
<td class="alt1" id="td_title_$thread[realthreadid]">
<!-- / TCattitude's improved thread preview -->


That title="$thread[preview]" is the default vb preview.

bashy
01-23-2006, 08:52 PM
I have just searched that template for the word preview and only your hack modifications show up...

The default text has been changed to yours...
Here is my threadbit

<!-- TCattitude's improved thread preview -->
<script type="text/javascript">
<!--
var THREAD_PREVIEW = "$thread[preview]";
var THREAD_ID = "$thread[threadid]";
// -->
</script>

<SCRIPT language="JavaScript1.2" src="clientscript/tcthreadpreview_style.js" type="text/javascript"></SCRIPT>
<!-- / TCattitude's improved thread preview -->
<tr>
<td class="alt1" id="td_status_$thread[realthreadid]">
$thread[openclose_editable]
<img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_status_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" />
</td>
<if condition="$show['threadicons']">
<td class="alt2"><if condition="$show['threadicon']"><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /><else />&nbsp;</if></td>
</if>
<if condition="$show['threadprefix'] == 2">
<td class="alt1" align="$prefixalign" nowrap="nowrap"><if condition="$thread['threadprefix']">$prefixmarkup[0]$thread[threadprefix]$prefixmarkup[1]</if></td>
</if>
<!-- TCattitude's improved thread preview -->
<td class="alt1Active" id="td_title_$thread[realthreadid]" title="$thread[preview]" onmouseover="this.className='alt2Active'" onmouseout="this.className='alt1Active'">
<!-- / TCattitude's improved thread preview -->

$thread[title_editable]
<div>
<span style="float:$stylevar[right]">
<if condition="$show['moderated']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/moderated_small.gif" alt="<phrase 1="$thread[hiddencount]">$vbphrase[x_moderated_posts]</phrase>" /> </if>
<if condition="$show['paperclip']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/paperclip.gif" alt="<phrase 1="$thread[attach]">$vbphrase[x_attachments]</phrase>" /> </if>
<if condition="$show['subscribed']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" alt="$vbphrase[you_are_subscribed_to_this_thread]" /> </if>
<if condition="$personalsticky"> <img class="inlineimg" src="$stylevar[imgdir_misc]/mystickypin.gif" alt="$vbphrase[sticky_thread]" /> </if>
<if condition="$show['sticky']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/sticky.gif" alt="$vbphrase[sticky_thread]" /> </if>
</span>
<if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
$thread[movedprefix]
<if condition="$show['threadprefix'] == 1">
<if condition="$thread['threadprefix']">$prefixmarkup[0]$thread[threadprefix]$prefixmarkup[1]</if>
</if>
$thread[typeprefix]
$thread[moderatedprefix]
<!-- TCattitude's improved thread preview -->
<if condition="$show['gotonewpost']">
<strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]" onMouseOver="stm(Text[$thread[threadid]],Style[2])" onMouseOut="htm()">$thread[threadtitle]</a></strong>
<else />
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" target="_blank"><img src="$stylevar[imgdir_misc]/new_window.gif" alt="New Window" width="16" height="16" border="0"></a>
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]" onMouseOver="stm(Text[$thread[threadid]],Style[2])" onMouseOut="htm()">$thread[threadtitle]</a>
</if>
<!-- / TCattitude's improved thread preview -->
<if condition="$thread['pagenav']">$stylevar[dirmark]<span class="smallfont" style="white-space:nowrap">(<img class="inlineimg" src="$stylevar[imgdir_misc]/multipage.gif" alt="$vbphrase[multipage_thread]" border="0" /> $thread[pagenav]<if condition="$show[pagenavmore]"> ... <a href="showthread.php?$session[sessionurl]t=$thread[threadid]&amp;page=$thread[totalpages]$thread[highlight]">$vbphrase[last_page]</a></if>)</span></if>
</div>

<div class="smallfont">
<if condition="$show['threadratings'] AND $show['threadrating']"><span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" border="0" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span></if>
<if condition="$show['guestuser']">
$thread[postusername]
<else />
<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]')">$thread[postusername]</span>
</if>
</div>

<if condition="$show['unsubscribe']">
<div class="smallfont">
<a href="newreply.php?$session[sessionurl]do=newreply&amp;t=$thread[threadid]" rel="nofollow">$vbphrase[reply]</a> |
<a href="subscription.php?$session[sessionurl]do=removesubscription&amp;return=ucp&amp;t=$thread[threadid]" rel="nofollow">$vbphrase[unsubscribe]</a>
</div>
</if>

</td>

<if condition="$show['threadmoved']">
<td class="alt2" align="center">-</td>
<else />
<td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>">
<div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap">
$thread[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$thread[lastposttime]</span></if><br />
<phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase</phrase> <a href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</div>
</td>
</if>

<if condition="$show['notificationtype']">
<td class="alt1"><div class="smallfont">
<label for="sub$subscribethread[$threadid]">$thread[notification]</label>
</div></td>
<td class="alt2"><input type="checkbox" name="deletebox[$subscribethread[$threadid]]" id="sub$subscribethread[$threadid]" value="yes" /></td>
<else />
<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><a href="#" onclick="who($thread[threadid]); return false;">$thread[replycount]</a></if></td>
<td class="alt2" align="center">$thread[views]</td>

<if condition="$show['forumlink']">
<td class="alt1"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a></td>
</if>
</if>

<if condition="$show['inlinemod']">
<td class="alt1">
<input type="checkbox" name="tlist[$thread[realthreadid]]" id="tlist_$thread[realthreadid]" value="$thread[checkbox_value]" <if condition="$show['disabled']">disabled="disabled"</if> />
</td>
</if>
</tr>

You miss this edit:


That [B]title="$thread[preview]" is the default vb preview.

SnickersTK
01-23-2006, 09:28 PM
I love you!

bashy
02-12-2006, 10:40 AM
You miss this edit:

Quote:
## Template threadbit

Find:
<td class="alt1" id="td_title_$thread[realthreadid]" title="$thread[preview]">

Replace with:
<!-- TCattitude's improved thread preview -->
<td class="alt1" id="td_title_$thread[realthreadid]">
<!-- / TCattitude's improved thread preview -->




That title="$thread[preview]" is the default vb preview.

Yes i did miss it well sort of lol

This is what i had done, took me a while to figure it out mind as mine was slightly different to the code to change...

<!-- TCattitude's improved thread preview -->
<td class="alt1Active" id="td_title_$thread[realthreadid]" title="$thread[preview]" onmouseover="this.className='alt2Active'" onmouseout="this.className='alt1Active'">
<!-- / TCattitude's improved thread preview -->


This works 100% and is prob one of the best hacks i have installed
and beleive me, i have 209 installed pmsl....

Well done TC.... will look forward to more of your work in the future :)

T3MEDIA
02-16-2006, 07:34 PM
I am getting an error. It seems there is a javascript error Text not defined.
I only see it on some IE machines on xp.

Belive it or not. firefox other IE it works fine. I found 22 errors and there was 22 topics showing it was the Text element... not defined... or sometimes I get expecting Object... you know IE it doesnt specify exactly just line 2.

SilentNoise
03-21-2006, 01:26 AM
I just got a request from a couple of guys on my board.

Is it possible to put a bit of a delay on when the preview shows up?

Hornstar
03-21-2006, 11:12 PM
I just got a request from a couple of guys on my board.

Is it possible to put a bit of a delay on when the preview shows up?


yeah even a 1 second delay so its not instant, i know what thats like even tho i have not installed this yet.

Also is this working fine with no problems for 3.5.4 and does it install good.

Thanks

bchertov
05-11-2006, 02:33 AM
Awesome Dude!
Thanks!:up:

sensimilla
05-13-2006, 09:00 PM
Any chance to include attachment thumbnail preview in the popup ? :D :D

Great hack, thanks

JohnBee
05-13-2006, 10:43 PM
Okay I installed this mod and uninstalled it afterwards.
Heres what I found.

First off the MOD display's (some) thread previews using popup technology under firefox. So members are asking wth happened to the thread preview function.

Secondly it only display's plain text threads, if there is formating of html display it doesn't show anything. (no preview)

It's a great idea, but CSS would do a better job of producing the preview avoiding the popup route. And I also think it would be possible to get an html redered view or thumbnail in there.

Nice idea but far from useful on my board.

ForeverForums
05-14-2006, 02:48 PM
Does this display images too or just text ?

bchertov
05-14-2006, 05:52 PM
yeah even a 1 second delay so its not instant, i know what thats like even tho i have not installed this yet.
After installing this, I also would like to have a slight delay. It would also be nice to just turn on this preview when in Firefox (or not IE) where the native browser preview doesn't work.

But overall, this is fabulous!:banana:

rmxs
05-23-2006, 09:45 AM
in 3.5.4 worl fine..

Sugestion:Preview image with on the fly RESIZE :)

rossco_2005
05-30-2006, 07:57 PM
Little tip for this mod that I just discovered:
The place for the <script> tag in threadbit (at the top) is not valid xhtml, if you are trying to make this valid put it between some <td> and </td> tags (don't make new ones, just paste it somewhere else in the threadbit template).

Stoebi
06-02-2006, 03:07 AM
Hi

I'm using Firefox v1.5.0.3 and almost every page I visit gives me errors that show in the 'JavaScript Console':

Error: Error in parsing value for property 'top'. Declaration dropped.

How can i fix it, please?

Regards, Stoebi

Edit:
solved

cOuNtErFiET
07-27-2006, 03:06 PM
ok i have the hide hack resurrection installed and with your thread preview the users can see the hidden content between the tags, i posted in the HHR thread but he told me to come here. Below is his response

Sorry, I cannot give solutions. The hack should use the standard data out of the variable already provided on the page, then there be no problems. Please ask the author of thread preview to use std. variables and not create new ones.

my question is can you do this or is this hack dead to any new versions? im sure a lot of users that use this are having the same problem and would maybe like this updated for the HHR users?

Thanks
CF

bchertov
07-27-2006, 03:21 PM
I sure hope you are planning on porting/test this on 3.6!
Its a great hack! Have you added a configurable sligt delay as some of us have asked?

Thanks!
Barry

Parker Clack
08-02-2006, 11:26 AM
What code would you put in the plugin so that the preview strips all the code replacements for items such as &, < , > or ""? As it stands now the preview shows these as & amp ; & lt ;, etc. (without the spaces). Also, any idea how to include a url or image tag so that the url or image is displayed?

Thanks,
Parker

bashy
08-17-2006, 05:13 AM
i would really like this for 3.6 can anyone confirm it works if not can this be ported please?

Mike-D
09-04-2006, 06:29 PM
i would really like this for 3.6 can anyone confirm it works if not can this be ported please?Trust me, it works excellent in 3.6!!! -Mike

bashy
09-04-2006, 06:39 PM
Yeah ya right lol sorry forgot to mention it :)

This does work very well in 3.6!! :)

rmxs
09-10-2006, 07:31 PM
i make it to work with firefox byt IE shows only the Preview title not the message :(

Vb 3.6


FIXED :)

Mark.B
09-11-2006, 09:42 AM
Looks good, only two suggested improvements:

1) Get characters like " to show up correctly instead of as &quot
2) "Fix" the position of the box once clicked, so it doesn't follow the mouse.

rmxs
09-11-2006, 09:58 AM
Also if someone can make it to dispay the images istead of the link!

hurry
09-17-2006, 06:00 AM
The popup does not work in IE7. Show only the Preview heading but no text of the post. Works perfectly well in Firefox and Opera. I think the following code does not work with IE7:

onMouseOver="stm(Text[$thread[threadid]],Style[2])"

How did you fix this problem with IE rmxs? Anyone, please let us know the solution for IE?

How do I change the number of words or characters which appear in the popup? Thanks.

hurry
09-17-2006, 06:08 AM
1) Get characters like " to show up correctly instead of as &quot

I also want a solution for this. It looks messy when the quotes are changed to &quot;

2) "Fix" the position of the box once clicked, so it doesn't follow the mouse.

This is quite a problem. Even if you take your mouse out of the thread titles, the last popup seems to stick to the mouse wherever you move in the page. Even clicking on other areas of the page does not remove the popup. Please solve this at the earliest. Do we change some setting in js script for this? Thanks.

Mike-D
09-18-2006, 03:25 PM
Also if someone can make it to dispay the images istead of the link!Yes I'm interested too to see a image preview of its contents. Probably I found the right solution for this. All we need is someone who knows exactly how to integrate it into the Thread Preview. See Image Tooltip (http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm). The solution looks easy but isn't. I've tried it but I got no results. I hope to find the right man to help us, because I'm not familar about JS. -Mike

bashy
09-26-2006, 05:07 PM
Hi peeps

Just noticed that with this installed the inline thread title edit dont work anymore, can anyone shed some light on this please?

Chicago_VLNU_4s
09-29-2006, 04:56 PM
the default preview still shows when you hover over Stickied threads. Fix?

bashy
09-29-2006, 05:07 PM
You have still left the deafult code in the template, I will try to find the post for you 2 secs

Here ya go... https://vborg.vbsupport.ru/showpost.php?p=880618&postcount=19

Chicago_VLNU_4s
09-29-2006, 05:51 PM
^ Thanks, it worked..

BTW, is it just my connection or does it sometime load FORUMHOME and user profiles spaced out then loads? My connection?

category
09-29-2006, 08:52 PM
anybody know why the thread preview doesnt work for guests?

rmxs
09-30-2006, 06:09 PM
anybody know why the thread preview doesnt work for guests?
Check forum permisions!

rmxs
09-30-2006, 06:12 PM
Hi peeps

Just noticed that with this installed the inline thread title edit dont work anymore, can anyone shed some light on this please?
I fix this in 3.6.x byt i cannot post the fix because doesnt work in all themes!

This is the original code try part part in this part..
## Template threadbit

Find:
<if condition="$show['gotonewpost']">
<strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a></strong>
<else />
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>
</if>

Replace with:
<!-- TCattitude's improved thread preview -->
<if condition="$show['gotonewpost']">
<strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]" onMouseOver="stm(Text[$thread[threadid]],Style[2])" onMouseOut="htm()">$thread[threadtitle]</a></strong>
<else />
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]" onMouseOver="stm(Text[$thread[threadid]],Style[2])" onMouseOut="htm()">$thread[threadtitle]</a>
</if>
<!-- / TCattitude's improved thread preview -->

## Template threadbit
edit first this
if condition="$show['gotonewpost']">
<strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a></strong>

and chech if works if not revert and edit the part after <else />(3.6.x doesnt use <else />)
ALSO BE SURE THAT YOU EDIT ThE CORECT LINES!

If you have problem i post here my threadbit with my edits and the FIX BYT ONLY IF THE OWNET WONT IT!

Gizmo5h1t3
10-14-2006, 08:12 AM
has anyone got any adaptations on this, as it still seems to be a bit buggy??

SCRIPT3R
11-23-2006, 10:26 PM
has this been abandoned?

Seb@
11-24-2006, 08:45 PM
yep its abandoned

yoyoyoyo
12-06-2006, 11:46 PM
yep its abandonedtoo bad

Gizmo5h1t3
03-12-2007, 02:05 PM
got this working fine on my place.....excellent hack this....

AcidX
07-10-2007, 09:18 PM
Still no port for 3.6.x? :(

TCattitude
07-30-2007, 09:44 PM
New version HERE:
https://vborg.vbsupport.ru/showthread.php?t=153835

Realm of Horror Comics
08-02-2007, 04:26 PM
Edit: problem not to do with this hack.

Thanks TCattitude for all your help

TCattitude
08-02-2007, 11:24 PM
The Realm Horror's problem is nothing with this plugin (talked and seen by PM).
(Even with the plugin disabled, the error is still there)

Anyway, i recommend anyone to upgrade to the new version here:
https://vborg.vbsupport.ru/showthread.php?t=153835

Realm of Horror Comics
08-03-2007, 09:56 PM
Is it possible to change the ammount of text that shows up in the preview?