slidedown

WordPress Email Notification Plugin Theme

Deutsche Version

(There is also an English version of this article)

Ich nutze das WordPress Email Notification Plugin von Brian Groce für diese Seite, damit auch Besucher, die kein RSS nutzen (wollen) auf dem Laufenden bleiben können.
Das Plugin versendet an alle angemeldeten Adressen eine Benachrichtigung wenn ein neuer Artikel gepostet wird.

Dummerweise hat Brian noch keine Zeit gehabt das ganz so zu bauen, dass die Meldungen im Theme-Layout eingebunden werden. Derzeit werden darum Fehler, Bestätigungen und Abmeldungen auf einer einfachen weißen Seite ausgegeben, der sogar wichtige tags fehlen.
Schön wäre natürlich wenn die Meldungen im Theme-Layout auftauchen würden. Anstatt dies geht ganz einfach indem man header, footer und sidebar des Themes in die indexdatei einbindet. Dazu ersetzt man in der Datei ./maillist/index.php:

 include ("wpemn_config.php"); 

durch den folgenden Code:

include ("wp-config.php");
include ("wp-content/themes/{euer-theme}/header.php");
include ("wpemn_config.php");

zusätzlich sollte man dann noch am Ende der Datei folgenden Code einfügen:

< ?php
include ("wp-content/themes/{euer-theme}/sidebar.php");
include ("wp-content/themes/{euer-theme}/footer.php"); ?>

Schon wird das Theme auch für die Meldungen des Email notifier Plugins genutzt. So braucht man nicht puren HTML-Code in diese Datei einfügen und diesen jedesmal händisch ändern, wenn sich etwas am header verändert.

Zu erwähnen bleibt, dass man noch {euer-theme} gegen den Foldernamen (wer hätte es gedacht) Eures Themes austauschen muss. Je nach Layout kann es auch sein, dass Ihr gar nicht die Sidebar einbauen wollt oder diese in den oberen Teil gehört, aber das bekommt Ihr dann sicher selber hin. Gegen Fragen hab ich aber auch nix. ;-)
Kennt jemand vielleicht die PHP Abfrage für den relativen Pfad zum aktuellen Theme? Dann könnte man das auch weich Coden und bei einem Themewechsel wäre alles gut ohne hier die Zeilen ändern zu müssen.

English Version

(deutsche Version dieses Artikels)

On this page I use the WordPress Email Notification Plugin by Brian Groce. It can be used to give users who do not have or do not want to use RSS the oportunity to stay informed. Fot that matter it sends information to all subscribers if a new article is posted on the blog via email.

The only bad thing about the Plugin is the fact, that Brian did not have the time to make it using the Frontend Theme of WordPress yet. Today all the output is viewed on a plain white page which even lags some important basic tags like head or body.
It would be comfortable if the Plugin would use the current Theme layout. But instead of just writing plain HTML into the ./maillist/index.php file you can also include the important files via php. To do that just exchange the line:

 include ("wpemn_config.php"); 

with the following code:

include ("wp-config.php");
include ("wp-content/themes/{your-theme}/header.php");
include ("wpemn_config.php");

At the end of the file just include this:

< ?php
include ("wp-content/themes/{your-theme}/sidebar.php");
include ("wp-content/themes/{your-theme}/footer.php"); ?>

Know you just have to change {your-theme} to the folder name of (surprise!) the theme you use. Maybe you want to kick the sidebar here or you want it to be above the plugin, but that is something you can do from here i guess.
If not: I am happy to answer questions ;-) .

Last but not least: Does somebody know how to use the relative path to the current Theme in worpress via PHP? If one would use that, a theme change would not break the design! In the moment you have to change this code if you use a different theme after some time. And theme switcher can not be used at all…

7 Kommentare to “WordPress Email Notification Plugin Theme”

  1. Olaf sagt:

    “Kennt jemand vielleicht die PHP Abfrage für den relativen Pfad zum aktuellen Theme?”

    Wenns weiter nix iss:
    bloginfo(‘template_url’)
    bloginfo(‘template_directory’)

  2. Are you still working on this plugin?
    I get this error when I activate it :(
    I am running WordPress 1.5.1.2
    What am I doing wrong?
    Help me please!

  3. Actually I did not develop the plugin in the first place! The developer’s homepage might be a good source. There is also a help section which could link you to some more information.

    Anyway, I can try to help you, if you give me some more information about the error. ;-)

  4. Tobi sagt:

    Hi,

    danke für die Anpassungen. Wie binde ich die von Olaf genannten realtiven Pfade korrekt ein? Könntest Du das evtl. direkt in Deinem POst oben ändern?

    Vielen Dank schon mal

    Tobi

  5. Tobi sagt:

    Oh, ich habe noch eine Frage:

    Im Installationsskript steht

    7. Put form code in template…

    Enter your e-mail address to receive notifications when there are new posts

    Wo packe ich den Code hin?

    Vielen Dank im Voraus

    Tobi

  6. Tony sagt:

    What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?
    Thanks.

  7. paul sagt:

    hallo,
    ich nutze das PlugIn ebenfalls. Nun wollte ich die Bestätigungen über die Eintragungen und die unsubscribemeldungen an mein Theme anpassen.

    Ich habe die obigen Schritte durchgeführt. Aber ich erhalte permanent synthax-Fehler.

    Nutze das Kubrick-Theme.

    Kann mir da einer helfen?

Hinterlasse einen Kommentar