Title: Giveaway of the Day Shortcode
Author: Paulo R. Ribeiro
Published: <strong>29 de julio de 2014</strong>
Last modified: 14 de agosto de 2014

---

Buscar plugins

![](https://ps.w.org/giveaway-of-the-day-shortcode/assets/banner-772x250.png?rev
=957735)

Este plugin **no se ha probado con las últimas 3 versiones mayores de WordPress**.
Puede que ya no tenga soporte ni lo mantenga nadie, o puede que tenga problemas 
de compatibilidad cuando se usa con las versiones más recientes de WordPress.

![](https://s.w.org/plugins/geopattern-icon/giveaway-of-the-day-shortcode.svg)

# Giveaway of the Day Shortcode

 Por [Paulo R. Ribeiro](https://profiles.wordpress.org/falarcompaulo/)

[Descargar](https://downloads.wordpress.org/plugin/giveaway-of-the-day-shortcode.2.0.6.zip)

 * [Detalles](https://es.wordpress.org/plugins/giveaway-of-the-day-shortcode/#description)
 * [Valoraciones](https://es.wordpress.org/plugins/giveaway-of-the-day-shortcode/#reviews)
 *  [Instalación](https://es.wordpress.org/plugins/giveaway-of-the-day-shortcode/#installation)
 * [Desarrollo](https://es.wordpress.org/plugins/giveaway-of-the-day-shortcode/#developers)

 [Soporte](https://wordpress.org/support/plugin/giveaway-of-the-day-shortcode/)

## Descripción

This plug-in enables the addition of [Giveawayoftheday.com](http://www.giveawayoftheday.com/?gp=1380445673)
software giveaways in your WordPress blog with just a simple shortcode.

This is my first WordPress plug-in, made basically to simplify the edition of my
[site](http://www.falarcompaulo.com.br/) front page, and since it became quite a
nice plug-in, I decided to share it, hoping it will be useful to somebody else.

#### Features

 * 100% compatible with localization – translate it into your own language.
 * If you are a member of the Partner Program you can use your own Partner ID.
 * Choose between the 12 language options provided by the Giveaway Feed Service.
 * Comes with 7 pre-defined colors for the download button match your site template.
 * If none of the pre-defined colors suits your needs, you can create a custom color.
 * If your template already have a download button style, you can reuse it’s CSS
   class name.
 * If none of the color options above are enough, you can use the CSS editor (with
   syntax hightlight and autocomplete function) to customize every style aspect 
   of the plug-in generated code.

#### Rate this plug-in

Please rate this plug-in! Give me a chance to address your concerns if this plug-
in doesn’t earn 5 stars.

#### Special Thanks

My wife, who is my inspiration.

### Shotcode Usage

#### Main Shortcode

**[giveawayoftheday]** and **[gaotd]**

 * Use the shortcode without parameters to insert all the relevant information about
   the current software giveaway.
 * Note: Both shortcodes accepts the same parameters listed below.

#### Giveaway Sample

To make things easier to understand, let’s assume that the software being given 
away is the **My Awesome Software** which requires **Windows XP/Vista/7/8/8.1 (x64/
x86); 1GB RAM/Pentium D or above**, is developed by **My Software Company** that
normally sells it for **$199.95**, has a download file size of **132.45 MB** and
can be downloaded for free for the next **14** hours and **37** minutes.

#### Shortcode Options

**[gaotd data=»title»]**

 * Insert the software name of the current software giveaway.
 * Sample output:
    My Awesome Software

**[gaotd data=»content»]**

 * Insert the full description about the current software giveaway, may include 
   html tags.
 * Sample output:

Lorem ipsum dolor sit amet, consectetur _adipisicing elit_, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut **aliquip ex ea commodo** consequat.

    ```
    <p>Duis aute irure dolor in <a href="sample url">reprehenderit in voluptate velit</a> esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> 
    ```

**[gaotd data=»excerpt»]**

 * Insert excerpted description about the current software giveaway, in plain text.
 * Sample output:
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam
   eget ligula eu lectus lobortis condimentum. Aliquam nonummy auctor massa. Pellentesque
   habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
   Nulla at risus. Quisque purus magna, auctor et, sagittis ac, posuere eu, lectus.
   Nam mattis, felis ut adipiscing.

**[gaotd data=»publisher»]**

 * Insert the publisher name of the current software giveaway.
 * Sample output:
    My Software Company

**[gaotd data=»sysreq»]**

 * Insert the system requirements of the current software giveaway.
 * Sample output:
    Windows XP/Vista/7/8/8.1 (x64/x86); 1GB RAM/Pentium D or above.

**[gaotd data=»size»]**

 * Insert the download file size of the current software giveaway.
 * Sample output:
    132.45 MB

**[gaotd data=»price»]**

 * Insert the regular software price of the current software giveaway.
 * Sample output:
    $199.95

**[gaotd data=»days»]** and **[gaotd data=»hours»]** and **[gaotd data=»minutes»]**

 * Insert the number of `days` **or** `hours` **or** `minutes` left until the end
   of the software giveaway, depending on the supplied parameter.
 * Note: The giveaways timespan are usualy set to 24 hours, which means that the
   parameter «days» will almost always return zero, this is why I strongly recomend
   you to use the `timeleft` parameter to get the giveaway remaining time instead.
 * Sample output for `[gaotd data="minutes"]`:
    37

**[gaotd data=»timeleft»]**

 * Insert the remaining time left for the current software giveaway.
 * Sample output:
    14 hours and 37 minutes

**[gaotd data=»downloadlink» class=»optional-class» target=»optional-target]**

 * Insert the download link for the current software giveaway.
 * Note: Parameter `class` if not specified will be filled according to color configuration.
 * Note: Parameter `target` if not specified will be filled with the default value`
   _self`.
 * Sample output:
    Download
 * You can also insert the shortcode around text to customize the download link 
   text.
 * Sample output for `[gaotd data="downloadlink"]My Download Text[/gaotd]`:
    My 
   Download Text

**[gaotd data=»downloadmirror1″ class=»optional-class» target=»optional-target]**

 * Insert the download link mirror 1 for the current software giveaway.
 * Note: The `downloadmirror1` option accepts the same parameters as `downloadlink`
   option.
 * Obs: The XML field `downloadmirror1` usualy contains the same value as `downloadlink`.
 * Sample output:
    Download (mirror 1)

**[gaotd data=»downloadmirror2″ class=»optional-class» target=»optional-target]**

 * Insert the download link mirror 2 for the current software giveaway.
 * Note: The `downloadmirror2` option accepts the same parameters as `downloadlink`
   option.
 * Obs: The XML field `downloadmirror2` usualy is not used in giveaways and was 
   included just for conveniency.
 * Sample output:
    Download (mirror 2)

**[gaotd data=»giveawaylink» class=»optional-class» target=»optional-target]**

 * Insert the link for the current software giveaway on the giveaway page.
 * Note: The `giveawaylink` option accepts the same parameters as `downloadlink`
   option.
 * Sample output:
    Read more at the promotion page.

**[gaotd data=»publisherlink» class=»optional-class» target=»optional-target]**

 * Insert the link for the publisher of the current software giveaway.
 * Note: The `giveawaylink` option accepts the same parameters as `downloadlink`
   option.
 * Sample output:
    My Software Company.

**[gaotd data=»screenshot» alt=»optional alt text» class=»optional-class» title=»
optional title»]**

 * Insert the screenshot of the current software giveaway.
 * Note: Parameters `alt` and `title` if not specified, will be filled with the 
   software title.
 * Note: Parameter `class` if not specified, will be empty.
 * Sample output:

## Capturas

[⌊Shortcode being used in my site's frontpage.⌉⌊Shortcode being used in my site's
frontpage.⌉[

Shortcode being used in my [site](http://www.falarcompaulo.com.br/)‘s frontpage.

## Instalación

#### Requirements

The one and only requirement for this plug-in to work is that your host server supports
the `allow_url_fopen` PHP option.

 * Some hostings allow the activation of this option by adding the line `php_value
   allow_url_fopen On` in the `.htaccess` file located at the root of the site.

#### Main Plug-in

 1. Upload the `giveaway-of-the-day-shortcode` folder to the `/wp-content/plugins/`
    directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Place `[giveawayoftheday]` or `[gaotd]` shortcodes in your posts and pages
 4. Done!

## FAQ

  How do I change options?

In WordPress backend, click in the «Settings » Giveaway of the Day» menu option.

  How do I change colors?

Yor can use one of the pre-defined colors if the match your site template, you can
create a custom color, define a custom CSS class name from your site template, or
even edit the entire CSS code.

## Reseñas

No hay valoraciones para este plugin.

## Colaboradores y desarrolladores

«Giveaway of the Day Shortcode» es un software de código abierto. Las siguientes
personas han colaborado con este plugin.

Colaboradores

 *   [ Paulo R. Ribeiro ](https://profiles.wordpress.org/falarcompaulo/)

[Traduce «Giveaway of the Day Shortcode» a tu idioma.](https://translate.wordpress.org/projects/wp-plugins/giveaway-of-the-day-shortcode)

### ¿Interesado en el desarrollo?

[Revisa el código](https://plugins.trac.wordpress.org/browser/giveaway-of-the-day-shortcode/),
echa un vistazo al [repositorio SVN](https://plugins.svn.wordpress.org/giveaway-of-the-day-shortcode/)
o suscríbete al [registro de desarrollo](https://plugins.trac.wordpress.org/log/giveaway-of-the-day-shortcode/)
por [RSS](https://plugins.trac.wordpress.org/log/giveaway-of-the-day-shortcode/?limit=100&mode=stop_on_copy&format=rss).

## Registro de cambios

#### 2.0.6

 * Changed some CodeMirror parameters.
 * Small changes to CSS code.

#### 2.0.5

 * Fixed a bug preventing options from being saved.
 * Added the option to restore default options.
 * Rewrote some parts of the core code.

#### 2.0.4

 * Fixed another «unexpected output during activation» error.
 * Removed titan framework options panel because I didn’t like their translation
   implementation.
 * Added new options panel, now using the standard WP Settings API.
 * Added CodeMirror for CSS editing, with syntax highlight and autocomplete enabled
   by default.
 * Plug-in is now 100% compatible with translations, thanks to WP Settings API.
 * Plug-in native language is now Brazilian Portuguese, English translation included.

#### 2.0.3

 * Implemented experimental options panel.
 * Rewrote core functions and made other changes.

#### 2.0.2

 * Fixed the «unexpected output during activation» error.
 * Small changes to dynamic CSS code.

#### 2.0.1

 * Added new shortcode parameters.
 * Added a new file to hold css code.
 * Fixed some shortcode subfunctions.
 * Improved documentation.

#### 2.0.0

 * Plug-in core code completely rewritten.
 * Added shortcode parameters – still experimental, yet more to come.
 * Added 3 new download button color options.
 * Added 4 download button color mode – yet it’s hard to use since options panel
   is not implemented yet.
 * Options are stored in the DB as an array – uses only one DB entry.
 * Fixed all translation errors from the broken 1.0.10 version.

#### 1.0.10

 * Broken version, removed from repository.

#### 1.0.9

 * (Definitely) changed the name of the plug-in.
 * Added possibility to coexist with to pro version.
 * Fixed a small bug in Plugin URI code.
 * Added a Creative Commons license.
 * Added missing domainpath.
 * Improved translation file.

#### 1.0.8

 * Small changes in the main code.
 * Fixed small bug in CSS code.

#### 1.0.7

 * Changed plug-in name to it’s full name.
 * Fixed a bug in the hours/minutes separator string of the translation file.
 * Some changes in the CSS code.

#### 1.0.6

 * Added option to insert your GAOTD partner ID.

#### 1.0.5

 * Fixed missing «textdomain» in a string.

#### 1.0.4

 * Plug-in native language changed to english.
 * Added (_.po/_.mo) translation support.

#### 1.0.3

 * Added download button color options.

#### 1.0.2

 * Added CSS code to make download link display like a button.

#### 1.0.1

 * Fixed XML cache path.

#### 1.0.0

 * First plug-in working version.

## Meta

 *  Versión **2.0.6**
 *  Última actualización **hace 12 años**
 *  Instalaciones activas **10+**
 *  Versión de WordPress ** 3.9 o superior **
 *  Probado hasta **3.9.40**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/giveaway-of-the-day-shortcode/)
 * Etiqueta:
 * [shortcode](https://es.wordpress.org/plugins/tags/shortcode/)
 *  [Vista avanzada](https://es.wordpress.org/plugins/giveaway-of-the-day-shortcode/advanced/)

## Valoraciones

Aún no se han enviado valoraciones.

[Tu valoración](https://wordpress.org/support/plugin/giveaway-of-the-day-shortcode/reviews/#new-post)

[Ver todas las reseñas](https://wordpress.org/support/plugin/giveaway-of-the-day-shortcode/reviews/)

## Colaboradores

 *   [ Paulo R. Ribeiro ](https://profiles.wordpress.org/falarcompaulo/)

## Soporte

¿Tienes algo que decir? ¿Necesitas ayuda?

 [Ver el foro de soporte](https://wordpress.org/support/plugin/giveaway-of-the-day-shortcode/)

## Donar

¿Te gustaría apoyar el progreso de este plugin?

 [ Dona a este plugin ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LVYPJ5YUMBZ7L)