vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Smiliecreator v1.1 (https://vborg.vbsupport.ru/showthread.php?t=50450)

jbear6 03-19-2003 09:25 PM

Quote:

Today at 01:42 PM Slynderdale said this in Post #35


PHP Code:

stripslashes() 


Thank you my friend, but you give me more credit than I deserve. Where would I put that?

Thanks,
Jbear6

Slynderdale 03-19-2003 09:37 PM

find in text2schild.php:
PHP Code:

<?

under it add:
PHP Code:

function remove_magic_quotes(&$x,$keyname="") {
    if (
is_array($x)) {
        while (list(
$key,$value) = each($x)) {
            if (
$valueremove_magic_quotes(&$x[$key],$key);
        }
    } else if (
ini_get('magic_quotes_sybase')) {
        
$x preg_replace("/''/""'"$x);
    } else if (
ini_get('magic_quotes_runtime')) {
        
$x preg_replace("/\\\"/"'"'$x);
    } else if (
ini_get('magic_quotes_gpc')) {
        
$x stripslashes($x);
    }


then find:
PHP Code:

$text rawurldecode($_GET["text"]); 

under it add:
PHP Code:

remove_magic_quotes(&$text); 


jbear6 03-19-2003 09:59 PM

Ummmm....I put this
PHP Code:

<?php
error_reporting
(7);

$noheader=1;

require(
"./global.php");

to prevent non-members from linking to the smilie image URL, is that going to conflict with your first instruction?

Thanks,
Jbear6

Slynderdale 03-19-2003 10:02 PM

No, you can basicly put that function any wheres, the slash you get is most likly due to having magic quotes turned on, with this, it will strip the extra slashes from the text.

Quote:

Today at 06:59 PM jbear6 said this in Post #43
Ummmm....I put this
PHP Code:

<?php
error_reporting
(7);

$noheader=1;

require(
"./global.php");

to prevent non-members from linking to the smilie image URL, is that going to conflict with your first instruction?

Thanks,
Jbear6


jbear6 03-19-2003 10:21 PM

Thanks Slynderdale :)

Jbear6

Lesane 03-20-2003 09:56 AM

Great addon, well done.

I get 2 javascript errors though:

PHP Code:

Line10
Char
14
Error
'document.schild.type' is not an object 

And when i click on generate smilie then i get this javascript error:

PHP Code:

Line275
Char
1
Error
'opener' is not an object 

Any idea's?

Kars10 03-20-2003 11:06 AM

@ Lesane, this is very strange.
Look in your vbcode_popup_smiliecreator-template and make shure that there is no error. Have you uploadet the modified vbcode.js? :)

Lesane 03-20-2003 11:51 AM

It works now, i first tried to run it standalone.

Thanks.

Kars10 03-20-2003 11:53 AM

No Problem. Glad that you like it! :)

Lesane 03-20-2003 01:09 PM

It's a great addon.

I have it integrated in my store hack as standalone and it works perfect. They are forced to download the smilie to their computer and to not use the text2schild.php url(password protected) to prevent high server load.

Kars10 03-20-2003 02:05 PM

@ Lesane, very cool addition to this hack!!
I think many other store-users would like to have this addon!! ;)

Kars

GameCrash 03-20-2003 02:14 PM

I would add something like a cache mechanism... maybe storing the created pictures in a mysql table and using this everytime someone calls the text2schild.php with the same parameters... may be less ressource hungry...

Larry@IOG 03-20-2003 11:39 PM

I would love to have this hack but my forums are huge. :(

Larry

Link14716 03-21-2003 01:39 AM

I will probably release a store addon tommorow using this hack. It will output the image to a file, and then add that to the board's smilies. :)

Steve123 03-21-2003 05:04 AM

How do u get rid of the / slashes that are created when u use " or '

/Steve

The Wedge 03-21-2003 06:48 AM

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/virtual/site5/fst/var/www/html/board/text2schild.php on line 11

when i click on the smilecreate box it creates an error, but still pops the box up, than when im done creating the smile i want i put it to the reply or post and than post, and it comes up as a URL and when i click the link it gives me that error up there...

Kars10 03-21-2003 07:15 AM

@ Link 14716, i would love to see a Storeintegration. ;)

@ Steve123, use the Fix by Slynderdale Link...

@ The Wedge, check everything twice. Also make shure to have dynamic image tags enabled in your Posting Code Settings.

Kars

iggy123 03-21-2003 06:09 PM

Excellent --- we only have 20 members so we shouldn't need to worry for a while..

Steve123 03-21-2003 09:06 PM

@ Kars10...

Ive tired using his fix, it dont work.. As soon as i add the function to the .php file, the images wont work...

Steve123 03-21-2003 09:39 PM

also cant use #'s in the smilies...

Sanni 03-22-2003 01:47 AM

Quote:

03-20-03 at 04:04 AM Kars10 said this in Post #32
Please PM me your URL, so i can have a look. ;)
Hi Kars, I am having the same problem as the flying dutchman (a red X is being displayed instead of the image, even though the smilies are viewable via the smiliecreator popup). I am running VB 2.3.

also if i copy and paste the url that is generated (http://www.ozforums.com/text2schild....ol=255,255,255) i get this error:

Fatal error: Call to undefined function: imagecreatefrompng() in /web/www.ozforums.com/htdocs/text2schild.php on line 60


my boards are located at http://www.ozforums.com (unfortunately you have to be a member to post)

FlyingDutchman 03-22-2003 04:27 AM

well, my problem was the port of the server, the bb url didn't include it, stupid me, lol

FlyingDutchman 03-22-2003 04:30 AM

Quote:

Today at 12:06 AM Steve123 said this in Post #59
@ Kars10...

Ive tired using his fix, it dont work.. As soon as i add the function to the .php file, the images wont work...

try this using this function instead (as the other one didn't work for me, i searched for a fix, heheh):

PHP Code:

function remove_magic_quotes(&$x,$keyname="") {
    if (
is_array($x)) {
        while (list(
$key,$value) = each($x)) {
            if (
$valueremove_magic_quotes(&$x[$key],$key);
        }
    } else if (
ini_get('magic_quotes_sybase')) {
        
$x preg_replace("/''/""'"$x);
    } else if (
ini_get('magic_quotes_gpc')) {
      
$x stripslashes($x);
    }


remember you still need the call to the function... see Slynderdale's post...

Steve123 03-22-2003 04:49 AM

^^ Thankyou that works!!..

Now gota figure out how to make it so u can use #'s and *'s

Kars10 03-22-2003 06:59 AM

@ FlyingDutchman, you have a new PM! :)

Kars10 03-22-2003 07:54 AM

Ok, updated Zip-File in First Post with the Quote-Bugfix by Slynderdale and FlyingDutchman.
To update from Version 1.0. just replace the text2schild.php with the new one from the Zip-File. :)

Kars

Steve123 03-22-2003 08:10 AM

^^^

Cool but can u get # and *'s working in the pics :)

/Steve

Kars10 03-22-2003 08:35 AM

@ Steve123, i?ve tested the *'s and it works perfect. ;)

The # don?t work yet.

Steve123 03-22-2003 08:51 AM

damn.. mine dont work with *'s..

its weird cus when i put *'s in it..

it comes up as normal text.. like this..

[ img] blah blah *test* [img ]

so its not displaying the image just the url :S

SmartGnome 03-22-2003 04:30 PM

Quote:

Today at 04:47 AM Sanni said this in Post #61


Hi Kars, I am having the same problem as the flying dutchman (a red X is being displayed instead of the image, even though the smilies are viewable via the smiliecreator popup). I am running VB 2.3.

also if i copy and paste the url that is generated (http://www.ozforums.com/text2schild....ol=255,255,255) i get this error:

Fatal error: Call to undefined function: imagecreatefrompng() in /web/www.ozforums.com/htdocs/text2schild.php on line 60


my boards are located at http://www.ozforums.com (unfortunately you have to be a member to post)


Looks like you have no GD_Lib available on your server.
imagecreatefrompng() is a call to the lib.

Cheers

SmartGnome 03-22-2003 04:31 PM

Quote:

Today at 11:51 AM Steve123 said this in Post #69
damn.. mine dont work with *'s..

its weird cus when i put *'s in it..

it comes up as normal text.. like this..

[ img] blah blah *test* [img ]

so its not displaying the image just the url :S


:cross-eyed: Me have same problemo. Weird :D

Cheers

Sanni 03-23-2003 04:16 AM

Quote:

Today at 04:30 AM SmartGnome said this in Post #70



Looks like you have no GD_Lib available on your server.
imagecreatefrompng() is a call to the lib.

Cheers



ahh yes i spoke to my sys admin before installing the hack and he said he thought that GD was installed....he is now going to look into it .

Thanks for the help :)

zefman 03-23-2003 04:41 AM

thank you very much Kars10 for this !

my members are very happy with this fantastic addon

i had the same problem as SmartGnome & Steve123 for "*'s" but resolved with your new text2schild.php, thanks :)

another minor problem is in using the word "l?" for exemple (french typo) and it appears as a curious thing when posted, the "?" is converted as a "r" with an oblique bar on top of it. :surprised:

SmartGnome 03-23-2003 07:52 AM

Quote:

Today at 07:16 AM Sanni said this in Post #72




ahh yes i spoke to my sys admin before installing the hack and he said he thought that GD was installed....he is now going to look into it .

Thanks for the help :)

There is a simple way to check it your self.

Create in a text editor a file called showme.php and put the following in that file:

PHP Code:

<? 
phpinfo()  
?>

Upload to your server and call it in your browser. Scroll the file till you have the GD part and it schould look like the attached screenshot

Cheers

FlyingDutchman 03-23-2003 08:39 AM

Quote:

Today at 10:52 AM SmartGnome said this in Post #74


There is a simple way to check it your self.

Create in a text editor a file called showme.php and put the following in that file:

PHP Code:

<? 
phpinfo()  
?>

Upload to your server and call it in your browser. Scroll the file till you have the GD part and it schould look like the attached screenshot

Cheers


http://to.your.site/forums/admin/ind...action=phpinfo

works too ;)
no need for a new file or anything, and not everyone can view it this way :P

Steve123 03-23-2003 09:18 AM

Still dont work for me, using the new .php :S

Exo 03-23-2003 06:47 PM

wie krieg ich den hintergrund von den erstellten smiles transparent?

sabret00the 03-24-2003 03:04 PM

installing this as i type, well ot quite but in a minute

Kars10 03-25-2003 04:36 AM

Ok, updatet template in First Post.
Now you have a "Color-Preview" in the Background and Textcolor-Dropdownmenu (and more colors)!
To update, simply replace your old template with the new template of the zip. :)

See the screenshot!

Have fun
Kars

C.Birch 03-25-2003 04:43 AM

some of my members get a error on page and can not get it to pop up but others like my self can. any ideas why?


All times are GMT. The time now is 06:45 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01462 seconds
  • Memory Usage 1,845KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete