Welcome, Guest. Please Login or Register.
May 10, 2025, 01:23:56 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  variable problem, need help « previous next »
Pages: [1] Reply Ignore Print
Author Topic: variable problem, need help  (Read 528 times)
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

variable problem, need help
« on: March 15, 2003, 10:57:42 PM »
Reply with quote

I'm writing on an email notification mod, which also sends the message, poster and postertime with the message.

on line 1107 in post.php I added $message, $posterName, $posterTime to the global variables

near line 1182 I added $message to the body. this one works. so the message is send in the email
BUT posterName and posterTime aren't sent.

I had no idea why it is not working. any help? thanks.
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:variable problem, need help
« Reply #1 on: March 15, 2003, 11:58:44 PM »
Reply with quote

use $name, $email instead
u gotta look in the function that calls NotifyUser() and see the variables used there
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:variable problem, need help
« Reply #2 on: March 16, 2003, 12:12:12 AM »
Reply with quote

thanks part 1 worked with $username, now this shows me the person who posted

now the variables there are
global $subject, $threadid, $txt, $cgi, $db_prefix, $realemail, $doLimitOne, $message, $username, $language, $chklngfile, $chklngfile2, $mbname;
   global $ID_MEMBER, $modSettings;


but I couldn't find any that would help me to find out the time when it was posted, so that I can send that also in the email.

and the board it was posted in would also be great.
which variables can help me?
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:variable problem, need help
« Reply #3 on: March 16, 2003, 12:18:00 AM »
Reply with quote

here are the vars inserted to the database, u can find the rest here:

INSERT INTO {$db_prefix}messages (ID_TOPIC, ID_MEMBER, subject, posterName, posterEmail, posterTime, posterIP, smiliesEnabled, body, icon, attachmentSize, attachmentFilename, nowListening)
VALUES ($threadid, $ID_MEMBER, '$subject', '$name', '$email', $time, '$REMOTE_ADDR', $se, '$message', '$icon', '$attachment_size', $tmpname, '$nowListening')")

Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:variable problem, need help
« Reply #4 on: March 16, 2003, 12:31:07 AM »
Reply with quote

thanks according to that $time should give me the result, but it doesn't.
I declared it also as a global variable and then used $time in the send_body, but it doesn't work...
any ideas? thanks.
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:variable problem, need help
« Reply #5 on: March 16, 2003, 12:41:06 AM »
Reply with quote

it should work if u do it right
u'll also need to format the time, cuz it's still in unix timestamp, u can use the timeformat() function
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:variable problem, need help
« Reply #6 on: March 16, 2003, 12:49:29 AM »
Reply with quote

I guess I'm not doing it right then....

function NotifyUsers ()
{
   global $subject, $threadid, $txt, $cgi, $db_prefix, $realemail, $doLimitOne, $posterName, $posterTime, $time, $message, $username, $language, $chklngfile, $chklngfile2, $mbname;
   global $ID_MEMBER, $modSettings;


that's what I the global variables are. I added $time and posterTime,

then a bit below in the $send_body = "$txt[128]\n
$message      
$username
$time



$message and $username are working, the data is submitted in the email, but $time is not.
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:variable problem, need help
« Reply #7 on: March 16, 2003, 01:06:37 AM »
Reply with quote

i think u'll also need to add $time in Post2() global line
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:variable problem, need help
« Reply #8 on: March 16, 2003, 01:09:31 AM »
Reply with quote

that made the difference! thanks.
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  variable problem, need help « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.107 seconds with 20 queries.