Quote:
Originally posted by izz
May I ask you to rearrange your hack code to consider the following:
1. Language style changes with the user group.
|
First create a new "template set" for your Arabic language and edit all templates accordingly so that texts are in Arabic.
Do same by adding a new "replacement set" for your Arabic language and edit your colors/fonts etc.
Now create a new style set and point your Arabic template and replacements sets. Name it as "Arabic".
Do all above for English language.
Note style ids of English and Arabic styles.
To test if they work or not, first make all stylesets (by modify) "user selectable" and then login to your User CP, and change styles. See if language changes as it should be.
(You can find a lot of information about 2 styles in 2 languages in vbulletin.com, if you cant handle it)
If everything is ok upto now, replace my hack code:
PHP Code:
$DB_site->query("UPDATE user SET usergroupid=E WHERE userid=$bbuserinfo[userid]");
AS:
PHP Code:
$DB_site->query("UPDATE user SET usergroupid=E, styleid=Englishstyleid WHERE userid=$bbuserinfo[userid]");
and
PHP Code:
$DB_site->query("UPDATE user SET usergroupid=E WHERE userid=$bbuserinfo[userid]");
AS:
PHP Code:
$DB_site->query("UPDATE user SET usergroupid=D, styleid=Arabicstyleid WHERE userid=$bbuserinfo[userid]");
Now when users clicks the link, their styleid will automatically change too (so does the language/colors/fonts everything about your forum)
Quote:
Originally posted by izz
2. Guests can see a default language style (Arabic in my case), and can see the language switching code
|
This will be again done in your Admin CP, you dont need any hacks.
After you completed the steps above, click Modify/Forums and choose modify ALL forums according to this:
Custom style set for this forum : (Any style you want)
Override users custom styles: No
The style you set will be the default for guest. So for example if you set English style here, all guests will see these boards in English..
As you can see most of the work is default vb behaviour and does not require any hacking. And in fact even if you used 2 different boards, you would do some of this work..
Hope this helps..