Attention!!™
SMB3 Hacking Forum Opened!
Information needed!
If you have any useful data on hacking SMB3, please post it in the this stickied thread in the new SMB3 Forum. We are also looking for someone to help run a SMB3 hacking Wiki.
Join the Kafuka Discord! (Click here)
Views: 5,555,324
Main | FAQ | IRC chat | Memberlist | Active users | Latest posts | Calendar | Stats | Ranks | Online users | Search
10-16-18 04:03 PM
Guest: Register | Login

0 users currently in AcmlmBoard Developer Zone | 1 guest

Main - AcmlmBoard Developer Zone - Smiley test and possible solution
Next newer thread | Next older thread


Kawa
Posted on 02-15-12 04:33 PM (rev. 2 of 02-15-12 06:36 PM by Kawa) Link | ID: 6508
Retired Staff

Not okay
Prophet of Celestia
Level: 86


Posts: 659/2423
EXP: 5939301
Next: 202806

Since: 01-01-12
From: The Netherlands

Last post: 9 days
Last view: 9 days
This is a line with a smiley :) in the middle.
This is a line with http://a.smiley.^_^.in.an.url.bbcode.
This is a line with a smiley ^_^ in an HTML link
Obvious problem is obvious.

Kafuka
if (!$nosmilies) {
for($i=0;$i<$smilies[num];$i++)
$msg=str_replace($smilies[$i][text],'«'.$smilies[$i][text].'»',$msg);
for($i=0;$i<$smilies[num];$i++)
$msg=str_replace('«'.$smilies[$i][text].'»','<img src=.$smilies[$i][url]. align=absmiddle border=0
alt="'.$smilies[$i][text].'" title="'.$smilies[$i][text].'">',$msg);
}


Wordpress
function convert_smilies($text) {
global $wp_smiliessearch;
$output = '';
if ( get_option('use_smilies') && !empty($wp_smiliessearch) ) {
// HTML loop taken from texturize function, could possible be consolidated
$textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between
$stop = count($textarr);// loop stuff
for ($i = 0; $i < $stop; $i++) {
$content = $textarr[$i];
if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag
$content = preg_replace_callback($wp_smiliessearch, 'translate_smiley', $content);
}
$output .= $content;
}
} else {
// return default text.
$output = $text;
}
return $output;
}


Worth a look?

Edit: source - demo


So Much
(post deleted) ID: 103638

H Magyar H
(post deleted) ID: 103686

Next newer thread | Next older thread
Main - AcmlmBoard Developer Zone - Smiley test and possible solution


Acmlmboard v2.5.4 (10/13/2018)
© 2005-2018 Acmlm, Emuz, et al.

Page rendered in 0.026 seconds. (607KB of memory used)
MySQL - queries: 62, rows: 447/479, time: 0.018 seconds.