Page 9 of 13

Re: Smilie Creator

Posted: Fri Feb 27, 2009 2:20 am
by Richio747
Using 3.0.4
'Have checked and rechecked everything, flushed the cache and refreshed the template,
but I get this error when clicking to make a post:
WHITE PAGE

Code: Select all

Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/explorer/public_html/includes/bbcode.php on line 75
Line 75: $str = array('search' => array(), 'replace' => array());

I suppose it's because I'm attempting to use it with AeroBlue. :o
Neither the prosilver nor the subsilver smilie_creator.html works.

Oh well, it was worth a try. :(

Re: Smilie Creator

Posted: Fri Feb 27, 2009 3:43 pm
by Dr.Death
Hi,

you have an syntax error in your edited includes/bbcodes.php

Please link your edited bbcode.php, so we can check your problem.

Maybe there is only a missing character a few lines before or you deleted a special braket:

Code: Select all

	function bbcode_second_pass(&$message, $bbcode_uid = '', $bbcode_bitfield = false)
	{

Re: Smilie Creator

Posted: Fri Feb 27, 2009 4:44 pm
by Richio747
Re: BBCode syntax error.

Thank you for looking.
Somethings I can do, but this is beyond me.
http://www.ozarkcountyforums.com/bbcode-error.zip

Update:
Just as a link (even from the root) resulted in a blank file. ???
Anyway, I copied it to the desktop and it opened fine, so I zipped that up.
Link corrected.

Re: Smilie Creator

Posted: Fri Feb 27, 2009 5:20 pm
by Richio747
'Multitasking this morning, but I checked to make sure I'd redone both edits as previously installed.
(I had to uninstall, as it left the board useless - even in a pre-lauch state)
Well, I'd missed the second edit, so now the file is as it was when I first received the error.

That "hanging" closing bracket } thingy on line 76 bothered me, but the install file didn't include it, so I didn't either

'Seems to me that the "find" for the 2nd edit was part of larger routine and that the addition should have been after that closing } bracket.

But what do I know? I'm only a chimp.

Re: Smilie Creator

Posted: Fri Feb 27, 2009 8:34 pm
by Dr.Death
You have edit the includes/bbcode.php at the wrong place.

Take a closer look at this posting: http://www.phpbb.com/community/viewtopi ... 5#p6246755

Re: Smilie Creator

Posted: Sat Feb 28, 2009 12:45 am
by Richio747
Thank you. I see the error.
I won't have a chance to test it out until Sunday, though.

UPDATE:
I did have some time. 'Works like a charm!
Thank You!

Re: Smilie Creator

Posted: Wed Apr 01, 2009 10:26 pm
by Zhono
Is it possible to edit text2schild.php to use larger smilies? Like ones that are about 48x64?

Re: Smilie Creator

Posted: Sat Apr 04, 2009 10:20 am
by Dr.Death
You are free to edit the text2schild.php

But i don't support these mofifcations ;-)

Re: Smilie Creator

Posted: Sun Apr 05, 2009 9:21 pm
by bobocop
Hi, this is a great mod.
I have it installed in my 3.04 board and works perfectly.

The one thing i would like to do is to be able to add bigger smilies (as poster above)
I know that's not supported, but can you at least point me into which line of code i should mess with?

I added a smiley just a bit wider.
smilie31.jpg
smilie31.jpg (2.7 KiB) Viewed 714 times
but this is how it looks with the sign
test.jpg
test.jpg (5 KiB) Viewed 714 times
as you can see it cuts off the arm on the smiley

Can you point me to which line of code to fix that please.

Re: Smilie Creator

Posted: Tue Apr 07, 2009 6:22 pm
by Dr.Death
FIND:

Code: Select all

imagecopy ($img, $smilie, ($width / 2 + 6), ($height - 24), 0, 0, 23, 23); // Copy image tile  
REPLACE WITH:

Code: Select all

imagecopy ($img, $smilie, ($width / 2 + 6), ($height - 24), 0, 0, 38, 38); // Copy image tile  
But be carefull...if someone uses a short "text", the smilies will cut off, because of the short shield box.

The main problem with bigger smilies is: The width of the smilie box depends of the written text and the font-size.

Code: Select all

//Main work here
$smilie                = imagecreatefrompng("{$phpbb_root_path}images/smilie_creator/smilie" . $smilie . ".png");
$schild                = imagecreatefrompng("{$phpbb_root_path}images/smilie_creator/schild.png");
$img                = imagecreate($width, $height); 
Later the smilie will be attached to the textbox.
If the smilie is bigger than the textbox, the smilie will be cut off. Thats the main problem.

Just play around with the $width variable and some copy commands...... it's your turn ;-)

Re: Smilie Creator

Posted: Sun May 24, 2009 9:34 pm
by Ahri89
This mod is very nice jeje but i cant use "¿" this mod not support UTF-8 no? Thanks :D

Re: Smilie Creator

Posted: Sun May 24, 2009 11:35 pm
by A_O_C
Ahri89, from the first page, third post:
Dr.Death wrote:Only plain text is allowed
;)

Re: Smilie Creator

Posted: Wed Jul 01, 2009 5:33 am
by gmvasek
prudil wrote:Your script doesn't accept diacritic...
For example: ěščřžýáíéůú ěščřžýáíéůú ěščřžýáíéůú
Image
And many others... try this:
I maybe solved it:

In current version IT IS possible to make characters like ěščřžýáíé work. I have tested it on my localhost. This solution works with most GD libraries and will support any iso-8859-2 character. Iconv must be enabled on the server.

OPEN text2schild.php
FIND:

Code: Select all

$text             = utf8_decode(request_var('text', '', true));  
REPLACE WITH:

Code: Select all

$text             = request_var('text', '', true);  
FIND:

Code: Select all

$text = htmlspecialchars_decode($text);  
BEFORE, ADD:

Code: Select all

$text = iconv('UTF-8', 'ISO-8859-2', $text);  
Screenshots:
Before
Image
After
Image


Or it is possible to rewrite the script to use imagettftext instead of imagestring, which will solve the problem probably with all UTF-8 characters.

Re: Smilie Creator

Posted: Wed Jul 01, 2009 10:52 am
by updown
And by the way: Imagemagick-support for animated Smilie-GIFs would also be VERY nice ;)

Re: Smilie Creator

Posted: Wed Jul 01, 2009 11:04 am
by autinhyeu
gmvasek wrote:
prudil wrote:Your script doesn't accept diacritic...
For example: ěščřžýáíéůú ěščřžýáíéůú ěščřžýáíéůú
Image
And many others... try this:
I maybe solved it:

In current version IT IS possible to make characters like ěščřžýáíé work. I have tested it on my localhost. This solution works with most GD libraries and will support any iso-8859-2 character. Iconv must be enabled on the server.

OPEN text2schild.php
FIND:

Code: Select all

$text             = utf8_decode(request_var('text', '', true));  
REPLACE WITH:

Code: Select all

$text             = request_var('text', '', true);  
FIND:

Code: Select all

$text = htmlspecialchars_decode($text);  
BEFORE, ADD:

Code: Select all

$text = iconv('UTF-8', 'ISO-8859-2', $text);  
Screenshots:
Before
Image
After
Image


Or it is possible to rewrite the script to use imagettftext instead of imagestring, which will solve the problem probably with all UTF-8 characters.
don't work for me :(
phpinfo
phpinfo
untitled.PNG (9.52 KiB) Viewed 554 times