Artikel-Schlagworte: „Wordpress“

Page 2 of 3123

Give feedback on errors with the WordPress Settings API

After working with the WordPress Settings API I first found no easy way out to give feedback on errors.

As a lot of you I was reading the tutorials from David Gwyer, Ozh, BobGneu and Otto, but none of them gave proper information on how to pass the error messages to the user when theie values fail the validation test.

BUT…. I found a somehow quick but practicable way to bypass the lack of user validation information.

Take the sanitize function you call from register_setting which is responsible to check the values:


<?php

function myplugin_options_validate($input) {

// use  $input['error'] and $input['message'] for error messages

$input['error'] = false;

$input['message'] = '';

# do some regex validation

if (1=!1) { // yes we have an error

$input['error'] = true;

$input['message'] = 'you have got an error: 1!=1';

}

return $input;

}

?>

Now go to the function which creates the settings form (most called via add_options_page) and check with $_GET['settings-updated'].


<?php

function myplugin_options_page() {

if ($_GET['settings-updated'])  { // yes, settings have been changed

if ($_GET['settings-updated'] && $options['error']) {
print '<div>'.$options['message'].'</div>';
}

}

?>

That’s it.

WordPress plugin: 404-to-start send every page not found error to start page

WordPress 3.1 ok

“404-to-start” plugin will send every 404 page not found error directly to start page or any other custom page/site you like to overcome problems with search engines.

This will help you solve problems with external bad links which are not under your influence.

Chose between 301 – Moved permanently (default) and 302 – Moved temporarily.

Changelog

1.3 (03.03.2011)

  • Set custom target Url (any page or site you like)

1.2 (24.02.2011)

  • tested with WordPress 3.1

1.1 (10.02.2010)

  • new settings menu
  • chose between 301 and 302 redirect
  • tested with WordPress 3.0.5
  • 1.0 (02.01.2010)

  • first Version
  • Download from WordPress repository.

    WordPress Plugin: Geotagmapper, customize Geo information inside Header automatically

    WordPress 3.1.3 ok

    Geotagmapper will add geographical identification meta data to the header of your webpage. The data (latitude and longitude) will automatically be retrieved by Google maps. You only have to specify your address.

    It is really easy to handle and self-explanatory.

    Download from WordPress repository.

    Changelog

    1.5.1 (28.05.2011)

    • Test wird WordPress 3.1.3 -> ok
    • Bugfix: “Fatal error: Cannot redeclare my_plugin_options()

    1.5 (25.02.2011)

    • test with WordPress 3.1 -> ok
    • translations

    1.4 (03.07.2010)

    • now multilanguage
    • added German

    1.3 (18.06.2010)

    • tested with WordPress 3.0 ok
    • Switched from XML to JSON data import

    1.2 (16.06.2010)

    • ability to insert geodata in frontpage, pages or posts only
    • creating function to place data manually into templates

    WordPress: Create unique content with Old Post Spinner

    WordPress 3.2 ok!

    NOW WITH ABILITY TO CREATE UNIQUE CONTENT

    Create a complete unique new post on a random old one and promote it to the top of your blog.

    It is really easy to handle and self-explanatory.

    Compared to other plugins which do pretty much the same my plugin uses the build in functionality of WordPress’ own “cronjob”. This makes the whole part much more stable and (what is even more important) bypasses workload away from the server.

    Every promotion is registered in a log file.

    Download

    Download directly from WordPress.org repository.

    FAQ

    Is there anything I should be aware of? Any limitations?

    Yes! This plugin should no be used with permalink structures that include dates.

    Please explain me the settings’ values

    Old Post Spinner (OPS) checks if a certain amount of time has passed. If so it promotes (or duplicates, depending on the settings) a random post to any position you like.

    E.G. take this values:

    • Minimum interval between old post promotions: 2000 minutes
    • Random maximum interval (added to minimum interval): 500 minutes

    Now OPS will every 200 0+ X minutes (where X lies somewhere random between 0 and 500) pick up one old post and promote (or duplicate) it to the defined position.

    OPS will take into account which posting categories you never want to promote

    You can also specify an minimum age for a post to be considered.

    What will happen? Let’s take 10 posts ordered by age with No. 1 the as the youngest one. OPS picks the, let’s say, sixth post and give it the current date to promote it to position number one.

    If you want a post to be promoted to position 3 OPS will place it, regarding the date, exactly in the middle between number 2 and (the old) number 3, which now will drop to position 4.

    What is the difference between duplicating and promoting?

    Promoting will move the post to a new position, whereas duplicating will copy a post to the new position, so the latter generates a new post.

    What are the best practice values?

    They are installed as default values. Minimum interval: 2000 minutes, Random interval: 500 minutes, Post age: 14 days. But maybe you should experiment with your own values. It’s up to you.

    What do you mean with spinning?

    Spinning means the creation of a new “spinned” content. That will create a new and unique post every time it gets promoted (or duplicated).

    How do I spin the title and the content?

    That requires a bit of handwork. You can manually add multiple synonym versions of any sentence and any word you want. That is done by using the characters |, { and }. I give you an example:

    
    Hello, my name is {Jack|Jim} and I love {Tennis|Golf}.
    

    Using this spinning instructions sentence will generate this four different result sentences every time your article is promoted:

    • Hello, my name is Jack and I love Tennis.
    • Hello, my name is Jack and I love Golf.
    • Hello, my name is Jim and I love Tennis.
    • Hello, my name is Jim and I love Golf.

    So, with a little bit of extra afford you are able to create a complete unique post every time.

    Just add as many synonym sentences as you like between the curly brackets ”{“, “}” and separate each synonym sentence by Pipe “|”.

    You can nest your sentences as well:

    
    Hello, my name is {Jim|{Handsome|Ugly}Joe}.
    

    Will result in:

    • Hello, my name is Jim.
    • Hello, my name is Handsome Joe.
    • Hello, my name is Ugly Joe.

    IMPORTANT: Please post this spinning instruction sentences in the extra Old-Post-Spinner meta box of WordPress (see the screenshot) and NOT into the normal text and content form fields

    What will happen if I only want to spin the title or the content?

    No problem. If you only fill in spinning instructions on the title, then only the title will be spinned. The content won’t change. Same with the content, if you only want the content to be spinned, than leave the spinning instructions on the title empty.

    What date will the promoted posts get?

    Posts promoted to first position will get the current date. Posts below first position will be placed right in the middle of the enclosing posts.

    Why should I use a category to ignore from promotion?

    Some posts are simply not meant to be spinned. Especially if they are date-related. E.g. you should place posts with news into an omitted category.

    But how do I hide the category from my blog?

    If you don’t want this category to appear in you blog you can use the “AVH Extended Categories” plugin.

    How can I recover the original dates?

    All original dates are stored as custom fields. The name is “ops_original_pub_date”.

    How can I support you?

    That is nice of you. You can donate via Paypal.

    How can I promote my newly dated posts to twitter now?

    I think you should consider to use a service like twitterfeed.com. It will pickup your promoted posts and send status messages to twitter.

    Do you have other plugins?

    Check out my other WordPress Plugins.

    Where do I post my feedback?

    Here

    Changelog

    2.4.0 (06.07.2011)

    • testing with WordPress 3.2 -> OK
    • small security bugfix

    2.3.3 (10.06.2011)

    • testing with WordPress 3.1.3 -> OK
    • removing schedule cron value when deactivating as well

    2.3.2 (12.04.2011)

    • small security bugfix

    2.3.1 (25.03.2011)

    • bugs fixed on test routine, when entering wrong values

    2.3.0 (15.03.2011)

    • using minutes instead of hours

    2.2.1 (26.02.2011)

    • testing with WordPress 3.1 -> ok

    2.2 (19.02.2011)

    • tested with 3.0.5
    • more FAQs
    • new screenshots
    • more log entries to check for
    • more translations

    2.15 (04.12.2010)

    • tested with WordPress 3.02

    2.14 (11.08.2010)

    • tested with 3.01
    • new screenshots

    2.13 (11.07.2010)

    • Fresher design of meta boxes
    • new wording
    • correcting typo errors

    2.12 (11.07.2010)

    • creating a brand new permalink when duplicating
    • fixing a bug where not unique permalinks could get deleted

    2.11 (10.07.2010)

    • now detects an existing “Google XML Sitemaps Generator for WordPress”-Plugin and starts creating the sitemap on request

    2.10 (09.07.2010)

    • tuning the visual design

    2.02 (08.07.2010)

    • small bugfix where on rare occasions (special PHP/server configuration) OPS creates an error

    2.01 (07.07.2010)

    • adding more logging messages

    2.00 (06.07.2010)

    • Now you can even duplicate a unique post instead of only promoting it

    1.21 (05.07.2010)

    • delete spinning instructions as well when removing of plugin

    1.20 (25.06.2010)

    • NOW WITH ABILITY TO CREATE UNIQUE CONTENT (Read FAQs on that, please)
    • fixed little date bug

    1.10 (18.06.2010)

    • first multi language version
    • German added

    1.09 (18.06.2010)

    • tested for WordPress 3.0 – ok
    • log folder error message now appears inside admin header

    1.08 (17.06.2010)

    • fixed unnecessary warning messages on development systems

    1.07 (16.06.2010)

    • moving log folder to wp-content path to face some problems when updating

    1.06 (15.06.2010)

    • fixing problems some might have with the creation of log folder

    1.05 (12.06.2010)

    • new FAQs
    • checking of implausible values
    • new screenshots

    1.04 (08.06.2010)

    • better logview (check for still not existing log file)

    1.03 (07.06.2010)

    • small bugfixes

    1.02 (06.06.2010)

    • using build in WordPress Cronjob
    • better logfile view

    1.01 (05.06.2010)

    • little bugfixes, wording
    • including of deinstalation routine to delete all data
    • implementing a better log file viewer

    1.00 (04.06.2010)

    • first Version

    WordPress: Empty Plugin Template – A plugin template to start with

    S T I L L   B E T A

    As it says, an empty plugin considering all the advices given in

    http://codex.wordpress.org/Writing_a_Pluginhttp://codex.wordpress.org/Creating_Options_Pages and http://planetozh.com/blog/2009/09/top-10-most-common-coding-mistakes-in-wordpress-plugins/

    Including:

    • multi language ability
    • uninstall routine
    • data delete routine (avoid orphaned data)
    • coding advices
    • security aspects (validating user inputs, nonces)
    • external third party stuff (Ajax, CSS, Javascript)
    • shortcode
    • WordPress scheduler (“cronjob”)

    Download from WordPress repository

    Changelog

    0.1 (17.02.2011)

    • first Version

    WordPress für mobile Geräte (Android, iPhone) fit machen

    Mit Schrecken musste ich feststellen, dass mein WordPress-Template auf einem mobilen Endgerät mehr als bescheiden aussieht, fast unleserlich ist und ewig zum Laden braucht. Das musste in Angriff genommen werden.

    Wer seine eigene Website auf mobile Anwendbarkeit testen will, kann das unter ready.mobi erledigen. Dort erfolgt eine genauere Analyse für:

    • MIME Typen
    • Character encoding
    • Pop up Fenster
    • Alt texts für Bilder
    • Nutzen der Stylesheets
    • Tabellen
    • Übergroße Bilder

    Und es besteht die Möglichkeit, die Seite mit einem Emulator zu besuchen.

    Nach dieser schlecht gelaufenen Analyse habe ich mir drei verschiedene Plugins vorgenommen.

    Ich habe mich für MobilePress entschieden, weil es einfach zu installieren ist und ein eigenes Template eingebaut hat. Und vor allem scheint es auch immer noch gepflegt zu werden. Man installiert es wie jedes beliebige Plugin. Eventuell muss noch der Webseiten-Cache geleert werden, falls man ein Cache-Plugin installiert hat. Das war es auch schon.

    Ein jetzt durchgeführte Test gab bei fast allen Punkten “grünes Licht” und vor allem kann man mein Blog jetzt auch ohne Kopfschmerzen auf einem Android-Handy lesen.

    Ein  sehr guter Artikel mit Tests zu 9 anderen Plugins findet sich aktuell bei Dr. Web.

    http://www.handypark.de/webmaster/blogs/wp-viewmobile.html

    Niche-Marketing ist Bullshit, Teil 2

    So schnell sind die Besucher von Twitter ja noch nie gekommen.

    Innerhalb von knapp 60 Sekunden:

    Niche-Marketing ist Bullshit

    Habe gerade wieder zufällig so eine Website aufgetan:

    http://wordpress-autoresponder.ebook-site.de/

    Bin nur überrascht, dass diese Schneelawinenbaukastenscrolldownsalespages jetzt verzögert auch in Deutschland auftauchen. Ich hatte gehofft, diese Scheiße würde unser Land verschonen. Gibt es wirklich Leute, die hier was kaufen?

    Ich weiß aus eigener Erfahrung, dass das ganze Long-Tail-SEO-Niche-Marketing-Auto-Content-Gelumpe eine komplette Zeitverschwendung ist.

    Warum? Ganz einfach: Google lernt. Das heißt, es ist ein ewiges Wettrennen. Und der Aufwand lohnt sich einfach nicht.

    Die einzigen, die etwas Geld damit machen, sind diejenigen, die die Tools dafür verkaufen. Aber dann auch nur, wenn sie im Multi Level Netzwerk möglichst weit oben stehen. Und natürlich werden diese Verkäufer, die ganz weit oben stehen betonen, wie einfach man damit ein paar Kröten verdienen würde.

    Hallo, aufwachen! Es war noch nie einfach Geld zu verdienen.

    Es ist wie im Goldrausch, Geld verdienen können nur die Schaufelverkäufer.

    Das Internet ist kein Geschäft! Es ist ein Vertriebskanal. Der Würstchenverkäufer kommt ja auch nicht auf die Idee, Propangasflaschen zu verkaufen, nur weil er damit seine Würstchen befeuert.

    Mein Tipp: Besorge dir erstmal ein “Real Life Business”, das theoretisch auch komplett ohne Internet funktioniert: Immobilienverkauf, Brötchenverkauf, T-Shirt-Verkauf oder irgendeine andere Dienstleistung. Nimm das, was du am besten kannst und magst. Und DANN benutzt du das Internet, um damit den Vertrieb zu stärken. Und NUR dann.

    Oberste Devise dabei: ehrlich sein. Google hat einfach die Kraft, Grey Hat Methoden zu identifizieren. Und dann bist Du am Arsch. Dann bist Du selbst die Paar Euro fuffzich los, die Du mit deinen 125 Blogs gemacht hast.

    Glaub mir, mit dem ganzen SEO-Scheiß verdienst du weniger Geld als meine Putzfrau, sehr viel weniger.

    Und das bis zum Untergang sektiererhafte Hinterherlaufen und Hoffen auf bessere Clickrates “beim nächsten Blog” oder mit einer anderen Themen-Nische, bringt dich auch nicht weiter.

    Und dann noch dieses dämliche Artikelmarketing! Wieviele 300-Wort-Variationen zum Thema “SEO-Marketing” gibt es denn noch? Die braucht niemand! Glaubt ihr wirklich, Google&Co können diesen unnützen Bodensatz des Internets nicht von den Suchergebnissen fernhalten?

    Wenn der eigentliche Geschäftssinn darin besteht, sich selbst zu reproduzieren, so sollte jedem Depp klar sein, dass man damit seinen Lebensunterhalt nicht bestreiten kann. Soll etwa jeder Mensch auf der Welt Artikel-Spinning betreiben? PDF-Dokumente verkaufen, in den steht, wie man PDF-Dokumente verkauft? Seid ihr von allen guten Geistern verlassen?

    Verkauft lieber Würstchen oder Eis. Das mag jeder. Im Winter Würstchen und im Sommer Eis. Fertig. Und solche einfachen Geschäftsmodelle versteht der Kredit-Abnicker von der Bank auch. Und wenn es denn sein muss, setze ein Blog über deine tollen, selbstgemachten Saucen in die Welt. Oder belästige harmlose Menschen auf Facebook damit.

    Aber bitte, BITTE, lass die Finger von Niche-Marketing.

    Alle Informationen über eine Website auf einen Blick: webmastercoffee.com

    Mein Tipp des Tages (und kein Aprilscherz) ist webmastercoffee.com.

    Dort kann man sich auf Deutsch und sehr ausführlich mit Erklärungen dokumentiert alle öffentlich zugänglichen Informationen über eine Website auf einen Blick anschauen:

    • verwendeter Server
    • verwendetes CMS
    • verwendete Skriptsprache
    • nachgeladene Javascript-Bibliotheken (mit Erläuterungen)
    • verwendete Plugins (bei WordPress!)
    • aktivierte Schnittstellen (z.B. Pingback oder RSD)
    • Sitemaps, Feeds
    • Cookies
    • Google Informationen (AdSense, Tracker Codes)
    • Provider
    • Keywords und Keyword-Dichte

    Vor bestimmten Schwachstellen, z.B. im Klartext lesbare E-Mail-Adressen, wird auch rot hervorgehoben gewarnt.

    Ein schönes Tool, das eine erste Übersicht bietet als Anlaufstelle für tiefere Analysen.

    Webmastercoffee - aufführliche Websiteinformationen

    Kraft durch Bilder – SEO mit Bildern

    Auch Bilder können Traffic auf sich ziehen und das nicht zu knapp.

    Wenn ich den Google Analyzer starte, so sehe ich regelmäßig, dass viele meiner Bilder in Googles Bildersuche gefunden werden.

    Wie schafft man das? Natürlich indem man alles HTMLmögliche macht, um die Bilder mit SEO-Techniken zu spicken: weiter lesen..

    Page 2 of 3123