Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vba CMPS: Smilie Creator Details »»
vba CMPS: Smilie Creator
Version: 1.00, by KW802 KW802 is offline
Developer Last Online: Nov 2021 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-05-2004 Last Update: Never Installs: 62
 
No support by the author.

vBa CMPS: Smilie Creator v1.0.1

OVERVIEW: This is a conversion of an old VB2 hack (https://vborg.vbsupport.ru/showthread.php?t=50450) by Kars10 to create new smilie faces on the fly. The original version acted as a pop-up box from within a BB code so that the new smilie would be inserted into your forum message posting. A BB code trick posted over at vbulletintemplates.com (http://www.vbulletintemplates.com/mo...ead.php?t=6671) really eliminates the need of having to do this hack anymore since you can accomplish nearly the same thing without having to do any code changes. I was still interested in this old hack though because there are times I'd like to be able to create a new smilie on the fly either for my own personal usage or for my site. So looking at it as a learning experience my goals were to change the hack to be a more generic approach and make it easy to integrate into a site so making it into a vBadvanced CMPS (http://www.vbadvanced.com) module seemed the obvious answer. The other added benefit of making it into a vBadvanced CMPS module is the fact that it could then be added to a web site without doing any code modifications at all but still being able to, for instance, block access to it from non-registered users. I emphasis.... the PHP code is by Kars10, my only change to it was to remove the file name from being hard-coded and instead I'm passing it in from the template in order to make it easier to add new smilies in the future.

REQUIREMENTS: Since the template and PHP are really generic you should be able to easily get it working with just about configuration. For my purposes thought it was intended for.....
  • vBulletin 3.x.x
  • vBadvanced CMPS
  • A server that supports GD -- If you server is not running GD then it will not be able to create the new image.
INSTALLATION: Installation is really easy.....
  1. Upload the fps_smilie_creator.php file to your /forums/modules directory (the folder where you keep your CMPS modules).
  2. Upload the fps_smilie_creator folder to your /forums/images/smilies folder (the folder where you keep your VB smilies). The resulting path should then be /forums/images/smilies/fps_smilie_creator.
  3. Copy & paste the contents of fps_smilie_creator_template.html into a new custom template named adv_portal_fps_smilie_creator (or whatever your prefer).
  4. Create a new VBA CMPS page or module. This is really your choice. For my site I liked it better being a seperate page so when I created my page I used the Page Template option. If you add it as a module instead of a new page then do not include the PHP file in the new module, only include the template!
That's it, you're done! If you upload the PHP file to a folder other than your modules directory or if you upload the images to a folder other than ../images/smilies then you'll have to update the template path names.


UPDATES: Updates & changes....
  • 2004-08-09: The problem with the right-mouse "Save Picture As..." in Microsoft Internet Explorer, where it would want to save it as a bitmap instead of a PNG, has been fixed. I also tweaked the template a little to no longer need the <div> tags.
TIPS & TRICKS: Some ways increase the functionality of your Smilie Creator....REMINDER: To always be informed of updates & changes be sure to click the button. :classic:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 08-13-2004, 03:01 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working nice at our website, as a center module, thanks for this cool addon!
Reply With Quote
  #53  
Old 08-13-2004, 03:08 PM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Polo
Working nice at our website, as a center module, thanks for this cool addon!
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.
Reply With Quote
  #54  
Old 08-31-2004, 12:43 AM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ) 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:
Reply With Quote
  #55  
Old 08-31-2004, 01:07 AM
YLP1 YLP1 is offline
 
Join Date: Aug 2004
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KW802
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.
Reply With Quote
  #56  
Old 08-31-2004, 01:23 AM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Reply With Quote
  #57  
Old 08-31-2004, 01:41 AM
YLP1 YLP1 is offline
 
Join Date: Aug 2004
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank so you much....I will patient....
Reply With Quote
  #58  
Old 09-06-2004, 06:43 AM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey what is smilies.psd in the zip?
Reply With Quote
  #59  
Old 09-06-2004, 02:14 PM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #60  
Old 09-25-2004, 02:00 PM
Blam Forumz Blam Forumz is offline
 
Join Date: Jun 2004
Posts: 554
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

help
Reply With Quote
  #61  
Old 09-25-2004, 02:04 PM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:28 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.04830 seconds
  • Memory Usage 2,327KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete