Whats the difference between getnew and getdaily for un-registered / not logged in users? (direct links)
getnew vs getdaily?
Collapse
X
-
i suppose there isn't a difference for not registered/logged in users they both will return the daily threads and replies since ?
not sure really hehe:: Always Back Up Forum Database + Attachments BEFORE upgrading !
:: Nginx SPDY SSL - World Flags Demo [video results]
:: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ] -
-
well i only use getdaily myself:: Always Back Up Forum Database + Attachments BEFORE upgrading !
:: Nginx SPDY SSL - World Flags Demo [video results]
:: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]Comment
-
Originally posted by Joe
a direct link to getnew for guest members would show new in last 24hrs tho, correct?Comment
-
I wasn't even aware that 'getdaily' existed. Nice feature!
If anyone's interested, here's an easy way to add getdaily to your forum home page:
Modify template: forumhome_newposts (additions in bold)
Code:<a href="search.php?s=$session[sessionhash]&action=getnew">View New Posts</a> [b]<br> <a href="search.php?s=$session[sessionhash]&action=getdaily">View Posts From Last 24 Hours</a>[/b]
Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
Change CKEditor Colors to Match Style (for 4.1.4 and above)
Steve Machol Photography
Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.
Comment
-
Originally posted by smachol
I wasn't even aware that 'getdaily' existed. Nice feature!
:: Always Back Up Forum Database + Attachments BEFORE upgrading !
:: Nginx SPDY SSL - World Flags Demo [video results]
:: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]Comment
-
Find
// ###################### Start get daily #######################
and add right above it
PHP Code:// ###################### Start get with no replies #######################
if ($action=="noreplies") {
// generate query
// do it!
if ($bbuserinfo[userid]!=0) {
$forumsql=" AND thread.replycount=0";
$wheresql="1=1".$forumsql;
$wheresql.=" AND thread.open<>10";
if ($getsearch=$DB_site->query_first("SELECT searchid FROM search WHERE query='".addslashes($wheresql)."'")) {
$searchid=$getsearch[searchid];
} else {
// get last search for this user and check floodcheck
if ($prevsearch=$DB_site->query_first("SELECT searchid,dateline FROM search WHERE ".iif($bbuserinfo[userid]==0,"ipaddress='$ipaddress'","userid=$bbuserinfo[userid]")." ORDER BY dateline DESC LIMIT 1")) {
if (time()-$prevsearch[dateline]<$searchfloodcheck and $searchfloodcheck!=0) { // and !ismoderator()) {
eval("standarderror(\"".gettemplate("error_pmfloodcheck")."\");");
exit;
}
}
// insert query into db
$DB_site->query("INSERT INTO search (searchid,query,dateline,querystring,showposts,userid,ipaddress) VALUES (NULL,'".addslashes($wheresql)."',".time().",'".addslashes($query)."',1,$bbuserinfo[userid],'".addslashes($ipaddress)."')");
$searchid=$DB_site->insert_id();
}
eval("standardredirect(\"".gettemplate("redirect_search")."\",\"search.php?s=$session[sessionhash]&action=showresults&searchid=$searchid\");");
} else {
$action="getdaily";
}
}
Comment
-
nice ... how do you limit the no replies results to just the last 24hrs or 7 days?:: Always Back Up Forum Database + Attachments BEFORE upgrading !
:: Nginx SPDY SSL - World Flags Demo [video results]
:: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment