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
  #22  
Old 08-10-2004, 03:44 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yup, that would be nice
Reply With Quote
  #23  
Old 08-10-2004, 04:49 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 ranger2kxlt
Works like a charm :-D love the hack...

question, why can't we link directly to the image? is there a way to do that? also what about making an add-on, so we can create images within our posts :-D

Thanks
You wouldn't want to link directly to the image because you'd really be linking to the PHP file that is generating the image on the fly. Just think about it.... if you have a 100 people viewing the same linked image then your server is doing 100 GD processes to create those images.

I put the message about no direct linking in there really for my benefit because I wouldn't want to kill my server. There is nothing stopping from you using the linked URL, but rather it's something you most likely wouldn't want to do.

In regards to inserting it directly into the posts, check out the link I gave for the VBT.com thread. The same end effect could be achieved without having to create a new image on the fly or even using GD at all.


If you guys/gals really want something that gets inserted directly into a post then let me know..... Romeo Tunes pointed me in the direction of something that most likely will be my next learning experiment that will do it but it will take a little bit of time for me to work on it.
Reply With Quote
  #24  
Old 08-10-2004, 05:41 PM
ranger2kxlt ranger2kxlt is offline
 
Join Date: Jan 2003
Location: Plano, TX
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
In regards to inserting it directly into the posts, check out the link I gave for the VBT.com thread. The same end effect could be achieved without having to create a new image on the fly or even using GD at all.
not sure where this can be found...

I would love to have the images be made and inserted on the fly while in posting mode :-D
Reply With Quote
  #25  
Old 08-10-2004, 05:43 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 ranger2kxlt
not sure where this can be found...

I would love to have the images be made and inserted on the fly while in posting mode :-D
The VBT.com thread can be found here.
Reply With Quote
  #26  
Old 08-10-2004, 06:30 PM
YLP1 YLP1 is offline
 
Join Date: Aug 2004
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi all, I followed the instructions but I don't know how to be able to choose this mod option....
If I was a visitor and wanted to use this module, how would I do it..

And yes...I am a real noobe.
Reply With Quote
  #27  
Old 08-11-2004, 02:55 AM
Romeos Tune Romeos Tune is offline
 
Join Date: Jun 2004
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeahhhhh We want we want! lol...... This'll be great when you get that thing working......
Reply With Quote
  #28  
Old 08-11-2004, 12:01 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 fiber1
KW802,

What is the fix for the bitmap issue, so the people who already installed know what we need to go in and fix?

Fiber
The quick fix is a one word change on line #23 of the original template. Please see post #17 above (https://vborg.vbsupport.ru/showpost....9&postcount=17) for the details.


For those not familiar with, or haven't come across it yet, the bitmap issue was....

Some people using IE were having problems when they went to right-click "Save Picture As..." on the new smilie. Instead of seeing the name "fps_smilie_creator" as the file name to be saved and PNG as the file type they would instead see "untitled" as the file name and "bitmap" as the file type. The file would still be saved and would work fine but by saving it as a bitmap instead of a PNG it wasn't saving the transparency of the graphic, instead the new smilie would appear with a white background. Because the file would still save some people didn't even realize that there was a problem and just assumed that the white background was normal.

To confuse matters even more not all IE users were experiencing it. I finally tracked it down to the fact it would only happen if there were spaces placed into the smilie message. In other words, an IE user creating a smilie with the message of "Cool!" would see "fps_smilie_creator" / PNG but an IE user creating a smilie with the message of "This is cool!" would see "untitled" / bitmap.

What was causing me frustration was the fact that only IE was experiencing the problem, Mozilla Firefox would always properly recognize both the file name and file type.

For people who already have it installed changing the one line I gave earlier (the part about "+text+") will fix the IE problem. Changing the one line will have no impact on either the template or the new smilie image, it'll just take care of the IE right-mouse issue.


I really do appreciate everybody's patience in dealing with the problem until I had a fix. Thanks, everybody!
Reply With Quote
  #29  
Old 08-11-2004, 12: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 Romeos Tune
yeahhhhh We want we want! lol...... This'll be great when you get that thing working......
Assuming that somebody else doesn't knock it out first it's the 2nd thing on my 'to do' list. The first thing on my list is that I'm trying to change the RSS Feed hack by VeloCD to hard-code some logic in the PHP to force all articles that contain a certain phrase into one particular forum regardless of what the original RSS Feed was or what forum that feed would normally be posted into. It's an ugly change, because it'd be hard-coded in the PHP instead of through the ACP menu, but for my site it'd be useful to do.

I think converting that UBB hack to be a VB hack would be another nice learning project so it's definitely something I'll be working on. I've looked at the code that you sent me and am currently seeing which code is for the actual function of the panel generator and which code is for the UBB functionality. Yeah, I'm a geek... I look at code for fun.
Reply With Quote
  #30  
Old 08-11-2004, 12:17 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 YLP1
Hi all, I followed the instructions but I don't know how to be able to choose this mod option....
If I was a visitor and wanted to use this module, how would I do it..

And yes...I am a real noobe.
YLP1,

Good morning. OK, first question.... did you implement it as a CMPS add-on or as a seperate VB item? Assuming that you did it through CMPS, how did you do it? Did you create a new module, did you create a new page, or some other method?

Thanks,
Kevin
Reply With Quote
  #31  
Old 08-11-2004, 06:32 PM
ranger2kxlt ranger2kxlt is offline
 
Join Date: Jan 2003
Location: Plano, TX
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm confused on the VBT hack...how do users know about the other faces they can use? please explain how that works.

thanks
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 10:44 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.05026 seconds
  • Memory Usage 2,322KB
  • 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_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