Author Topic: Include additional menue on all sites?  (Read 7311 times)

0 Members and 1 Guest are viewing this topic.

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Include additional menue on all sites?
« 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:

Code: [Select]
<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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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">&nbsp;&raquo; <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

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: Include additional menue on all sites?
« Reply #1 on: January 31, 2006, 01:06:11 PM »
hi,
save your code as menu.php in your 4images root and then you insert:
Code: [Select]
<?php include("menu.php"); ?>in every template page
you can change the links only in the menu.php file

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: Include additional menue on all sites?
« Reply #2 on: January 31, 2006, 10:33:22 PM »
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 ?

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: Include additional menue on all sites?
« Reply #3 on: January 31, 2006, 10:43:45 PM »
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. ;)

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: Include additional menue on all sites?
« Reply #4 on: February 01, 2006, 02:18:25 AM »
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
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)