Page 1 of 1

popfetcher / Filter question

Posted: Mon Oct 24, 2005 3:26 pm
by sandro
Dear all

I not very happy with the implementation of the popfetcher plugin.
Well it does fetch mails and display it as blog, function as wanted, but i would like some more features to it.

I have seen this features in easymoblog and find them very good.

1.) Sender Email Adress filter, so i can specify who is allowed to send Emails to my blog and delete all other (spam, .....). Best would be you can configure more than one emailadress. (one from home, one from mobile phone, .....). So no one except this emailadresses is allowed to send a blog entry via mail.

2.) specify some special Character for delete text after this character.
Example: my mobilphone provider attaches some text to every mms i send to my Emailaddress. With a special Character i can specify that this is the end of my Message and i would like do delete everything after this Character (legal footers, adverts, ....).

This would be a very usefull implementation.
Are there someone who i can contact for this ??

Ciao from Austria.

Alessandro

Re: popfetcher / Filter question

Posted: Mon Oct 24, 2005 4:17 pm
by garvinhicking
Hm, I think the better way for your first request is to make E-Mail forwards for your domain/mailbox and still fetch a central mailbox.

You should not publically announce your email address you use to send the blogmails, then you won't need to deal with spam...

The second request sounds very useful to me. I just committed it in version 1.3 of the plugin. :)

Best regards,
Garvin

Posted: Fri Nov 04, 2005 8:34 pm
by PENorwood
One thing I'd like to see is a way to tell popfetcher which portion of the email is the extended body (without using attachments).

Posted: Fri Nov 04, 2005 9:03 pm
by garvinhicking
That would be fairly easy to code! I'll do that somewhen the next week and let you know.

The code is already there for stripping advertisments, that can be extended to not indicate advertisment, but extended entries as well.

Regards,
Garvin

Posted: Wed Nov 09, 2005 5:48 pm
by PENorwood
What is the code or special character we need to put at the end of a message to indicate that it is the end, and to tell s9y to delete the rest of the message that is received?

Posted: Wed Nov 09, 2005 6:03 pm
by garvinhicking
Sorry, I forgot about this posting. I've just committed the path that allows splitting the entry body/extended.

(In version 1.6 of the plugin)

You can enter the popfetcher config, and define a magic string like "xx-STRIP-xx" for splittext. Then if you have a mail like this:

Code: Select all

Hell! This is my body
xx-STRIP-xx
and this is the extended part
then the entry will be split up accordingly.

The same applies for the striptext advertisement option. First you enable the advertisement stripping, and then you enter another magic text like this:

Code: Select all

Hello! This is my own message
xx--ADVERTISEMENT--xx
Go to O2 Germany and be happy!
If you made "xx--ADVERTISEMENT--xx" your advetisement special magic string, your entry will only contain "Hello! This is my own message" and all the rest is stripped.

HTH,
Garvin

Posted: Wed Nov 09, 2005 6:10 pm
by PENorwood
Very cool!

Thanks so much ... I have tried just about all the different blogging software available and s9y is by FAR the best I have ever used!

NExt month I intend to send you a donation for your excellent work.

Posted: Wed Nov 09, 2005 6:13 pm
by garvinhicking
Oh, many thanks for that and your praise! CVS sadly lags about 24 hours, so it might take some time until version 1.6 of the plugin is available. Hope it works for you as I intended, if not, please report back! :)

Regards,
Garvin

Posted: Wed Nov 09, 2005 6:33 pm
by PENorwood
Hi,

I just tried the new revision and I get a few errors. WHen I put in a string "xxx-SPLIT-xxx" it doesn't seem to work at all. In fact no text appears in the entry at all, it strips it all out.

Here are my config setting ...

Use plaintext attachments as entry body? NO
First text attachment is entry body, the rest extended: NO
Define a string which separates body/extended parts: xxx-SPLIT-xxx
Strip text after special string: xxx-END-xxx

Posted: Wed Nov 09, 2005 6:43 pm
by garvinhicking
Can you show/tell me the exact mail you sent to try it with?

Regards,
Garvin

Posted: Wed Nov 09, 2005 6:45 pm
by PENorwood

Code: Select all

Haven't we heard enough fron Andrea Yates? You remember her? She is the fine citizen who drowned her five children in the bathtub, claiming post-partum depression.
xxx-SPLIT-xxx
I understand that post-partum depression is a real problem, and something I have seen people suffer from. However, none of those people drowned their children. Can you imagine the amount of energy and thought that must have been required in order to hold five struggling children in the bathtub? Drowning can take several minutes, so there must have been a massive struggle.

The only reason she is getting a retrial, it would seem, is because a psychiatrist for the Prosecution did not make his full opinion known on the stand, and colored it in a way that would benefit the state. I think this time the Prosecution needs to do a better job, but I still think that Mrs. Yates deserves to spend the rest of her natural life in prison.

Posted: Wed Nov 09, 2005 6:55 pm
by garvinhicking
I'm terribly sorry! In fact I committed a spelling mistake.

Can you please edit your popfetcher file at line 275 and replace "$entr['body']" with "$entry['body']" (note the extra "y"). Then it works here on my setup!

Best regards,
Garvin

Posted: Wed Nov 09, 2005 7:07 pm
by PENorwood
Beautiful!

It works now. I understand typos ... I have made many typos while programming and they are really easy to miss.

Thanks again!

Posted: Tue Nov 29, 2005 9:13 pm
by PENorwood
Hi Garvin,

If I was skilled at all with PHP I'd make this change myself but I am a dyed-in-the-wool ASP programmer and haven't yet learned much PHP (just enough to get into trouble, really).

Is it possible to add a feature to popfetcher to set the date? E.G. many times on some of the sites I run I don't run popfetcher everyday (they don't really need the CRON running since they update infrequently). If I could put in a special tag to tell popfetcher that such and such is the post date that would be great! e.g. [date]11/29/05[/date]. This way I can run popfetcher even a day late and the entry gets the correct date?

Thanks!

Posted: Wed Nov 30, 2005 1:29 pm
by garvinhicking
Actually the plugin already evaluates the Header "Date" from your E-Mails to set an entry date. Only if parsing the date of your mail fails (using strtotime() from PHP on your input) you would get the current timestamp in your mails.

So I would actually like to fix the date parsing. What does your "Date" Header of your Mail(s) look like?

Regards,
Garvin