PEAK XOOPS - Seeking Sitemap plugin for Content 0.5 in englishin japanese

Seeking Sitemap plugin for Content 0.5

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/23 18:51
Ejona  办霹始   Posts: 20
Tried to make it myself but dont get the tree displayed correctly. All Menus and Submenus are being showed, but im not able to get them sorted in the proper order: Menu -> Submenu.

The corresponding fields:

- storyid (the id of the content itself)
- parent_id (contains the parent content)
- blockid (forces the sorting, else its sorted by storyid)
- title (topic of the content)

Hope that someone can help me as i didnt find an equal piece of code which matches in the already available plugins.

Thanks in advance.

Votes:7 Average:8.57
Previous post - Next post | Parent - No child | Posted on 2006/2/23 18:56
Ejona  办霹始   Posts: 20
Below is the code i was using so far:

<?php
function b_sitemap_content(){

$db =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();

$result = $db->query("SELECT storyid, blockid, parent_id, title FROM ".$db->prefix("content")." order by storyid, blockid");

$ret = array() ;
while(list($storyid, $blockid, $parent_id, $title) = $db->fetchRow($result)){
$ret["parent"][] = array(
"id" => $storyid,
"title" => $myts->makeTboxData4Show($title),
"url" => "index.php?id=$storyid"
);
}

return $ret;
}
?>
Votes:16 Average:3.75

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!