/*
Plugin Name: WP Flickr Post Bar
Plugin URI: http://tantannoodles.com/toolkit/wp-flickr-post-bar/
Description: Displays a Flickr bar at the top of your edit screen, which allows you to easily add Flickr photos to your posts with one click. Configure...
Version: 0.5
Author: Joe Tan
Author URI: http://tantannoodles.com/
Copyright (C) 2005 Joe Tan
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* ******************************************************************
Front end display functions
****************************************************************** */
/*
Prints HTML code where badge should be displayed
*/
function tantan_fpbFormDisplay() {
//$photos = tantan_fpbGetData();
//$tantan_fpbSize = get_option('tantan_fpbSize');
//$tantan_flickrMaxPhotos = get_option('tantan_flickrMaxPhotos');
//if (!$tantan_fpbSize) $tantan_fpbSize = 'Small';
$html =
"
";
// $html .= "";
echo $html;
// include(dirname(__FILE__).'/post-bar-form.html');
}
/*
Retrieve Flickr data
*/
function tantan_fpbGetData() {
// check to see if data is cached
$lastTimestamp = get_option('tantan_fpbTimestamp');
$photos = get_option('tantan_fpbPhotos');
$cached = false;
if ((is_array($photos) && count($photos) && $lastTimestamp && ((time() - $lastTimestamp) < 60*60))) {
// data is cached and still fresh, so don't do anything
$cached = true;
}
if (!$cached) {
include_once(dirname(__FILE__).'/lib.flickrBadge.php');
// not cached, so get data from flickr and update
$badge = new TanTanBadge();
$badge->setFlickrAPI(get_option('tantan_flickrAPI'));
$photos = $badge->getData(get_option('tantan_flickrUser'), get_option('tantan_flickrMaxPhotos'));
if (!is_array($photos) || (count($photos) == 0)) { // some sort of error
update_option('tantan_fpbPhotos', false);
} else {
update_option('tantan_fpbPhotos', $photos);
update_option('tantan_fpbTimestamp', time());
}
}
if (is_array($photos)) {
return $photos;
} else {
return array();
}
}
/* ******************************************************************
Admin options
****************************************************************** */
/*
Add hooks for admin page options
*/
function tantan_fpbAdminOptions() {
add_options_page('Flickr Post Bar', 'Flickr Post Bar', 10, __FILE__, 'tantan_fpbAdminPage');
}
/*
Admin page controller
*/
function tantan_fpbAdminPage() {
if (isset($_POST['tantan_action'])) {
update_option('tantan_flickrAPI', $_POST['tantan_flickrAPI']);
update_option('tantan_flickrUser', $_POST['tantan_flickrUser']);
update_option('tantan_flickrMaxPhotos',$_POST['tantan_flickrMaxPhotos']);
update_option('tantan_fpbSize', $_POST['tantan_fpbSize']);
update_option('tantan_fbpLinkDest', $_POST['tantan_fbpLinkDest']);
update_option('tantan_fbpLinkDestValue', $_POST['tantan_fbpLinkDestValue']);
update_option('tantan_fpbAutoLoadDisabled', $_POST['tantan_fpbAutoLoadDisabled']);
$status = "Saved settings.";
if ($_POST['tantan_clearCache'] == 'yes') {
update_option('tantan_fpbPhotos', false);
$status .= " Cleared cache.";
}
} else {
$status = "";
}
$tantan_flickrAPI = get_option('tantan_flickrAPI');
$tantan_flickrUser = get_option('tantan_flickrUser');
$tantan_flickrMaxPhotos = get_option('tantan_flickrMaxPhotos');
$tantan_fpbSize = get_option('tantan_fpbSize');
$tantan_fbpLinkDest = get_option('tantan_fbpLinkDest');
$tantan_fbpLinkDestValue = get_option('tantan_fbpLinkDestValue');
$tantan_fpbAutoLoadDisabled=get_option('tantan_fpbAutoLoadDisabled');
include(dirname(__FILE__).'/post-bar-admin.html');
}
// install hooks
add_action('edit_form_advanced', 'tantan_fpbFormDisplay');
add_action('simple_edit_form', 'tantan_fpbFormDisplay');
add_action('edit_page_form', 'tantan_fpbFormDisplay');
add_action('admin_menu', 'tantan_fpbAdminOptions');
?>
Toolkits
http://www.otheredge.com.au/klogs/toolkit
2008-01-07T02:36:31Zhourly12000-01-01T12:00+00:00Starting anew
http://www.otheredge.com.au/klogs/toolkit/2008/starting-anew.htm
2008-01-04T00:16:02ZKirstySnippetsI think I will set up a new blog for the new year. Last year the Toolkits blog ran its course and dried up (rather like a mountain stream in summer). There has been much exciting stuff happening that I would like to blog about from a professional angle (personal ...On Hiatus
http://www.otheredge.com.au/klogs/toolkit/2007/intro-to-blogging.htm
2007-06-25T07:02:13ZKirstyPD Resources and ApproachesSnippetsThis blog is no longer active - please feel free to wander through the archives at your leisure. Resources and References from Jay Cross
http://www.otheredge.com.au/klogs/toolkit/2007/resources-and-references-from-jay-cross.htm
2007-05-08T20:18:07ZKirstyPD Resources and ApproachesSnippetsI've got a little scrap pf paper on ny desk of "Books I want" and then a mental list supported by my del.icio.us links and blog posts of resources online for referring others to.
This post from Jay Cross brings together his similar lists, including a link to the Internet ...Workshop Resources from New Practices Projects
http://www.otheredge.com.au/klogs/toolkit/2007/workshop-resources-from-new-practices-projects.htm
2007-05-08T19:54:40ZKirstyPD Resources and ApproachesResource Development ToolsToolsFantastic resource for our team as we work with teachers!
from the Australian Flexible Learning Framework...
In 2006 some of the past New Practices in Flexible Learning project
teams developed workshop resources for their projects. These workshops
are now available as professional development opportunities on a fee
for service basis, and to further enhance the ...Podcasting from Uni of Wisconsin
http://www.otheredge.com.au/klogs/toolkit/2007/podcasting-from-uni-of-wisconsin.htm
2007-04-28T11:34:10ZKirstyPD Resources and ApproachesResource Development ToolsToolsengage - transforming teaching and learning through technology
For educational purposes, a podcast could be:
* course audio files, e.g. bird calls or heart sounds
* mini lessons with audio and visuals, eg., glossaries with sound and images, slides with voice-over explanations
* audio or video case studies containing interview with experts or other ...Internode - Unmetered Content
http://www.otheredge.com.au/klogs/toolkit/2007/internode-unmetered-content.htm
2007-04-28T10:39:12ZKirstyTech StuffResources/ LOsInternode - Unmetered Content
Zac has just pointed out that we can get unmetered downloads from the ABC site. Pretty neat considering the plethora of topics and formats they have available. Seems to be more and more every week. Andys Black Hole: Are you seriously Mobile ???
http://www.otheredge.com.au/klogs/toolkit/2007/andys-black-hole-are-you-seriously-mobile.htm
2007-04-11T03:39:26ZKirstyLeadership, Change and OrganisationsInnovation, Ideasvia Andys Black Hole: Are you seriously Mobile ???
In a post about mobile workforces, this quote caught my eye:
“Creativity is no longer about which companies have the most visionary executives, but which have the most compelling architecture of participation. That is, which companies make it easy, interesting and rewarding for ...Staff Induction about Australian Apprenticeships
http://www.otheredge.com.au/klogs/toolkit/2006/staff-induction-about-australian-apprenticeships.htm
2006-11-07T22:40:07ZKirstyPD Resources and ApproachesWorkplace LearningResources/ LOsThis could be a really useful presentation when working with teams to set the scene about apprenticeships - I'm thinking the teacher induction program and also when we are working with teams coming to grips with apprenticeships properly for the first time.
from the DEST website
"New Staff Induction Presentation - UPDATED
This ...Six Word Learning Plans
http://www.otheredge.com.au/klogs/toolkit/2006/six-word-learning-plans.htm
2006-11-02T03:57:40ZKirstyLearning DesignSnippetsFrom Mark Oehlert comes the notion of 6 word learning plans. Recently in a workshop Marie Jasinski intorduced me to the notion of writing a 32 word summary, then reducing it 16, then to 8, then to 4, then to 2 - a game called essence. To be able to ...Online Enrolments
http://www.otheredge.com.au/klogs/toolkit/2006/online-enrolments.htm
2006-10-18T04:50:29ZKirstySnippetsLearnScopeOne of the other projects was e-business focussed - about secure online enrolments for our institute!
The project was a research project to see what was involved - because of the diverse environments we work in, and different ways we enrol students it's not simple. You have to draw in the ...