This feature is soooo cooooool!!!! I want it!

Started by Gobo, December 28, 2005, 05:34:53 PM

Previous topic - Next topic

Grudge

Gregory,

That code is for SMF 1.1 RC1, you will have to do extra work to get the Subs stuff to work on SMF 1.0.5. Note that the zip also contains a font file which you can use by changing the img_settings array in holdsign.php from font => false to font => $scriptdir . '/trebuc.ttf' - this makes it look much cooler ;)

Some of the positioning code may not be that great I'm afraid, and it could do with a little better error handling. All the errors which currently called die() should probably call create_error - as this makes a nice error image as oppossed to an awful red x.

Anyway, hope you can make something cool out of this. As I said, my code is meerly a framework, more needs to be done. Firstly, perparsecode should check that the php file exists before allowing the user to use the sign tag (i.e. if modSEttings['smiley_dir'] .'/default/signs/$1.php doesn't exist it removes the BBC).

The framework does handle all the security for you though, you shouldn't really need to change "signs.php", although I may have forgotten to call exit() at the end of create_error? (Serious bug if so)

I like having a PHP script for each image, it makes it much more flexible. What I'd probably look into is having it create the image when the user makes the post, and then link directly to the image instead of having PHP generate it each page view. That would be the next step for me :D
I'm only a half geek really...

Gregory

yeah I eventually gave up working out how to do it for SMF 1.05!!
I installed SMF 1.1 RC1  to hopefully get this working to a releaseable state and then wait till I upgrade my real SMF board to 1.1 till I can actually enjoy it myself.

I added exit() to the end of create_error.

I agree with how you put the script for the image seperate actually. It makes it good for beginner SMF codders to add more of their own images. You could also easily make different packages with different images.

Would be good to modify the post template at some point to add an icon(s) and perhaps a pop up text box for the text. But by my count it the mod should have something work now.
Upload, install, no errors.
Test message, preview/post.
Er, nope it doesn't do anything it just shows the tag as it was typed.

Well I don't know what wouldn't be working but if you or someone wants to have a look and find it before me (I don't know that I will) then attached is what I've got/done so far...
Hmm I can't attach, will upload it to...
http://www.nomoregrapes.com/SmilieSignMod.zip
Ant's Life - My morpg that is integrated with SMF for good communications between players and staff.

Advertisement: