vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   DHTML Thread Preview with Per-User Option (https://vborg.vbsupport.ru/showthread.php?t=64591)

Chroder 04-30-2004 10:00 PM

DHTML Thread Preview with Per-User Option
 
What Is This?

This hack will alter the way your users view the thread previews. Instead of using vB default "title", which can be annoying, we're using a DHTML tooltip to display it. You can even customize the look of the tooltips. And remember that Mozilla bug where linebreaks show up as black squares? No more! You can actually preserve the line breaks now! And now we've moved the tooltip to a thread's post icon for easy activation, so no more annoying accidental preview popups. On top of all that, your users can just disable the whole thing if they don't like it!


Hack Overview

  • vB Version: 3.0.1
  • overLIB Version: 4.00
  • New files: overLIB library
  • New Profile Fields: 1
  • Files to modify: 1
  • Templates to modify: 2
What You Need

All you need is the overLIB. You can download it from this page. To get more functionality and customization, you can read the online manual.


Downloads / Thing to look at
- The package that contains the instructions.
- A screenshot (uploading images doesn't want to work for me...)
- Live example (hover over the post icons)

SaN-DeeP 05-01-2004 12:56 AM

nice hack :)

i like the idea.
and excellent placing of THE words.

people are really CREATIVE

Sandy...

FleaBag 05-01-2004 01:47 AM

I like this - will have to look into overLIB. Nice work. :)

Chroder 05-01-2004 02:18 AM

Thanks guys :)

thuffner 05-01-2004 08:12 AM

Used to use overLIB on my site a long time ago. I enjoyed it, and it worked well for me. Looks like you have done the same with this hack. Good job! :)

SmartGnome 05-01-2004 09:29 AM

The following error occurred when attempting to evaluate this template:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/virtual/site1/fst/var/www/smarty/forum/includes/adminfunctions_template.php(3037) : eval()'d code on line 3

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

What did I doing wrong :disappointed:

Scrub 05-01-2004 11:02 AM

Which template you editing when you get that error? :p

floleb7 05-01-2004 12:06 PM

if there isn't post icon ?

Chroder 05-01-2004 03:28 PM

Quote:

Originally Posted by floleb7
if there isn't post icon ?

If you've turned them off then your SOL :p If the user didn't select one, then it automatically inserts a default one.

I couldn't think of anywhere else to put it. Maybe the post indicators are a better place.

SmartGnome 05-01-2004 04:13 PM

Quote:

Originally Posted by Scrub
Which template you editing when you get that error? :p

The one mentioned in the instructions "threadbit" :ermm:

Scrub 05-01-2004 04:17 PM

Try this:

HTML Code:

<if condition="$show['threadicons']">
                <td class="alt2">
            <if condition="$show['threadicon'] && $thread[preview] && !empty($thread[preview]) && $bbuserinfo[field5] != 'No'">
                <img src="$thread[threadiconpath]" alt="" border="0" onmouseover="return doPreview('$thread[preview]');" onmouseout="return nd();" />
            <else />
                <if condition="!$show['threadicon'] && $thread[preview] && !empty($thread[preview]) && $bbuserinfo[field5] != 'No'">
                    <img src="images/icons/icon1.gif" alt="" onmouseover="return doPreview('$thread[preview]');" onmouseout="return nd();" />
                <else />
                    <if condition="$show['threadicon']">
                        <img src="$thread[threadiconpath]" alt="alt="$thread[threadicontitle]"" border="0" />
                    <else />
                        <img src="images/icons/icon1.gif" alt="Post" />
                    </if>
                </if>
            </if>
        </if>


Chroder, I belive you forgot an </if> in the threadbit edit. ;)

Chroder 05-01-2004 05:02 PM

Quote:

Originally Posted by Scrub
Try this:

HTML Code:

<if condition="$show['threadicons']">
                <td class="alt2">
            <if condition="$show['threadicon'] && $thread[preview] && !empty($thread[preview]) && $bbuserinfo[field5] != 'No'">
                <img src="$thread[threadiconpath]" alt="" border="0" onmouseover="return doPreview('$thread[preview]');" onmouseout="return nd();" />
            <else />
                <if condition="!$show['threadicon'] && $thread[preview] && !empty($thread[preview]) && $bbuserinfo[field5] != 'No'">
                    <img src="images/icons/icon1.gif" alt="" onmouseover="return doPreview('$thread[preview]');" onmouseout="return nd();" />
                <else />
                    <if condition="$show['threadicon']">
                        <img src="$thread[threadiconpath]" alt="alt="$thread[threadicontitle]"" border="0" />
                    <else />
                        <img src="images/icons/icon1.gif" alt="Post" />
                    </if>
                </if>
            </if>
        </if>


Chroder, I belive you forgot an </if> in the threadbit edit. ;)

Uh oh :eek: I'll take a look

Chroder 05-01-2004 05:06 PM

See first post for updated package. Missed a </td> and </if>. Should work now :D

SmartGnome 05-01-2004 05:07 PM

@Scrub

Many TNX ....... works fine now :banana:

Scrub 05-01-2004 05:35 PM

Quote:

Originally Posted by Chroder
See first post for updated package. Missed a </td> and </if>. Should work now :D

I should've caught that missing </td>. LMAO! Guess I was more interested in the error. :p

Chroder 05-01-2004 10:37 PM

Any idea's on different locations for the hovering? The post icons aren't too practical. I was thinking of a 5x5px image next to each title that had the hoving on it -- too much?

Boofo 05-02-2004 03:58 AM

Why not just do the thread title link?

Chroder 05-02-2004 06:13 AM

Because it's clumsy and annoying :p

Boofo 05-02-2004 06:18 AM

Well, you asked for a different location. Sorry it wasn't the answer you wanted.

msimplay 05-02-2004 12:56 PM

just realised that the dhtml tooltips missing for when u search posts
could we add it to that ?

ps how do i remove the preview altip from thread title on forum display

also i wasn't sure wether to ask here or in the vbadvanced forum
but i'd also like to intergrate this with last posts block for Vbadvanced somehow :o

excellent hack idea by the way
the thread previews get annoying when they don't have html stripped in the thread preview alt tip

Chroder 05-02-2004 02:24 PM

Quote:

Originally Posted by msimplay
just realised that the dhtml tooltips missing for when u search posts
could we add it to that ?

ps how do i remove the preview altip from thread title on forum display

also i wasn't sure wether to ask here or in the vbadvanced forum
but i'd also like to intergrate this with last posts block for Vbadvanced somehow :o

excellent hack idea by the way
the thread previews get annoying when they don't have html stripped in the thread preview alt tip

Oh yeah, forgot to specify to take out the title on the cell ;)

In threadbit temlpate, find:
HTML Code:

<td class="alt1Active" id="t$thread[threadid]" title="$thread[preview]">
Replace:
HTML Code:

<td class="alt1Active" id="t$thread[threadid]">
(Thus deleting the title part ;).

I'll update the main package later, and I'll try and find out how to put it into the search as well.

msimplay 05-02-2004 02:47 PM

Quote:

Originally Posted by Chroder
Oh yeah, forgot to specify to take out the title on the cell ;)

In threadbit temlpate, find:
HTML Code:

<td class="alt1Active" id="t$thread[threadid]" title="$thread[preview]">
Replace:
HTML Code:

<td class="alt1Active" id="t$thread[threadid]">
(Thus deleting the title part ;).

I'll update the main package later, and I'll try and find out how to put it into the search as well.

thanks :D

djohn 05-02-2004 03:27 PM

There is a similar hack for IPB, exept for the hover thingie is only displayed when your mouse is over the topic name. It prooved to be very practical, and the users liked it. How can i do the same with this hack?

Chroder 05-02-2004 05:18 PM

Most of the complaints about the topic preview is about how it's annoying, so that's why I moved it away from the topic title. If you want it on the topic title then you might as well just enable the default topic preview.

My users like it on the icon because if they want a preview, then they just hover over it. No delays, no "sticky" tooltips etc.

msimplay 05-02-2004 05:32 PM

Quote:

Originally Posted by Chroder
Most of the complaints about the topic preview is about how it's annoying, so that's why I moved it away from the topic title. If you want it on the topic title then you might as well just enable the default topic preview.

My users like it on the icon because if they want a preview, then they just hover over it. No delays, no "sticky" tooltips etc.

yeh i was thinking about moving it onto the thread title but looking at the nature of the dhtml being instant once its loaded
would become very annoying when mousing over titles so i actually prefer it on the post icons aswell now :D

Chroder 05-02-2004 05:41 PM

You could use a delay, but that kinda defeats the purpose IMO.

msimplay 05-06-2004 10:50 PM

any news on adding this to search posts ?

msimplay 10-24-2004 03:57 PM

**bump** same as the last time

msimplay 10-24-2004 04:15 PM

Quote:

Originally Posted by msimplay
**bump** same as the last time

ok found the answer

HTML Code:

FIND in search_results :

$headinclude

HTML Code:

ADD AFTER in search_results :

<if condition="$bbuserinfo[field5] != 'No'">
    <script language="javascript" src="clientscript/overlib/overlib.js"></script>
    <script language="javascript">
    function doPreview(txt)
    {
        return overlib(txt, FGCOLOR, '#F3F6FA', BGCOLOR, '#000000', TEXTSIZE, '8pt', TEXTCOLOR, '#000000');
    }
    </script>
</if>

HTML Code:

FIND in search_results :

</body>
</html>

HTML Code:

BEFORE ADD in search_results :

<if condition="$bbuserinfo[field5] != 'No'"><div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div></if>


This will give the same ability in search results
none of that was my code i just copied and pasted in the right templates :)

hope thats useful to others

zurih 12-28-2004 05:23 PM

anyone knows how can I change the preview from the icon to the other icon in the left? (new post, old post, etc icon)

thanks

yoyoyoyo 01-23-2005 02:42 PM

How do I add this function to the search results also? I noticed it only works in forum view mode, and not on search results. I think it would be handy to have this function work for search results as well.

msimplay 01-23-2005 03:29 PM

Quote:

Originally Posted by yoyoyoyo
How do I add this function to the search results also? I noticed it only works in forum view mode, and not on search results. I think it would be handy to have this function work for search results as well.

i did this a while back now
heres my previous post that explains exactly how

https://vborg.vbsupport.ru/showpost....6&postcount=29

yoyoyoyo 01-23-2005 03:36 PM

Quote:

Originally Posted by msimplay
i did this a while back now
heres my previous post that explains exactly how

https://vborg.vbsupport.ru/showpost....6&postcount=29

Thanks, I missed that it seems :D


All times are GMT. The time now is 04:37 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.01389 seconds
  • Memory Usage 1,835KB
  • 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
  • (10)bbcode_html_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (33)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