コード例 #1
0
ファイル: sidebar_stories.php プロジェクト: pantofla/geez
if (!isset($main_smarty)) {
    $main_smarty = new Smarty();
}
// If we're calling this page through another page like index.php, $main_smarty will already be set
// If we're calling this page directly, set main_smarty
include_once 'config.php';
include_once mnminclude . 'html1.php';
include_once mnminclude . 'link.php';
include_once mnminclude . 'tags.php';
include_once mnminclude . 'search.php';
include_once mnminclude . 'smartyvariables.php';
include_once mnminclude . 'sidebarstories.php';
global $the_template, $main_smarty;
// for filterTo you can use "published", "queued" or "all"
// to change the way the links look, edit /tempates/<your template>/sidebar_stories.tpl
$ss = new SidebarStories();
$ss->orderBy = "link_date DESC";
// newest on top.
$ss->pagesize = 5;
// the number of items to show in the box.
$ss->TitleLengthLimit = 26;
if (pagename == "index") {
    $ss->filterToStatus = "queued";
    $ss->header = $main_smarty->get_config_vars("PLIGG_Visual_Pligg_Queued");
    $ss->link = getmyurl("upcoming");
} elseif (pagename == "upcoming") {
    $ss->filterToStatus = "published";
    $ss->header = $main_smarty->get_config_vars("PLIGG_Visual_Published_News");
    $ss->link = my_base_url . my_pligg_base;
} else {
    $ss->filterToStatus = "published";
コード例 #2
0
// You can get copies of the licenses here:
// 		http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
// -------------------------------------------------------------------------------------
include_once 'Smarty.class.php';
if (!isset($main_smarty)) {
    $main_smarty = new Smarty();
}
// If we're calling this page through another page like index.php, $main_smarty will already be set
// If we're calling this page directly, set main_smarty
include_once 'config.php';
include_once mnminclude . 'html1.php';
include_once mnminclude . 'link.php';
include_once mnminclude . 'tags.php';
include_once mnminclude . 'search.php';
include_once mnminclude . 'smartyvariables.php';
include_once mnminclude . 'sidebarstories.php';
global $the_template;
$ss = new SidebarStories();
$ss->pagesize = 5;
// the number of items to show in the box.
$ss->orderBy = "link_votes DESC";
// newest on top.
$ss->filterToTimeFrame = 'today';
$ss->header = PLIGG_Visual_Pligg_Today;
if ($the_template == "yget") {
    echo "<div class=tlb><span><a onclick=\"new Effect.toggle('sstop','blind', {queue: 'end'}); \">  <img src=\"" . my_base_url . my_pligg_base . "/templates/yget/images/expand.png\" onClick=expandcontent(this,'sstop') ></a></span><a href=" . my_pligg_base . "/index.php?part=today>" . $ss->header . "</a></div><div id=sstop style=padding-bottom:5px>";
    $ss->template = $the_template . '/sidebar_stories.tpl';
    $ss->show();
    echo "</div>";
}