Size ana Sayfa icin daha detayli bir arama icin ufak bir Hack sunuyorum

Boardlarinizin en alt tarafinda Son 24 Saat icindeki aktiv Konulari göster diye bir Link var,
bunu benim sunacagim kücük bir degisiklik sayesinde ilerletebilirsiniz

yani Son 48 Saat icindeki aktiv Konulari ve Son 7 gün icindeki aktiv Konulari göster diye....



search.php acin

ARA:
[code]/* new threads 24h */
if ($_GET['action'] == '24h') {
$boardids = '';
list($boardcount) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_boards");

$result = $db->query("SELECT boardid FROM bb".$n."_boards WHERE password='' AND boardid IN (0".getSearchableBoards().")");
if ($db->num_rows($result) < $boardcount) {
while ($row = $db->fetch_array($result)) {
if ($boardids != '') $boardids .= ','.$row['boardid'];
else $boardids = $row['boardid'];
}
if (!$boardids) redirect($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"), "search.php" . $SID_ARG_1ST);
}

$savepostids = '';
$datecute = time() - 86400;
$result = $db->unbuffered_query("SELECT p.postid FROM bb".$n."_posts p, bb".$n."_threads t WHERE p.threadid=t.threadid AND p.visible=1 AND p.posttime>'$datecute'
".(($boardids) ? ("AND t.boardid IN ($boardids)") : ("")));
while ($row = $db->fetch_array($result)) $savepostids .= ','.$row['postid'];

if (!$savepostids) redirect($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"), "search.php" . $SID_ARG_1ST);
$result = $db->query_first("SELECT searchid FROM bb".$n."_searchs WHERE searchhash = '".getQueryHash($savepostids, 0, 'lastpost[/swf2][swf3]desc', $wbbuserdata['userid'], $REMOTE_ADDR)."'");
if ($result['searchid']) {
header("Location: search.php?searchid=".$result['searchid'].$SID_ARG_2ND_UN);
exit();
}
$db->query("INSERT INTO bb".$n."_searchs (searchhash,postids,showposts,sortby,sortorder,searchtime,userid,ipaddress)
VALUES ('".getQueryHash($savepostids, 0, 'lastpost[/swf2][swf3]desc', $wbbuserdata['userid'], $REMOTE_ADDR)."','$savepostids','0','lastpost','desc','".time()."','$wbbuserdata[userid]','$REMOTE_ADDR')");
$searchid = $db->insert_id();

header("Location: search.php?searchid=$searchid".$SID_ARG_2ND_UN);
exit();
}[/code]


ALTINA EKLE:
[code]/** Search Erweiterung onIndex Baslangic **/
/* new threads 48h */
if ($_GET['action'] == '48h') {
$boardids = '';
list($boardcount) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_boards");

$result = $db->query("SELECT boardid FROM bb".$n."_boards WHERE password='' AND boardid IN (0".getSearchableBoards().")");
if ($db->num_rows($result) < $boardcount) {
while ($row = $db->fetch_array($result)) {
if ($boardids != '') $boardids .= ','.$row['boardid'];
else $boardids = $row['boardid'];
}
if (!$boardids) redirect($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"), "search.php" . $SID_ARG_1ST);
}

$savepostids = '';
$datecute = time() - 172800;
$result = $db->unbuffered_query("SELECT p.postid FROM bb".$n."_posts p, bb".$n."_threads t WHERE p.threadid=t.threadid AND p.visible=1 AND p.posttime>'$datecute'
".(($boardids) ? ("AND t.boardid IN ($boardids)") : ("")));
while ($row = $db->fetch_array($result)) $savepostids .= ','.$row['postid'];

if (!$savepostids) redirect($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"), "search.php" . $SID_ARG_1ST);
$result = $db->query_first("SELECT searchid FROM bb".$n."_searchs WHERE searchhash = '".getQueryHash($savepostids, 0, 'lastpost[/swf2][swf3]desc', $wbbuserdata['userid'], $REMOTE_ADDR)."'");
if ($result['searchid']) {
header("Location: search.php?searchid=".$result['searchid'].$SID_ARG_2ND_UN);
exit();
}
$db->query("INSERT INTO bb".$n."_searchs (searchhash,postids,showposts,sortby,sortorder,searchtime,userid,ipaddress)
VALUES ('".getQueryHash($savepostids, 0, 'lastpost[/swf2][swf3]desc', $wbbuserdata['userid'], $REMOTE_ADDR)."','$savepostids','0','lastpost','desc','".time()."','$wbbuserdata[userid]','$REMOTE_ADDR')");
$searchid = $db->insert_id();

header("Location: search.php?searchid=$searchid".$SID_ARG_2ND_UN);
exit();
}

/* new threads 7Days */
if ($_GET['action'] == '7tage') {
$boardids = '';
list($boardcount) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_boards");

$result = $db->query("SELECT boardid FROM bb".$n."_boards WHERE password='' AND boardid IN (0".getSearchableBoards().")");
if ($db->num_rows($result) < $boardcount) {
while ($row = $db->fetch_array($result)) {
if ($boardids != '') $boardids .= ','.$row['boardid'];
else $boardids = $row['boardid'];
}
if (!$boardids) redirect($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"), "search.php" . $SID_ARG_1ST);
}

$savepostids = '';
$datecute = time() - 604800;
$result = $db->unbuffered_query("SELECT p.postid FROM bb".$n."_posts p, bb".$n."_threads t WHERE p.threadid=t.threadid AND p.visible=1 AND p.posttime>'$datecute'
".(($boardids) ? ("AND t.boardid IN ($boardids)") : ("")));
while ($row = $db->fetch_array($result)) $savepostids .= ','.$row['postid'];

if (!$savepostids) redirect($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"), "search.php" . $SID_ARG_1ST);
$result = $db->query_first("SELECT searchid FROM bb".$n."_searchs WHERE searchhash = '".getQueryHash($savepostids, 0, 'lastpost[/swf2][swf3]desc', $wbbuserdata['userid'], $REMOTE_ADDR)."'");
if ($result['searchid']) {
header("Location: search.php?searchid=".$result['searchid'].$SID_ARG_2ND_UN);
exit();
}
$db->query("INSERT INTO bb".$n."_searchs (searchhash,postids,showposts,sortby,sortorder,searchtime,userid,ipaddress)
VALUES ('".getQueryHash($savepostids, 0, 'lastpost[/swf2][swf3]desc', $wbbuserdata['userid'], $REMOTE_ADDR)."','$savepostids','0','lastpost','desc','".time()."','$wbbuserdata[userid]','$REMOTE_ADDR')");
$searchid = $db->insert_id();

header("Location: search.php?searchid=$searchid".$SID_ARG_2ND_UN);
exit();
}
/** Search Erweiterung onIndex Son**\[/code]



ACP -> Templates degistir -> index.tpl acin

ARA:
[code]{$lang->items['LANG_START_CURRENT_THREADS']}[/code]

ARKASINA EKLE:
[code]| {$lang->items['LANG_START_CURRENT_48H']} | {$lang->items['LANG_START_CURRENT_7DAYS']}[/code]



son olarakta 2 Dil Kategorisi olustuyoruz...

ACP -> Dil Kategorisi Olu_tur

Kategori::START
Dil Degiskeni: LANG_START_CURRENT_48H
Degisken Degeri: Son 48 Saat içindeki Aktif Konulari Göster

Kategori: START
Dil Degiskeni: LANG_START_CURRENT_7DAYS
Degisken Degeri: Son 7 Gün içindeki Aktif Konulari Göster

Beğeniler: 0
Favoriler: 0
İzlenmeler: 620
favori
like
share