vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   PHP file to alphabetize your smilies (https://vborg.vbsupport.ru/showthread.php?t=197591)

aciurczak 11-29-2008 04:18 PM

PHP file to alphabetize your smilies
 
1 Attachment(s)
If your board has a bunch of smilies that you added over time, keeping them in order can be a real pain in the ass. Makes sense to alphabetize them. But it's a real pain in the ass to do it manually with the display order field. This php file does the work for you, after you run it your smilies displayorder will be in alpha order from the smilie titles.

Upload file to the includes/cron directory, and set up a scheduled task. Keep the task marked inactive.

filename that the task calls will be: ./includes/cron/alphasmilies.php

Then just go to scheduled task, click run, and your smilies are now in alpha order, and the displayorder increments by 10 so there's plenty of space to add more smilies later in the right spot, if you want to sort a few manually.

Also, this keeps categories intact, so if you have multiple smilie categories, this will sort them within each category, but will not group all smilies into a single category.

Firyou 04-05-2014 03:51 AM

I get an error for this. Any one have something to similar to this?

aciurczak 04-05-2014 04:19 AM

I'm still using this from time to time if I add smilies; still seems to work fine with 3.8.7. What error are you seeing when you run it?

CAG CheechDogg 01-01-2015 08:04 PM

ozzy my Man ..would this work on vB4?

ozzy47 01-01-2015 08:13 PM

Yes, I just tried it and it seemed to work correctly. But I would try it on a test site first to ensure you get the desired results.

http://www.myfriendsspace.com/images.../Babycha-a.gif

For anyone wanting to use this, see the file in this post, https://vborg.vbsupport.ru/showpost....6&postcount=21

CAG CheechDogg 01-01-2015 08:43 PM

Ok good stuff my man ...thanks ...

ozzy47 01-01-2015 08:45 PM

Not a problem, glad to help. :)

CAG CheechDogg 01-01-2015 08:54 PM

I got the following error when running the task:



--------------- Added [DATE]1420152915[/DATE] at [TIME]1420152915[/TIME] ---------------

The table should be "cagisf_smilie" ......

ozzy47 01-01-2015 08:59 PM

Try this file. Remember test site first. :)

CAG CheechDogg 01-01-2015 09:04 PM

I got this now:


All times are GMT. The time now is 11:25 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.01170 seconds
  • Memory Usage 1,728KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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