Announcement

#1 2010-12-09 22:07:53

marekh
Member
Slovakia
1970-01-01
3

[resolved] How to add new item to menu bar?

Hello,

I`m new in PWG and actually I`m trying to personalize it as much as possible under BlancMontXL theme.
I have installed "Advanced menu manager" and "PWG Stuffs" as well.
Here is what I want to achieve( please see attached illustration):
1.move "About" ,  "Contact" and "Quick search" to the top level
2. hide "Menu"
3. After click on "About", open about.php below
4. After click on "Contact", open initial page associated with plugin "Contact form"

Thank you for your advices

Marek

Offline

 

#2 2010-12-10 08:58:05

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: [resolved] How to add new item to menu bar?

For your need

1/ With [extension by grum] Advanced Menu Manager parameter Quick schearch / About / contact

2/ Go to admin install and Activate plugin LocalFiles Editor

3/ Go to Administration -> Plugins -> LocalFiles Editor -> tab 'templates'

Create new file

File name -> personalmenu
submit

add code

{foreach from=$block->data item=link}
<dt>
        {if is_array($link)}
            <li><a href="{$link.URL}" title="{$link.TITLE}" {if isset($link.REL)}{$link.REL}{/if}>{$link.NAME}</a></li>
        {/if}
</dt>
    {/foreach}
   
<dt>
{if isset($block->data.qsearch) and  $block->data.qsearch==true}
    <form action="{$ROOT_URL}qsearch.php" method="get" id="quicksearch" onsubmit="return this.q.value!='' && this.q.value!=qsearch_prompt;">
      <p style="margin:0;padding:0"{*this <p> is for html validation only - does not affect positioning*}>
        <input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" style="width:90%">
      </p>
    </form>
    <script type="text/javascript">var qsearch_prompt="{'Quick search'|@translate|@escape:'javascript'}"; document.getElementById('qsearchInput').value=qsearch_prompt;</script>
  {/if}
</dt>

save file

4/ go to Administration -> Configuration -> Templates

for line personalmenu select for collum 'Original templates' menubar_menu.tpl
submit

5/ look at your site
Is that what you want ?

[If you made a personal theme, you can also add in the template directory, a file menubar_menu.tpl with this code]


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#3 2010-12-13 12:19:04

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: [resolved] How to add new item to menu bar?

[extension by ddtddt] About1menu
[extension by ddtddt] Contact1menu

for scheach template extension

<dt>
{if isset($block->data.qsearch) and  $block->data.qsearch==true}
    <form action="{$ROOT_URL}qsearch.php" method="get" id="quicksearch" onsubmit="return this.q.value!='' && this.q.value!=qsearch_prompt;">
      <p style="margin:0;padding:0"{*this <p> is for html validation only - does not affect positioning*}>
        <input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" style="width:90%">
      </p>
    </form>
    <script type="text/javascript">var qsearch_prompt="{'Quick search'|@translate|@escape:'javascript'}"; document.getElementById('qsearchInput').value=qsearch_prompt;</script>
  {/if}
</dt>


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#4 2010-12-13 20:08:23

marekh
Member
Slovakia
1970-01-01
3

Re: [resolved] How to add new item to menu bar?

Hello ddtddt,

many thanks for the stuff you made for me during last days. I really appreciate it!
Almost everything is working as we expected, there are only 2 cosmetic things to be corrected.
First, when you click on "About", menu bar disappears. And the second is that "search" form overflows menu bar.
Do you think you could dedicate to this a bit more of your time please?

Thank you,

Marekh ( www.marekh.sk)

Offline

 

#5 2010-12-13 20:48:31

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: [resolved] How to add new item to menu bar?

for template extension, jou can test only

<form action="{$ROOT_URL}qsearch.php" method="get" id="quicksearch" onsubmit="return this.q.value!='' && this.q.value!=qsearch_prompt;">
<dt><input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" style="width:90%">
</dt></form>
<script type="text/javascript">var qsearch_prompt="{'Quick search'|@translate|@escape:'javascript'}"; document.getElementById('qsearchInput').value=qsearch_prompt;</script>
<dd></dd>

for menubar on about page

[extension by VDigital] Spread menus


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#6 2010-12-13 21:16:31

marekh
Member
Slovakia
1970-01-01
3

Re: [resolved] How to add new item to menu bar?

yes, this is exactly what I searched for.
thanks!

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact