Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Phrase Type Manager Details »»
Phrase Type Manager
Version: 1.0.0, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 10-12-2005 Last Update: 10-12-2005 Installs: 39
Uses Plugins
Additional Files Is in Beta Stage  
No support by the author.

Phrase Type Manager

Description
This Hack allows you to easily manage custom phrase types.

Details
1 Product XML (12 Phrases)
1 ACP Script
1 ACP Navigation XML

Note: As this Hack is meant for developers, it can only be used in debug mode!

Credits to Hoffi for PhraseGroupManager, which inspired this Hack

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 12-02-2005, 03:53 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does the product manager export the phrase types?
Reply With Quote
  #23  
Old 12-02-2005, 04:16 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure.
Reply With Quote
  #24  
Old 12-02-2005, 04:23 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uhh... But your hack doesn't seem to be adding anything into the product manager. So if custom phrases are not a default functionality, why would the product manager be exporting them?
Reply With Quote
  #25  
Old 12-02-2005, 04:29 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

They are a default functionality, there is just no nice GUI for it - which this Hack does add.
=> adminfunctions_language.php, add_phrase_type()
Reply With Quote
  #26  
Old 12-02-2005, 04:35 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So will this hack be present in the next vbulletin release?
Reply With Quote
  #27  
Old 08-08-2006, 01:37 PM
Hoffi's Avatar
Hoffi Hoffi is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is not in 3.6, and I think this will not work in 3.6 because the structure of the Table is changed.

See who ist first to build a 3.6 Version. Andreas or myself.
Reply With Quote
  #28  
Old 08-28-2006, 08:55 AM
Ahriman Ahriman is offline
 
Join Date: Jun 2004
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anything new here?
Reply With Quote
  #29  
Old 03-25-2007, 01:23 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To get this to work in 3.6.x find:
PHP Code:
if ($_REQUEST['do']  == 'listgroups')
{
    
print_form_header('phrasetype''add');
    
print_table_header($vbphrase['custom_phrase_types']); 
and replace with:
PHP Code:
if ($_REQUEST['do']  == 'listgroups')
{
    
print_form_header('phrasetype''add');
    
print_table_header($vbphrase['custom_phrase_types']);

    
$defaultphrasetypes = array('accessmask''attachment_image''banning''bbcode''calendar''cpglobal''cphelptext''cphome''cpoption''cppermission''cprank''cprofilefield''cpstopmsg''cpuser''cpusergroup''cron''diagnostic''emailbody''emailsubject''error''faqtext''faqtitle''forum''forumdisplay''fronthelp''frontredirect''global''help_faq''holiday''infraction''infractionlevel''inlinemod''language''logging''maintenance''messaging''moderator''plugins''pm''poll''postbit''posting''profilefield''promotion''register''reputation''reputationlevel''search''showthread''sql''stats''style''subscription''thread''threadmanage''timezone''user''vbsettings''wol');

    
$phrasetypes fetch_phrasetypes_array();
    foreach(
$phrasetypes AS $id => $type)
    {
        
$cell = array();
        
//if ($id > 56 AND $id < 1000)
        
if (!in_array($id$defaultphrasetypes)) 
        { 
Reply With Quote
  #30  
Old 03-25-2007, 01:30 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

find:
PHP Code:
if ($_REQUEST['do'] == 'edit'
{
    
$vbulletin->input->clean_gpc('r''phrasetypeid'TYPE_INT);
    
$phrasetype $db->query_first("SELECT * FROM " TABLE_PREFIX "phrasetype WHERE phrasetypeid = " $vbulletin->GPC['phrasetypeid']);
    
print_form_header('phrasetype''update');
    
construct_hidden_code('phrasetypeid'$phrasetype['phrasetypeid']);
    
print_table_header($vbphrase['edit_phrase_type']);
    
print_label_row($vbphrase['varname'], $phrasetype['fieldname']);
    
print_input_row($vbphrase['phrase_type'], 'groupname'$phrasetype['title']);
    
$products fetch_product_list();
    
print_label_row($vbphrase['product'], $products["$phrasetype[product]"]);
    
print_submit_row($vbphrase['save']);

replace:
PHP Code:
if ($_REQUEST['do'] == 'edit'
{
    
$vbulletin->input->clean_gpc('r''phrasetypeid'TYPE_STR);
    
$phrasetype $db->query_first("SELECT * FROM " TABLE_PREFIX "phrasetype WHERE fieldname = '" $db->escape_string($vbulletin->GPC['phrasetypeid']) . "'");
    
print_form_header('phrasetype''update');
    
construct_hidden_code('phrasetypeid'$phrasetype['phrasetypeid']);
    
print_table_header($vbphrase['edit_phrase_type']);
    
print_label_row($vbphrase['varname'], $phrasetype['fieldname']);
    
print_input_row($vbphrase['phrase_type'], 'groupname'$phrasetype['title']);
    
$products fetch_product_list();
    
print_label_row($vbphrase['product'], $products["$phrasetype[product]"]);
    
print_submit_row($vbphrase['save']);

Reply With Quote
  #31  
Old 04-19-2007, 09:09 PM
TheRed's Avatar
TheRed TheRed is offline
 
Join Date: Oct 2003
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Andreas, sabret00the.

Correct implementation would be:

PHP Code:
if ($_REQUEST['do']  == 'listgroups')
{
    
print_form_header('phrasetype''add');
    
print_table_header($vbphrase['custom_phrase_types']);

    
$defaultphrasetypes = array('accessmask''attachment_image''banning''bbcode''calendar''cpglobal''cphelptext''cphome''cpoption''cppermission''cprank''cprofilefield''cpstopmsg''cpuser''cpusergroup''cron''diagnostic''emailbody''emailsubject''error''faqtext''faqtitle''forum''forumdisplay''fronthelp''frontredirect''global''help_faq''holiday''infraction''infractionlevel''inlinemod''language''logging''maintenance''messaging''moderator''plugins''pm''poll''postbit''posting''profilefield''promotion''register''reputation''reputationlevel''search''showthread''sql''stats''style''subscription''thread''threadmanage''timezone''user''vbsettings''wol');

    
$phrasetypes fetch_phrasetypes_array();
    foreach(
$phrasetypes AS $id => $type)
    {
        
$cell = array();
        
//if ($id > 56 AND $id < 1000)
        
if (!in_array($id$defaultphrasetypes)) 
        {
            
$cell[] = $type['title'];
            
$cell[] = construct_link_code($vbphrase['edit'], 'phrasetype.php?' $vbulletin->session->vars['sessionurl'] . "do=edit&amp;phrasetypeid=$id")." ".construct_link_code($vbphrase['delete'], 'phrasetype.php?' $vbulletin->session->vars['sessionurl'] . "do=delete&amp;phrasetypeid=$id");
        }
        
print_cells_row($cell);
    }
    
print_submit_row($vbphrase['add_new_phrase_type']);
    
print_table_footer();

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 09:53 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.05073 seconds
  • Memory Usage 2,364KB
  • Queries Executed 26 (?)
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
  • (5)bbcode_php
  • (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
  • (3)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