Anzeige letzte 48 Std möglich anstatt 24 Std?

Missy78
Hallo,

ich suche einen Hack, den ich im Helmheader ändern könnte,
auf 48 Std Beiträge anstatt wie vorgegeben 24 Std....

Ist sowas möglich?

Wenn ja wie?

Bin dankbar für Antworten

LG

Sandra
ape#3
Fänd ich wohl auch ganz hilfreich... Jemand ne Idee?

Gabs da nicht nen Hack? Werd mich mal auf die Suche machen, aber wenns einer weiß, gehts schneller Augenzwinkern

lg
ape#3
dèjavue
ich hab mal gebastelt großes Grinsen

öffnet die search.php

sucht:

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
/* 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) error($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"));
	}	
	
	$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) error($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"));
	$result = $db->query_first("SELECT searchid FROM bb".$n."_searchs WHERE searchhash = '".getQueryHash($savepostids, 0, 'lastpost', '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', '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(); 	
}


fügt darunter ein:

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
/* 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) error($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"));
	}	
	
	$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) error($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"));
	$result = $db->query_first("SELECT searchid FROM bb".$n."_searchs WHERE searchhash = '".getQueryHash($savepostids, 0, 'lastpost', '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', '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(); 	
}


um nach Topics innerhalb 48h zu suchen nutzt anstelle
code:
1:
..euredomain/search.php?action=24h 


code:
1:
...euredomain/search.php?action=48h 


Also bei mir hats nach den kurzen Test per suche funktioniert, probierts mal aus großes Grinsen
24Bytes
man kann das ganze auch verkürzen Augenzwinkern :

php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
/* 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 (!$boardidserror($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"));
    }    
    
    $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 (!$savepostidserror($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"));
    $result $db->query_first("SELECT searchid FROM bb".$n."_searchs WHERE searchhash = '".getQueryHash($savepostids0'lastpost''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($savepostids0'lastpost''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();     
}


ersetzen durch :
php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
/* new threads 24h / 48h */
if ($_GET['action'] == '24h' || $_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 (!$boardidserror($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"));
    }    
    
    $savepostids '';
    $datecute time() - ($_GET['action'] == '24h') ? '86400' : (($_GET['action'] == '48h') ? '172800' false);
    $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 (!$savepostidserror($lang->get("LANG_GLOBAL_ERROR_SEARCHNORESULT"));
    $result $db->query_first("SELECT searchid FROM bb".$n."_searchs WHERE searchhash = '".getQueryHash($savepostids0'lastpost''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($savepostids0'lastpost''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();     
}


PS: ungetestet Augenzwinkern
ape#3
Beides getestet, funktioniert beides.
Dankeschön an euch beide fröhlich

Oh man... Kennt ihr das, wenn einem die deutsche Sprache irgendwie total seltsam vorkommt? Ist irgendwie gerade der Fall. Soviel beide(s), krass... Sorry für Offtopic^^

lg
ape#3
dèjavue
@SiGa ich wollt auf nummer sicher gehen Augenzwinkern
24Bytes
ist ja auch richtig Augenzwinkern ... aber anscheind bist du kein echter Coder ...

"Coder - Tippfaul³" fröhlich
dèjavue
hehe nö fröhlich

mal ehrlich es sind ja mal gerade 3 zahlen zu ändern da kommt ja fast jeder drauf der halwegs denken kann Augenzwinkern
Missy78
cool...

aber ich bin absolut Anfänger...

wo muss ich das ändern`?

Hab den Header von Helmchen...



um nach Topics innerhalb 48h zu suchen nutzt anstelle
code:

1:



..euredomain/search.php?action=24h



code:

1:



...euredomain/search.php?action=48h