vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Language and Template Mod installations (https://vborg.vbsupport.ru/showthread.php?t=76674)

The Geek 02-20-2005 07:23 AM

Language and Template Mod installations
 
Hey guys. I was wondering if anyone could help me with this:

First off, I have had conflicting information regarding the creation of phrases (mostly phrasegroups) in modifications. The most frequent problem is that the very first time the phrases in my installs are, erm, installed - they do not seem to get built even calling build_language(); - that means the first time installed - the user frequnetly has to edit a phrase and then save it in order to have the phrasegroup built.
I was told that I was inserting into languageid 0 and I should be installing into languageid -1. I changed over to that only to find that since its the master language, the phrases are wiped out after a vb upgrade.

What is the actual process for creating and building a phrasegroup?

Here is what I do (pseudocode):
PHP Code:

INSERT INTO phrasetype VALUES (newid'title''title'3)
INSERT INTO phrase VALUES (NULL'-1''varname''text''newid')
build_language(-1

Then templates.

Whenever I upgrade vb, I can count on random templates vanishing for no reason whatsoever. This is not isolated to my mods, but several others as well (all of my vBa installs are prone to this). Anyway to prevent that from happening?

Thanks guys

Akex 02-20-2005 08:41 AM

For my phrasegroups and phrase I do so :

I insert phrasetype this way :

PHP Code:

$phrasetypeid['anything'] = add_phrase_type('anything''anything'); 

(it adds a field in language too ;) and you get the id of the phrasegroup you can put in vbulletin options for later use).

Then add phrase this way :

PHP Code:

INSERT INTO phrase VALUES (NULL'0''varname''text'$phrasetypeid['anything']) 

0 is important for the languageid as it avoids custom phrases to be removed during vBulletin upgrade.

And after all phrases added :
PHP Code:

build_language(-1

I hope this could help, It always worked in my installation files, no problem encounter




For templates, maybe it's due to the removal of custom templates in MASTER style during vb upgrade. I asked Jelsoft to allow custom template to be kept during upgrade, I'm waiting for the answer :).

The Geek 02-20-2005 08:52 AM

THanks for that... ill give it a go.


All times are GMT. The time now is 06:22 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.00970 seconds
  • Memory Usage 1,719KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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