1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J....
-
Upload
clinton-morton -
Category
Documents
-
view
214 -
download
0
Transcript of 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J....
![Page 1: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/1.jpg)
1
Information Management
DIG 3563 – Lecture 8
Content Management Systems:
Plugins for Wordpress
J. Michael Moshell
University of Central Florida
Original image* by Moshell et al .
Imagery is fromWikimedia except where marked with *.
![Page 2: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/2.jpg)
-2 -
• There are LOTS of them• Their quality varies widely
- Maturity (length of service; number of users)
- Continuing support
- Experience of the builder
How to find out? Read the posting and forums!
![Page 3: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/3.jpg)
-3 -
Some Random Plugin Visits
• Petfinder Listing
Relies on the Petfinder.com API
(So you don’t have to build your own back-end).
Petfinder.com can host an entire animal-welfare
website.
Petfinder Listing allows YOUR site to get data
from a Petfinder.com – hosted website.
![Page 4: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/4.jpg)
-4 -
Gpawisconsin.org
![Page 5: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/5.jpg)
-5 -
Some Random
Plugin Visits
• Buddypress
Actually a COLLECTION of plugins
to support social networking
http://wordpress.org/extend/plugins/buddypress/
Example:
http://helloecoliving.com/community/
![Page 6: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/6.jpg)
-6 -
How is it built? See Source!
![Page 7: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/7.jpg)
-7 -
How is it built? See Source!
![Page 8: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/8.jpg)
-8 -
Examples:
• BuddyMobile
“Mobile BuddyPress theme optimized for ... iPhone,
iPod touch. Will also work on Android & some
Blackberry devices.”
For BuddyPress 1.5 only.
![Page 9: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/9.jpg)
-9 -
Examples:
• BuddyPress Media
“Production grade” social media hosting
“Drag and Drop” photos, audio, video between
Facebook, Flickr, YouTube ...
ecommerce capabilities
2.7 million users, 16,000 sites.
![Page 10: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/10.jpg)
-10 -
Beer Ratings
• Requires a RateBeer API Key
Better not say too much about this one;
somebody might do it for a term project
and we've had TOO MANY like this!
![Page 11: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/11.jpg)
-11 -
WP Survey and Quiz Tool
• Promising topic; many people need this•Maintenance via GitHub
BUT: Daunting feedback.
![Page 12: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/12.jpg)
-12 -
SS Quiz
• Downloads: 5,319• Apparently a Russian product
• I decide to get it and try it.
![Page 13: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/13.jpg)
-13 -
SS Quiz
• Downloads: 5,319• Apparently a Russian product
• I decide to get it and try it.
1) Download and unzip
2) Move into
wordpress/wp-content/plugins
3) In the Plugin menu, activate
![Page 14: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/14.jpg)
-14 -
SS Quiz
• Downloads: 5,319• Apparently a Russian product
• I decide to get it and try it.
1) Download and unzip
2) Move into
wordpress/wp-content/plugins
3) In the Plugin menu, activate
4) A new row appears in the Dashboard
![Page 15: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/15.jpg)
-15 -
SS Quiz
“To insert quiz into page, use short code
[ssquiz id=‘#’].
So I create a page and call it ‘Mikwiz’, insert
[ssquiz id=‘1’].
Quiz appeared. I took it.
![Page 16: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/16.jpg)
-16 -
SS Quiz: Control Panel
![Page 17: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/17.jpg)
-17 -
SS Quiz: Control Panel
Issues: (1) Why were questions 3, 4 radio buttons?
while 1,2,5 were textboxes?
(2) Is the data stored anywhere?
Answers: Exploring, I found:
![Page 18: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/18.jpg)
-18 -
SS Quiz: Scores
Stores the number of correct answers; no details
![Page 19: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/19.jpg)
-19 -
SS Quiz: Template
Augmented HTML, with %%TITLE%% etc.
![Page 20: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/20.jpg)
-20 -
SS Quiz: Template
How do I set “Title” and other variables?
Experimenting with the user interface, I observe
the phrase “Let’s start the quiz “%%TITLE%%”!
On the quiz page, I see:
![Page 21: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/21.jpg)
-21 -
SS Quiz: Template
Likewise, I observe:
![Page 22: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/22.jpg)
-22 -
SS Quiz: Template
SO I conclude that these “variables” correspond
to built-in features of the SS Quiz Plugin:
TITLE
DESCRIPTION
QUESTIONS (number of questions entered)
![Page 23: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/23.jpg)
-23 -
SS Quiz: Template
And likewise,
PERCENT
TOTAL
![Page 24: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/24.jpg)
-24 -
SS Quiz: We Played a bit
Experiment with creation of a Quiz
and
the use of the Question Editor
![Page 25: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/25.jpg)
-25 -
SS Quiz: We Play a bit
Experiment with creation of a Quiz
and
the use of the Question Editor
Identify one or more shortcomings of the Plugin:
![Page 26: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/26.jpg)
-26 -
SS Quiz: We Play a bit
Experiment with creation of a Quiz
and
the use of the Question Editor
Identify one or more shortcomings of the Plugin:
•no UNDO. I delete a question, it’s gone•no actual answer storage. I can’t diagnose...
![Page 27: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/27.jpg)
-27 -
Time to Build our Own
Plugin. I seek a Tutorial.
http://codex.wordpress.org/Writing_a_Plugin
I start a log (word document) to remember what I do.
![Page 28: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/28.jpg)
-28 -
Step 1: Trivially modify existing code
Hello Dolly
Go to Plugins menu, activate the plugin.
Small lines of text appear in upper right
corner of the Admin screen.
![Page 29: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/29.jpg)
-29 -
Step 1: Trivially modify existing code
Understand the Header Comment
It’s NOT ignored by the system. It’s essential!
![Page 30: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/30.jpg)
-30 -
Step 1: Trivially modify existing code
Make a copy of hello.php, call it hello2.php
Look at plugins menu again. Wierd, huh?
![Page 31: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/31.jpg)
-31 -
Step 1: Trivially modify existing code
Modify hello2 just enough to recognize it.
Change its name to dolly2
change text to refer to ‘Herman’
Note and fix the
add_action( ) function.
KEY QUESTION: WHAT ARE ‘actions’?
![Page 32: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/32.jpg)
-32 -
Step 1: Trivially modify existing code
Learn about ‘actions’.
http://codex.wordpress.org/Plugin_API/Action_Reference
NOTE: You are not required to program in
this course. But you are required to understand
key concepts, and action is one of those.
![Page 33: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/33.jpg)
-33 -
Step 1: Trivially modify existing code
An Action in Wordpress is called an event
in other languages.
As Wordpress runs, it will check its action lists
for functions that should be called, at various
times.
Each plugin can add functions to those lists.
![Page 34: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/34.jpg)
-34 -
![Page 35: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/35.jpg)
-35 -...and many more ...
![Page 36: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/36.jpg)
-36 -
Step 1: Trivially modify existing code
There's a plugin that looks "Suspiciously"
like a Hello-World (starter kit) example
![Page 37: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/37.jpg)
-37 -
Step 1: Trivially modify existing code
The action in this “Hello Dolly” story
is called admin_notices.
'admin_notices', which
apparently has to do with the top row of
the admin screen.
![Page 38: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/38.jpg)
-38 -
Step 1: Trivially modify existing code
So, I add my OWN action to see what happens.
![Page 39: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/39.jpg)
-39 -
Step 1: Trivially modify existing code
So, I add my OWN action to see what happens.
I edited hello.php as above. And the result ...
![Page 40: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/40.jpg)
-40 -
Step 2: Make something more interesting
I wanted to put something into the main
data area, where PAGES appear.
It took me an hour of exploring to discover an
example. Cut to the chase ... here’s what I
found.
![Page 41: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/41.jpg)
-41 -
Step 2: Make something more interesting
I wanted to put something into the main
data area, where PAGES appear.
It took me an hour of exploring to discover an
example. Cut to the chase ... here’s what I
found.
![Page 42: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/42.jpg)
-42 -
Step 2: Make something more interesting
Example: A ‘filter’ to replace all the “<h1>”
tags in a page with ‘<h3>’ tags.
How was that done?
With REGULAR EXPRESSIONS!
![Page 43: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/43.jpg)
-43 -
Step 2: Make something more interesting
I wanted to actually inject some copy
into a page. So I added an operator to replace
a tag ‘JMMtrigger’ with the text.
![Page 44: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/44.jpg)
-44 -
Step 2: Make something more interesting
![Page 45: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/45.jpg)
-45 -
And I had to find an Action to use.
The example code showed me this:
A ‘filter’ is an action that will take in the content
of a page, do stuff to it, and then send it on
to the screen.
So this filter will add the JMMexchange stuff.
![Page 46: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/46.jpg)
-46 -
JMMexchange will do two things:
1) Replace H1 with H3 tags, and
2) replace the word JMMtrigger
with the data provided by my function.
![Page 47: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/47.jpg)
-47 -
Then I needed a page to contain the
stuff. Edit-view:
![Page 48: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/48.jpg)
-48 -
Then I needed a page to contain the
stuff. HTML-view
![Page 49: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/49.jpg)
-49 -
AND the result on my front page.
![Page 50: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/50.jpg)
-50 -
Things to understand about Plugin-making:
1)Making Plugins requires PHP skills
2)What is an Action
3)What is a Filter
4)What is the relationship between the code in the Plugin, and the text of a page?
How is the plugin’s activity triggered?
How can it modify the text of a page?
![Page 51: 1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.](https://reader037.fdocuments.us/reader037/viewer/2022110208/56649dce5503460f94ac2009/html5/thumbnails/51.jpg)
-51 -
Things to understand about Plugins:
1) Their quality and complexity varies WIDELY
2) They seldom do exactly what you want
3)You can modify ‘em, but keep a clean copy.
AND the MORAL:
Invest the effort to find a module* that actually
does what you need (or, as close as possible.)
(*: Plugin, in Wordpress-speak!)