Piwigo.org

You are not logged in. (Register / Login)

Announcement

Post a reply

Write your message and submit

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

gubcio
2012-10-01 02:41:41

Step 1. Select languages in the "Language Switch" Plugin:
Step 2. Open file /plugins/language_switch/flags.tpl
Step 3. Comment out code :

<!--
<li>{strip}<a id="languageSwitchLink" title="{'Language'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
  <span class="pwg-icon" style="background:url('{$lang_switch.Active.img}') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Language'|@translate}</span>
</a>
<div id="languageSwitchBox" class="switchBox">
  <div class="switchBoxTitle">{'Language'|@translate}</div>
  {foreach from=$lang_switch.flags item=flag name=f}
  <a rel="nofollow" href="{$flag.url}"><img class="flags" src="{$flag.img}" alt="{$flag.alt}"> {$flag.title}</a>
  {if ($smarty.foreach.f.index+1)%3 == 0}<br>{/if}
  {/foreach}
</div>
{/strip}</li>
-->

Step 4. Add code in the flags.tpl file:

<li>
  {foreach from=$lang_switch.flags item=flag name=f}
  <a rel="nofollow" href="{$flag.url}"><img style="padding-left: 3px" class="flags" src="{$flag.img}" alt="{$flag.alt}"> </a>
  {if ($smarty.foreach.f.index+1)%3 == 0}<br>{/if}
  {/foreach}
</li>

Stap 5. Save file and upload on the Server

flop25
2012-04-29 19:14:46

Hello
it seems you need to add new trigers to the plugin, in order to generate and assign the variables

peter.w.lampke
2012-04-29 17:45:48

yes. the login page calls header.tpl

the switch selector is there, only the

Code:

<img src="{$lang_switch.Active.img}" alt="{$lang_switch.Active.alt}" title="{$lang_switch.Active.alt}"/>

don't works. the selected language flag is not showed. the HTML code shows:

Code:

<img src="" alt="" title=""/>
ddtddt
2012-04-29 17:32:19

you've header on login page ?

peter.w.lampke
2012-04-29 17:27:51

well, now works 90%... ;)

I put it in header.tpl hard coded.

Code:

<img src="{$lang_switch.Active.img}" alt="{$lang_switch.Active.alt}" title="{$lang_switch.Active.alt}"/>
<ul>
    <li><a href="{$ACTUAL_URL}?/categories&amp;lang=es_ES"><img src="language/es_ES/es_ES.jpg">Spanish</a></li>
    <li><a href="{$ACTUAL_URL}?/categories&amp;lang=en_UK"><img src="language/en_UK/en_UK.jpg">English</a></li>
</ul>

the only problem persists in login.php, cannot see the selected language :(

peter.w.lampke
2012-04-27 08:33:47

oh no! I discovered another problem with this 'Personal Plugin'.

In backend. Photos > Batch Manager I see this error:

Warning: make_section_in_url wrong type for category in /public/include/functions_url.inc.php on line 343

Warning: make_section_in_url category id not numeric in /public/include/functions_url.inc.php on line 346

Warning: make_section_in_url category name not set in /public/include/functions_url.inc.php on line 349

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /public/include/functions_url.inc.php on line 351

Warning: make_section_in_url category permalink not set in /public/include/functions_url.inc.php on line 353

Warning: Cannot modify header information - headers already sent by (output started at /public/include/functions_url.inc.php:343) in /public/include/page_header.php on line 103

:(

peter.w.lampke
2012-04-27 07:53:12

hey ddtddt!

ddtddt wrote:

Can you give me a link and webmaster pass for your gallery ?

ah! I think I know what you want to do. ;) you want to try the 'Personal Plugin' right? (the solution from plg in post 116987)

well, I tried it and works 90%. the problem are this 2 points:

1.- in the page: login.php I cannot see the selected language.

I mean, in each another page you can see the flag of the selected language. To show the flag of the active language, I use this line:

Code:

<img src="{$lang_switch.Active.img}" alt="{$lang_switch.Active.alt}" title="{$lang_switch.Active.alt}"/>

2.- the link when you try to change the language is strange.

I mean, when I use the switcher in the index.php to change the language to english I see that:
http://www.domain.com/index.php?/catego … lang=en_UK

but when I am in help.php I see that:
http://www.domain.com/?lang=en_UK

instead something like:
http://www.domain.com/help.php?lang=en_UK

nice eh? ;) maybe anyone can help?

thanks again!

peter

ddtddt
2012-04-27 06:57:20

Can you give me a link and webmaster pass for your gallery ?

peter.w.lampke
2012-04-27 00:00:40

hi ddtddt!

> Use this is a bad idea, other plugin can use this
ah! ok. I understand now.

I want to use english and spanish... only 2 languages for now. :)

ddtddt
2012-04-26 23:58:52

ddtddt wrote:

how language would you want ?

ddtddt
2012-04-26 23:58:41

peter.w.lampke wrote:

no. don't works... I tried all. {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}
I tried to put it on header.tpl but nothing...

Use this is a bad idea, other plugin can use this

peter.w.lampke
2012-04-26 23:39:57

hi ddtddt...

no. don't works... I tried all. {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}

I tried to put it on header.tpl but nothing...

ddtddt
2012-04-24 21:49:49

you can read post:116987

ddtddt
2012-04-24 21:47:52

how language would you want ?


you can use html tag

peter.w.lampke
2012-04-24 21:16:40

hi ddtddt! thanks for your answer.

I will try it. the only problem is I don't need it in the MENUBAR. I need it in the top of the page :)

maybe I can change it. want something like {$LANGUAGE} that uses the flags.tpl of the plugin.

thank you!

peter

Board footer

Powered by FluxBB

About this website · Donate · Contact Piwigo project © 2002-2013