PDA

View Full Version : someone could do it ?


meteore
08-20-2002, 06:53 PM
it 's an idea of hack of a guy in a the team i belong to:

a hack which replace the start letter of each post by the corresponding image.

it would be a great thing for the design.

can someone do it ???

or is it too hard to do?

Xenon
08-20-2002, 07:45 PM
hmm, should be possible, this would be an easie method, but not 100% perfect (Problem when first word is bbcode or image or smilie)

open your admin/functions.php
find in getpostbit section: $post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);

below add:
$first=substr($post[message],0,1);
if($first!="<") $post[message]="<img src='{ imagefolder}/".$first.".gif'>".substr($post[message],1);

then create a.gif...z.gif.
this version does NOT ignore capital letters, so you have to add also A.gif....Z.gif

g-force2k2
08-21-2002, 02:37 AM
nice work Xenon :)

g-force2k2

meteore
08-21-2002, 02:01 PM
thx a lot but is there mean to do as members cant start their post with a smiley or a bbcode or image

g-force2k2
08-21-2002, 02:48 PM
huh? do you have the codes disabled? or do you mean that you want to disable the first smiley or img in a post?

g-force2k2

Xenon
08-21-2002, 03:16 PM
@meteore: i have updated my post, now it should be possible to start a post with an img or a smilie.

meteore
08-21-2002, 04:41 PM
and with bbcode too ?

Xenon
08-21-2002, 08:30 PM
i think so, just test it out ;)

meteore
08-22-2002, 09:42 AM
ok thx :)