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-05-2004 10:00 PM

vba CMPS: Smilie Creator
 
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 https://vborg.vbsupport.ru/ button. :classic:

Polo 08-06-2004 07:04 PM

Awesome! Thanks for sharing Pal!
*clicks install*

SnowBot 08-07-2004 12:56 AM

hhhmm strange thing. I added it as a page. In the Page Template:i added adv_portal_smilie_creator I have enabled ALL usergroups to see it BUT as an admin i can see the page and it all works BUT none of my members can at all :(

Any ideas?

Romeos Tune 08-07-2004 03:48 AM

I'm just thinking how cool it would be to be able to have it where maybe when viewing extra smilies there was another link to the smilie creator and then it brings up the window with the smilies. That's simple enough to put that link there.... But....What I'd like to see is the smilie to automatically be inserted into a message.

KW802 08-07-2004 01:34 PM

Quote:

Originally Posted by SnowBot
hhhmm strange thing. I added it as a page. In the Page Template:i added adv_portal_smilie_creator I have enabled ALL usergroups to see it BUT as an admin i can see the page and it all works BUT none of my members can at all :(

Any ideas?

SnowBot, what's the URL to check it out? I was testing it as my account (admin' only), a test account (registered users only) and as not being logged in with no problems. The security issues are really a CMPS thing but I'll see what I can do to help you out.

Have you tried going to the page with a test account or not logged in yet?

KW802 08-07-2004 01:36 PM

Quote:

Originally Posted by Romeos Tune
I'm just thinking how cool it would be to be able to have it where maybe when viewing extra smilies there was another link to the smilie creator and then it brings up the window with the smilies. That's simple enough to put that link there.... But....What I'd like to see is the smilie to automatically be inserted into a message.

Romeos Tune, check out the thread I mentioned over at VBT.com -- You can accomplish it through BB code alone. :nervous:

Snatch 08-07-2004 02:44 PM

i donĀ“t us CMPS, is there any way to use this hack without VBadvanced vBadvanced CMPS

Romeos Tune 08-07-2004 04:52 PM

Awesome! I found that! :) Hey, I'd like to show you something...... Sending you a pm..... I used to run ubbthreads and switched over and had a great program like this.... Take a look at your pms...... And thanks! :)
Quote:

Originally Posted by KW802
Romeos Tune, check out the thread I mentioned over at VBT.com -- You can accomplish it through BB code alone. :nervous:


KW802 08-07-2004 06:39 PM

Quote:

Originally Posted by Snatch
i don?t us CMPS, is there any way to use this hack without VBadvanced vBadvanced CMPS

Snatch, you should be able to incorporate it into just about any page. There is a thread by Erwin I saw recently about using any HTML page from within VB -- To use this outside of CMPS you'd just have to reference the .html tempate and change your folder paths accordingly and then you should be good to go.

I've only got a few minutes right now but if you can't get it working outside of CMPS then give this thread a bump in the next day or so and I'll see what I can do.

Kevin

KW802 08-07-2004 06:41 PM

Quote:

Originally Posted by Romeos Tune
Awesome! I found that! :) Hey, I'd like to show you something...... Sending you a pm..... I used to run ubbthreads and switched over and had a great program like this.... Take a look at your pms...... And thanks! :)

When I get back home tonight I'll check it out; the SO is waiting for me downstairs so I've only got a few minutes. Playing around with this is a 'learning project' for me so if I think I can tackle it I'll give just about anything a try. :nervous:


All times are GMT. The time now is 01:47 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.01163 seconds
  • Memory Usage 1,750KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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