From: <ru...@us...> - 2010-06-23 13:12:30
|
Revision: 7555 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7555&view=rev Author: rurban Date: 2010-06-23 13:12:23 +0000 (Wed, 23 Jun 2010) Log Message: ----------- add wikilens to theme search path, and not double Modified Paths: -------------- trunk/lib/plugin/RateIt.php trunk/themes/Sidebar/templates/top.tmpl trunk/themes/Sidebar/themeinfo.php Modified: trunk/lib/plugin/RateIt.php =================================================================== --- trunk/lib/plugin/RateIt.php 2010-06-21 08:56:10 UTC (rev 7554) +++ trunk/lib/plugin/RateIt.php 2010-06-23 13:12:23 UTC (rev 7555) @@ -138,6 +138,9 @@ function head() { // early side-effects (before body) global $WikiTheme; + static $_already; + if (!empty($_already)) return; + $_already = 1; $WikiTheme->addMoreHeaders(JavaScript( "var prediction = new Array; var rating = new Array; var avg = new Array; var numusers = new Array; Modified: trunk/themes/Sidebar/templates/top.tmpl =================================================================== --- trunk/themes/Sidebar/templates/top.tmpl 2010-06-21 08:56:10 UTC (rev 7554) +++ trunk/themes/Sidebar/templates/top.tmpl 2010-06-23 13:12:23 UTC (rev 7555) @@ -1,6 +1,13 @@ <?php // -*-php-*- // rcs_id('$Id$'); -if (ENABLE_RATEIT && !empty($user) && $user->isAuthenticated() && $page->exists()) +$pagename = $page->getName(); +$isActionPage = isActionPage($pagename); +if (ENABLE_PAGE_PUBLIC) + $public = $page->get('public'); +else + $public = false; +if (ENABLE_RATEIT && !empty($user) && $user->isAuthenticated() + && $page->exists() && !$isActionPage && !$WikiTheme->DUMP_MODE) $rating = 1; else $rating = 0; @@ -8,7 +15,7 @@ <!-- Page title --> <a name="top" id="contentTop"></a> <?php if ($page->_pagename != "HomePage") { ?> -<h1 class="firstHeading<?= $rating ? '-rating' : '' ?>"><?= $HEADER ?></h1> +<h1 class="firstHeading<?= $rating ? '-rating' : '' ?><?= $public ? '-public' : '' ?>"><?= $HEADER ?></h1> <?php } ?> <?php if ($rating && $request->getArg('action') == 'browse') { ?> <?= Template('ratings') ?> Modified: trunk/themes/Sidebar/themeinfo.php =================================================================== --- trunk/themes/Sidebar/themeinfo.php 2010-06-21 08:56:10 UTC (rev 7554) +++ trunk/themes/Sidebar/themeinfo.php 2010-06-23 13:12:23 UTC (rev 7555) @@ -154,7 +154,7 @@ * WikiWords can automatically be split by inserting spaces between * the words. The default is to leave WordsSmashedTogetherLikeSo. */ - $this->setAutosplitWikiWords(true); + //$this->setAutosplitWikiWords(true); /** * If true (default) show create '?' buttons on not existing pages, even if the @@ -203,6 +203,9 @@ require_once("lib/wikilens/PageListColumns.php"); //require_once("lib/plugin/RateIt.php"); $plugin = new WikiPlugin_RateIt; + // add parent to current theme to find the RateIt images + // $WikiTheme->addParent('wikilens', 'noinit'); + $WikiTheme->_parents[] = new WikiTheme('wikilens', 'noinit'); $plugin->head(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |