vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Easily create 50-state Thread Prefixes (https://vborg.vbsupport.ru/showthread.php?t=182201)

briansol 06-10-2008 10:00 PM

Easily create 50-state Thread Prefixes
 
1 Attachment(s)
Don't feel like entering 50 states selecting all the options each time for prefixes? I didn't either.

If your comfortable with phpmyadmin, this will be easy for you.

Step 1) Make a new Prefix Group.
  • ID = states1
  • name = States
  • Display order = (any you want, given your other lists)
  • forums = select which forums which the prefixes should appear on (i used it on my classifieds area)
  • Save
(Note: The ID of states1 is important, as it must match the file below. The other options can be any values you wish)

Step 2) Run the attached code block from the txt file in phpmyadmin -> SQL tab
  • Note 1: You will need to edit the file FIRST if you used a table prefix (perhaps, vb_ or forum_) on your database. ie, replace "INSERT INTO prefix" with "INSERT INTO vb_prefix" and "insert into phrase" with "insert into vb_phrase". Any decent text editor will allow you do to a global replace.
  • Note 2: This assumes language ID of 0, the default language. I would imagine most people using the states list would have English as their language set. If you are using a different language than default where you want this prefix associated with, you will need to alter the code block from 0 to your language ID as well.
Step 3) verify that you have uploaded everything properly by visiting the prefix group in the ACP. you should see something like the screen shot below.

If not, you may need to click on 'edit' as described in post 3 of this thread.
https://vborg.vbsupport.ru/showpost....09&postcount=3

Step 4) Finally, go to a forum you selected in step one, and click new thread. you should see your prefixes listed there.



This list also includes Washington DC.

and feel free to add in Canadian provinces as well if you wish, just follow the same format.

:up:

Princeton 06-13-2008 01:20 PM

thank you - great tip :up:

Boofo 06-13-2008 01:37 PM

Excellent article although you might want to point out that they have to edit and save one state from the list to have them all show up. ;)

briansol 06-13-2008 07:20 PM

Quote:

Originally Posted by Boofo (Post 1548409)
Excellent article although you might want to point out that they have to edit and save one state from the list to have them all show up. ;)

i just tried this again and did not have to do this. Anyone else confirm?

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

I also just noticed that i'm missing a state.

I have washington DC in there, and the list only goes to 50.

rep points to the first person who finds the state i forgot, and then i will edit the file(s).

Boofo 06-13-2008 10:29 PM

When I added the SQL queries from the text file, they ran fine. My listing showed like your pic in the first post except it had no state names on the left column. That is when I clicked on the edit button for one of the states and saved it without doing anything to it and then the whole list showed up fine.

I was just on my way up to report about the missing state. I haven't looked closely enough to figure out which one yet, though.

Grampz 06-29-2008 07:56 PM

Quote:

Originally Posted by briansol (Post 1548652)
i just tried this again and did not have to do this. Anyone else confirm?

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

I also just noticed that i'm missing a state.

I have washington DC in there, and the list only goes to 50.

rep points to the first person who finds the state i forgot, and then i will edit the file(s).

Washington D.C. is not a state. The state you forgot is Virginia.

briansol 07-31-2008 08:05 PM

Thanks.

VA has been added, and the file updated.

While DC is technically not a state, it is an 'area' that could be considered useful for geographic location on classified forums, etc.

Brandon Sheley 09-18-2008 08:31 PM

great article :)


All times are GMT. The time now is 11:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01417 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete