XESBlog
Questions answered by this recipe
How can I create a Blog in PmWiki without having to pull together all the components and tricks to do it myself?
Answer
Install XES Blog package and it will give you a wide array of functionality and step-by-step instructions to get up & running with a blogging engine in your PmWiki installation. Currently this recipe is set up for the administrator (admin) to create blog entries and manage the website, and website visitors are allowed to add comments to the website.
Description
Blogging recipe - compilation of other recipes and custom functions.
Features
See XES Blog - Use for usage documentation. End-user documentation is separated from administrative/technical information so that you have an easier time giving step-by-step use instructions to customers or fellow website users/bloggers once the recipe is installed. Screenshots are included in the step-by-step blog use tutorial, so you can get an idea of what the site looks like when the recipe is installed.
Public features
|
Admin features (when logged in)
|
2023 version Deprecated features:
- Pingback (requires PEAR library) optional, default is off
- Google blog ping optional, default is on
- blog with XMLRPC (Ecto, etc.) optional, default is off
Notes
All screenshots are on a (pretty-much) bare-bones install of PmWiki with very little formatting/css added.
License Note: since this recipe includes a bundle other recipes, the GPL2 licensing applies where possible. The instructions on this page are CC0 licensed. All bundled recipes by other authors than XES are under their own licenses.
Step One: Add files to server
Download, expand and install xesblog.tgzΔ or xesblog.zipΔ components: everything inside the cookbook folder should be added to your cookbook/ directory, the xeslib.d folder should be placed in the same folder as contains your wiki.d folder, and the blog-images folder should be placed in the root of your web directory. Other configurations are possible, but this is how the package was set up, and you'll have to fiddle if you change it.
Step Two: Installation
Add the following text to your local/config.php file:
$LinkFunctions['Pub:'] = 'LinkIMap'; $IMap['Pub:'] = $PubDirUrl . '/$1'; // this is an InterMap for the URL path to your pub folder include_once($FarmD.'/cookbook/xesblog.php');
$XesBlogGroup = "News";
and $ListCategories_SizedlistNum = 150;
means you'll have up to 150 categories in the tag cloud. [NOTE: If you change the group & page name all the included page templates will be off -- groups will need to be changed in pagelists, pagenames in xeslib.d should be changed to the new group name, etc. Changing the group name is still being tested. There may be bugs. You've been warned.] More configurations in xesblog.php willand will be moved to SDV later for easy tweaking of the overall package.Step Three: Pimp your sidebar
When Logged Out |
When Logged In |
Make the following tweaks to the bottom of your sidebar (or add these links, lists, & icons to other chosen area of your website):
* [[Blog/Blog]] * [[Blog/TagCloud | Blog Cloud Index]] * [[Category/Category| Tags]] * [[BlogArchive/Blog Archive]] [[Blog/RecentChanges?action=rss | Pub:blog-images/blog-rss2.0.gif]] [[Blog/RecentChanges?action=atom | Pub:blog-images/blog-atom.gif]] ---- Backlinks: (:pagelist link={*$FullName} fmt=#titlespaced group=-Site,-PmWiki:) ---- (:if auth admin:) (:newpagebox base=Blog.Blog label=Blog:) * [[ {*$FullName}?action=logout | logout]] (:else:) * [[ {*$FullName}?action=login | login]] (:ifend:) (:if auth admin:)[-[[Site.SideBar?action=edit | edit SideBar]]-]\\ [-[[Site/XesCommentsTemplates?action=edit | edit Blog Comments]]-] [[Comments/Unapproved \ | (:pagelist name=-GroupFooter,-GroupAttributes,-RecentChanges,-Unapproved \ group=Comments fmt=count if="!equal {{=$FullName}$Xes_Approved} true":) \ unapproved comments]] (:ifend:)
Edit as necessary -- if you changed the blog group, you'll need to tweak this setup.
Step Four: Enable public comments & pingbacks
Navigate to Comments/GroupAttributes?action=attr
in your installation and change the edit password to @nopass
to allow the public to leave comments. Do the same with Pingback/GroupAttributes?action=attr
Step Five: Go crazy
Feel free to upgrade any of the component packages that are installed -- each is maintained separately by other recipe authors and may have been upgraded before this recipe is updated. Also, poke around pmwiki.org and learn how to add functionality, more add-ins, and redesign your website, however often you'd like.
Step Six: Make it pretty.
Here's some CSS to customize a few components. Add to pmwiki/pub/css/local.css (create the file if it doesn't exsit):
div.category { background-color: #EEE; margin-top: 20px; text-align: right; padding: 0px 20px; } div.category a { color: #333; font-style: italic; font-size: 85%; } form.xesapprovebutton submit { text-align: right; } .commentblock { padding: 20px; border-bottom: 1px #333 solid; }
Functionality notes
I do have to document one of the more obscure features of the package. I've added an attribute (variable value) to pages in the Comments/ group -- $Xes_Approved. This value is set to "true" (note this is a string value) when a page has been approved by the administrator. When doing pagelists of comments, you will want to keep this attribute in mind. It is used to filter approved from unapproved comments, as in this sidebar example (also above):
(:pagelist name=-GroupFooter,-Unapproved\ group=Comments fmt=count if="!equal {{=$FullName}$Xes_Approved} \ true":)
Release Dates
- 2023-12-08
- Deprecated features: GoogleBlogPing, XMLRPC, Pingbacks. Otherwise this still seems to still be working. Cleaned up links to scripts so it's farm-ready, and checked as working with PmWiki 2.3.28.
- 2014-01-29
- Many tweaks, nothing terribly important:
- changed to NewPageBoxPlus
- moved image folder to pub/
- updated the bundled PmForm
- disabled Pingback & XMLRPC by default (enable with
$XesAddPingbacks = true;
and$XesAddXMLRPC = true;
respectively before you include xesblog.php to re-enable). I never got Pingbacks to work, and most people probably don't use blogging software to need XMLRPC. If you add Pingbacks, you will need to add$XesPingNotify = "email@example.org";
(with the correct email address) before including xesblog.php. - due to feedback with installing the recipe on already-established sites, I added ability to disable URLApproval (use
$XesAddURLApproval = false;
but use with caution!). I don't recommend it. - Added $XesAddGoogleBlogPing default is true (on) but it can be disabled. I'm not sure Google Blog Ping works, and if you don't care, you may as well disable it to save server-side processing.
- Oops: need to create an InterMap so that everyone can find the feed images whether on a farm or otherwise. Added to documentation above and fixed links in the sidebar. Will add to basic recipe next time.
- 2008-04-01
- Thanks to Hugo for help with the FarmD component for the package. Now should be Farm compatible. Also added recipeinfo per Cookbook Recipe suggestions.
- 2008-01-08-07
- Some of the changes that were supposed to be in yesterday's release were not uploaded. Today: fixed xeslib.d pagestore issue, you can now turn off Pingbacks in case you don't have PEAR (add
$XesAddPingbacks = false;
to your config.php file), and I tested it on a clean install of PmWiki to squish bugs. A few pagelists were tweaked, and more.... - 2008-01-07-06
- Now RSS feeds are more configurable, with default values set up and a bunch of variables that can be set by the user. "Blog.Blog" is now the default blog homepage, and 150 is the default number of categories in the TagCloud -- to use the recipe out of the box you only need to set the email address for notifications and include xesblog.php. Resolves issues where general RSS would show pages & groups you probably didn't want it to, so now general RSS feeds are restricted to groups and pages you probably want to show up in the feeds, and all of this is in SDV variables so they can be overridden in config.php.
- 2008-01-07-05
- Fixed RSS feeds so they now work site-wide instead of blog-only.
- 2008-01-06
- Note change to backlinks pagelist in sidebar to
fmt=#titlespaced
. Added captcha.php to bundle. BlogArchive pages fixed in the xeslib.d pagestore (hopefully). -- to fix manually change BlogArchive.GroupHeader to:(:pagelist group=Blog link={*$FullName} \ list=normal name=-Blog,-GroupHeader,-GroupFooter,-RecentChanges,-TagCloud,-SideBar \ order=$:timestamp fmt=#title:)
- 2007-12-17
- Fixed Comments group redirect to point to correct Blog page (timestamp regex added)
- 2007-12-12
- Adds automated monthly blog archives, fixes sidebar link problems, tweaks some features
- 2007-12-04
- First package release
To Do
- Fix pingbacks - probably not working yet, forgot the special pingbacks PEAR package from the recipe....
- Can't tell if Google pings are working....
- Move more configurable items to SDV vars.
- i18n.
- fix bugs
- add pingback display in templates.... (oops)
- add support for more than just RSS extended content feeds....
See Also
In action:
Documentation/Use notes:
Bundled Packages
This recipe borrows from many other recipes. To tweak blog capabilities or features, you may have to check the documentation on these pages.
- XMLRPC (allows external editing of your blog with blogging software -- see XMLRPC page for compatibility with different editors)
- Pingback (if upgrading, note that the lowercase pingback.php should be renamed to pingback_pmw.php and the modded PEAR file remains Pingback.php -- MacOSX doesn't care about upper vs lowercase and wants to overwrite the lowercase with the uppercase file....this change keeps the module cross-platform compatible)
- TagPages
- ListCategories
- PmForm & Captcha
- EnhancedWebFeeds
- GoogleBlogPing
- UrlApprovals (enabling the PmWiki feature to approve external URLs)
- NewPageBoxPlus
Ideological Contributions
Here's a partial list of ideological credits (concepts on pagelists, templates, wiki-as-a-blog use, etc. used in the recipe), by no means in any specific order:
- Bundle4Blog (for suggested recipes and features for a blog, not a recipe in itself)
- Backlinks
- CommentsSplit
The rest of the credit goes to PmWiki's flexibility and I take some credit for getting tired of people saying blogging doesn't exist yet, and making it work as a cohesive package. Not sure how much of this functionality people wanted added to the core, but whenever possible I used [Cookbook/PmForm]] and core principles for building this package, so it should be able to stand tough for quite some time.
Comments
This space is for User-contributed commentary and notes. Please include your name and a date (eg 2007-05-19) along with your comment. Optional alternative: create a new page with a name like "ThisRecipe-Talk" (e.g. PmCalendar-Talk).
See discussion at XESBlog-Talk
User notes : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.