DailyQuote Plugin - Usage Document
DailyQuote Plugin Version 1.0.5
by Alford Deeley aka machinari
Last Modified: Dec 26, 2004
E-mail: ajdeeley@summitpages.ca
Web site: http://summitpages.ca
DailyQuote Plugin 1.0.5
- Features
- Random/Cached Quote
- phpblock_randomquote/Center Block
- What's New/GL Stats/Search
- The Menu Block
- Add/Delete a Quote
- Search the Repository
- Clickable Links
- Navigating the Categories
- Batch Add Quotations
- Moderate Submissions
- Manage Quotes
- Manage Categories
- Permissions
- Rights
- Configuration
- Backup/Restore Utility
- Upgrade
- Note: Profile Display Integration
- To Do's
- Features
- Retrieves quotations and related information from one's own database not relying upon
any other web sites, and displays those quotations on the plugin's index page together with
the by-line as well as contributor information.
- Can also display a random or cached quote (cache time is configurable) in a center block,
or a PHP block.
- Quotations can be categorized and can belong to multiple categories.
- Quotations are searchable by keywords, personalities, contributors, etc. Quotations
can also be sorted on the main index page according to various criteria.
- A category index page exists for your convenience.
- Users have the ability to add to your collection.
- Users have the ability to add multiple quotations at once.
- Many configurable options on the admin page.
- DailyQuote has taken advantage of many of GeekLog's plugin API calls. The "
What's New" block as well as the native GL search engine and stats page are all supported.
Moderation functions are not supported. However, the plugin makes use of its own moderation
system and is fully configurable with respect to permissions.
- Configurable permissions allow or disallow members and/or anonymous
users to add and/or view quotations.
- This plugin was designed with GeekLog 1.3.9x in mind, but is 1.3.10 compliant.
- Random/Cached Quote
A random or cached quotation is displayed in a box at the top of the main plugin's pages. This displays
the most basic function of this plugin, i.e., to display data retrieved from a database.
- phpblock_randomquote/Centerblock
As well as displaying the quotation at the top of various plugin pages, a random or cached quote may be
displayed in a center block just as staticpages or the ever popular forum plugin may be. A random or
cached quote may also be displayed in an already defined PHP block as configured in your
<public_html>/admin/block.php. It has only to be enabled from that page to make it to your
display and of course permissions matter.
Optional Block Components::
- By default, the related information is not displayed with the quotation when it appears in the
phpblock, the centerblock, or the random quote block. Only the quotation and the personality quoted will
appear. Some other information, such as the contributor's byline, the source, the source date, etc., is
configurable and can be made to appear, or not, from the admin page.
- What's New/GL Stats/Search
The "what's new" listing can be turned on or off from the admin page. It lists, by default,
those quotations approved within the previous 14 days. The by-line provides the content of the list and
clicking on any of the names will bring you to the search page, which will display the matching quotation.
The list provided on the GL stats page displays the top ten most quoted personalities contained in the
repository and clicking on any of the names will bring you to the search page once again, but now all
quotations by that personality will be displayed.
The GL search results function similarly, but within a
broader spectrum. The results from a GL search list the quotation, the by-line, and the contributor. By clicking
on any of these you are redirected to the plugin's search page where either the quotation, or
all quotations by a particular personality, or all quotations submitted by a particular contributor are displayed.
- The Menu Block
If you run GeekLog 1.3.10, you'll notice a menu block dynamically created in your left blocks column whenever you
are on a dailyquote plugin page. This menu replaces the usual link row that will appear at the top of the plugin
pages in all earlier versions of GeekLog for which this plugin is compatable.
- The bracketed number beside the "listing" link reflects the total active entries.
- The bracketed number beside the "categories" link reflects the total active categories.
- The bracketed number beside the "moderate" link reflects the total unapproved entries in the submission queue.
- Add/Delete a Quote
To add a quotation you have only to follow the link provided in the "user functions" block, and
once at the add page, paste or type your quotation into the space provided. You may create a new category
at the same time by filling in the appropriate space or you may simply use the checkboxes to select relevant
categories. All quotes are considered miscellany unless otherwise indicated. Click on "submit quote"
and you are done.
You may, if you wish, restrict the add page to logged in members only from the admin page.
Note: do not enclose your quotations in double quotes whether you are adding one or many. The logic will supply
your outermost quotation marks.
- Search the Repository
From any of the DailyQuote pages you may click on the search link, which will then take you to the search page.
Once there you can search the repository by supplying at least one keyword. You may select from the various
drop downs the type of search you wish, e.g., you may search by contributor, quotation, by-line, or date. You
may also limit your search to a particular category or contributor. Results return all information relevant to
a particular quotation.
- Clickable Links
Quotations can be displayed along with related information such as source, date, contributor, etc. A few of these fields
are clickable, i.e., you can click on them and be lead to another page.
- If the personality quoted is clicked on then the user will be transferred to the google search page where results are displayed for that personality. This feature can be enabled/disabled.
- If the contributor/user name is clicked on then the user will be transferred to the contributor's profile page.
- If the category is clicked on then the user will be taken to the search page where all quotes in that category are displayed.
- Navigating the Categories
From any of the DailyQuote pages you may click on the categories link, which will then take you to the categories page.
Once there you can select and click on any category title from the list of active and enabled categories, which
will in turn display the results on the search page. The results will consist of all quotes assigned to that
particular category.
Note:
- An active category is that category which contains quotes. An disabled category refers to that category
which contains quotes, but has been turned off and so is not displayed. This may be accomplished from the
category management page--see "Manage Categories."
- Batch Add Quotations
If you are the plugin's admin or have been granted permission by the admin, then you have the
ability to add multiple quotes at once. To accomplish this you have only to submit a tab-delimited
text file containing 5 columns: the quotation (tab); the by-line (tab); the category; the source (tab);
and the source date. The by-line and/or the category, the source, and the source date may all be left blank (do not
forget the tabs however!), but there must be a quotation of some kind before the first tab or you will receive
an error at the very least. You may create a new category independent of the submitted file by filling in the
appropriate space in the form. That newly created category will be applied to any blank category fields in the
file.
Note: do not enclose your quotations in double quotes whether you are adding one or many. The logic will supply
your outermost double quotation marks.
- Moderate Submissions
As admin you have the ability to turn ON or OFF the submission queue. This means that you may moderate user
submissions if you so desire or feel it necessary to do so. The queue is turned on by default, but you can switch
it off from the admin page. When moderation is turned on, all submissions must pass through the queue for
approval, deletion, or editing. If there are submissions in the queue, the admin is notified on the "manage
quotes" page as well as the admin page. When moderation is turned off, all submissions left in the queue
will summarily be approved and no more submissions will be passed through moderation (until the queue is turned on
again), but will instead be added directly to the repository ready for display.
- Manage Quotes
Admins will find a "manage quotes" link in their "user functions" block. This page
allows you to edit any quotation, by-line, or category that resides in the database except for those
that are still in the submission queue if any. You may also change who contributed the quotation if
you wish. A use for that is when a user has forgotten to log in and requests that you put his name
on the otherwise anonymously contributed quotation.
Quotes displayed on this page are displayed according to your search results. A search form is provided and the
results are displayed, each quotation within its own form, ready to be edited or deleted entirely.
- Manage Categories
The category management page allows you to edit, delete, create, and enable/disable categories independent of any
other page. When a category is disabled (e.g., seasonal quotes), all quotes belonging to that category are not
displayed on any page unless they belong also to an enabled category.
Note:
- Quotes may still be added to disabled categories, but will only appear when that category becomes enabled
or if they were also added to an enabled category.
- Disabled categories still appear in the category lists on the category index page, as well as the add form
and the management form, however, the text is greyed in order to indicate a disabled category.
- Permissions
Permissions are fully configurable and self-explanatory. You may configure permissions from the admin page.
Note: If you have given anonymous users permission to add a quote, but have not given them permission to
view the quotes, they will not be able to add a quote either.
- Rights
Rights refer to degrees of access one has within the DailyQuote pages. You may have rights by default, as admin does;
or you may only have permission. Permissions are configurable in most cases, but in order to gain rights, you must
be added to a group, which has been given those rights. Available rights include: view; add; and edit rights. Admin
has edit rights. By default, view rights are granted to the logged in members group.
What's the point?
An Example:
- You may turn off permission to add quotes effectively denying logged in members the ability to add quotes,
but have a select few still able to add quotes based on add rights given to a created group--those members
belonging to that group of course.
- Configuration
As I said, this plugin's functionality is very configurable. It does more than simply display a random quote
somewhere on a web page. In the "admins only" box you will find the DailyQuote admin link, which
will take you to the configuration page. From this page you may modify the default settings according to
what options are provided. You may also reset any modified settings to their default by clicking on the
"apply default settings" button at the bottom of the screen. In addition, from this page you may
check the integrity of your DailyQuote database and repair it if necessary.
The Default Settings:
- Anonymous users can view quotations, but cannot add a quotation.
- Logged in users can view quotations and can add quotations as well as create categories.
- Only admin may utilize the batch add feature.
- The submission queue is turned on, and all but admin submissions must go through the queue.
- The "what's new" list is enabled by default.
- A PHP block is defined and listed with your other blocks, but is disabled by default. This is
enabled on the blocks configuration page along with the rest of your GeekLog blocks.
- The center block is disabled.
- Cached quote refresh period is disabled in favor of a new quotation being displayed with every page refresh.
- See the admin page for more information--all settings are listed and accessible there.
- Backup/Restore Utility
New to version 1.0.5 is the ability to backup and restore your DailyQuote table data. This function is
available from the admin page.
Backup/Restore Features:
- Backup does not use the mySQL dump executable, but simply PHP.
- Backup creates a downloadable .gz file in the /dailyquote/data directory--just click on the link provided to download the file.
- A clickable list of previous backups is provided if any exist.
- Select from the list and you have the option to delete the file, restore the data from the file, or even
to preview the data in the file before you decide what to do with it.
Note:
- The backup function will store only data from your DailyQuote plugin tables and no other GeekLog tables.
- The restore function will remove all data from your present DailyQuote tables and restore the backed
up data from whichever backup file was selected.
- Upgrade
Always check the change.log and the install.html files in your docs/
directory. These documents will note changes and install/upgrade instructions. If there are no database changes
in the upgraded version of the plugin, then you may just overwrite your files adding/editing any changes you had
made previously. If the database was modified in anyway, you will find instructions in the install.html file and
an upgrade script included in the updates/ directory.
- Note: Profile Display Integration
Version 1.0.5 includes the ability to integrate into a user's GL profile display in order to list a user's last
10 dailyquote submissions as well as a user's total submission count. Because GeekLog seems not to fully support
a plugin's ability to accomplish this, I have had to make a couple of minor modifications to the core. These mods
have been sent to the developers in hope that they will intergrate them or some form of them into the GL core.
For now, if you would like to extend the user's profile display to include dailyquote stats for that user, then
follow these simple instructions:
- Notice a mods/ directory in your <geeklog_dir>/plugins/dailyquote/ directory. This directory
contains changes and additions to the geeklog core.
- <public_html>/users.php and <geeklog_dir>/system/lib-plugins.php will have to be
replaced. The replacement files are slightly modified versions of the 1.3.10 release.
- There is also one changed and three new template files that will go to your
<layout>/theme_name/users/ directory--required for all themes being used on your site.
- These changes have been sent to CVS as a feature request--we'll see what happens.
- To Do's
- Batch delete from the manage page (probably will end up on a separate page--like a summary manage page)
is still being worked out.
- Will add and option to admin that enables/disables the menu_item link for header.thtml.
- If you have further suggestions, bug reports, fixes, etc., please visit the development thread at geeklog.net
or at summitpages.ca and post. I'm sure, as simple as this plugin is, you would like other features or you
will find problems/bugs here and there. Please, Please, if this happens let me know. I'll see what I can do.
Thanks Everybody