Nicht angemeldet. · Kennwort vergessen · Registrierung deaktiviert
Forum: Übersicht Questions / Fragen RSS
Creating mod for multi-blog subscribe and unsubscribe
jeffsherk #1
Mitglied seit 11/2007 · 37 Beiträge
Gruppenmitgliedschaften: Mitglieder
Profil anzeigen · Link auf diesen Beitrag
Betreff: 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
Benutzertitel: Author
Mitglied seit 06/2007 · 928 Beiträge
Gruppenmitgliedschaften: Administratoren, Mitglieder
Profil anzeigen · Link auf diesen Beitrag
Zitat von 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.

Zitat von 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.)

Zitat von 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)

Zitat von 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
Mitglied seit 11/2007 · 37 Beiträge
Gruppenmitgliedschaften: Mitglieder
Profil anzeigen · Link auf diesen Beitrag
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
Benutzertitel: Author
Mitglied seit 06/2007 · 928 Beiträge
Gruppenmitgliedschaften: Administratoren, Mitglieder
Profil anzeigen · Link auf diesen Beitrag
He would have three entries.
id, cat_id
mailid, 3
mailid,7
mailid,10
Hope that is what you wanted to hear.....
jeffsherk #5
Mitglied seit 11/2007 · 37 Beiträge
Gruppenmitgliedschaften: Mitglieder
Profil anzeigen · Link auf diesen Beitrag
Yes, that's it... thanks!!

I'll post my mods when I get them done for others that might be interested!
Schließen Kleiner – Größer + Auf diesen Beitrag antworten:
Prüfcode: VeriCode Gib bitte das Wort aus dem Bild ins folgende Textfeld ein. (Nur die Buchstaben eingeben, Kleinschreibung ist in Ordnung.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Weitere Zeichen:
Gehe zu Forum