• [MOD] Language select 4 0 5 1
Currently:  

Author Topic: [MOD] Language select  (Read 307688 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #180 on: April 21, 2009, 02:10:42 PM »
just add these into your menue.html
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline egyptandy

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: [MOD] Language select
« Reply #181 on: April 21, 2009, 04:05:15 PM »
Including that in the menue.php directly before those 3 lines?

<?php
global $site_sess;
?>

This were the items, I have no idea what to do with them.
By the way, this menu part is in my case a .php and not a .html.

Sorry, to bother you again with my "stupid " question. Bu I am working hard to understand 4images better.
Best regarrds


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #182 on: April 22, 2009, 01:18:36 AM »
The code you showed is 100% html and doesn't contain any PHP.

So, leave your code intact and add the code I've posted at the end of the file or in the place you need.

P.S.
The best way to understand is try and see what happens.
but remember to always backup any files you change.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline egyptandy

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: [MOD] Language select
« Reply #183 on: April 22, 2009, 02:28:30 AM »
Hello, thanks again.
I did what you suggested, but beside having 3 new lines in my menue nothing happened. No language change when I switch the language tab. So something is still missing.
You are right with your remark about the html code, but the name of this file is menue.php and not menue.html.
And it is not in the templates section but in the main section where you also find the global.php but no html files.
Maybe this is a mistake in the template itself.
But when I changed the name of the file after including your changes into menue.html and moved it to the templates part, I received several mistake warnings and the menue was gone in this part.
Now I am getting confused.

Offline crs

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: [MOD] Language select
« Reply #184 on: April 30, 2009, 11:33:43 PM »
Hello, the "url" of the links is for example know: "details.php?image_id=11191&l=deutsch"

Is there any way to hide the "&l=deutsch" or "&l=english" from all links on the 4images website?

Thanks for help

Would that be possible? Has anyone an idea?

Offline crs

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: [MOD] Language select
« Reply #185 on: May 29, 2009, 07:48:25 PM »
When i change my language in the Control Panel, i get redirected to the "Lost Password Page"... o.0
But the language i´ve selected is active.

It would be better to get a message like: "Language has been changed" or something like that.

Anyone can help?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #186 on: May 30, 2009, 02:08:09 AM »
What version of the mod did you install and if possible, link to the site could be helpful (with test login info)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline crs

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: [MOD] Language select
« Reply #187 on: May 30, 2009, 12:44:58 PM »
Hello V@no
Now i´ve tested both versions again and i have another problem  :roll:
Version A is now installed on my 4images, but i´ve the same new problem also with version B:

If i change my language once to german, im not able to change the language again to english.

U can test the function oft this mod on my site under:

http://autospotter.de/
User: test
pw: 123

Big thx for help.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #188 on: May 30, 2009, 09:07:57 PM »
I don't see where I can change the language...can't test it without it ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline crs

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: [MOD] Language select
« Reply #189 on: May 31, 2009, 04:01:55 PM »
Sorry, you can change the language in the Control Panel under "Select your language:".

As I said, i changed the language from english to german - that worked well.
But if i want to change the language again from german to english, it doesn´t work.

Thanks

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #190 on: June 01, 2009, 06:42:35 AM »
I think the problem is that by default 4images prioritizes "GET" over "POST" when it comes to selecting language and in your case that is what causing this.

Try replace in global.php:
  $requested_l = (isset($HTTP_GET_VARS['l'])) ? trim($HTTP_GET_VARS['l']) : trim($HTTP_POST_VARS['l']);

with this:
  $requested_l = (isset($HTTP_POST_VARS['l'])) ? trim($HTTP_POST_VARS['l']) : trim($HTTP_GET_VARS['l']);
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline crs

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: [MOD] Language select
« Reply #191 on: June 05, 2009, 12:08:27 AM »
Yes, that works!
Thank you!  8)

Offline crs

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: [MOD] Language select
« Reply #192 on: July 16, 2009, 02:34:41 AM »
Hello, the "url" of the links is for example now: "details.php?image_id=11191&l=deutsch"

Is there any way to hide the "&l=deutsch" or "&l=english" from all links on the 4images website?

Thanks for help

Offline Carpfish

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Carp-Photo-Portal
Re: [MOD] Language select
« Reply #193 on: October 25, 2009, 09:29:08 AM »
Habe den Mode auch ausprobiert, aber ich bekomme immer diese Fehlermeldung dazu wenn ich auf den English Button Drücke

Warning: Invalid argument supplied for foreach() in /home/.sites/75/site627/web/4images/includes/page_header.php on line 519

Warning: Invalid argument supplied for foreach() in /home/.sites/75/site627/web/4images/includes/page_header.php on line 527

in line 519 steht Original   foreach ($image_order_optionlist as $key => $val) {
in line 527 steht Original   foreach ($image_sort_optionlist as $key => $val) {

Gruß Andy

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #194 on: October 25, 2009, 04:21:02 PM »
Please attach your page_header.php
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)