Flattr

Social

Plugins

Apps

Lab

Kategorien

23. Oktober 2008 / Closed

The WordPress plugin wpSLEEP – Easy time control for parts of a post

WordPress already offers naturally a comfortable possibility to publish articles delayed. The advantages of this convenient function are ...

WordPress already offers naturally a comfortable possibility to publish articles delayed. The advantages of this convenient function are obvious: Posts can be created in advance and will automatically be published a few days later or on midnight – even if you are not at the pc. wpSleep is based on the same thought and actuate parts of a post as the author likes them to.

German Version
» wpSleep, WordPress-Plugin für zeitliche Steuerung der Teile eines Artikels

wpSleep puts text parts delayed offline
Simply said: In the originated post, text passages, graphics or other elements are marked up to sample and are provided with a start- and / or end date. After saving and publishing of the post, the marked part is only viewable during the time span specified (from 01.10.2010 1 pm until 31.12.2010 6.30 pm for example).

Examples are also graphical banners or text links, which are booked for a certain time. Accordingly paragraphs or chapters can be taken first off- and at later stage taken online again, just one specifies. Variations are nearly unlimited!

Jump marks

Features

  • No database necessary
  • Fast carrying out, as there is only a modicom of code
  • No Admin-Panel required. Time specification are directly within the post

Mode of operation
Is a certain (text) block within a post supposed to get a certain timing, this section should be circumfluenced with [wpsleep][/wpsleep]. The short code offered by this WordPress plugin (WordPress 2.5+ required) is able to accept adjacent attributes as time parameters, to fade out or in the selected area as specified.

Examples

  • [wpsleep start="31.12.2010 09:00"]This section is now offline, but from 31.12.2010 9 am for everyone viewable[/wpsleep]
  • [wpsleep start="07.10.2010 09:00" end="08.10.2010" alt="Alternative text"]This section is only for a few hours viewable. The rest of the time you see the alternative text[/wpsleep]
  • [wpsleep start="09:00" end="11:30"]This section is viewable every day at the same time[/wpsleep]

Start- and end date can be defined – both or just one of it. The date value is written in german text format day.month.year hours:minutes. Those attributes can be specified as date only (without time specified) or time only (without date specified).

Status of visibility as a php tag
Since wpSleep 0.5 is a global variable available, which is set to true when the marked part is visible.

Execute my code when the part is visible

<?php if (!empty($GLOBALS['wpSLEEP']->visible)) {
    /* My Code */
} ?>

Version of progress
Version 0.6 dated 11.10.2010

  • Timezone support
  • German translation

Version 0.5 dated 10.12.2008

  • The visible flag is set, if the hidden part is visible (see an example above)

Version 0.4 dated 27.10.2008

  • Support for alternative text (attribute alt, see examples)

Version 0.3 dated 10.10.2008

  • Attributes for start- and end timing can now be specified as time of day only, which offers daily repeat

Version 0.2 dated 08.10.2008

  • Start date is no manditory field anymore. Start- and Enddate can be specified at will

Version 0.1 dated 07.10.2008

  • wpSleep goes online

Installation

  • Download wpSleep
  • Unzip the archive
  • Upload the folder wpsleep into ../wp-content/plugins/
  • Go to tab plugins
  • Activate wpSleep
  • Please use your formatted shortcode
  • Ready

Download
› WordPress Plugin wpSleep ↓

  • Format: ZIP
  • Version: 0.6
Sergej Müller

[Der Autor]Sergej Müller ist enthusiastischer Software Engineer mit Schwerpunkten Webentwicklung, Apps und WordPress. Seit 2007 programmiert und vertreibt er wpSEO, das zugkräftige SEO-Plugin für WordPress-Blogs.