vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Yahoo Smilies hack. Need help! (https://vborg.vbsupport.ru/showthread.php?t=49236)

mtha 02-23-2003 01:55 AM

Yahoo Smilies hack. Need help!
 
1 Attachment(s)
If you want to add some Yahoo_like smilies, there will be some problems:

if you add :)) , it will display as :) and )

See picture:
https://vborg.vbsupport.ru/external/...achmentid=4744


FIX:

in function.php, look for

PHP Code:

if($dosmilies) {
    
$bbcode=str_replace("&gt""> )"$bbcode);
    
$bbcode=str_replace("&lt""< )"$bbcode);
    if(!isset(
$smilies)) {
     
$smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie" ); 
    } else {
     
$DB_site->data_seek(0,$smilies);
    }
    while (
$smilie=$DB_site->fetch_array($smilies)) {
     if(
trim($smilie[smilietext])!="" ) {
        
$bbcode=str_replace(trim($smilie[smilietext]),"<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\">",$bbcode);
     }
    }


Replaced by

PHP Code:

if($dosmilies) {
    
$bbcode=str_replace("&gt""&gt; )"$bbcode);
    
$bbcode=str_replace("&lt""&lt; )"$bbcode);
    if(!isset(
$smilies)) {
     
$smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie ORDER BY LENGTH( `smilietext` ) DESC" ); 
    } else {
     
$DB_site->data_seek(0,$smilies);
    }
    while (
$smilie=$DB_site->fetch_array($smilies)) {
     if(
trim($smilie[smilietext])!="" ) {
    
$smilie[smilietext]=str_replace("<","&lt;",$smilie[smilietext]);
    
$smilie[smilietext]=str_replace(">","&gt;",$smilie[smilietext]);     
        
$bbcode=str_replace(trim($smilie[smilietext]),"<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\">",$bbcode);
     }
    }



All YIM smilies will be displayed fine.



However, there'll be one problem in the popup_smilies function

- with :"> the "> will stop the html command in vbcode_popup_smiliesbits template, it's not clickable either.

Code:

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

- with \:-D/ , when you click on the smilie, it will only display :-D/ ; the \ gone


Anyone know how to fix this problem


All times are GMT. The time now is 04:18 PM.

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.01049 seconds
  • Memory Usage 1,729KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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