vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Email posts into forum (https://vborg.vbsupport.ru/showthread.php?t=40595)

Crazy Pete 05-22-2003 04:01 PM

Does the subject send too, dodgy? If so, what did you change your query to? What amp2000 had?

dodgy 05-22-2003 11:16 PM

Nope.. subject field is still empty. trying to figure it out but I'm running out of ideas:(

Crazy Pete 05-25-2003 06:08 AM

Ok it works for me now, I just have two little quirks.

First, how do I get the subject to automatically include the required info to reply? Like the [threadidxxxx] thing as on here?

Secondly, it appears that in the email, the password is open for viewing. Whereas on here it says something like [thread-53352-], on mine it says [thread-53352-xxxx] where xxxx is the e-mail password. Shouldn't that not be showing up?

Crazy Pete 05-25-2003 06:18 AM

Ah nevermind. I figured out the first part by editing the email_notify subject template. Also I think the second question is because I'm the admin, so it should show up for me but not for regular members. I'll have to try it with my regular member test account and see.

This is pretty cool though!

dodgy 05-26-2003 04:00 AM

my e-mail notify subject field still appears empty. tho postemail_emailerror and all other e-mails by forum subject fields are ok.

emailsubject_notify is also ok. has Reply to post $threadinfo[title] in it.

I guess I've f$%#ed something up in code.

dodgy 05-30-2003 01:28 AM

I've done some minor changes in procpost.php so that you can post messages from any e-mail account by using user name and password in subject line like this:

[thread-123-user-password]

reason for that is to be able to send posts from mobile phones, airplanes etc.

not sure about security holes yet

PHP Code:

  /* Get needed data from headers */
    
if (preg_match('#\[post-([0-9]+)-([a-z0-9]+)-([a-z0-9]+)\]#i'$headers['subject'], $subjectparts)) {
        
$postid intval($subjectparts[1]);
    } else {
        
preg_match('#\[thread-([0-9]+)-([a-z0-9]+)-([a-z0-9]+)\]#i'$headers['subject'], $subjectparts);
        
$threadid intval($subjectparts[1]);
    }
    
preg_match('#([-.a-z0-9_]+@[-.a-z0-9_)]*)#i'$headers['from'], $emailparts);

    
/* Move data to new variables */
    
$email $emailparts[1];
  
$emailuser $subjectparts[2];
    
$emailcode $subjectparts[3];
    
$title str_replace('[thread-'.$threadid.'-'.$emailuser.'-'.$emailcode.']'''str_replace('[post-'.$postid.'-'.$emailuser.'-'.$emailcode.']'''$headers['subject']));
    
$message trim(str_replace('[thread-'.$threadid.'-'.$emailuser.'-'.$emailcode.']'''str_replace('[post-'.$postid.'-'.$emailuser.'-'.$emailcode.']'''$d_message['text'][0])));

    
/* Get the user info by the email */
    
$bbuserinfo $DB_site->query_first("
        SELECT user.*, userfield.field'.
$_config['fieldid'].'
        FROM user
        LEFT JOIN userfield USING (userid)
        WHERE username = '
$emailuser'
    "
);

    
/* And make sure it's not a phoney */
    
if (!$bbuserinfo) {
        
mailerror('Invalid user: user name does not exist.');
        continue;
    } elseif (empty(
$bbuserinfo['field'.$_config['fieldid']])) {
        
mailerror('No email password: you did not specify an email password in your profile, and cannot post through email.');
        continue;
    } elseif (
$bbuserinfo['field'.$_config['fieldid']] != $emailcode) {
        
mailerror('Invalid email password: the email password you specifed does not match the one in the database.');
        continue;
    } 

obviously you will have to edit templates and insert $emailuser where ever it needs to. ($emailuser is user name)

iggy123 06-05-2003 09:32 PM

if someone figures out how to work this in 2.3 can you let me know, I can't see any of the code that requires changing in the showthread.php or some of the code from the funcitons.php

dodgy 06-05-2003 11:45 PM

Quote:

Yesterday at 11:32 PM iggy123 said this in Post #87
if someone figures out how to work this in 2.3 can you let me know, I can't see any of the code that requires changing in the showthread.php or some of the code from the funcitons.php

last few pages are about this issue.

anywhereanytime 07-06-2003 02:23 AM

We need this BADLY but want to move to vB3, I am crossing my fingers that it will work ... soon ???

If not we are on VB 2.3 ... was that fixed ??

john_rsd 08-05-2003 10:05 PM

I hope that when this board is updated to vb3 that the hack will also be kindly updated.

Would really like to see this working with vb3


All times are GMT. The time now is 08:05 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.01318 seconds
  • Memory Usage 1,757KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete