vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Fix animated smilies after clicking (https://vborg.vbsupport.ru/showthread.php?t=34808)

Kier 02-04-2002 10:00 PM

Not much of a hack, this one... and it only works in IE4+ and the very latest of the other browsers.

Basically, it stops the animated smilies in the clickable list from halting their animation cycle after you click one.

Very simple really... change the vbcode_smiliebit template from this:
Code:

<a href="javascript:smilie('$smilie[smilietext]')"><img src="$smilie[smiliepath]" alt="$smilie[title]" border="0"></a>
to this
Code:

<img src="$smilie[smiliepath]" alt="$smilie[title]" border="0"
        onmouseover="this.style.cursor='hand';"
        onclick="smilie('$smilie[smilietext]');">


snyx 02-05-2002 01:39 PM

hey this is really cool kier, installing it now, thx!

Sephi 02-05-2002 01:43 PM

Good :)
It works :D
Thx !

FWC 02-05-2002 04:53 PM

Thanks, Kier. :)

voogru 02-05-2002 05:00 PM

thanks

Mystics 02-05-2002 05:42 PM

Big Thx @Kier!

One small addon:
You also should fix the "Smilies List Popup" (misc.php?action=getsmilies&s=)

To do that, change the vbcode_popup_smiliesbits template from this:
Code:

<td bgcolor="$backcolor"><a href="javascript:opener.smilie('$smilie[text]')"><img src="$smilie[path]" border="0" alt="$smilie[title]"></a></td>
<td bgcolor="$backcolor"><normalfont>$smilie[text]</normalfont></td>

to this
Code:

<td bgcolor="$backcolor"><img src="$smilie[path]" border="0" alt="$smilie[title]"
        onmouseover="this.style.cursor='hand';"
        onclick="opener.smilie('$smilie[text]');"></td>
<td bgcolor="$backcolor"><normalfont>$smilie[text]</normalfont></td>


JJR512 02-05-2002 08:15 PM

I've applied both of these template mods and they are great. However, one little thing...and I mean really little...When you click the link that says "Get More," the smilies there still do stop animating. Could someone tell us how to fix that, too? :)

Mystics 02-05-2002 08:42 PM

Quote:

Originally posted by JJR512
When you click the link that says "Get More," the smilies there still do stop animating. Could someone tell us how to fix that, too? :)
One solution would be to remove the javascript from the "Get More"-Link and to open just a normal Page, but then you can't let open the Smilie Window with a special size (for example 240x280 as default), because it just opens a new, normal Browser Instance.

However, to do this you have to change the Template vbcode_smilies_getmore

Search:
Code:

<a href="javascript:opensmiliewindow(240,280,'$session[sessionhash]')">
and replace that with:
Code:

<a href="misc.php?action=getsmilies&s=$session[sessionhash]" target="_blank">
[EDIT]
Ok, the solution of Kier is of course much better, so please ignore (or delete @Mods) this Posting.

Kier 02-05-2002 08:43 PM

Edit the vbcode_smilies_getmore template to this:
Code:

<a href="javascript:opensmiliewindow(240,280,'$session[sessionhash]')">Get More</a>
to this
Code:

<span onmouseover="this.style.cursor='hand';" onclick="opensmiliewindow(240,280,'$session[sessionhash]');">
Get More
</span>

edited to prevent smilie parsing

haas 02-05-2002 08:59 PM

Great hack!! Installing now!


All times are GMT. The time now is 12:35 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.01114 seconds
  • Memory Usage 1,737KB
  • 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
  • (8)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete