Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
Essentially, this has a variable delay tooltip, that will show when the user hovers over a topic subject.

The tooltip is fully styled and fully HTML, with all tags being closed by the truncator. No nl2br stuff or text only!

Just read the readme.txt (duh) and have at it. I have it working on my play forum: Here . The hover activates after a 1 second (configurable) delay.

I think i currently have it showing the last post in the thread, where first==last for a totally new topic wink

Notes:

1. "title="header=[Preview] body=[{$postrow[topic].PostBody}] fade=[on] delay=[1000] fadespeed=[1] cssheader=[tthdr] cssbody=[ttbdy]"

you can change these ie:
. "Preview" could come from a lang file, if you want and you could call it whatever
. fade=[on] can be off, if you don't want the tooltip to fade at all
. delay is in ms, so 1000 is one second. feel free to change. i find a short one kinda sux
. tthdr, ttbdy can be any class you desire. i just used them as 'tt' - tooltip smile

2. i've included a compressed version of boxover.js, since its static anyway. you can choose to copy boxover-cs.js to boxover.js if you want. i also have boxover-nm.js in case you killed the original boxover.js.

3. The css i included above was for a blueish theme (light), so feel free to change it for your particular needs. Also, the widths may not be to your liking. Have at it! You can include 'opacity' stuff and have some neat effects, if you'd like. i tried it, then reverted to none.

4. The popup is a fully HTML one and all tags that aren't finished are handled (finished off) by truncate.inc.php, so no worries, if you choose to have a different size for the preview.

5. You can choose what the hover tooltip will display (first post or last post), by changing the SQL above from .TOPIC_LAST_POST_ID to t1.POST_ID

Screenie below:
[Linked Image]

That's it!

Enjoy!

(Edited and updated for 7.2 release)
Attachments
2447-TooltipForPostlist.zip (13.71 KB, 53 downloads)
All your files are belong to us
SHA1: c1a771ce41fc2b8b8371740d2bba9eec8d355eb1
2448-ReadMe.txt (13.72 KB, 82 downloads)
Prolly should read this ;)
SHA1: b9d6e4fa8bc13ce7c26e5d4607211d00c27c99e2

Last edited by sirdude; 07/21/2007 10:30 PM. Reason: Updated to latest
Sponsored Links
Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
This is great .. thanks heaps. I applied it and it works very well. smile A couple of things I noticed:

1. It doesn't like spoilers. If there is a spoiler in a topic, it won't show the preview.

2. The second item in Step 2 - the Replace With code is missing the "; at the end, although I picked it up straight away, and it wasn't a problem.

Otherwise it's wonderful. I'm going to have a lot of happy users. They've been asking for something like this for ages.

Thanks again!! laugh

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
Good catch Rose! updated readme.txt for Step 2.

Will look @ spoilers. Gotta make sure that it doesn't spoil the spoiler too!! wink

Holy moley, the POST_BODY impact for a spoiler is huge. it's over the 450 character limit, so html->truncate kills it.

That's the nature of the spoiler tag as it is stored in the database.

Even upping the limit to something larger in the truncate(450) call, doesn't fix it either soooo..

For now, it will have to stay as is.. i'll see what i can do with the truncation as to some special cases. i've noticed embedded vids don't get previewed either, but these are more rare than common.

Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
I can live with the spoiler thing, SD - and the video thing. But I have noticed one other thing, and I'm not sure what to do about it.

When I click on a topic now, it doesn't take me to the first unread message - it takes me to the beginning of the step. Any ideas?

Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75

Sponsored Links
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Lookin good paps, keep up the good work wink


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
actually Rose, that's a better idea. i forgot to revert the mod back to 1st unread, because there is another mod that i had done, which allows preview in 3 parts.

1. hover over subject --> preview 1st post
2. hover over replies x (yy) --> preview 1st unread
3. hover over last poster's name --> preview last post

and all 3 were clickable (2 are now anyway) to take you to what was shown in the preview. i just made the (yy) clickable too..

i think for this mod though, it should jump to 1st unread as you have done and is how the board functions without the preview.

i will update the files to reflect your input there.

and thanks again

ps: all files now up to date

Joined: Oct 2006
Posts: 21
Newbie
Newbie
Offline
Joined: Oct 2006
Posts: 21
If you haven't, could you post your mod that does what you say here, about first post on subject, first unread on replies and last post on person. I'd like to have that option ...maybe smile


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)