vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Have Newsletters Posted To Your VB (https://vborg.vbsupport.ru/showthread.php?t=53142)

kreftt 05-19-2003 10:00 PM

Have Newsletters Posted To Your VB
 
TESTED ON 2.2.9, SHOULD WORK ON ANY 2.X BOARD

What does it do?

Say you have a newsletter from some site like sitepoint, that you receive and want to make available to your members.
so usually you would check your mailbox, read the mail, do a copy'n'paste and post the newsletter in your forum.
if there is more than one or the one comes quite often the work sums up.

now you can have this hack run by a cronjob or run it manual and have your new newsletters from any pop3-box automatically posted into your board.

detailed features:
  • no vb file edits at all, just one file to upload and adapt to your needs
  • check any pop3-mailbox for a newsletter
  • define as which user thenewsletter should be posted
  • define in which forum that user should post
  • basic spam check (checks sender name for a string you define)
  • url-parsing
  • cut off unneeded parts in header and footer that are always the same by strings you define
    DO NOT BREAK ANY COPYRIGHTS WITH THAT
  • posted newsletters get deleted after posting from the mailbox, other mails stay intact
  • with little adaptation to vb3's database scheme it will be vb3-compatible

instructions:
  • preparation: subscribe to a newsletter ;)
    i personally would use a dedicated email-account just for the newsletter/-s to prevent spam
  • download the attachment, which contains a single php-file
  • rename the file to whatever you like, like newsletterxyz.php
  • edit the file and adapt it to your needs, like mailbox-variables and the username as who the newsletter should be posted
  • Check if you have scott macvicars last post on forumhome hack installed as you have to edit another line in the file then (line 193)
  • close and upload to [FORUMROOT]
  • either run it manually once in a while in browser or setup a cronjob if your host supports this

    THATS IT
  • for uninstallation: delete the file off your server

you have to use a new copy of the hack for every newsletter you subscribe to

screenshot wont be provided as you would only see some user having posted some thread, nothing exciting

the hack has run for about a month on my board and has posted about 500 threads so far, without a problem

as i have rearranged the variables so that you can change all variables in the header and dont need to scroll through the whole file, i might have made a mistake in this process.
thats why its in beta for now.

please try it, feel free to comment and ask for support, and please click "install" if you decide to use it

finally: i will not be held responsible for any harm you do to your board by using this hack

EDIT: 27.05.03 trouble with cron when running from admin-dir, updated to have it reside in forumroot

alesis404 06-12-2003 10:15 AM

When a person visits the php page after install should it appear white? I edited everything with my proper info but get a white page

Thanks

alesis404 06-12-2003 10:25 AM

Also if you don't mind, what exactly does this mean

//next setting is to avoid spam
//only emails with the following string included in the sender is parsed
$allowedsender="vbulletin-announcement";

so for $allowsender="what exactly goes here"

Do I have to include the email address? or does the topic always have to be the same for it to work? Thanks for any explanation

kreftt 06-12-2003 02:12 PM

hiya,

yes it should appear white. if you run it via cronjob it wont be seen by anyone anyway, and if you run it yourself, its just white.
if you think you need a link back to your forum-mainpage, telle me and ill post what to edit in the file.

second issue:
you include a part or the whole email-address of the sender to make sure only the emails that you want to be posted are posted.
so if your sender is listserv@jelsoft.com and you put $allowsender="listserv@jelsoft.com", then email from any other email will be ignored. if you put $allowsender="jelsoft.com", then any email from jelsoft would be parsed...
hope that clears it.

greets

kreftt

alesis404 06-12-2003 06:32 PM

Thank you very much for the quick reply kreftt ,testing now and hope to be able to add this ;)

alesis404 06-12-2003 07:00 PM

kreftt, I have followed the directions and still no results and not sure if any factors that might stop this from working

*At first I thought it might be the username and the "case" so I made a lowercase username and have done this
====================================
//these are to determine which "user" shall post
//the newsletter in which forum
$forumid="5";
$postusername="skybot";
$userid="8";


//pop3-settings
$mailserver="mail.mydomain.net";
$mailport="110";
$mailuser="skybot";
$mailpass="******";

//next setting is to avoid spam
//only emails with the following string included in the sender is parsed
$allowedsender="mydomain.net";

===============================

*Note have replaced *real* domain with "mydomain.net" for posting here ;) as well i am using the correct password for the mail account

**I am not running this via cron but I visit the page manually and reload a few times and get no results, have sent 5 mails to skybot@mydomain.net and I know they are getting there but the emails don't seem to get posted to the forum as they should, any factors you could think that might influence this not happening?

Thanks again for your time

alesis404 06-12-2003 07:12 PM

For instance could group permissions stop this from working? I am sorta confused why this member would need no password to access and post and am thinking maybe because my forums require you to login to post?

kreftt 06-13-2003 03:34 PM

remember that you have to put the email of the SENDER and not the RECIPIENT into that variable, so if you have sent the emails from an account different than *@mydomain.net it cannot work.

alesis404 06-13-2003 10:02 PM

Thank you kreft I will wait for the next mail from them monday to test

gmarik 06-24-2003 05:32 PM

Sounds great, will install it later ... we'll see.

StepFenz 06-24-2003 08:07 PM

I followed the instructions, but I keep on getting this error message:

Warning: main(./config.php) [function.main]: failed to create stream: No such file or directory in /www/htdocs/headpres/forum/admin/global.php on line 96

I'm not sure that I've entered the right mailport, but I don't think this is the problem, right?
I've put the file in my /forum directory.

Hope anyone can help, because this hack was about the first thing to come into my mind as a great idea.

kreftt 06-25-2003 03:44 AM

what did you put after the line:

//variables

could you please post that here?

StepFenz 06-25-2003 04:43 AM

Hi kreftt, I've already tried and changed the first line into require("forum/admin/global.php");, but that didn't help. I got more evil messages :classic:
I have also installed VBHome, so my forum is in a different, i.e. forumdirectory.

This is what I have now:

require("forum/admin/global.php");

//these are to determine which "user" shall post
//the newsletter in which forum
$forumid="23";
$postusername="PersberichtenBot";
$userid="259";

//pop3-settings
$mailserver="mail.xxxx.nl";
$mailport="110";
$mailuser="xxxxxxx";
$mailpass="xxxxxxx";

//next setting is to avoid spam
//only emails with the following string included in the sender is parsed
$allowedsender="vbulletin-announcement";

kreftt 06-25-2003 02:52 PM

as you have put the php-file into your forum-directory, you should have

require("admin/global.php");

does that work?

StepFenz 06-25-2003 04:18 PM

No kreftt, that causes the error message I mentioned. So I changed the require-line. But then I've got 3 error messages.
What's the mailport number, by the way? Where can I find that?

Do you have an example of a newsparserscript running on a site? So I can see some output to understand (a bit) what the script is doing.

kreftt 06-26-2003 04:12 AM

sorry my board isnt public so i couldnt show you.
is your php-file in /www/htdocs/headpres/forum ? the mailport would be 110, which is standard for pop3...

Ronin Six 07-10-2003 02:53 PM

Hi Kreftt,

I'm getting the same errors as StepFenz. Below is part of the php file residing in the forum root:

//variables
require("admin/global.php");

//these are to determine which "user" shall post
//the newsletter in which forum
$forumid="55"; //Test Forum
$postusername="HAL9000";
$userid="540";


//pop3-settings
$mailserver="https://sub.domain.net/v-webmail/";
$mailport="110";
$mailuser="me@domain.com";
$mailpass="xxxxxx";



Another question: if html isn't allowed in a particular forum, I assume that html emails won't get parsed correctly, right? And for html emails to get parsed correctly, I'd have to allow html in the posts? Just wanna be certain.

kreftt 07-11-2003 04:02 AM

hmm, ive never seen a mailserver starting with https://, are you sure that is right?

i only guess now, but i think the post gets parsed and checked for html before it gets entered into the database. so if a hack enters the post by a query directly into the db without using newpost.php it SHOULD work. just try it, if it doesnt work, we'll find a workaround...

greetz

kreftt

Ronin Six 07-11-2003 10:23 PM

Still getting the same errors. Any ideas why? Perhaps another hack interfering? Here's my new settings:

//variables
require("admin/global.php");

//these are to determine which "user" shall post
//the newsletter in which forum
$forumid="55"; //Test Forum
$postusername="HAL9000";
$userid="540";


//pop3-settings
$mailserver="pop.isp.domain.com";
$mailport="110";
$mailuser="me@isp.com";
$mailpass="xxxxxxxxx";

Also, exactly what is that error message telling me? That it can't find global.php or config.php?

Thanks so much for any help you can give. :)

twollert 12-28-2003 03:10 PM

Quote:

Originally Posted by alesis404
kreftt, I have followed the directions and still no results and not sure if any factors that might stop this from working

I am not running this via cron but I visit the page manually and reload a few times and get no results, have sent 5 mails to skybot@mydomain.net and I know they are getting there but the emails don't seem to get posted to the forum as they should, any factors you could think that might influence this not happening?

Thanks again for your time

The same problem here...

gmarik 12-28-2003 03:53 PM

great, how is 2.3.2?

X-Caliber 01-11-2004 03:41 PM

Seems that this hack has a problem with database access.

Warning: main(./config.php) [function.main]: failed to create stream: No such file or directory in /www/htdocs/headpres/forum/admin/global.php on line 96

Can anyone help out on this.

gopherhockey 03-10-2004 06:54 PM

Anyone working on something like this for vb3?

kreftt 04-18-2004 06:29 PM

im running this on vb3 with over 3000 posts by this hack so far.
but apparently it doesnt work for others.
if you want to try it, email me.

greetz


All times are GMT. The time now is 11:48 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.01387 seconds
  • Memory Usage 1,788KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (24)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