Go to content Go to navigation Go to search

taghandlersxt.php · Dec 26, 02:38 pm by Rick Silletti


I’ve collected all the changes and additions to taghandlers.php that I have done and built an experimental file that can be used to replace taghandlers and still maintain all the default capabilities. The transistion from one to the other should be transparent. What follows is included at the head of the file and includes installation instructions.

Link: taghandlersxt.php for download.

Link: taghandlersx3.php for download (Version 4.0.3 only).


Additions:

if_article_id – used in an article form and takes a select attribute to check for match to the current article id.

if_days_passed – takes a number of days attribute as an integer and returns true if that number of days have passed since it was posted.

if_days_not_passed – takes a number of days attribute as an integer and returns true if that number of days have not passed since it was posted. Conditional tags are double tags and will accept an else clause.

file_download_max – returns the linked file name and number of downloads for the file/files with most downloads by file category or the whole site.

file_download_total – returns the total number files downloaded with “file mod” links by file category or the whole site.

section_custom – will accept a comma delimited list for the name attribute to display sections, and will detect if a section is current and disable the link if it is. – in collaboration with Nate Hanna.

cssid attribute additions – added code to look for a css id attribute. If cssid is passed to any of the following tags, a css id will be rendered in the output for block level tags, in place of the class attribute ( you can blame Nate for suggesting this as well, though I do like the idea ). Normal default behaviors have been maintained.

linklist
recent_articles – added a sense attribute to set this tag to return articles from the current category only, if there is one set.
recent_comments
related_articles
category_list
section_list
section – added list capability with the name attribute and normal list attributes as well.
category – added list capability with the name attribute and normal list attributes as well.
image_index

if_article_section – added list capability for the name attribute.

Installation:
upload taghandlersxt.php to /textpattern/publish/, you should see taghandlers.php in the publish directory – put taghandlersxt.php in the same directory.

change line 34 of publish.php from:

- include_once txpath.’/publish/taghandlers.php’;
to:
+ include_once txpath.’/publish/taghandlersxt.php’;

that way, if the world breaks you can revert to your original file by changing your include path back to what it was.

This file is highly experimental and not fully tested, no guarantees can be given as to its usefulness or operation – that said, have fun.

Link: taghandlersxt.php for download.


Any feedback on this would be highly welcome


Name
E-mail
http://
Message
  Textile Help