Icy Phoenix

     
 

Global Language Change Block

Global Language Change Block

Article
Reply with quote    Download Post  
Post Global Language Change Block 
 
Hey guys,

i´ve been working on this for 2 days now... and cant figure it out... i hope you can give me some tips...

I want to let my users change there lang in a easy way... so i´ve done this so far, look the picture...
 lang_select
Deactivated the lang select function in page_header, an put the function in a block file, and the added the block file as global block via CMS...

Works pretty good! ... BUT: only for guests...

I want to allow loggedin users this feature too... I tried to take some functions from usercp_register but cant get this to work if the user is logged in...

Can someone help me the add the needed code lines/sql queries to update the users lang in the DB...

here is my work so far...

blocks\blocks_imp_lang.php
Spoiler: [ Show ]


templates\default\blocks\lang_block.tpl
Spoiler: [ Show ]


Thanks in advance!



 
KugeLSichA - View user's profile Send private message  
KugeLSichA [ Mon 14 Mar, 2011 23:11 ]
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us


Global Language Change Block

Comments
Reply with quote    Download Post  
Post Re: Global Language Change Block 
 
your doing this for .53 or for new version ??

Ups . sorry.

looks like your on .53 cause new version (svn) got no page header. only globals




i think you forgot to declare : $lang_select = '';

on the begining of the function

Code: [Download] [Hide] [Select]
        // Mighty Gorgon - Change Lang/Style - Begin
        $lang_select = '';
        if ((($board_config['select_lang'] == true) && (!$userdata['session_logged_in'])))


hm and maybe include the constants.php because of the defines

this is just a snippet of your code



 
Last edited by spydie on Tue 15 Mar, 2011 00:42; edited 1 time in total 
spydie - View user's profile Send private message  
spydie [ Mon 14 Mar, 2011 23:37 ]
Reply with quote    Download Post  
Post Re: Global Language Change Block 
 
Hi spydie!

spydie wrote: [View Post]
your doing this for .53 or for new version ??

Ups . sorry.

looks like your on .53 cause new version (svn) got no page header. only globals


oh yeah i forgot that... sorry...

not a .53 its a beta version from some time ago... but similar to .53 (not the SVN version)

spydie wrote: [View Post]

i think you forgot to declare : $lang_select = '';

on the begining of the function

Code: [Download] [Hide] [Select]
        // Mighty Gorgon - Change Lang/Style - Begin
        $lang_select = '';
        if ((($board_config['select_lang'] == true) && (!$userdata['session_logged_in'])))


this is just a snippet of your code


yupp but this var is for the guests not needed...

and for the logged in users i also tried with this var... -> not working



 
KugeLSichA - View user's profile Send private message  
KugeLSichA [ Mon 14 Mar, 2011 23:57 ]
Reply with quote    Download Post  
Post Re: Global Language Change Block 
 
hm

i´ll have a look on that tomorow. bit late allready.

let´s see, if i finish my menu mod first



 
spydie - View user's profile Send private message  
spydie [ Tue 15 Mar, 2011 00:02 ]
Display posts from previous:    

HideWas this topic useful?

Post new topic  Reply to topic  Page 1 of 1