4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: trez on January 31, 2006, 12:58:10 PM
-
Hi,
i know i'am asking to many questions, but i hope you can help me with this one too. I have an aditional menue on my site, with over 30 links to internal sites. The way i put the menue in every site of my 4images installation is like this:
<td width="160" class="rowright" valign="top">
<table width="160" class="navbar" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="navbar" height="20">
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form method="post" action="{url_search}">
<input type="text" align="left" name="search_keywords" size="10" class="searchinput" />
<input type="submit" align="right" value="търси!" class="button" name="submit" />
</td>
</tr>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td class="head2pics" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />Снимки!</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="search.php?search_new_images=1"><font color="red">Нови Снимки</font></a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="categories.php?cat_id=1">PP - Party Pics</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="categories.php?cat_id=5">Рисунки/Картички</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="top.php">Топ Снимки</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="categories.php?cat_id=4">Ваши Снимки</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="categories.php?cat_id=26"><font color="red">Потребителски Папки</font></a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td class="head2music" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />Музика!</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=releases">Releases</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=worldtop20">Top 20 / 40</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=musicdownload"><font color="red">Download</font></a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td class="head2clubs" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />Места!</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=Disco">Дискотеки / Клубове</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=Bars">Барове / Пъбове</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=Piano">Пиано / Жива Музика</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=Cafe">Кафета / Заведения</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=otherclubs"><font color="red">Всички Места</font></a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=selectedclubs">Избрани Места</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=week"><font color="teal"> Място На Седмицата</font></a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td class="head2chitchat" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />Чит-Чат!</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=specials">SPECIALS</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="board.php">ФОРУМ</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=faq">FAQ</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="contact.php">Контакт</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="{url_search}">Разширено Търсене</a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1"> » <a href="index.php?template=sponsors"><font color="red">Спонсори</font></a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="left" class="row1rn"> » <a href="index.php?template=about"><font color="teal">За Нас</font></a></td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
</tr>
</table>
{footer}
So i put hat code in every site i've made in my 4images installation.
But my problem is the following: When i'd make a mistake in the menue, or want to add an additional link, i have to edit this on ALL sites, so the question is, is there a way to make or example a "menue.html" and to include it on every page by something like "{menue}" ? So that i have just a single file to edit when i want to change the menue ?
Thanks for your time and for your suggestions :)
Georgi
-
hi,
save your code as menu.php in your 4images root and then you insert:
<?php include("menu.php"); ?>
in every template page
you can change the links only in the menu.php file
-
Sorry, but it doesnt work for me. I include *just* the code showed above into a menu.php , then for example in the home.html i include the php form you gave me, and "{menu}" there, where the menu has to appear - but it doesnt work. What am i doing wrong ?
-
If you intend to include PHP files within your HTML template files, make sure you enable the option from your includes/constants.php file as well from 0 to 1. ;)
-
save your code as menu.php in your 4images root and then you insert:
Almost correct, exept it must be placed into includes/ directory not root.
and php code formating should be as explained in the FAQ topic to avoid possible errors:
http://www.4homepages.de/forum/index.php?topic=4295.0