2004/12/22 9:48
Anonymous
Posts: 0
Since:
2004/12/22 21:26
2004/12/23 7:45
Mithrandir
XOOPS is my life!
Posts: 6320
Since: 2003/6/21
2004/12/23 7:51
include "header.php";include_once WFS_ROOT_PATH . "/include/functions.php" ;include_once WFS_ROOT_PATH . "/class/wfsarticle.php";include_once WFS_ROOT_PATH . "/class/wfsindex.php";include_once XOOPS_ROOT_PATH . "/class/xoopstree.php";global $xoopsModuleConfig, $wfsTemplates, $wfsPathConfig;$catid = (isset($_GET['category']) && ereg("^[0-9]{1,}$", $_GET['category'])) ? $_GET['category'] : 0;$op = isset($_GET['category']) ? "category" : "default";$start = isset($_GET['start']) ? intval($_GET['start']) : 0;switch ($op){ /** * Start of main category index listings */ case "default": default: include_once(XOOPS_ROOT_PATH . "/header.php"); $xoopsOption['template_main'] = $wfsTemplates['catindex']; $catarray = array(); $index = new WfsIndex(1); $catarray['imageheader'] = $index->imageheader("S"); $catarray['indexheading'] = $index->indexheading("S"); $catarray['indexheader'] = $index->indexheader("S"); $catarray['indexfooter'] = $index->indexfooter("S"); $catarray['indexheaderalign'] = $index->indexheaderalign(); $catarray['indexfooteralign'] = $index->indexfooteralign(); $sarray = WfsArticle::getAllArticle(5, 0, 'online|spotlightmain', 0, 0, "published DESC"); $count = 0; foreach ($sarray as $articles) { if ($articles->spotlightmain == 2 && $count == 0) { $feature["summary"] = $articles->summary("S"); $feature["artlink"] = $articles->textLink("S"); $feature["date"] = $articles->published("S"); $feature["cat"] = $articles->category->textLink('', 0, 'viewarticles.php'); $feature["image"] = $articles->articleimg("S", 2); $feature["author"] = $articles->uname("S"); $feature["more"] = $articles->morelink("S"); $xoopsTpl->assign('featured', $feature); $count = 1; } else { $features["summary"] = $articles->summary("S"); $features["artlink"] = $articles->textLink("S"); $features["date"] = $articles->published("S"); $features["cat"] = $articles->category->textLink('', 0, 'viewarticles.php'); $features["image"] = $articles->articleimg("S", 4); $features["author"] = $articles->uname("S"); $features["more"] = $articles->morelink("S"); $xoopsTpl->append('features', $features); } } /** * display categories/sections */ $xt = new WfsCategory(); $categorys = $xt->getFirstChild(); $i = 0; foreach($categorys as $onecat) { if ($onecat->status() != 1) continue; $recurse = 0; //$recurse = ($xoopsModuleConfig['submenus']) ? 0 : 1; $num = WfsArticle::countByCategory($onecat->id, 0, $recurse) ; $category['num'] = $num; $category['catid'] = $onecat->id(); $category['title'] = $onecat->textLink('', 1, 'viewarticles.php'); $category['sectionimage'] = $onecat->imgLink(); $category['imgalign'] = $onecat->imgalign("S"); if ($xoopsModuleConfig['showartlistings'] == 1 || $xoopsModuleConfig['showartlistings'] == 3) { $category['description'] = $onecat->description('S'); } if ($num > 0) { if ($xoopsModuleConfig['showartlistings'] == 2 || $xoopsModuleConfig['showartlistings'] == 3) { $artarray = WfsArticle::getAllArticle($xoopsModuleConfig['showartlistamount'], 0, 'online', $onecat->id()); foreach ($artarray as $articles) { $status = ($articles->changed() > 0) ? 1 : 0; $category['icons'] = wfs_displayicons($articles->created(), $status, $articles->counter()); $category['content'][] = array('articlelink' => "" . $articles->textLink(). " ". $category['icons']); } } $updated = WfsArticle::getLastChangedByCategory($onecat->id()); $category['updated'] = ($updated) ? formatTimestamp($updated , $xoopsModuleConfig['timestamp']) : ""; } $xoopsTpl->append('categories', $category); unset($category); /** * sub sections */ if ($xoopsModuleConfig['submenus'] == 1) { $deps = 1; $childcat = $onecat->getFirstChild(); if ($childcat) { foreach($childcat as $subonecat) { if ($subonecat->status() == 0) continue; $deps ++; $num = WfsArticle::countByCategory($subonecat->id()); $category['num'] = $num; $category['catid'] = $subonecat->id(); $category['title'] = str_repeat(" ", $deps) . " : " . $subonecat->textLink('', 1, 'viewarticles.php') . ""; $category['sectionimage'] = $subonecat->imgLink(); $category['imgalign'] = $subonecat->imgalign("S"); if ($xoopsModuleConfig['showartlistings'] == 1 || $xoopsModuleConfig['showartlistings'] == 3) { $category['description'] = $subonecat->description('S'); } if ($num > 0) { if ($xoopsModuleConfig['showartlistings'] == 2 || $xoopsModuleConfig['showartlistings'] == 3) { $artarray = WfsArticle::getAllArticle($xoopsModuleConfig['showartlistamount'], 0, 'online', $subonecat->id()); foreach ($artarray as $articles) { $category['content'][] = array('articlelink' => "" . $articles->textLink()); } } $updated = WfsArticle::getLastChangedByCategory($subonecat->id()); $category['aupdated'] = ($updated) ? formatTimestamp($updated , $xoopsModuleConfig['timestamp']) : ""; } $xoopsTpl->append('categories', $category); unset($category); } } } } $xoopsTpl->assign('lang_sponser', _WFS_SPONSER); $xoopsTpl->assign('lang_author', _WFS_AUTHER); $xoopsTpl->assign('lang_updated', _WFS_LASTUPDATE); $xoopsTpl->assign('lang_articles', _WFS_ARTICLES); $xoopsTpl->assign('lang_category', _WFS_CATEGORY); $xoopsTpl->assign('lang_readmore', _WFS_READMORE); $xoopsTpl->assign('lang_listarticles', _WFS_LISTARTICLES); $xoopsTpl->assign('lang_listfeatured', _WFS_FEATUREDARTS); $xoopsTpl->assign('lang_listsections', _WFS_SECTIONLISTIN); $xoopsTpl->assign('catarray', $catarray); break;}$xoopsTpl->assign("xoops_module_header", '');include_once 'footer.php';?>
2004/12/23 14:42
limecity
Friend of XOOPS
Posts: 1602
Since: 2003/7/6 0
2004/12/23 14:48
Advanced Search
497 user(s) are online (58 user(s) are browsing Support Forums)
Members: 0
Guests: 497