|
Cookbook /
TraceTrailSummary: Trail history of the last (default=5) visited wiki pages
Version: 20060516
Prerequisites: pmwiki 2.1.5
Status: Stable
Maintainer: Americo Albuquerque
Categories: Links, WikiTrails
Questions answered by this recipeIs it possible to have a list of the previous n pages seen before? Yes, using this recipe tracetrail.phpΔ See the variables section for the only difference. BillReveile January 07, 2007, at 05:15 PM
Another version tracetrail3.phpΔ which remembers the trail history via a cookie - added by HansB June 23, 2008, at 04:50 PM DescriptionThis recipe creates a list of recent visited local pages that have the markup (:tracetrails:). Only pages with that markup are saved. You can put the markup in the GroupHeader or GroupFooter to have all pages of a group to be listed in the history trails. The history is not group dependent. That means that all pages with the (:tracetrails:) markup will appear on the trail list whatever group it belongs. Installation:Save the tracetrail.php into your cookbook directory. NotesThere are some variables that can be used to change the recipe's behaviour.
Also available in TraceTrail2.php
tracetrail3.php: additional variables and changesThe tracetrail list is kept as trace history in a cookie, so will be remembered from session to session.
-I used this in my sidebard with the Triad skin. All I had to do was put the markup How to put the trace on all pages ? See GroupHeaders and put something like (note the new line and the "\\\") $GroupHeaderFmt .= "(:tracetrails:)(:nl:)"; in your Workaround to show trails in your header'-I had a problem if i follow the instructions of the upper part the code breaks the layout of some pages like the one of PmWiki.BasicEditing, the span at the right dont shows properly in the default template, i spent a few hours how to work around this situation. First of all set your GroupFooterFmt to in your config
This will make your site to show the trails but it lookes really ugly in the footer, well, keep reading... Edit your tracetrail.php file and change the span tag for a div tag and set the id of the div to, lets say..., hiddentrails. From
To
This will make our div invisible Then edit your .tmpl file and put a new div, this div will show our menu add to the body tag an onLoad command <body onLoad="showMenu()"> Paste the next script at the header section
<script type="text/javascript" language="JavaScript">
function showMenu(){
inner = document.getElementById('hiddentrails').innerHTML;
document.getElementById('menuTrail').innerHTML = inner;
}
</script>
And add the div to the position where you want to see the menu I pasted it under the <div id='wikicmds'> section and it looks really nice <div class="menuTrail" id="menuTrail"></div> Either this link is dead or its server is not running 11-05-2009 6:49 pkhg Well thats all hope it works-' Demo http://rootshell.be/~jeditec/pmwiki/pmwiki.php?n=PmWiki.BasicEditing I already posted this question to Hans in the Fox comments section, but just in case, maybe someone has a work around for this issue. Hans, I'm using a Cookbook file called Tracetrail http://www.pmwiki.org/wiki/Cookbook/TraceTrail (which you are familiar with since you authored tracetrail3.php and is the version I chose to use). I have installed that php file in my wiki which is currently running on the Triad skin. Also, I just recently installed Fox because I wanted to have some of its functionalities and the shoutbox possibility (http://www.pmwiki.org/wiki/Cookbook/FoxShoutboxAlternative). Anyway, somehow whenever I leave Fox commented in my config.php somehow Trace Trail instead of giving me the sites I've been to only gives me a "+" on my wikisite. Whenever I uncomment Fox, and leave Trace Trail commented, Trace Trail works again and I can see the names of the links I've been to. Is there a work around for this issue? I'm also using PMWiki pmwiki-2.2.0-beta65, which of course is fairly recent. Thanks, Real Chris October 20, 2008, at 12:01 PM Ok, since I got a response from Hans, I think its best that I post his response with my question just in case anyone else had that problem. $TraceLinkFmt id set to '* '. try setting in config.php $TraceLinkFmt = '* '; I do not see the connection with fox.php though. i though t the Pagename? markup syntax is generally defined in pmwiki, to show a page title rather than page name. HansB October 20, 2008, at 12:19 PM Thanks, Real Chris October 20, 2008, at 12:30 PM User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |