Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2005, 06:41 PM
trevelyn1015 trevelyn1015 is offline
 
Join Date: Dec 2004
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default search.php - help needed - "getdaily"

PHP Code:
// #############################################################################
if ($_REQUEST['do'] == 'getnew' OR $_REQUEST['do'] == 'getdaily'

     
globalize($_REQUEST, array( 
          
'forumid' => INT
          
'days' => INT
          
'hours' => INT
          
'minutes' => INT,
          
'seconds' => INT
          
'exclude' => STR 
     
)); 
 
     
// get date: 
     
if ($_REQUEST['do'] == 'getnew' AND $bbuserinfo['lastvisit'] != 0
     { 
          
// if action = getnew and last visit date is set 
          
$datecut $bbuserinfo['lastvisit']; 
     } 
     else 
     { 
          
$_REQUEST['do'] = 'getdaily'
          if (
$days 1
          { 
               
$days 1
          } 
 
          if (!
$hours
          { 
               
$hours 24
          } 
 
          if (!
$minutes
          { 
               
$minutes 60
          } 
          
          if (!
$seconds
          { 
               
$seconds 60;
           }
          
$datecut TIMENOW - ($hours $minutes $seconds $days); 
     } 
why doesn't that work for getting daily posts by minutes?

hours and days work? but not minutes... why not?

for:

search.php?do=getdaily&minutes=15

search.php?do=getdaily&hours=1

search.php?do=getdaily&days=1

days work, hours, work, but minutes don't...

any help

15 minutes is pulling up last 6 hours
30 minutes is pulling up last 9 hours
45 minutes is pulling up last 18 hours
Reply With Quote
  #2  
Old 01-05-2005, 06:44 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trevelyn1015
PHP Code:
// #############################################################################
if ($_REQUEST['do'] == 'getnew' OR $_REQUEST['do'] == 'getdaily'

     
globalize($_REQUEST, array( 
          
'forumid' => INT
          
'days' => INT
          
'hours' => INT
          
'minutes' => INT,
          
'seconds' => INT
          
'exclude' => STR 
     
)); 
 
     
// get date: 
     
if ($_REQUEST['do'] == 'getnew' AND $bbuserinfo['lastvisit'] != 0
     { 
          
// if action = getnew and last visit date is set 
          
$datecut $bbuserinfo['lastvisit']; 
     } 
     else 
     { 
          
$_REQUEST['do'] = 'getdaily'
          if (
$days 1
          { 
               
$days 1
          } 
 
          if (!
$hours
          { 
               
$hours 24
          } 
 
          if (!
$minutes
          { 
               
$minutes 60
          } 
          
          if (!
$seconds
          { 
               
$seconds 60;
           }
          
$datecut TIMENOW - ($hours $minutes $seconds $days); 
     } 
why doesn't that work for getting daily posts by minutes?

hours and days work? but not minutes... why not?

for:

search.php?do=getdaily&minutes=15

search.php?do=getdaily&hours=1

search.php?do=getdaily&days=1

days work, hours, work, but minutes don't...

any help
where are you defining thoughs varibles ?
Reply With Quote
  #3  
Old 01-05-2005, 06:48 PM
trevelyn1015 trevelyn1015 is offline
 
Join Date: Dec 2004
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in the url...

with code's that look like this (ignore the "month" one)
Attached Images
File Type: jpg code.JPG (129.4 KB, 0 views)
Reply With Quote
  #4  
Old 01-05-2005, 07:59 PM
trevelyn1015 trevelyn1015 is offline
 
Join Date: Dec 2004
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well?
Reply With Quote
  #5  
Old 01-05-2005, 08:03 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trevelyn1015
well?
What code where?
Reply With Quote
  #6  
Old 01-05-2005, 08:09 PM
trevelyn1015 trevelyn1015 is offline
 
Join Date: Dec 2004
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the attached thumbnail image... showing how i edited the navbar template for the links...

there is more editing done than that, of course... i just took a screenshot of the links
Reply With Quote
  #7  
Old 01-05-2005, 08:11 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trevelyn1015
the attached thumbnail image... showing how i edited the navbar template for the links...

there is more editing done than that, of course... i just took a screenshot of the links
Where are you defining thoughs varibles in THE PHP
Reply With Quote
  #8  
Old 01-05-2005, 08:23 PM
trevelyn1015 trevelyn1015 is offline
 
Join Date: Dec 2004
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i don't understand what you are saying...

do you have aol instant messenger?
Reply With Quote
  #9  
Old 01-05-2005, 08:48 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the $days variable isn't defined either, so i don't think it needs to be deined i think the issue is the the TIMENOW() fucntion, he's gotta work out which is for which.
Reply With Quote
  #10  
Old 01-05-2005, 11:20 PM
trevelyn1015 trevelyn1015 is offline
 
Join Date: Dec 2004
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah... anyone know what to do here?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:48 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03902 seconds
  • Memory Usage 2,299KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete