Howto Ad additional navigation to nav bar?

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-19-2007, 07:31 AM
Casual Pligger
 
Join Date: Aug 2007
Posts: 92
Pligg 9.8
Server: cPanel, Apache2.2
PHP 5
Website: Kiefit.com

Hello,

How can I ad additional links- navigation to the navigation bar?

==================================================
Home Login Register Live Top users Tag cloud ????? ????? ==================================================

How is the exact procedure to customize the script?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 09-19-2007, 08:41 AM
Constant Pligger
 
Join Date: Feb 2007
Posts: 226
You can edit your navigation bar by opening your template's header.tpl file. The adding procedure vary's a bit depending on what kind of links you want to add. Like links that are only visible to users who are logged in or logged out etc.
Reply With Quote
  #3 (permalink)  
Old 09-20-2007, 09:27 AM
Casual Pligger
 
Join Date: Aug 2007
Posts: 92
Hello Andtony,

I would like to ad links that are visible to users who are logged in or logged out as well.
How can I do that?

Thanks.
Reply With Quote
  #4 (permalink)  
Old 09-20-2007, 07:09 PM
not2serious's Avatar
Pligg Donor
Pligg Version: v0.96 w/modifications
Pligg Template: Yget w/modifications
 
Join Date: Apr 2007
Location: East Coast, USA
Posts: 205
Code:
{if $pagename eq "upcoming"}
		    <li><a href="{$my_base_url}{$my_pligg_base}" class="navbut3"><span>{#PLIGG_Visual_Published_News#}</span></a></li>
		    <li><a href="{$URL_upcoming}" class="navbut4"><span>{#PLIGG_Visual_Pligg_Queued#} ({$queued})</span></a></li>
		    <li><a href="{$URL_submit}" class="navbut3"><span>{#PLIGG_Visual_Submit_A_New_Story#}</span></a></li>
		    <li><a href="http://www.critiquemyart.com/How_To.php" class="navbut3"><span>FAQs & How To's</span></a></li>   
                    <li><a href="http://www.critiquemyart.com/Contest_Page.php" class="navbut3"><span><strong>* CONTESTS *</strong></span></a></li>

{elseif $pagename eq "published"}
		    <li><a href="{$my_base_url}{$my_pligg_base}" class="navbut4"><span>{#PLIGG_Visual_Published_News#}</span></a></li>
		    <li><a href="{$URL_upcoming}" class="navbut3"><span>{#PLIGG_Visual_Pligg_Queued#} ({$queued})</span></a></li>
		    <li><a href="{$URL_submit}" class="navbut3"><span>{#PLIGG_Visual_Submit_A_New_Story#}</span></a></li>
		    <li><a href="http://www.critiquemyart.com/How_To.php" class="navbut3"><span>FAQs & How To's</span></a></li>
		    <li><a href="http://www.critiquemyart.com/Contest_Page.php" class="navbut3"><span><strong>* CONTESTS *</strong></span></a></li>

{elseif $pagename eq "submit"}
This is how I did linked tabs to additional pages. Edit the header.tbl file. The red and green code was added to each {if} and they provide a direct link to the appropriate page. I am still working on this, but it does appear to work for me.
Reply With Quote
  #5 (permalink)  
Old 09-21-2007, 08:30 AM
Casual Pligger
 
Join Date: Aug 2007
Posts: 92
Quote:
Originally Posted by not2serious View Post
Code:
{if $pagename eq "upcoming"}
		    <li><a href="{$my_base_url}{$my_pligg_base}" class="navbut3"><span>{#PLIGG_Visual_Published_News#}</span></a></li>
		    <li><a href="{$URL_upcoming}" class="navbut4"><span>{#PLIGG_Visual_Pligg_Queued#} ({$queued})</span></a></li>
		    <li><a href="{$URL_submit}" class="navbut3"><span>{#PLIGG_Visual_Submit_A_New_Story#}</span></a></li>
		    <li><a href="http://www.critiquemyart.com/How_To.php" class="navbut3"><span>FAQs & How To's</span></a></li>   
                    <li><a href="http://www.critiquemyart.com/Contest_Page.php" class="navbut3"><span><strong>* CONTESTS *</strong></span></a></li>

{elseif $pagename eq "published"}
		    <li><a href="{$my_base_url}{$my_pligg_base}" class="navbut4"><span>{#PLIGG_Visual_Published_News#}</span></a></li>
		    <li><a href="{$URL_upcoming}" class="navbut3"><span>{#PLIGG_Visual_Pligg_Queued#} ({$queued})</span></a></li>
		    <li><a href="{$URL_submit}" class="navbut3"><span>{#PLIGG_Visual_Submit_A_New_Story#}</span></a></li>
		    <li><a href="http://www.critiquemyart.com/How_To.php" class="navbut3"><span>FAQs & How To's</span></a></li>
		    <li><a href="http://www.critiquemyart.com/Contest_Page.php" class="navbut3"><span><strong>* CONTESTS *</strong></span></a></li>

{elseif $pagename eq "submit"}
This is how I did linked tabs to additional pages. Edit the header.tbl file. The red and green code was added to each {if} and they provide a direct link to the appropriate page. I am still working on this, but it does appear to work for me.
Hi and thank you. It works fine. :-)
Reply With Quote
  #6 (permalink)  
Old 09-21-2007, 09:49 PM
not2serious's Avatar
Pligg Donor
Pligg Version: v0.96 w/modifications
Pligg Template: Yget w/modifications
 
Join Date: Apr 2007
Location: East Coast, USA
Posts: 205
Hi dragan,

I took a look at your site. The additional table look great.

One thing you will need to do is add the code for the additional tabs to every "if/else". For example, if you select "Submit A Story" or "Contact," you will see that only the standard tabs are on those pages. Additionally, you will need to create statements for each new tab.

Code:
{if $pagename eq "upcoming"}
		    <li><a href="{$my_base_url}{$my_pligg_base}" class="navbut3"><span>{#PLIGG_Visual_Published_News#}</span></a></li>
		    <li><a href="{$URL_upcoming}" class="navbut4"><span>{#PLIGG_Visual_Pligg_Queued#} ({$queued})</span></a></li>
		    <li><a href="{$URL_submit}" class="navbut3"><span>{#PLIGG_Visual_Submit_A_New_Story#}</span></a></li>
		    <li><a href="http://www.critiquemyart.com/How_To.php" class="navbut3"><span>FAQs & How To's</span></a></li>   
                    <li><a href="http://www.critiquemyart.com/Contest_Page.php" class="navbut3"><span><strong>* CONTESTS *</strong></span></a></li>
So you will need to to change
Quote:
class="navbut3"
to
Quote:
class="navbut4"
For the tab that your are writing the "if/esle" rule for. This means that if the tab you have added is "Contact," then that line must have class="navbut4" and all the others must have class="navbut3". If you look at my sample, you will see this difference.

More questions ??? Post to this thread. Feel free to click that "Thanks" Button if I helped you :-).

Last edited by not2serious; 09-21-2007 at 09:53 PM.
Reply With Quote
  #7 (permalink)  
Old 10-28-2007, 01:46 AM
New Pligger
 
Join Date: Oct 2007
Posts: 6
My question is - can we do some kind of loop in PHP to get all the category names and automatically create navigation buttons for all categories?

Doing it manually works - for example to link to the videos category
HTML Code:
<li><a href="{$URL_category}Videos" class="navbut3"><span>Videos</span></a></li> 
However I would think it would be possible to have PHP extract the categories for both the link and the link text. I'm not familar enough with php or pligg to attempt this myself though.
Reply With Quote
  #8 (permalink)  
Old 05-05-2008, 04:17 PM
New Pligger
 
Join Date: May 2008
Posts: 14
Quote:
Code:
{if $pagename eq "upcoming"}
		    <li><a href="{$my_base_url}{$my_pligg_base}" class="navbut3"><span>{#PLIGG_Visual_Published_News#}</span></a></li>
		    <li><a href="{$URL_upcoming}" class="navbut4"><span>{#PLIGG_Visual_Pligg_Queued#} ({$queued})</span></a></li>
		    <li><a href="{$URL_submit}" class="navbut3"><span>{#PLIGG_Visual_Submit_A_New_Story#}</span></a></li>
		    <li><a href="http://www.critiquemyart.com/How_To.php" class="navbut3"><span>FAQs & How To's</span></a></li> <li><a href="http://www.critiquemyart.com/Contest_Page.php" class="navbut3"><span><strong>* CONTESTS *</strong></span></a></li>

{elseif $pagename eq "published"}
		    <li><a href="{$my_base_url}{$my_pligg_base}" class="navbut4"><span>{#PLIGG_Visual_Published_News#}</span></a></li>
		    <li><a href="{$URL_upcoming}" class="navbut3"><span>{#PLIGG_Visual_Pligg_Queued#} ({$queued})</span></a></li>
		    <li><a href="{$URL_submit}" class="navbut3"><span>{#PLIGG_Visual_Submit_A_New_Story#}</span></a></li>
		    <li><a href="http://www.critiquemyart.com/How_To.php" class="navbut3"><span>FAQs & How To's</span></a></li> <li><a href="http://www.critiquemyart.com/Contest_Page.php" class="navbut3"><span><strong>* CONTESTS *</strong></span></a></li>

{elseif $pagename eq "submit"}
This is how I did linked tabs to additional pages. Edit the header.tbl file. The red and green code was added to each {if} and they provide a direct link to the appropriate page. I am still working on this, but it does appear to work for me.
Works great! But, how can I add navigation button only for registered users (just like Submit a new story button)?
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I post additional navigation links? racerman28 Questions and Comments 3 05-09-2009 02:17 PM
page navigation limit? Calloused Questions and Comments 4 12-29-2008 06:22 PM
weird! why 'category name' didn't show up in navigation bar gogozilla Questions and Comments 2 11-25-2008 08:43 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development