<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>meloniq Technicznie &#187; coppermine</title>
	<atom:link href="http://blog.meloniq.net/tag/coppermine/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.meloniq.net</link>
	<description>...czyli to co nie mieści się na stronie firmowej...</description>
	<lastBuildDate>Sun, 29 Jan 2012 20:44:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Własne tłumaczone menu w Coppermine Photo Gallery</title>
		<link>http://blog.meloniq.net/2009/06/24/wlasne-tlumaczone-menu-w-coppermine-photo-gallery/</link>
		<comments>http://blog.meloniq.net/2009/06/24/wlasne-tlumaczone-menu-w-coppermine-photo-gallery/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 22:18:59 +0000</pubDate>
		<dc:creator>meloniq</dc:creator>
				<category><![CDATA[Modyfikacje]]></category>
		<category><![CDATA[coppermine]]></category>
		<category><![CDATA[cpg]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[mod]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[tłumaczone]]></category>

		<guid isPermaLink="false">http://blog.meloniq.net/?p=12</guid>
		<description><![CDATA[Własne tłumaczone dodatkowe menu w Coppermine Photo Gallery 1.4.25 i 1.4.24 jak na screenshot&#8217;cie z galerii Castle Party (na pasku z button&#8217;em &#8220;słuchaj&#8221;). Wybór języka w tym tutorialu odbywa się poprzez dodanie do pliku .php końcówki ?lang=pl i ?lang=polish. Jest to bardzo przydatna funkcja gdy galeria jest uzupełnieniem posiadanej już przez nas wielojęzycznej strony&#8230; a [...]]]></description>
			<content:encoded><![CDATA[<p>Własne tłumaczone dodatkowe menu w Coppermine Photo Gallery 1.4.25 i 1.4.24 jak na screenshot&#8217;cie z galerii <a title="Castle Party" href="http://www.castleparty.com/fansgallery/" target="_blank">Castle Party</a> (na pasku z button&#8217;em &#8220;słuchaj&#8221;). Wybór języka w tym tutorialu odbywa się poprzez dodanie do pliku <em>.php</em> końcówki <em>?lang=pl</em> i <em>?lang=polish</em>.</p>
<div id="attachment_13" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.meloniq.net/wp-content/uploads/2009/06/screenshot-castleparty-menu.gif" target="_blank"><img class="size-medium wp-image-13" title="Dodatkowe menu w CPG" src="http://blog.meloniq.net/wp-content/uploads/2009/06/screenshot-castleparty-menu-300x112.gif" alt="Dodatkowe menu w CPG" width="300" height="112" /></a><p class="wp-caption-text">Dodatkowe menu w CPG</p></div>
<p>Jest to bardzo przydatna funkcja gdy galeria jest uzupełnieniem posiadanej już przez nas wielojęzycznej strony&#8230; a więc zaczynamy&#8230;</p>
<p><strong>1.</strong> W pliku <em>template.html</em> w miejscu gdzie chcemy wstawić menu dodajemy poniższy kod</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>MELONIQ_NET_MENU<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>2.</strong> Otwieramy plik <em>include/themes.inc.php</em>, i odnajdujemy poniższy kod (ok. wiersza 1250)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #0000ff;">'{CUSTOM_HEADER}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$custom_header</span><span style="color: #339933;">,</span></pre></div></div>

<p>Pod nim dodajemy nowy kod</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #0000ff;">'{MELONIQ_NET_MENU}'</span> <span style="color: #339933;">=&gt;</span> theme_meloniq_net_menu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></pre></div></div>

<p>Aby to wyglądało w ten sposób</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000088;">$template_vars</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'{LANG_DIR}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$lang_text_dir</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{TITLE}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$CONFIG</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'gallery_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' - '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span>bb_decode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$section</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{CHARSET}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$charset</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{META}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$meta</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{GAL_NAME}'</span> <span style="color: #339933;">=&gt;;</span> <span style="color: #000088;">$CONFIG</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'gallery_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{GAL_DESCRIPTION}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$CONFIG</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'gallery_description'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{SYS_MENU}'</span> <span style="color: #339933;">=&gt;</span> theme_main_menu<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sys_menu'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{SUB_MENU}'</span> <span style="color: #339933;">=&gt;</span> theme_main_menu<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sub_menu'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{ADMIN_MENU}'</span> <span style="color: #339933;">=&gt;</span> theme_admin_mode_menu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{CUSTOM_HEADER}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$custom_header</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{MELONIQ_NET_MENU}'</span> <span style="color: #339933;">=&gt;</span> theme_meloniq_net_menu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>3. </strong>Otwieramy plik <em>themes/nasz_styl/theme.php</em> i przed końcem dokumentu ( <em>?&gt;</em> ) wstawiamy własną funkcję</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> theme_meloniq_net_menu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$lang_meloniq_net_menu</span><span style="color: #339933;">,</span> <span style="color: #000088;">$template_meloniq_net_menu</span><span style="color: #339933;">;</span>
&nbsp;
static <span style="color: #000088;">$meloniq_net_menu</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$meloniq_net_menu</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #000088;">$meloniq_net_menu</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$param</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #0000ff;">'{MELONIQ_NET_LINK1}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$lang_meloniq_net_menu</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'meloniq_net_link1'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{MELONIQ_NET_LINK2}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$lang_meloniq_net_menu</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'meloniq_net_link2'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{MELONIQ_NET_LINK3}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$lang_meloniq_net_menu</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'meloniq_net_link3'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{MELONIQ_NET_LANG}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$lang_meloniq_net_menu</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'meloniq_net_lang'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'{MELONIQ_NET_LANGFG}'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$lang_meloniq_net_menu</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'meloniq_net_langfg'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$meloniq_net_menu</span> <span style="color: #339933;">=</span> template_eval<span style="color: #009900;">&#40;</span><span style="color: #000088;">$template_meloniq_net_menu</span><span style="color: #339933;">,</span> <span style="color: #000088;">$param</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$meloniq_net_menu</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Należy wyedytować i wstawić tyle odnośników ile jest nam potrzebne.</p>
<p><strong>4. </strong>W pliku <em>themes/nasz_styl/theme.php</em> tworzymy teraz menu</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// HTML template for meloniq.net menu</span>
<span style="color: #000088;">$template_meloniq_net_menu</span> <span style="color: #339933;">=</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;EOT
:: &lt;a class=&quot;menu_linki&quot; href=&quot;http://www.twoja-domena.pl/link1.php{MELONIQ_NET_LANG}&quot;&gt;{MELONIQ_NET_LINK1}&lt;/a&gt;
:: &lt;a class=&quot;menu_linki&quot; href=&quot;http://www.twoja-domena.pl/link2.php{MELONIQ_NET_LANG}&quot;&gt;{MELONIQ_NET_LINK2}&lt;/a&gt;
:: &lt;a class=&quot;menu_linki&quot; href=&quot;http://www.twoja-domena.pl/link3.php{MELONIQ_NET_LANG}&quot;&gt;{MELONIQ_NET_LINK3}&lt;/a&gt;
::
EOT</span><span style="color: #339933;">;</span></pre></div></div>

<p>Należy wyedytować i wstawić tyle odnośników ile jest nam potrzebne. Zapisujemy i zamykamy.</p>
<p><strong>5. </strong>Otwieramy pliki językowe <em>(np. lang/english.php, lang/polish.php)</em> i dodajemy tłumaczenie.<br />
<em>lang/english.php</em></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$lang_meloniq_net_menu</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #0000ff;">'meloniq_net_link1'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Contact'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'meloniq_net_link2'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Domains'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'meloniq_net_link3'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Software'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'meloniq_net_lang'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'?lang=en'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'meloniq_net_langfg'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'?lang=english'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><em>lang/polish.php</em></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$lang_meloniq_net_menu</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #0000ff;">'meloniq_net_link1'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Kontakt'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'meloniq_net_link2'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Domeny'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'meloniq_net_link3'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Oprogramowanie'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'meloniq_net_lang'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'?lang=pl'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'meloniq_net_langfg'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'?lang=polish'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>To już wszystko;)</strong></p>
<p><strong>Zlecenie:</strong><br />
Jeśli chciałbyś abym wykonał tą modyfikację za Ciebie, pisz na maila.</p>
<blockquote><p>
Cena: od 30zł netto<br />
Wymagania: dostęp do FTP
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.meloniq.net/2009/06/24/wlasne-tlumaczone-menu-w-coppermine-photo-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

