getnew vs getdaily?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Joe
    Senior Member
    • May 2000
    • 2435

    getnew vs getdaily?

    Whats the difference between getnew and getdaily for un-registered / not logged in users? (direct links)
    Bike Forums.net
  • George L
    Former vBulletin Support
    • May 2000
    • 32996
    • 3.8.x

    #2
    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 ]

    Comment

    • Mike Sullivan
      Former vBulletin Developer
      • Apr 2000
      • 13327
      • 3.6.x

      #3
      getdaily = new in last 24 hours
      getnew = new since *your* last visit

      Comment

      • Joe
        Senior Member
        • May 2000
        • 2435

        #4
        a direct link to getnew for guest members would show new in last 24hrs tho, correct? Im wondering if i should include both links in my header... hmmm
        Bike Forums.net

        Comment

        • George L
          Former vBulletin Support
          • May 2000
          • 32996
          • 3.8.x

          #5
          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

          • Mike Sullivan
            Former vBulletin Developer
            • Apr 2000
            • 13327
            • 3.6.x

            #6
            Originally posted by Joe
            a direct link to getnew for guest members would show new in last 24hrs tho, correct?
            Correct.

            Comment

            • Steve Machol
              Former Customer Support Manager
              • Jul 2000
              • 154488

              #7
              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

              • George L
                Former vBulletin Support
                • May 2000
                • 32996
                • 3.8.x

                #8
                Originally posted by smachol
                I wasn't even aware that 'getdaily' existed. Nice feature!

                been using that or it's similar form since 1.1.4 heheh
                :: 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

                • Byron
                  Senior Member
                  • Nov 2000
                  • 525
                  • 3.0.0 Beta 6

                  #9
                  I am looking for a function to search posts with no replies.

                  Can someone help me with the code to add to search.php?

                  Thanks.
                  Last edited by Byron; Tue 26 Feb '02, 7:17pm.
                  .

                  Comment

                  • tubedogg
                    Senior Member
                    • Feb 2001
                    • 13602

                    #10
                    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

                    • Byron
                      Senior Member
                      • Nov 2000
                      • 525
                      • 3.0.0 Beta 6

                      #11
                      Hi Kevin,

                      Thank you very much for the code.
                      Last edited by Byron; Tue 26 Feb '02, 7:17pm.
                      .

                      Comment

                      • tubedogg
                        Senior Member
                        • Feb 2001
                        • 13602

                        #12
                        And you're going to
                        search.php?action=noreplies
                        ?
                        Cause it works perfectly for me (using it on my own board).

                        Comment

                        • Byron
                          Senior Member
                          • Nov 2000
                          • 525
                          • 3.0.0 Beta 6

                          #13
                          It is working great. Really thanks a lot.

                          Your code is showing the results as posts. How do i show the results as threads?
                          Last edited by Byron; Tue 26 Feb '02, 7:18pm.
                          .

                          Comment

                          • tubedogg
                            Senior Member
                            • Feb 2001
                            • 13602

                            #14
                            Change this
                            Code:
                            1,$bbuserinfo[userid],
                            to this
                            Code:
                            0,$bbuserinfo[userid],

                            Comment

                            • George L
                              Former vBulletin Support
                              • May 2000
                              • 32996
                              • 3.8.x

                              #15
                              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.
                              Working...