Archive for the ‘WordPress’ Category

More on Pledge Drive Widgets and Snippets

Sunday, January 20th, 2008

Referring back to the previous article, you might ask how are snippets used in Pledge Drive 2? You simply paste the snippet inside a Pledge Drive 2 Progress Meter widget as in the picture below (click to enlarge). Go to the WordPress Admin “Presentation” menu and select the “Widgets” tab.

pledgedrive2-progress-meter-widget-snipit


What if you don’t use WordPress sidebar widgets? No problem, we still have you covered. Just paste your snippet into the Admin Options Pledge Drive form (or edit the default Schlomo Simpleton mentioned above) and insert the following PHP code anywhere in your theme’s template files (most likely in your own “sidebars” or, perhaps, a header). This will output your snippet, after the Pledge Drive plugin replaces all the variables in you snippet with their current values based on your supporters donations and subscriptions.

<?php print pd2_progress_meter() ?>

New Progress Meter Graphics

Saturday, January 19th, 2008

Our original progress meter example used a template that was pure CSS colors. The new one (in the sidebar currently), uses two small gifs as CSS background images instead of background colors. I really like the improved look and it was a minor change to the snippet used to create the meter. Alicia is creating some even more fun graphics and snippets (she inspired me to post this example so she and other could start building from it. Below is the snippet for the new one.

Eventually, I would like to establish a gallery or garden of snippets that people can choose from. In that case, we will have to name each one so that they can be listed in drop-down, combo boxes (I like saying that). I’d like to christen the first one with a classic name and for a classic vlogger. This is the “Schlomo Simpleton” (sans the example descriptive text below the meter).

<style>
.pd2_progress {font-family: arial;
  font-size: 12pt;
  font-weight: bold;
  margin: 5px 20px 0 0;
  padding: 10px;
  text-align: center;
  width: 50px;
  color: white;
  background-color: #c7c9f3;
  border: thick solid #9d9fca;}
.money, .percentage, .contributions {padding: 3px;}
.meter {height: 200px;}
.money:before {content: "$";}
.percentage:after {content: "%";}
.contributions:after {content: " gifts";}
.remaining {min-height: %percentremaining%%;
  background:
    url(/wp-content/plugins/pledgedrive2/images/blue_v.gif);}
.achived {min-height: %percentraised%%;
  background:
    url(/wp-content/plugins/pledgedrive2/images/green_v.gif);}
</style>
<center>
<div class="pd2_progress">
  <div class="money">%goal%</div>
  <div class="meter">
    <div class="remaining">&nbsp;</div>
    <div class="achieved">&nbsp;</div>
  </div>
  <div class="percentage">%percentraised%</div>
  <div class="money">%amountraised%</div>
  <div class="contributions">%contributions%</div>
</div>
</center>

Rules for customizing snippets:

  • Change anything except the names of the %variables%.
  • It’s ok to use the %variables% in both HTML content and CSS styles.
  • Ok to move CSS to your own stylesheet as long as it has no %variables% in it.
  • %variables% are only replaced in snippets inside Pledge Drive 2 Progress Meter widgets.

Thanks to tipClique Counter Bar (GPL) for the background graphics.

Buy me a beer (please!)

Wednesday, January 16th, 2008

beer bubblesWe’ve been testing integration of Pledge Drive 2 with other popular plugins and widgets. The first one is Buy Me a Beer. Things seem to be working great! Note that the title option from BMaB is used as “company” field for PayPal request. One thing: BMaB hard codes PayPal urls, so needs a patch to make it work with PayPal sandbox url’s.

You can see the BMaB plugin in action in the side bar and at the bottom of each post or page. This can be controlled on a post-by-post basis, as well as using a default that you can set in the admin options menu.

I prefer the coffee cup icon over the beer mug, but of course you can use your own favorite icon image. Basically, BMaB just builds a standard PayPal payment button. This is not for subscriptions. The payments are reported back to Pledge Drive via PayPal Instant Payment Notifications and so everything is cool.

One concern I have is that there is no license information in the BMaB plugin or on that site that I can find. It appears it was created as a work-for-hire by the SEO blog author of blogclout.com.

There is also a “Buy Me a Pint” site that extends BMaB and charges something like $97 for the code. Google it if you are interested.

Can we do something similar with ChipIn? I think so?

Notice: About This Site

Wednesday, January 16th, 2008

This is a sandbox testing site and screencasting vlog for the Pledge Drive 2 plugin for WordPress. The PayPal features here require the use of a developer account and are for testing only. At this time, you can not really donate real money on this site, it is for testing only.

We are in the process of testing our new plugin. If you are interested in helping test or wish to be notified when the plugin is released, please join the Show in a Box Google Group and ask for “Pledge Drive”.

Welcome & Introduction

Saturday, January 5th, 2008


Here is a first post to kick off this vlog and to provide a sandbox for testing and for creating screencasts about Show in a Box and Pledge Drive 2. I’ve started by documenting the Paypal process on the wiki. I will evolve this vlog to add all of the Show in a Box goodness over the next few days as I document the process. For example, there is just a simple “Donate” button in the sidebar right now, but this will be augmented with a progress meter and other related widgets in the next few days.