Hi Colin,

How exactly would I go about implementing that last option? What PHP
code do I put in page.pagename.php and does it matter what I call
pagename? Is this on the wiki yet?

Thanks,
Vivek

On Fri, Mar 13, 2009 at 1:04 PM, Vivek Ayer <[email protected]> wrote:
> Hi Colin,
>
> Thanks so much! Got it to work. Will this technique work on most
> header.php files? I really actually would like the last solution you
> suggested, but I'll wait for you properly document it, before I
> migrate to that style.
>
> Thanks again,
> Vivek
>
> On Fri, Mar 13, 2009 at 9:44 AM, Colin <[email protected]> wrote:
>>
>> Hi Vivek
>>
>> You'll need to modify the appropriate file in your theme in order to
>> add tab links to pages not hosted by Habari.
>>
>> Lets use the K2 theme as supplied with Habari as an example. In this
>> theme, you'll need to modify the header.php file.
>>
>> Search for the following excerpt (you're may be slightly different as
>> I'm using the SVN code):
>>
>> ---
>>        <ul class="menu">
>>                <li <?php if($request->display_home) { ?>
>>        class="current_page_item"<?php } ?>><a href="<?php
>> Site::out_url( 'habari' ); ?>" title="<?php Options::out( 'title' );
>> ?>"><?php echo $home_tab; ?></a></li>
>> <?php
>> // Menu tabs
>> foreach ( $pages as $tab ) {
>>
>> ?>
>>                <li<?php if(isset($post) && $post->slug == $tab->slug) { ?>
>>        class="current_page_item"<?php } ?>><a href="<?php echo
>> $tab->permalink; ?>" title="<?php echo $tab->title; ?>"><?php echo
>> $tab->title; ?></a></li>
>> <?php
>> }
>> if ( $user instanceof User ) { ?>
>>                <li class="admintab"><a href="<?php Site::out_url(
>> 'admin' ); ?>" title="<?php _e('Admin area'); ?>"><?php _e('Admin');
>> ?></a></li>
>> <?php } ?>
>>        </ul>
>> ---
>>
>> All you need to do is add appropriate additional "<li></li>" entries
>> for your non-Habari pages.
>>
>> For example:
>>
>> ---
>>        <ul class="menu">
>>                <li <?php if($request->display_home) { ?>
>>        class="current_page_item"<?php } ?>><a href="<?php
>> Site::out_url( 'habari' ); ?>" title="<?php Options::out( 'title' );
>> ?>"><?php echo $home_tab; ?></a></li>
>> <?php
>> // Menu tabs
>> foreach ( $pages as $tab ) {
>>
>> ?>
>>                <li<?php if(isset($post) && $post->slug == $tab->slug) { ?>
>>        class="current_page_item"<?php } ?>><a href="<?php echo
>> $tab->permalink; ?>" title="<?php echo $tab->title; ?>"><?php echo
>> $tab->title; ?></a></li>
>> <?php
>> }
>> if ( $user instanceof User ) { ?>
>>                <li class="admintab"><a href="<?php Site::out_url(
>> 'admin' ); ?>" title="<?php _e('Admin area'); ?>"><?php _e('Admin');
>> ?></a></li>
>> <?php } ?>
>> <!-- ******** ADDDING ADDITIONAL NON-HABARI TABS ******** -->
>>               <li><a href="/path/to/my/mediawiki">MediaWiki</a></li>
>>               <li><a href="/path/to/my/punbb">PunBB</a></li>
>>        </ul>
>> ---
>>
>> You may want to add a bit more logic to make things look a bit nicer,
>> but I'm sure you get the idea.
>>
>> If you want to add pages that ARE part of Habari, then just create a
>> new page within the Habari interface.
>>
>> Now comes the complicated bit, if you wanted to show non-Habari
>> managed content, within a page that appears to be Habari content, then
>> you need to create an appropriate page.pagename.php file within your
>> theme and add the necessary PHP code to this file to show that content
>> (Note to self: I really must document this).
>>
>> HTH
>> Colin
>>
>>
>> On Fri, Mar 13, 2009 at 2:51 PM, fader <[email protected]> wrote:
>>>
>>> Hi guys,
>>>
>>> How do I add tabs next to 'Blog' and 'Admin'? I noticed many blogs
>>> have already enabled this, but never documented on how to do it. Do
>>> you have to modify the theme.php file of each theme? Or is it easier?
>>> I'd like to include links that are not within habari and maybe going
>>> to mediawiki or punbb, etc.
>>>
>>> Thanks in advance,
>>> Vivek
>>>
>>> >
>>>
>>
>>
>>
>> --
>> Colin Seymour
>> Blog: http://www.colinseymour.co.uk
>> Tech Stuff: http://www.lildude.co.uk
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/habari-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to