(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
06-12-24 07:40 PM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - I want to change my smilies system... How ? New poll | |
Pages: 1 2Add to favorites | Next newer thread | Next older thread
User Post
Stifu









Since: 11-18-05
From: Your mom's bed

Last post: 6325 days
Last view: 6323 days
Posted on 03-19-06 10:52 AM Link | Quote
Still not...


Warning: Compilation failed: unmatched parentheses at offset 30 in /var/www/free.fr/c/8/stifu/board/lib/function.php on line 220

Warning: Compilation failed: unmatched parentheses at offset 30 in /var/www/free.fr/c/8/stifu/board/lib/function.php on line 220

Warning: Compilation failed: unmatched parentheses at offset 30 in /var/www/free.fr/c/8/stifu/board/lib/function.php on line 220

Warning: Compilation failed: unmatched parentheses at offset 30 in /var/www/free.fr/c/8/stifu/board/lib/function.php on line 220
Parasyte +

Red Paragoomba


 





Since: 01-05-06

Last post: 6645 days
Last view: 6645 days
Posted on 03-19-06 05:43 PM Link | Quote
It is being copied incorrectly. This is the only answer? Test the demo script on your server, copy the code directly from it:

http://parasyte.panicus.org/s.zip
Stifu









Since: 11-18-05
From: Your mom's bed

Last post: 6325 days
Last view: 6323 days
Posted on 03-20-06 06:21 PM Link | Quote
Copied incorrectly ? I can't see how.
I'm simply replacing the original "$msg=..." by what you gave me.

I'll try that link you gave me once I'm back home, and I'll let you know...
___

Edit: The problem probably comes from the fact I don't overwrite what I should, that's what you must have meant...

The original function is like that:


function doreplace2($msg){
global $smilies;
if(!$smilies) $smilies=readsmilies();
for($s=0;$smilies[$s][0];$s++){
$smilie=$smilies[$s];
$msg=str_replace($smilie[0],"<img src=$smilie[1] align=absmiddle>",$msg);
}
etc

I assumed I had to put what you gave me inside instead of the $msg= line... I tried other things too, with no success.


(edited by Stifu on 03-20-06 05:51 PM)
Parasyte +

Red Paragoomba


 





Since: 01-05-06

Last post: 6645 days
Last view: 6645 days
Posted on 03-20-06 11:16 PM Link | Quote
The edited function would look like this:

function doreplace2($msg){
global $smilies;
if(!$smilies) $smilies=readsmilies();
for($s=0;$smilies[$s][0];$s++){
$smilie=$smilies[$s];
$smilie[0]=str_replace("[", "\\[", $smilie[0]);
$smilie[0]=str_replace("\\", "\\\\", $smilie[0]);
$smilie[0]=str_replace("^", "\\^", $smilie[0]);
$smilie[0]=str_replace("$", "\\$", $smilie[0]);
$smilie[0]=str_replace(".", "\\.", $smilie[0]);
$smilie[0]=str_replace("|", "\\|", $smilie[0]);
$smilie[0]=str_replace("?", "\\?", $smilie[0]);
$smilie[0]=str_replace("*", "\\*", $smilie[0]);
$smilie[0]=str_replace("+", "\\+", $smilie[0]);
$smilie[0]=str_replace("(", "\\(", $smilie[0]);
$smilie[0]=str_replace(")", "\\)", $smilie[0]);
$smilie[0]=str_replace("/", "\\/", $smilie[0]);
$msg=preg_replace("/(^|[^a-z0-9])".$smilie[0]."($|[^a-z0-9])/imx","$1<img src=$smilie[1] align=absmiddle>$2",$msg);
}
etc


Did you test s.php on your server to ensure it works as it is supposed to?
Stifu









Since: 11-18-05
From: Your mom's bed

Last post: 6325 days
Last view: 6323 days
Posted on 03-21-06 02:48 AM Link | Quote
Yes...

http://stifu.free.fr/s.php

However, for some reason, when I tested it locally using EasyPHP, it wouldn't work anymore if used inside the for.
Looks like it's the same once uploaded... I don't get any error anymore, it simply displays smilies all the time, regardless of what's around them...
Parasyte +

Red Paragoomba


 





Since: 01-05-06

Last post: 6645 days
Last view: 6645 days
Posted on 03-22-06 05:12 PM Link | Quote
How odd, it looks like the $1 is getting removed from your s.php. The script is replacing the smilie AND the preceeding character. The $1 will put the preceeding character back, while the $2 puts the proceeding character back.

And the for loop shouldn't change anything. Someone correct me if I am wrong, but that should have no affect at all.
Stifu









Since: 11-18-05
From: Your mom's bed

Last post: 6325 days
Last view: 6323 days
Posted on 03-22-06 06:13 PM Link | Quote
Oh yes, I did remove the $1 while messing with the file... Sorry about that.
And I don't know why it doesn't work inside the loop, but it certainly does not, no matter what... I tried countless times.

Have a look: http://stifu.free.fr/board2/thread.php?id=8891
Parasyte +

Red Paragoomba


 





Since: 01-05-06

Last post: 6645 days
Last view: 6645 days
Posted on 03-23-06 05:51 AM Link | Quote
Do you mind zipping your function.php file so I can take a closer look at it? And you smilies config, if you can.
Stifu









Since: 11-18-05
From: Your mom's bed

Last post: 6325 days
Last view: 6323 days
Posted on 03-23-06 06:11 AM Link | Quote
Sure thing, here you go: http://stifu.free.fr/dl/temp/fctsml.zip

Thank you.


(edited by Stifu on 04-01-06 07:32 AM)
Stifu









Since: 11-18-05
From: Your mom's bed

Last post: 6325 days
Last view: 6323 days
Posted on 04-07-06 11:59 AM Link | Quote
So, can't you figure it out or did you forget about me ?
Pages: 1 2Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - Programming - I want to change my smilies system... How ? |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.014 seconds; used 392.46 kB (max 481.25 kB)