Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Smilie Code Not Functioning Properly Details »»
Smilie Code Not Functioning Properly
Version: , by Sunshine Sunshine is offline
Developer Last Online: Jan 2005 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-22-2003 Last Update: Never Installs: 0
 
No support by the author.

I've looked high and low here and no one seems to have posted about this problem before.

On my site, the smilie code is not functioning properly.

For example -
;p is a tongue face and...
;puke is of course a puking face

The problem is, the puke face never comes up. Instead what we get is the tongue face. It's not reading past the p for some reason.

The same thing is true with codes that are similar but differentiated by a 2 or 3 at the end. For example -
;welcome would be the first welcome smilie
;welcome2 would be the second welcome smilie

When you type the code for the second welcome smilie, you get the first welcome smilie with a 2 next to the image.

Any insights or suggestions would be much appreciated. We were using version 2.2.9 but upgraded to 2.3.0 last night and that did not fix the problem.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-22-2003, 02:04 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That happens at my board too. My workaround would be to name ;puke ;vomit instead. The smilie replacement code seems to work like a bad naughty word filter that would bleep out a word like assess.

Amy
Reply With Quote
  #3  
Old 03-22-2003, 02:17 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i haven't tested it, because i don't have this problem (not using that much smilies ^^)

but i think this would work:

open admin/functions.php

find:
PHP Code:
  if($dosmilies) {
    
$bbcode=str_replace(">)""> )"$bbcode);
    
$bbcode=str_replace("<)""< )"$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);
      }
    }
  } 
and change it to:
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,LENGTH(smilietext) AS lgt FROM smilie ORDER BY lgt DESC");
    } 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);
      }
    }
  } 
Reply With Quote
  #4  
Old 03-22-2003, 03:52 PM
Sunshine Sunshine is offline
 
Join Date: Nov 2001
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much! That did the trick!
Reply With Quote
  #5  
Old 03-22-2003, 04:00 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xenon, you should release this as a bug fix over at the .com site and here. Everybody's board has this problem.
Reply With Quote
  #6  
Old 03-22-2003, 04:04 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Woah! Big bug. Installing this hack removes MANY of my smilies.

Some that were missing started with ! Not sure if that is the only problem though.
Reply With Quote
  #7  
Old 03-23-2003, 04:24 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

huh?

normally no smilies should disappaer, because the fix just changes the order smilies are get out of the db...
Reply With Quote
  #8  
Old 03-23-2003, 04:31 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure what it is doing, but with the code in, I have 2 pages of smilies in the control panel. With it out, I have about 10 pages.

Amy
Reply With Quote
  #9  
Old 03-23-2003, 04:36 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it is just that line:
PHP Code:
      $smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie"); 
which was changed, and as you can see, the new code:
PHP Code:
$smilies=$DB_site->query("SELECT smilietext,smiliepath,LENGTH(smilietext) AS lgt FROM smilie ORDER BY lgt DESC"); 
couldn't change the ammount of smilies.

but as said, it's just a quickfix of the bug above, i don't know if the smilies are preloaded somewhere which could produce the bug at your board.....

i've posted it over at vb.com for the developers to look into it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:13 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.04586 seconds
  • Memory Usage 2,294KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete