Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-30-2001, 02:39 PM
tkeil69575 tkeil69575 is offline
 
Join Date: Nov 2001
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi
Id like the date and time of a new posting to be displayed in the email thats sent to the admin or moderator when a new posting is made.

What Variables to I need to use?

regards
Tina
Reply With Quote
  #2  
Old 11-30-2001, 03:49 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, in both newthread.php and newreply.php, find this code:
Code:
      // send email to moderators
      if ($enableemail) {
and right below it, add this:
Code:
        $emailposttime=vbdate($timeformat,time());
        $emailpostdate=vbdate($dateformat,time());
Now you can use $emailposttime (to show the time) and $emailpostdate (to show the date) in the email_moderator template.
Reply With Quote
  #3  
Old 11-30-2001, 04:56 PM
tkeil69575 tkeil69575 is offline
 
Join Date: Nov 2001
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hallo Chen,
great! thats works perfect.

thanks a million for your help.

greetings
tina
Reply With Quote
  #4  
Old 11-30-2001, 08:07 PM
tkeil69575 tkeil69575 is offline
 
Join Date: Nov 2001
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Chen,

me again I thought I'd try and figure this one out for myself, but I'm not getting anywhere. I'd like to have the variable time and date also for the notify_email template and I figured out that I must make changes to the functions.php ? right?

But I'm not sure what and where to include it?
Maybe you could help me again?

regards
Tina
Reply With Quote
  #5  
Old 12-01-2001, 04:30 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure.

In functions.php, find this:
Code:
  if (!$enableemail) {
    return;
  }
and right below it add this:
Code:
  $emailposttime=vbdate($timeformat,time());
  $emailpostdate=vbdate($dateformat,time());
Now you can use $emailposttime (to show the time) and $emailpostdate (to show the date) in the email_notify template.
Reply With Quote
  #6  
Old 12-01-2001, 08:39 AM
tkeil69575 tkeil69575 is offline
 
Join Date: Nov 2001
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Chen,
Yes, I tried that already and unfortunately it didn't work. Here's how my code looks:

PHP Code:
// ############## Send out email notification ############
function sendnotification ($threadid$userid$postid) {
  
// $threadid = threadid to send from;
  // $userid = userid of who made the post
  // $postid = only sent if post is moderated -- 
                      
used to get username correctly

  
global $DB_site$enableemail$message$bbtitle,
 
$webmasteremail$bburl$postusername$bbuserinfo;

  if (!
$enableemail) {
      return;
  }
  
$emailposttime=vbdate($timeformat,time());
  
$emailpostdate=vbdate($dateformat,time());
  
$threadinfo getthreadinfo($threadid);
  
$foruminfo getforuminfo($threadinfo[forumid]); 
I'm getting the email, but no date an time is show in it. Any ideas?

greetings Tina
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 10:46 AM.


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.04406 seconds
  • Memory Usage 2,218KB
  • Queries Executed 13 (?)
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
  • (4)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete