Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
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!
 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
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
 




____________
Out of Order
 
Last edited by spydie on Tue 15 Mar, 2011 00:42; edited 1 time in total 
spydieSend private messageVisit poster's website  
Back to topPage bottom
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
 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
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
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron