Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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
  #92  
Old 10-06-2004, 04:28 PM
Mitsuaki Mitsuaki is offline
 
Join Date: Jun 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tis the same except the action is 'p' instead of 'page' so it will be 'index.php?p=smilie'
Reply With Quote
  #93  
Old 10-09-2004, 06:57 PM
Chazz Layne's Avatar
Chazz Layne Chazz Layne is offline
 
Join Date: Feb 2003
Location: Alive, Mobile and Unknown
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KW802
...or to save all of the images on their server eating up drive space, if they didn't have to...
How difficult would it be to make it do just that, and list out previously created smilies? I fuddled around with it for a while, but I don't know the inner workings of vB well enough to get the results to show ON a vB page (specifically, the same page as the Smilie Creator as a second "module"). It would work well for situations like mine where only paid subscribers can access the Smilie Creator...


Great hack BTW, my members are gonna love this.

[high]* Chazz Layne clicks install.[/high]
Reply With Quote
  #94  
Old 10-10-2004, 02:04 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

Mitsuaki: I haven't forgotten about you, I just haven't been home much lately. I'm getting married in less than 4 weeks and my free time has been reduced further than I thought it was going to be.

Chazz: Getting it to save the images is just a matter changing the PHP file. What I'm picturing in my head for the next version is an option to pass in whether to save the file to the server or not. I'll have to take a look to see if there is an easy way of looping through the previously created images to build the page on the fly (I haven't done something like that before yet so it's now on my list of 'things to learn how to do' ). The first part shouldn't be a problem but the second part will require me to do some quick learning.

If either of you guys don't hear back from me within a few days hit me up with a PM.
Reply With Quote
  #95  
Old 10-11-2004, 07:47 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

OK, is there anybody who is not using this with VB3? How about anybody who has access opened up to everybody including guests?

I'm working on saving the images to the server but need to come up with a naming convention. For my own purposes I'm thinking of using "{userid}_{YYYYMMDD}{HHMISS}_{file name of smileyselected}" -- Essentially I need to ensure that the file name is unique when saved to the server. The format I mentioned would result in a name like "1_20041011164111_vorlange1.png" which is a bit unwieldy but unique.

I wouldn't want to use the user name since it might contain characters like spaces, etcetra. The date & time ensure uniqueness and the source name would be just a nice thing to have in there. For people who have access opened up to non-guests then there might be an issue with having the userid in there because on a larget site it could happen that multiple guests are creating a smiley from the same source image at the same second. :ermm:

Thoughts? Bueller?
Reply With Quote
  #96  
Old 10-11-2004, 07:56 PM
Chazz Layne's Avatar
Chazz Layne Chazz Layne is offline
 
Join Date: Feb 2003
Location: Alive, Mobile and Unknown
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's exactly the way I was doing it, minus the userid. I have a PotD running the same way. I figured a paginated gallery (like avatars) would work best for retrieving them. The 2 problems I hit were both from not knowing the workings of vB well enough to get the filename to pass back to the template via variable to show the image after it's created (or the list of older images)... wish I had more time to read up on it.

OT: Congrats on the upcoming wedding.
Reply With Quote
  #97  
Old 10-18-2004, 05:36 PM
Mitsuaki Mitsuaki is offline
 
Join Date: Jun 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KW802
Mitsuaki: I haven't forgotten about you, I just haven't been home much lately. I'm getting married in less than 4 weeks and my free time has been reduced further than I thought it was going to be.

Chazz: Getting it to save the images is just a matter changing the PHP file. What I'm picturing in my head for the next version is an option to pass in whether to save the file to the server or not. I'll have to take a look to see if there is an easy way of looping through the previously created images to build the page on the fly (I haven't done something like that before yet so it's now on my list of 'things to learn how to do' ). The first part shouldn't be a problem but the second part will require me to do some quick learning.

If either of you guys don't hear back from me within a few days hit me up with a PM.
Np just as soon as u can....
Reply With Quote
  #98  
Old 10-24-2004, 02:24 PM
Roms's Avatar
Roms Roms is offline
 
Join Date: Jun 2004
Location: Witness ProtectionProgram
Posts: 1,841
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great job!

*Clicks Install
Reply With Quote
  #99  
Old 10-24-2004, 03:36 PM
Makador Makador is offline
 
Join Date: Sep 2004
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hm nice hack, but what is the matter with: "Please do not link directly to the smilie." As I see it works fine and the user doesn't have to save and upload it himself, if you link directly to the smilie. So where is the problem?
Reply With Quote
  #100  
Old 10-24-2004, 04:27 PM
Chazz Layne's Avatar
Chazz Layne Chazz Layne is offline
 
Join Date: Feb 2003
Location: Alive, Mobile and Unknown
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Makador
Hm nice hack, but what is the matter with: "Please do not link directly to the smilie." As I see it works fine and the user doesn't have to save and upload it himself, if you link directly to the smilie. So where is the problem?
The direct link to the smilie as shown customised is actually to the script. If your users link to it that way it will re-create the custom smilie each time it's viewed, which will rapidly start to eat up resources. On a site that only gets a few hits it may not be a big deal, but in a forum environment I imagine it would get out of hand pretty quickly.
Reply With Quote
  #101  
Old 10-24-2004, 04:33 PM
Makador Makador is offline
 
Join Date: Sep 2004
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hm yes thats right. Would be nice to modify the script, that it saves the generated picture automatically in a forum directory and shows the user the link, because most people don't have their own webspace and it is too much work to save and upload it.
Reply With Quote
Reply

Thread Tools

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:05 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.05270 seconds
  • Memory Usage 2,306KB
  • Queries Executed 27 (?)
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
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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