Revision history for wackozacko


Revision [22706]

Last edited on 2015-09-18 01:18:37 by wackozacko
Additions:
* @author {@link http://wikkawiki.org/wackozacko}
Deletions:
* @author {@link http://wikkawiki.org/wackozacko Isaac Doub}


Revision [21711]

Edited on 2012-04-28 13:36:15 by wackozacko
Additions:
Created a little script that adds an unordered list of pages belonging to a specified category to a page. It's turned out to be pretty useful. I've got one page which just lists all the pages on my site in a table format by category, and it automatically updates.
Deletions:
Created a little script that adds an unordered list of pages belonging to a specified category to a page.


Revision [21710]

Edited on 2012-04-28 13:32:41 by wackozacko
Additions:
======Scripts======
====Allow Comments====
A very simple script that changes my default setting on specific pages to allow comments and displays a little notice saying so.
echo $this->Format('>>@@//THIS PAGE ALLOWS COMMENTS//@@>>');
$this->config["hide_comments"] = 0;
?>%%
====List of Pages in Category====
* Creates a plain list of the pages in a specified category.
* @input string $category optional: the category from which you want to display the list of pages. Default: current page
echo $this->Format($str);
Deletions:
---
---
* Creates a right justified list of the pages in a specified category.
* @input string $category optional: the category from which you want to display a list of pages. Default: current page
echo $this->Format(">>@@===Pages in Category \"".str_replace("Category", "", $category)."\"===@@\n".$str.">>");


Revision [21709]

Edited on 2012-04-28 03:28:50 by wackozacko
Additions:
---
----
---
Created a little script that adds an unordered list of pages belonging to a specified category to a page.

%%(php)
<?php
/**
* Creates a right justified list of the pages in a specified category.
*
* Modified from the WikkaWiki file category.php
*
* @package Actions
* @version $1.0$
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
*
* @author {@link http://wikkawiki.org/wackozacko Isaac Doub}
* @input string $category optional: the category from which you want to display a list of pages. Default: current page
* @output a list of pages in a category
* @uses Wakka::GetPageTag();
* @uses Wakka::FullCategoryTextSearch()
* @uses Wakka::FullTextSearch()
*/

if ($cattag = $_GET['wakka']) #312 (only files action uses POST for wakka)
{
$str ="";
if (!isset($category)) $category=$this->GetPageTag();
if ($category=="/") $category="CategoryCategory";

if (isset($class)) {
$class="class=\"$class\"";
} else {
$class="";
}

if (!$category) {$category=$cattag;}

if ($this->CheckMySQLVersion(4,0,1))
{
$results = $this->FullCategoryTextSearch($category);
}
else
{
$utf8Compatible = 0;
if(1 == $this->config['utf8_compat_search']) {
$utf8Compatible = 1;
}

$results = $this->FullTextSearch($category, 0, $utf8Compatible);
}

if ($results)
{
$count = 0;
$categorycount = 0;
$list = array();

foreach ($results as $i => $cpage) {
if($cpage['tag'] != $category) {
array_push($list,$cpage['tag']);
}
}

sort($list);

while (list($key, $val) = each($list)) {
if ($val != $this->GetPageTag()) {
$str .= "~-[[".$val."]]\n";
$count++;
$categorycount++;
}
}
}
else $str .= sprintf(T_("Sorry, No items found for %s"),$category);

echo $this->Format(">>@@===Pages in Category \"".str_replace("Category", "", $category)."\"===@@\n".$str.">>");
}
?>
%%


Revision [21708]

The oldest known version of this page was created on 2012-04-28 03:23:54 by wackozacko
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki