Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
Doulos
Life Cycles Becoming CPU Cycles



Joined: Jun 06, 2005
Posts: 732

PostPosted: Mon Oct 21, 2013 3:26 pm Reply with quote

How would I add a today's posts link to the forums? Sometimes people exit out of the browser after looking at one new post by mistake and then have to look through all the forums to see which ones have a new post. I link to search for all posts made today would be nice.

Thanks,
Doulos
 
View user's profile Send private message
wHiTeHaT
Life Cycles Becoming CPU Cycles



Joined: Jul 18, 2004
Posts: 579

PostPosted: Mon Oct 21, 2013 4:26 pm Reply with quote

$now = now() <------you can format it
select * from the_forums_table where date is $now

or just............

https://www.phpbb.com/community/viewtopic.php?f=70&t=751885

[EDITED AGAIN]

sorry the link i showed you is for a phpbb3 however if scrll a little down you see a phpbb2 link of this mod.

But as i inspect the file , it seems it uses the search function.
So to be hornest, it isnt realy what you had in mind.

Sorry.... Embarassed
 
View user's profile Send private message Send e-mail
wHiTeHaT







PostPosted: Mon Oct 21, 2013 4:37 pm Reply with quote

Doulos wrote:
How would I add a today's posts link to the forums? Sometimes people exit out of the browser after looking at one new post by mistake and then have to look through all the forums to see which ones have a new post. I link to search for all posts made today would be nice.

Thanks,
Doulos


owww you actualy want THAT!!!!
 
Doulos







PostPosted: Tue Oct 22, 2013 12:34 am Reply with quote

Yes, I have seen this type of link on other types of forums
 
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Tue Oct 22, 2013 7:51 am Reply with quote

I remember looking for something like this back in 2007... [ Only registered users can see links on this board! Get registered or login! ]

If memory serves me correct it was possible in earlier versions of phpbb2 but support for it was removed in one of the subsequent patches; likely due to security concerns. When it did work, it had required a wildcard * for the author

name=Forums&file=search&search_author=*&search_time=5

I believe it's still possible to do such a search but it is limited to a specific author (or possibly forum)

If you are only trying to track public forums I'll make the same suggestion that was made to me; use a RSS Feed.
 
View user's profile Send private message Visit poster's website
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1122

PostPosted: Tue Oct 22, 2013 8:31 am Reply with quote

Code:
############################################################## 

## MOD Title: Posts in Last 24 Hours
## MOD Author: pgarvin76 < N/A > (Paul Garvin) N/A                                 
## MOD Description: Adds a new search feature to the index page that finds all posts in the last 24 hours
## MOD Version: 0.1.1
##
## Installation Level: easy
## Installation Time: 5 Minutes
## Files To Edit: search.php
##                includes/page_header.php
##                language/lang_english/lang_main.php
##                templates/subSilver/index_body.tpl
## Included Files: None
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
##
##     2006-04-25  - Version 0.1.1
##          - BETA release.
##          - Fixed redirect link
##          - Updated header to latest template
##
##     2005-11-20  - Version 0.1.0
##          - ALPHA release.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
search.php

#
#-----[ FIND ]------------------------------------------
#
#   NOTE - The complete line to find is:
# if ( $search_id == 'newposts' || $search_id == 'egosearch' || $search_id == 'unanswered' || $search_keywords != '' || $search_author != '' )
if ( $search_id == 'newposts' ||

#
#-----[ IN-LINE FIND ]----------------------------------
#
$search_id == 'unanswered' ||

#
#-----[ IN-LINE AFTER, ADD ]----------------------------
#
 $search_id == 'last24' ||

#
#-----[ FIND ]------------------------------------------
#
#   NOTE - The complete line to find is:
# if ( $search_id == 'newposts' || $search_id == 'egosearch' || ( $search_author != '' && $search_keywords == '' )  )
if ( $search_id == 'newposts' ||

#
#-----[ IN-LINE FIND ]----------------------------------
#
$search_id == 'egosearch' ||

#
#-----[ IN-LINE AFTER, ADD ]----------------------------
#
 $search_id == 'last24' ||

#
#-----[ FIND ]-----------------------------------------
#
else
{
   $search_author = str_replace('*', '%', trim($search_author));

#
#-----[ BEFORE, ADD ]-----------------------------------
#
         else if ( $search_id == 'last24' )
         {
            if ( $userdata['session_logged_in'] )
            {
               $sql = "SELECT post_id
                  FROM " . POSTS_TABLE . "
                  WHERE post_time >= " . ( time() - 86400 );
            }
            else
            {
               redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=last24", true));
            }

            $show_results = 'topics';
            $sort_by = 0;
            $sort_dir = 'DESC';
         }

#
#-----[ OPEN ]-----------------------------------------
#
modules/Forums/templates/subSilver/admin/page_header.tpl

#
#-----[ FIND ]-----------------------------------------
#
'L_SEARCH_NEW' => $lang['Search_new'],

#
#-----[ AFTER, ADD ]-----------------------------------
#
   'L_SEARCH_LAST24' => $lang['Search_last24'],

#
#-----[ FIND ]-----------------------------------------
#
'U_SEARCH_NEW' => append_sid('search.'.$phpEx.'?search_id=newposts'),

#
#-----[ AFTER, ADD ]-----------------------------------
#
   'U_SEARCH_LAST24' => append_sid('search.'.$phpEx.'?search_id=last24'),

#
#-----[ OPEN ]-----------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]-----------------------------------------
#
$lang['Search_unanswered'] = 'View unanswered posts';

#
#-----[ AFTER, ADD ]-----------------------------------
#
$lang['Search_last24'] = 'View posts in last 24 hours';

#
#-----[ OPEN ]-----------------------------------------
#
templates/subSilver/index_body.tpl

#
#-----[ FIND ]-----------------------------------------
#
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br />

#
#-----[ AFTER, ADD ]-----------------------------------
#
      <a href="{U_SEARCH_LAST24}" class="gensmall">{L_SEARCH_LAST24}</a><br />

#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©