Page Index Toggle Pages: 1
Topic Tools
Hot Topic (More than 10 Replies) Include thread "teaser" in TITLE attribute of link (Read 4,612 times)
cepheid
Senior Member
****
Offline



Posts: 516
Include thread "teaser" in TITLE attribute of link
Jun 14th, 2009 at 1:07am
Post Tools
As any forum admin or user knows, sometimes (or often!) a thread's subject will be generic, confusing, or downright irrelevant.  The only way to know what is in the thread is to actually click on it and read it.  It would be great if there were a quick "preview" of the thread available simply by mousing over it.

This can be accomplished by placing a "teaser" (say, the first 100-200 characters) of a thread in the TITLE attribute of the TD tag containing the thread listing, so that it will show up as a tooltip on mouseover.  (This applies to the Board listing, so that each thread listing contains the teaser... putting it in the TITLE of the TD tag would have it show up when mousing over any portion of the table cell, though you could put it in the TITLE of the anchor tag instead, to show up only when mousing over the actual link.)

This could also be made admin-configurable, so admins could enable or disable the teaser.

Benefit: increased user-friendliness, so users can get a preview of the thread to decide whether it's actually worth clicking on and reading.

Potential problems:
1) Increased storage and/or processing, because the teaser would either have to be stored in the Board file (increased storage) or the script would have to poll each thread while generating the board listing (increased processing).  The increased storage is probably not a major issue since it's only 100-200 chars per thread, though the teaser would need updating if the original post were modified (but this functionality is already built-in since thread titles get updated on modify).  The increased processing (primarily file open/close) is also probably not a huge issue unless there were a lot of threads listed per page.  However, putting the teaser into the Board file (increased storage) will be the faster method.

2) Increased page size for board listings due to the extra 100-200 characters in each thread link, though this is relatively minor.

In general, I think either problem isn't really a big issue, and if the feature is admin-configurable then admins who think it slows down their board can disable it.  (It can be disabled by default on new installs, if this is a worry.)

If the method chosen for this is to put the teaser text into the Board file (the faster method, rather than polling each thread), then the Board files will need to be rebuilt to put the teaser text for old threads in place.
  
Back to top
WWW  
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Include thread "teaser" in TITLE attribute of link
Reply #1 - Jun 14th, 2009 at 6:37am
Post Tools
It also could be done by AJAX. If you stay for a while over the Thread title it could open a little window showing only a short summary of the topic called at this moment. But this may take a bit longer then the other suggestions.
I don't like the idea of adding it to the Board file because then we must go through all scripts to rewrite the split(/\|/, ...).
The other thing is, will you really get an idea of the content of the thread viewing only the last 100-200 characters?
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Include thread "teaser" in TITLE attribute of link
Reply #2 - Jun 14th, 2009 at 6:52am
Post Tools
deti wrote on Jun 14th, 2009 at 6:37am:
It also could be done by AJAX.

True, though I think this would (as you said) be even slower.

deti wrote on Jun 14th, 2009 at 6:37am:
I don't like the idea of adding it to the Board file because then we must go through all scripts to rewrite the split(/\|/, ...).

The rewrite should be minimal because you can make the teaser be the final field, so you'll only need to assign it explicitly when you want to deal with it.  If you assign a split into an array of variables, any excess fields from the split (for which there are no variables) are simply ignored, so this would only affect split lines where you then want to deal with the teaser.

In other words, if $str="a|b|c|d" and you do ($var1,$var2)=split(/\|/,$str) then you get $var1<->"a" and $var2<->"b" ... the excess fields are ignored.  So, for the board file, you can easily do the split with the current code and ignore the teaser except in the code where you explicitly use it.

Also, I volunteer to rewrite those few splits that are affected. Smiley

deti wrote on Jun 14th, 2009 at 6:37am:
will you really get an idea of the content of the thread viewing only the last 100-200 characters?

The first 100-200 chars, but yes, you can get an idea of the content of the thread, especially in those cases where the thread subject line is wholly generic (like "Help!") or nonsensical.  There are boards that offer this feature and I use it extensively on those boards, believe it or not.  Also, 200 chars is quite sufficient... after all, Twitter uses only 140! Wink
  
Back to top
WWW  
IP Logged
 
Jet Li
Legacy Dev Team
Development Team
****
Offline



Posts: 6,588
Location: Hong Kong
Re: Include thread "teaser" in TITLE attribute of link
Reply #3 - Jun 14th, 2009 at 7:53am
Post Tools
« Last Edit: Jun 14th, 2009 at 7:55am by Jet Li »  

PM me for YaBB Installation Service
Back to top
WWWGTalkFacebook  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Include thread "teaser" in TITLE attribute of link
Reply #4 - Jun 14th, 2009 at 8:16am
Post Tools
@ Jet Li

Jeez, can't I have an original idea one of these days? Wink

(At least I'm only 2 months behind, not 2 years! Tongue)
  
Back to top
WWW  
IP Logged
 
Jet Li
Legacy Dev Team
Development Team
****
Offline



Posts: 6,588
Location: Hong Kong
Re: Include thread "teaser" in TITLE attribute of link
Reply #5 - Jun 14th, 2009 at 8:21am
Post Tools
cepheid wrote on Jun 14th, 2009 at 8:16am:
can't I have an original idea one of these days?

you can download on Boardmod first link here posted. Author is Carsten. Wink
« Last Edit: Jun 14th, 2009 at 8:22am by Jet Li »  

PM me for YaBB Installation Service
Back to top
WWWGTalkFacebook  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Include thread "teaser" in TITLE attribute of link
Reply #6 - Jun 14th, 2009 at 8:31am
Post Tools
I guess you can consider this a vote for adding this mod into the next release. Cheesy
  
Back to top
WWW  
IP Logged
 
Jet Li
Legacy Dev Team
Development Team
****
Offline



Posts: 6,588
Location: Hong Kong
Re: Include thread "teaser" in TITLE attribute of link
Reply #7 - Jun 14th, 2009 at 8:32am
Post Tools
I will think about it and talk with the other Devs. Smiley
  

PM me for YaBB Installation Service
Back to top
WWWGTalkFacebook  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Include thread "teaser" in TITLE attribute of link
Reply #8 - Jun 14th, 2009 at 8:39am
Post Tools
Jet Li wrote on Jun 14th, 2009 at 8:32am:
the other Devs.

(Of which I hope to be one, soon..... Wink)
  
Back to top
WWW  
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Include thread "teaser" in TITLE attribute of link
Reply #9 - Jun 14th, 2009 at 10:26am
Post Tools
cepheid wrote on Jun 14th, 2009 at 8:39am:
Of which I hope to be one, soon...

Have you filled out http://www.yabbforum.com/joindev.php ?
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Include thread "teaser" in TITLE attribute of link
Reply #10 - Jun 18th, 2009 at 7:06am
Post Tools
Jet Li wrote on Jun 14th, 2009 at 7:53am:

The one "problem" with this mod, and how it differs from what I suggested above, is that it relies on Javascript to load and display the thread teasers.  My suggestion would be to put the teaser into the TITLE attribute, which would show up as a tooltip regardless of whether Javascript were enabled.

Of course, the benefit of Carsten's mod is that it displays the teaser in rich format, including smileys... but the downside is that it increases processing (per my first post) by dynamically querying the thread files.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top