View Single Post
  #840  
Old 10-29-2007, 05:47 PM
derfelix derfelix is offline
 
Join Date: Nov 2001
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Blaine0002 View Post
I checked your pm as well, thanks a ton!
hope it helps.. but as i'm just doing something similar it was easy to get the code snippets together..
Quote:
Originally Posted by Blaine0002 View Post
3.Im not sure exactly what you mean by title and description. I have most of the words phrased, but i do realize that in the boring job of making them all phrases i have missed a few. Ill get what i see included in the next version, bbut maybe this is not what you are talking about?
No i am not talking about the normal phrases...
Example: categegories... ( i'm preparing an art site.. and would have lets say 2 categories: category 1: title -> Two dimensional art
category 2: title -> Three dimensional art

(off topic: i see in the db you have a field category description.. didnt find where to input AND both fields are text.. I would go down to varchar 100 at least for title, i think its faster)

Ok now lets say my site is in english and chinese... the chinese user will still get to see the title (and probably future description) in english ... because it is not phrased.. (and is difficult to phrase) BUT there is a solution.. and it would be nice to have it..

When in vbulletin you create a custom profile field.. you have the same problem.. title and description being a field and you dont want to create x extra fields because not all users have the same number of languages installed... right?

so what they did.. (at least its similar to that) you save the main title in the database.. like now.. but in parallel it creates a phrase in custom phrases (could be in the vbay phrase group) called for example $vbphrase[$catid_title] AND a second phrase called $vbphrase[$catid_desc]. (the identifier could be: $catid_title = 'vbay_cat_title_'. $cat['catid']; )

Now when creating the cat it also saves (creates) a new phrase called vbay_cat_title_1
when editing the cat.. it creates an extra field for each language so that the admin can enter the translations.. and in the front end templates you do not use anymore $cat['catname'] but instead $vbphrase[$catid_title$cat[catid]]...

how it works can be easely seen in the vbulletin code... create a custom profilefield.. one line input..
give it a title and description.. then go to the phrases in group custom profile fields.. and you will see if the field you created is called field6 you will now have a phrase called field6_title and another one called field6_desc ....

Advantage: if your site is multilanguage.. you dont have important stuff in a language you dont understand.. (imagine main language is chinese and the category names are in chinese even if the rest is phrased..)

Important fields would be in my opinion: categories.. and Vbay Title and Vbay Announcements

I hope you understood what i meen...

Felix

PS1: i'm preparing that system for forum titles and description.. if you want you can have the code bits to adapt.. (but they are not ready yet)

PS2: I would though create a new phrasegroup for the global frontend phrases.. (vbay Global for example) so that they are loaded only on vbay pages.. (i think all the global vbay phrases are loaded on all vbulletin pages for the moment.. even in other addons like gallery and blog)(thinking of saving ressources and memory)

sorry if explanation was a bit long.. but these days i have tendence to talk a lot... looool
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01263 seconds
  • Memory Usage 1,780KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete