Follow vBSEO on Twitter
vBulletin Modifications
  • Forums
  • Add-Ons
  • Template Modifications
  • Styles
  • Graphics
  • Tutorials
  • Support Center
  • Register
  • vBulletin SEO

Member Log In

Site Navigation

  • Register
  • Members List
  • Social Groups
  • Search
  • Today's Posts
  • Mark Forums Read

Latest Modifications

  • [vB 3.8.4] THX - Hack for VB. 3.8.4
    By: bluedog
  • [vB 3.8.4] Cyb - Chatbox V.2.3
    By: bluedog
  • [vB 4.0.x] PHPKD - Advanced Quick...
    By: PHPKD
  • [vB 3.6.x] StopSpam
    By: flappi282
  • [vB 3.8.x] vBulletin Chat Addon for...
    By: 123flashchat

Latest Template Mods

  • [vB 4.0.x] Remove My Profile Link...
    By: Ak Worm
  • [vB 3.8.x] Images DownloadBox...
    By: cRs!MP
  • [vB 3.8.x] Adviertise Mod On Forum...
    By: MG4
  • [vB 3.8.4] Images PassWordBox...
    By: cRs!MP
  • [vB 3.8.4] Footer Follow Ups
    By: Ak Worm

Latest Styles

  • [vB 4.0.x] 4.0.3 - VB4STYLE-TWEETA...
    By: Belon
  • [vB 4.0.x] [4.0.3] vbdesigns.de...
    By: Belon
  • [vB 3.8.4] CompletevB - Skylight
    By: DreadKnight
  • [vB 3.8.3] [vB 3.8.4] Barcelona...
    By: hoiquantinhoc.com
  • [vB 3.8.3] Natures Walk by vBSkin...
    By: Chri5

Latest Graphics

  • [vB ] [anim.]Team Ranks
    By: cRs!MP
  • [vB ] Abstract Circles (3...
    By: cRs!MP
  • [vB ] PlayStation Rank Images
    By: cRs!MP
  • [vB 3.6.12] Heavy Stroked Button...
    By: Shelley
  • [vB ] Minature Ranks.
    By: Shelley
vBulletin Modifications » Forum Archives » vBulletin 3.0 Hack Releases » Miscellaneous Hacks - [BETA] Quick language Drop Down Menu
Reply

 

  • Thread Tools
Download Options
You Must Register First
To Download This Modification

Report A Bug
Bugs
No bugs found in the system. If you have found a bug, please report a bug here
Submit A Bug | View All Bugs
  
Not Supported (Beta Mode)
[vB 3.0.7] Miscellaneous Hacks - [BETA] Quick language Drop Down Menu (24)
Released: 08-10-2004, 06:46 PM
Modification Information: Version: 1.1
Ken Iovino's Avatar Author: Ken Iovino
Last Online: 06-09-2009
Installer Included: 0 Additional queries added to database: 0 Template Edits: 1
File Edits: 0 New Files: New Phrases: 0

Quick language Drop Down Menu Beta Version

What will this do?
This will show members a drop down menu to choose there language. Similar to the quick style changer.

Why Beta?
The reason this is in a beta stage is because i havn't figured out how to get the language to change for guest. Maybe someone can help?

To do list...
  • Time to install: 5 minutes
  • Queries to run: 0
  • File Mods: 1
    • /forum/index.php
  • Templates to edit: 1
  • Templates to add: 0
  • New Phrases: 0

Instructions

Open root/Index.php and find:
PHP Code:
// get forumid if set, otherwise set to -1
globalize($_REQUEST, array('forumid' => INT));

if (! 
is_array($foruminfo))
{
        
$forumid = -1;
} 
Above Add:
PHP Code:
        // language selection hack
        
$languagelist = '';
        
$languages = fetch_language_titles_array('', 0);
        if (
sizeof($languages) > 1)
        {
                foreach (
$languages AS $optionvalue => $optiontitle)
                {
                        
$optionselected = iif($bbuserinfo['languageid'] == $optionvalue, HTML_SELECTED, '');
                        eval(
'$languagelist .= "' . fetch_template('option') . '";');
                }
                
$show['languageoption'] = true;
        }
        else
        {
                
$show['languageoption'] = false;
        }

if (
$_POST['do'] == 'updatelang')
{
        
globalize($_POST, array('languageid' => INT));

        
$DB_site->query("
                UPDATE " 
. TABLE_PREFIX .
                
"user SET
                languageid = $languageid
                WHERE userid = $bbuserinfo[userid]
        "
);
                
$url = "index.php?$session[sessionurl]";

        eval(
print_standard_redirect('redirect_updatethanks'));

} 
In your ForumHome Template Add where you want the drop down menu to appear:

HTML Code:
<form action="index.php" method="post">
<input type="hidden" name="s" value="$session[dbsessionhash]" />
<input type="hidden" name="do" value="updatelang" />
                        <select name="languageid" id="sel_languageid" onchange="sel_languageid(this)">
                                <optgroup label="$vbphrase[use_forum_default]">
                                        $languagelist
                                </optgroup>
                        </select>$gobutton
</form> 

PLEASE REMEMBER TO BACKUP BEFORE YOU BEGIN!

Are you using this hack?

Please click it. If you have a fix for the guest problem, i will be able to take this out of beta and give full credit where it belongs. Thanks.



Old 08-24-2004, 07:07 PM   #2
Dark_Wizard
Charter Member

Activity Longevity
0/20 19/20
Today Posts
0/3 sssssss41
Location: New York
Age: 53
Dark_Wizard is on a distinguished road
Send a message via ICQ to Dark_Wizard Send a message via AIM to Dark_Wizard Send a message via MSN to Dark_Wizard
Status: Offline Default
Quote:
Originally Posted by LiveWire
Why Beta?
The reason this is in a beta stage is because i havn't figured out how to get the language to change for guest. Maybe someone can help?
You can't set it for guest as the info is stored in the user db and the users cookie....guests don't have a cookie set nor a place in the user db to store the languageid
Reply With Quote
Old 08-24-2004, 08:17 PM   #3
ShavedApe
Coder

Activity Longevity
0/20 20/20
Today Posts
0/3 sssss1112
Location: UK
Age: 37
ShavedApe is on a distinguished road
Status: Offline Default
While im inclined to agree with Dark_Wizard a big part of me is saying if a guest can change the style then there is no reason why they shouldnt also be able to change the language.

I will try and have a look over this in the next few days see if i can help out any.
Reply With Quote
Old 08-24-2004, 10:35 PM   #4
COBRAws
vB User

Activity Longevity
0/20 19/20
Today Posts
0/3 sssssss58
Location: Buenos Aires
Age: 25
COBRAws is on a distinguished road
Send a message via MSN to COBRAws
Status: Offline Default
im not a vB wizard hacker but ShavedApe is right, there has to be a way
Good job LiveWire, always good material from u :D

ill install when there is a way for Guests
Reply With Quote
Old 08-25-2004, 04:44 PM   #5
Dark_Wizard
Charter Member

Activity Longevity
0/20 19/20
Today Posts
0/3 sssssss41
Location: New York
Age: 53
Dark_Wizard is on a distinguished road
Send a message via ICQ to Dark_Wizard Send a message via AIM to Dark_Wizard Send a message via MSN to Dark_Wizard
Status: Offline Default
Quote:
Originally Posted by ShavedApe
While im inclined to agree with Dark_Wizard a big part of me is saying if a guest can change the style then there is no reason why they shouldnt also be able to change the language.

I will try and have a look over this in the next few days see if i can help out any.
The styles can be changed without a db entry since the url carries the styleid hence it working for guests. With that said then maybe there is a way? Have it so you pass the languageid via url?
Reply With Quote
Old 08-25-2004, 04:56 PM   #6
Ken Iovino
vBulletin Guru

Ken Iovino's Avatar

Activity Longevity
0/20 20/20
Today Posts
0/3 sssss2695
Location: Miami, Florida
Age: 27
Ken Iovino is on a distinguished road
Status: Offline Default
I tried passing the laungage url with ids and got no luck. i even tried as far as ?do=eng :p
Reply With Quote
Old 07-13-2005, 10:26 AM   #7
ReBeLLiouS
vB Newbie

Activity Longevity
0/20 16/20
Today Posts
0/3 ssssssss7
ReBeLLiouS is on a distinguished road
Status: Offline Default
i think this hack isn't working
because i tried it but it didn't Working
Reply With Quote Installed

Reply

« Debug Mode In Admincp | Show user's average posts in postbit »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
drop down menu in navbar Chad vBulletin Modification Requests 1 09-15-2006 10:55 PM
Drop down Menu in Mod Section waltercat Site Feedback 1 08-26-2006 10:01 AM
Add New Links To Drop Menu macgyver24 vBulletin Modification Requests 3 08-16-2006 04:24 PM



All times are GMT. The time now is 05:31 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Transverse Styles
  • Top
  • Archive
  • vBSEO
  • Contact Us
LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks
Bookmark & Share
Digg this Thread! Digg this Thread!
Add Thread to del.icio.us Add Thread to del.icio.us
Bookmark in Technorati Bookmark in Technorati
Furl this Thread! Furl this Thread!