PDA

View Full Version : menu addon problem


reflejandome
03-31-2007, 07:49 PM
hi, i have an addon that's write the menu in all pages in my photoblog. I put <MENU> in my pages and i have the same menu in all page (more easy to modified the menu if ineed it). The addon is like this

$menu =
"
<div id='navigation' >
<div class='cajaBorde'>
<span class='iconosCabecera' >
<a href='' >
<img src='iconos/email.gif' style='border:0px' alt='email' />
</a>
<a href='http://feeds.feedburner.com/REFLEJANDOMEREFLECTINGMYSELF'>
<img src='iconos/rss_icon_16x16.gif' style='border:0px' alt='rss'/>
</a>
</span>
<span class='menu' >
reflejandome :: reflectingmyself&nbsp;&nbsp; ·
<a href='index.php' title='volver al inicio'>ultima</a> ·
<a href='index.php?x=browse&amp;pagenum=1' title='archivos'>archivos</a> ·
<a href='index.php?x=about' title='acerca'>acerca </a> ·
<a style='font-weight:normal;' href='/photoblog/index.php?lang=en'>english</a>
</span>
</div>
</div>
";

$tpl = ereg_replace("<MENU>",$menu,$tpl);

I like to put <ALTERNATIVE_LANGUAGE> here. If i put <ALTERNATIVE_LANGUAGE> instead of a style='font-weight:normal;' href='/photoblog/index.php?lang=en'>english</a> it doesnt work because the HTML in my page is <alternative_language _moz-userdefined=""/>

i put ...<a href='index.php?x=about' title='acerca'>acerca </a> ".$language_link."</span> ... and also it doesn't work


anyone have a idea to resolve this ?? thx

sorry for my english :S

dakwegmo
04-01-2007, 04:24 AM
Unfortunately, I don't think it's going to be as easy as just adding the <ALTERNATIVE_LANGUAGE> tag in your addon. Replacement of the language specific tags occurs before the addons are "sucked in" and executed.

You could try adding

if ($cfgrow['altlangfile'] != 'Off')
{
$tpl = replace_alt_lang_tags( $tpl, $language_abr, $PP_supp_lang, $cfgrow);
}


after $tpl = ereg_replace("<MENU>",$menu,$tpl); in your addon. Unfortunately, it's a little inefficient because you're running the language replace function a second time, but at least the only tags that have to replaced are from your addon.

reflejandome
04-01-2007, 09:26 AM
thank you for you help. Perhaps it is a litte inefficient but it works. At least i dont have too mucho visit to make the photoblog slower ... xd thanx