vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Smilies replacing text problem... (https://vborg.vbsupport.ru/showthread.php?t=80619)

zahn 04-26-2005 08:28 PM

Smilies replacing text problem...
 
Hi...
I wan't to know if theres a way to fix my problem with smilies that are replacing text it shouldn't.
the problem:
I don't whan't smilies to replace text unless there's a 'space' before the smiliecode, here's an example:
if i have a timestamp like 12:08:31 posted a smilie will repleace it like 12:0[smilie]31.
my wish i that a smilie will replace only when theres a 'space' between any other text and the smilie code.

I have read this page, but it looks like it will not do what I want.
https://vborg.vbsupport.ru/showthrea...hlight=smilies

sorry I missed the notice about where I'm supposed to ask this. my bad.

akanevsky 04-26-2005 09:24 PM

Just change the smileys code to something different. Smiley codes should be either
:smileycode:
or, what is even better,
[-smileycode-]

zahn 04-26-2005 10:20 PM

Quote:

Originally Posted by Dark Visor
Just change the smileys code to something different. Smiley codes should be either
:smileycode:
or, what is even better,
[-smileycode-]

well how about no!
why do you think I even posted here? 'couse I don't wan't to change the smileycode.

akanevsky 04-26-2005 11:46 PM

There is no other solution.

Paul M 04-27-2005 12:54 AM

Quote:

Originally Posted by zahn
well how about no!
why do you think I even posted here? 'couse I don't wan't to change the smileycode.

Nice attitude, did you want help ?

zahn 04-27-2005 08:14 AM

Quote:

Originally Posted by Dark Visor
There is no other solution.

well why do not phpBB have this problem then? We migrated from phpBB to vBulletin and got this little anoying problem.
Quote:

Originally Posted by Paul M
Nice attitude, did you want help ?

Off course I wan't help, I'm just tired of people that don't belive you have though of the obvious before you ask a quiestion.

mholtum 04-27-2005 08:24 AM

Maybe you should have posted that you didnt want to change the smilie code. Then others wont waste your time with the obvious fix.

zahn 04-27-2005 08:50 AM

Quote:

Originally Posted by mholtum
Maybe you should have posted that you didnt want to change the smilie code. Then others wont waste your time with the obvious fix.

true... and next time I will think of my maners... :)

JohnBee 04-30-2005 04:33 PM

so in the end do we have a fix?

akanevsky 04-30-2005 07:45 PM

The original poster has dissappeared so I did not post the solution.

Since you want it, here you go.

In ./includes/functions_bbcodeparse.php, find:

PHP Code:

if (!$dohtml)
{
    
$smilie_find[] = htmlspecialchars_uni(trim($smilie['smilietext']));
}
else
{
    
$smilie_find[] = trim($smilie['smilietext']);


Replace with:

PHP Code:

if (!$dohtml)
{
    
$smilie_find[] = " ".htmlspecialchars_uni(trim($smilie['smilietext']))." ";
}
else
{
    
$smilie_find[] = " ".trim($smilie['smilietext'])." ";


P.S. I would suggest that Jelsoft adds this into his next vBulletin release....


All times are GMT. The time now is 09:35 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.01678 seconds
  • Memory Usage 1,736KB
  • 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
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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