vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vba CMPS: Smilie Creator (https://vborg.vbsupport.ru/showthread.php?t=68062)

KW802 08-12-2004 05:33 PM

Quote:

Originally Posted by YLP1
Hi Kevin,

WOW thanks for the explanation...I think I understand it!!

Cool. :D

Quote:

Originally Posted by YLP1
Here is what my gd says in PHP Info

gd
GD Support enabled
GD Version bundled (2.0 compatible)
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled

OK, I just did a brief experiment and it looks like your host server is running Windows instead of Unix or Linux and that line #53 of the PHP file may be having issues with that. When I get home (late) tonight I'll poke around to see if I can find anything out; I don't have access to a Windows hosted site to play with so it might take me a little bit longer than usual. :o

YLP1 08-12-2004 05:39 PM

Awesome, thanks Kevin...

Yes my forum is on a Windows server.

I'll be here....so whenever you find something...

KW802 08-12-2004 05:52 PM

Quote:

Originally Posted by YLP1
Awesome, thanks Kevin...

Yes my forum is on a Windows server.

I'll be here....so whenever you find something...

If you're up for it..... Experiment #1!

Please try replacing the "fps_smilie_creator.php" file on your server with the one attached instead.

Thanks,
Kevin

YLP1 08-12-2004 06:17 PM

K I uploaded the new one...same thing is happening.

YLP1 08-12-2004 06:19 PM

OH gosh...take a look at this: http://www.yourlincolnpark.com/lpsforum/lpsforum.php
I moved the module to the center and look where it appears on the portal page LOL....

What's up with that?

KW802 08-12-2004 06:21 PM

Quote:

Originally Posted by YLP1
K I uploaded the new one...same thing is happening.

I'm trying to come up with experiment #2 now.... in the mean time put the module back on the right side! We'll figure that one at later.

Edit: OK, experiment #2 attached.

Edit #2: YLP1, if it still doesn't work shoot me of a PM instead so I don't end up filling up the thread with experiments. :D

YLP1 08-12-2004 07:33 PM

Ok installed the new file and moved the module back to the right...no changes.

Oops...sorry..just sent this via pm...didn't see that before I posted this.

KW802 08-13-2004 12:20 PM

Quote:

Originally Posted by YLP1
Ok installed the new file and moved the module back to the right...no changes.

Oops...sorry..just sent this via pm...didn't see that before I posted this.

YLP1, I realized that I can't send attachments via PM so I've got to muddle up the thread a bit more.

Attached is experiment #3. If this one still doesn't work let's take it to email (kw802@farpointstation.org) so I can send attachments. :D

For everybody else reading this thread... sorry filling up the thread with this stuff. :o

YLP1 08-13-2004 02:14 PM

YEAH, You rock Kevin!!!! It worked...go see http://www.yourlincolnpark.com/lpsforum/lpsforum.php

Oops....it doesn't like two lines in the signage though...

KW802 08-13-2004 02:56 PM

Quote:

Originally Posted by YLP1
YEAH, You rock Kevin!!!! It worked...go see http://www.yourlincolnpark.com/lpsforum/lpsforum.php

Oops....it doesn't like two lines in the signage though...

We're getting there! :nervous:

Some experimenting later and you're absolutely correct, when it hits 33 characters or more it has problems. I'm seeing what I can do now.... We could always cheat and make the input limited to 32 characters but I'll have a solution for you.

Polo 08-13-2004 03:01 PM

Working nice at our website, as a center module, thanks for this cool addon! ;)

KW802 08-13-2004 03:08 PM

Quote:

Originally Posted by Polo
Working nice at our website, as a center module, thanks for this cool addon! ;)

https://vborg.vbsupport.ru/external/2009/02/1.gif Thanks, good to hear! I just wish everybody's install would go as smooth. Except for this Windows server issue I think I have all of the Unix/Linux people up & running.

Today's learning lesson for me will be to find out why parsing an array in PHP works fine on the Unix/Linux boxes but not on a Windows box. Man, I guess I am a geek.... I love doing this kind of stuff. I think the time has also come for me to visit my local Barnes & Noble up for some PHP books.

KW802 08-31-2004 12:43 AM

Here's a small & quick modification to the template for vBa CMPS users to help encourage your visitors to register!

What I've noticed on the sites that have installed the Smilie Creator is that they either leave the security settings wide open so that anybody can use it or they turn the page off for users not logged in. One of my goals with this (besides it being a learning experiment :p ) was to help encourage users to register but with security opened up to everybody visitors had no reason to register and even then they couldn't see what benefit registering would do for them. Plus for people who implemented this as a module, instead of page, they couldn't restrict access to it as easily as people who implemented it as a new page.

The solution is a quick change to the template to use a vBulletin conditional to restrict access to the "create" button to only users logged in. Simple but I think it does the job so far. :)

A screen shot of this modification showing the output to visitors not logged in is attached.

To make this change find the following code in your template:
Code:

<td align="center" valign="middle" colspan="2" class="alt1">
<br/><input type="button" name="Create_Smilie" value="Create my custom smilie!" onclick="createSmilie(get_radio_value(),document.smilie_form.text.value,document.smilie_form.col.value,document.smilie_form.shcol.value)"/>
</td>

And replace it with this code:
Code:

<td align="center" valign="middle" colspan="2" class="alt1">
<br/>
<if condition="$bbuserinfo[userid]">
        <!-- CODE TO DISPLAY IF THE USER IS LOGGED IN -->
        <input type="button" name="Create_Smilie" value="Create my custom smilie!" onclick="createSmilie(get_radio_value(),document.smilie_form.text.value,document.smilie_form.col.value,document.smilie_form.shcol.value)"/>
<else />
        <!-- MESSAGE FOR GUESTS -->
        <hr width="95%">
        <strong>If you were logged in right now a button would be here so that you could create your new smilie! If you haven't registered yet just click <a href="$vboptions[bburl]/register.php?$session[sessionurl]">here</a>. <i>It's fast, easy and free!</i></strong>
        <hr width="95%">
</if>
</td>

If you come up with any other modifications that you'd like to share with the community please feel free to post your ideas! To be emailed any major updates or changes click "Install" in the upper-right hand corner of this thread.



IMPORTANT: If you're running the original 1.0.0 version of the template the command line has changed in the 1.0.1 template! You'll need to make the following modificatins only if you're using the original 1.0.0 template otherwise if you're using the newer version of the template use the code above. Only use the code below if you're using the original version of the template: Look for this code:
Code:

        <td align="center" valign="middle" colspan="2" class="alt1">
Code:

<br/>
        <input type="button" name="Create_Smilie" value="Create my custom smilie!" onclick="createSmilie(get_radio_value(),document.smilie_form.text.value,document.smilie_form.col.value,docume nt.smilie_form.shcol.value)"/>
 
</td>


And change it to:
Code:

<td align="center" valign="middle" colspan="2" class="alt1">
Code:

<br/>
<if condition="$bbuserinfo[userid]">
<!-- CODE TO DISPLAY IF THE USER IS LOGGED IN -->
<input type="button" name="Create_Smilie" value="Create my custom smilie!" onclick="createSmilie(get_radio_value(),document.smilie_form.text.value,document.smilie_form.col.value,document.smilie_form.shcol.value)"/>
<else />
<!-- MESSAGE FOR GUESTS -->
<hr width="95%">
<strong>If you were logged in right now a button would be here so that you could create your new smilie! If you haven't registered yet just click <a href="$vboptions[bburl]/register.php?$session[sessionurl]">here</a>. <i>It's fast, easy and free!</i></strong>
<hr width="95%">
</if>
</td>



For some reason there keeps getting extra spaces inserted into the word "form" and "document" in the revised input command above. I've tried modifying it several times now and for some reason vBulletin keeps putting the spaces back in. In the revised code you'll need to remove the extra spaces before saving your template otherwise your page won't work and will display a script error message. :ermm:

YLP1 08-31-2004 01:07 AM

Quote:

Originally Posted by KW802
https://vborg.vbsupport.ru/external/2009/02/1.gif Thanks, good to hear! I just wish everybody's install would go as smooth. Except for this Windows server issue I think I have all of the Unix/Linux people up & running.

Today's learning lesson for me will be to find out why parsing an array in PHP works fine on the Unix/Linux boxes but not on a Windows box. Man, I guess I am a geek.... I love doing this kind of stuff. I think the time has also come for me to visit my local Barnes & Noble up for some PHP books.

Hi KW802, you make any headway on the issues I had posted? I would love to use this but I still have those issues.

KW802 08-31-2004 01:23 AM

Quote:

Originally Posted by YLP1
Hi KW802, you make any headway on the issues I had posted? I would love to use this but I still have those issues.

I didn't forget about you, I just don't have access to a windows box for testing. What I'm trying to do is piece together enough components from my spare parts bin to set up a box for testing. Why standard PHP would work fine on Unix/Linux boxes but not a Windows box has me puzzled yet but I'm determined to get a solution. :ermm:

YLP1 08-31-2004 01:41 AM

Thank so you much....I will patient....

venomx 09-06-2004 06:43 AM

Hey what is smilies.psd in the zip?

KW802 09-06-2004 02:14 PM

Quote:

Originally Posted by venomx
Hey what is smilies.psd in the zip?

VenomX,

It is a template smilie face so that new smilies can be created from it. It was part of the original VB2.x hack that this conversion was based upon. To create additional/new smilie faces use the PSD to make your smilie to how ever you'd like it and then when you upload it to your server just change the template to include it. As long as the new smilie is the same dimensions as the template then it'll work fine.

Kevin

Blam Forumz 09-25-2004 02:00 PM

I get it to work, but when you save image as, it saves it as .php

help

KW802 09-25-2004 02:04 PM

Quote:

Originally Posted by Blam Forumz
I get it to work, but when you save image as, it saves it as .php

help

Blam Forumz, are you using the most recent version of the template & code? The last revision should've taken care of that problem.

Blam Forumz 09-25-2004 02:18 PM

I just downloaded it a few minutes ago :|

KW802 09-25-2004 03:34 PM

Quote:

Originally Posted by Blam Forumz
I just downloaded it a few minutes ago :|

Is there a URL I could check out to see it?

Cold Steel 09-25-2004 10:09 PM

Excellent.

Thanks for the good work.

Blam Forumz 09-26-2004 04:40 AM

<a href="http://www.blaminator.co.uk/cmps_index.php?page=smilie" target="_blank">www.blaminator.co.uk/cmps_index.php?page=smilie</a>

KW802 09-26-2004 05:19 AM

Quote:

Originally Posted by Blam Forumz

Seems to be working fine. I tried that site with both IE 6.0.29 and Firefox .09 and both saved it as a PNG file.

Blam Forumz 09-26-2004 05:22 AM

Hmm, probably just Firefox 1.0PR messing things up

KW802 09-26-2004 05:26 AM

Quote:

Originally Posted by Blam Forumz
Hmm, probably just Firefox 1.0PR messing things up

It should work.... by any chance, is the file name in FireFox coming up as "fps_smilie_creator.php" and the Save as Type "PNG Image"?

Blam Forumz 09-26-2004 12:05 PM

Indeed it is

KW802 09-26-2004 02:22 PM

Quote:

Originally Posted by Blam Forumz
Indeed it is

That means you're running a Windows XP box with the "Folder Options / View / Hide Extensions for known file types" turned on. ;)

Firefox is picking up the name of "fps_smilie_creator.php.png" but it isn't showing you the ".png" part because the extensions are turned off but it is properly trying to save it as a "PNG Image". Go ahead and save the file to your hard-drive and then double-click it; it should launch in your image viewer. Try viewing the same page with IE and you'll see just "fps_smilie_creator" as the file name and "PNG" as the file type.

Blam Forumz 09-26-2004 07:56 PM

The thing is, file extensions are on o_O I hate them turned off

KW802 09-27-2004 01:55 AM

Quote:

Originally Posted by Blam Forumz
The thing is, file extensions are on o_O I hate them turned off

Did you try saving the file yet?

Blam Forumz 09-27-2004 05:13 AM

yeah, thanks, that worked fine, m just worried that people might end up saving .php files and not .png files and get confused

KW802 09-27-2004 12:35 PM

Quote:

Originally Posted by Blam Forumz
yeah, thanks, that worked fine, m just worried that people might end up saving .php files and not .png files and get confused

I'll see what I can do. The curious part is why Firefox displays the ".php" part of it but IE doesn't.

ashley53680 10-02-2004 04:14 AM

Oops, doesn't work for me *yet*.... the only thing I can think of is I saved the php file in the WRONG place. LOL

http://www.simply-baby.net/forum/vba...=smiliecreator


Thank you ahead of time! :)

ashley53680 10-02-2004 04:17 AM

Nevermind... I fixed it... hehe

KW802 10-02-2004 01:26 PM

Quote:

Originally Posted by ashley53680
Nevermind... I fixed it... hehe

Ashley53680, good to see you go it working. :D

dieselpowered 10-03-2004 07:12 PM

Hey that post at VBT not sure what that does?? Is it an addition to your hack? I would really like to use yours and allow people to click on the smilie created and have it place itself into the post? Forgive my ignorance!!

Mike

venomx 10-03-2004 07:28 PM

The one at VBT is for only in the post its used it.. If they want one to take away they need this hack here...

dieselpowered 10-03-2004 07:57 PM

Ok ya I am trying to get something that places the smilie in a post directly from the editor ;)

I am sure our buddy here can do that!!

Mike

KW802 10-04-2004 02:22 AM

Quote:

Originally Posted by xtremeoff-road
Hey that post at VBT not sure what that does?? Is it an addition to your hack? I would really like to use yours and allow people to click on the smilie created and have it place itself into the post? Forgive my ignorance!!

Mike

Mike,

The VBT trick is a BB code that creates the allusion of a smilie holding a sign. It does this by creating table that is 1 column by 2 rows; the first row has a border with a white background & contains the text that is typed in while the second row has no border & contains the smilie centered. The end result is a very nice looking table that gives the appearance of a smilie sign. It's a very simple & cool bb code trick. But, as others have pointed out, you can't save the image because it really isn't an image.

This hack creates an actual PNG file that the user can right-click save-as to their local PC. The problem appears to be that I was, to be candid, a bit short-sighted when I worked on it.

To clarify that last remark when I was working on this hack I knew about the VBT trick so in my head I thought that it eliminated the need of the original hack that this is based on because the same end results could be achieved, a smilie holding a sign inside of a post. That is why when I approached this hack as a learning experience I geared it more towards generic usage that could be used on just about any HTML page rather than just the VB forums. After all, I figured, why would anybody want to put additional overhead on their server to create the graphics inline, or to save all of the images on their server eating up drive space, if they didn't have to.

Well, based upon various feedback I was wrong. :ermm:

If you guys & gals can bear with me and give me a little bit of time I have a few ideas in floating around in my head on how to integrate this smilie maker with the VB3 editor. Priority wise I want to finish up some changes I'm doing to another hack, a modified version of external.php (search for FPS_EXTERNAL.PHP for that hack), and then my wedding is in a few weeks so my free time these days is very little but I would like to come back to this smilie creator and make the revisions to it so that it can be integrated into the VB3 editor. :nervous:


All times are GMT. The time now is 04:19 AM.

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.02751 seconds
  • Memory Usage 1,853KB
  • 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
  • (6)bbcode_code_printable
  • (19)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