Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
pagefooter with wiki functions
how do we get wiki functions to work in a pagefooter area?
Avatar
paul Wittenbraker #1
Member since Aug 2006 · 20 posts
Group memberships: Members
Show profile · Link to this post
Subject: pagefooter with wiki functions
We're using doku to develop a wiki for the city of Grand Rapids, MI http://g-wiki.org.
We're trying to implement a 'service area' that loads at the bottom of everypage, similar to the hemingway template for wordpress. You can see an example here. http://www.grooverelativity.com/provflux/.
We'd like our service area to have a 3 column table with the following content: 1st column -login window/status, help links; 2nd column Recent items (actually an archive list of the blog plugin), 3rd column an index of content using the indexmenu plugin. http://www.grooverelativity.com/provflux/. We started with the excellent 'simple' template (http://www.chimeric.de/dokuwiki/templates/simple).

We've created a pagefooter.html file see below. Our questions are:
1. Is this the right direction?
2. What code do we put in to bring in a login function that shows the login window if the person is not logged in and shows a user status and logout link if the person is not logged in?
3. How do we get the archive and index to show up at this point in the page. It makes sence that the wiki code does not work here since it is after the wikipagestop. If the wikicode won't work here to call up these things, is there another way to do this?

I'm obviously a novice at these things. Any help is greatly appreciated.
- Paul
<?php
/**
 * Example footer include
 *
 * This file shows you how to use the include hooks. However I recommend to
 * create your own complete new template instead.
 */
?>
<div align="center" class="pagefooterinc">
  <table width="95%" border="0" align="center">
    <tr>
      <td valign="top">Login:
        <p> <?php include(html_login); ?>
        <br />
        </p>
        <p>{{NEWPAGE}}</p>
        <p>{{indexmenu&gt;wiki:help|js}}</p>
      <p>&nbsp;</p></td>
      <td valign="top"><p>Recently</p>
      <p>{{archive&gt;*?2006-08}}</p></td>
      <td valign="top"><p>Pages</p>
      <p>{{indexmenu&gt;pages|js}}</p></td>
    </tr>
  </table>
</div>
chi #2
Member since Jun 2006 · 1851 posts · Location: Munich Germany
Group memberships: Members, Super Mods, Wiki Managers
Show profile · Link to this post
Hi Paul,

I think the easiest way to do what you like is to render normal wikipages in the footer. The below (untested ;-)) example should work, just put it into main.php before

  <?php /*old includehook*/ include(dirname(__FILE__).'/footer.html')?>

This way 3 wiki pages (left_column,center_column,right_column) are rendered directly. Just create these pages and insert the plugin code or whatever you want there.

<div align="center" class="pagefooterinc">
  <table width="95%" border="0" align="center">
    <tr>
      <td valign="top">
        <?php
          if(!$_SERVER['REMOTE_USER']) {
            // the login form
            html_login();
          } else {
            // the login button shows logout if a user is logged in
            // use tpl_actionlink('login') if you want a link instead
            tpl_button('login');
          }
        ?>
        <?php if(@file_exists(wikiFN('left_column'))) print(p_wiki_xhtml('left_column','',false)); ?> 
      </td>
      <td valign="top">
        <?php if(@file_exists(wikiFN('center_column'))) print(p_wiki_xhtml('center_column','',false)); ?>
      </td>
      <td valign="top">
        <?php if(@file_exists(wikiFN('right_column'))) print(p_wiki_xhtml('center_column','',false)); ?>
      </td>
    </tr>
  </table>
</div>

Well, that`s how I would do it ;-). Maybe there are other ways too.

Cheers
Michael
Please add [SOLVED] to the initial thread subject if you feel your question has been answered.
If my answer doesn't make sense maybe your question didn't either - just visit http://facepalm.org.
This post was edited on 2006-08-07, 19:48 by chi.
Avatar
paul Wittenbraker #3
Member since Aug 2006 · 20 posts
Group memberships: Members
Show profile · Link to this post
Subject: works great
chi,
the code you sent worked just as you suspected. We'll be tweaking it with some css to get is to look just as we want. thanks loads for your help and the original template as well.

paul
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-05-25, 05:23:40 (UTC +02:00)