vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Post date in Email to moderator (https://vborg.vbsupport.ru/showthread.php?t=32828)

tkeil69575 11-30-2001 02:39 PM

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

Admin 11-30-2001 03:49 PM

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.

tkeil69575 11-30-2001 04:56 PM

Hallo Chen,
great! thats works perfect.

thanks a million for your help.

greetings
tina :)

tkeil69575 11-30-2001 08:07 PM

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

Admin 12-01-2001 04:30 AM

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.

tkeil69575 12-01-2001 08:39 AM

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


All times are GMT. The time now is 07:13 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.01789 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete