Not logged in. · Lost password · Registration disabled
Forum: Overview Questions / Fragen RSS
Creating mod for multi-blog subscribe and unsubscribe
jeffsherk #1
Member since Nov 2007 · 37 posts
Group memberships: Mitglieder
Show profile · Link to this post
Subject: Creating mod for multi-blog subscribe and unsubscribe
I really like the plugin, but I am going to make some modifications to it, so that I can have people signup for multiple-blogs (multiple WP installs) from a single page (I have 5 seperate blogs). I need to ask a few questions about the database functionality:

#1 - wp_post_notification_emails TABLE
It appears that new unconfirmed emails have gets_mail = NULL,
and that confirmed emails have gets_mail = 1,
and that deactivated emails get deleted, and also there associated entry in the wp_post_notification_cats table also gets deleted.
Is this correct?

#2 - wp_post_notification_cats TABLE
The id field appears to match the id field in the wp_post_notification_emails. Is that correct?
Is the cat_id field assigned a number from the term_id field in the wp_terms table?
If cat_id is zero(0), does that mean ALL categories?
How would the entry look if the person wanted to subscribe to say Category 3, Category 7 and Category 10?

#3 - wp_post_notification_posts TABLE
What values are valid in the notification_sent field and what do they mean? I notice it is mostly -1 one, but sometimes there is a -2.

#4 - Settings in admin panel
I'm not sure I understand what these settings do... can you explain the difference between Send Normal Posts, Send Private Posts, and Send Pages.


Thanks
Morty (Administrator) #2
User title: Author
Member since Jun 2007 · 928 posts
Group memberships: Administratoren, Mitglieder
Show profile · Link to this post
Quote by jeffsherk:
#1 - wp_post_notification_emails TABLE
It appears that new unconfirmed emails have gets_mail = NULL,
and that confirmed emails have gets_mail = 1,
and that deactivated emails get deleted, and also there associated entry in the wp_post_notification_cats table also gets deleted.
Is this correct?

Yes. Unconfirmed mails are != 1, though. They kind of happen to be NULL. But this is mainly historically, and has no particular reason. I can therefore change that if it helps.

Quote by jeffsherk:
#2 - wp_post_notification_cats TABLE
The id field appears to match the id field in the wp_post_notification_emails. Is that correct?
Is the cat_id field assigned a number from the term_id field in the wp_terms table?
If cat_id is zero(0), does that mean ALL categories?
How would the entry look if the person wanted to subscribe to say Category 3, Category 7 and Category 10?

0 is all Cats. The Cat is the actual Cat-ID.  At the moment the cat_id->term_id->post Mapping is done when sending mails. This will probably change in the future. Then the cat_id->term_id Mapping will be done right away and term_id->post Mapping will be done when sending Mails. This will enable to also subscribe to tags. codex.wordpress.org has some documentation on the term_taxonomy table by now. (When I wrote the code there was only very little on this topic.)

Quote by jeffsherk:
#3 - wp_post_notification_posts TABLE
What values are valid in the notification_sent field and what do they mean? I notice it is mostly -1 one, but sometimes there is a -2.

-1 is sent.
-2 is do not send. (Probably hasn't been sent)

Quote by jeffsherk:
#4 - Settings in admin panel
I'm not sure I understand what these settings do... can you explain the difference between Send Normal Posts, Send Private Posts, and Send Pages.

You can create normal Posts, Private posts (not viewable to Public) and Pages. Although Posts and Pages have different interfaces, from the Database point of view they are almost the same.
jeffsherk #3
Member since Nov 2007 · 37 posts
Group memberships: Mitglieder
Show profile · Link to this post
Okay, thanks... but this still confuses me:

In the wp_post_notification_cats TABLE (in the cat_id field), how would the entry look if the person wanted to subscribe to say three seperate categories: Category 3 (term_id=3), Category 7 (term_id=7)and Category 10 (term_id=10)?

Thanks again
Morty (Administrator) #4
User title: Author
Member since Jun 2007 · 928 posts
Group memberships: Administratoren, Mitglieder
Show profile · Link to this post
He would have three entries.
id, cat_id
mailid, 3
mailid,7
mailid,10
Hope that is what you wanted to hear.....
jeffsherk #5
Member since Nov 2007 · 37 posts
Group memberships: Mitglieder
Show profile · Link to this post
Yes, that's it... thanks!!

I'll post my mods when I get them done for others that might be interested!
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum