Loading...
 
Skip to main content

Features / Usability


Re: 'tagging' or 'categorizing' text within a wiki page

Gary,

Thank you very much for responding.

Of course I don't expect anything for free. But one can always hope someone else has their own selfish need for the same thing, the capability to do it, and the willingness to share (the reason I can enjoy using Tiki today). Never hurts to fish 😊

I won't go the consultant route, at least not at this time. I'm guessing it would be quite pricey. The club has no funds for it, and I'm not feeling quite generous enough to take on the expense myself (though I'm a member too). Maybe I'll be a Tiki contributor in the future, and maybe this will be my contribution. First I'll have to build up the nerve to dive in. Everything new is intimidating at first, at least for me. I've done a little php for my old website, and years of C++ helps with understanding the basic constructs. It will be hard to find time to learn how to program plugins. But because of this topic, my interest is building.

Before I even start considering this, I'll have to figure out what is even in the realm of possibilities. May I ask for quick answers to some questions? A point in the right direction? Yes or no answers (not how) to whether certain things are possible? Maybe this belongs in a different forum now. I'll continue here for one more round...

Starting with the self-help question:
Q: Is there a Tiki Plugin Programming Guide (quick Google search yielded nothing promising)

For my idea to work efficiently, I think the information will have to be stored in a database
Q: Is it possible to create custom tables?

To be useful, the user would not have to manually add anchors and links (the "simplest form" you mention). So to be useful, the plugin that identifies the items should be able to parse the code and create the database entries. MakeToc parses and creates links, so I know parsing the contents of the page is possible. But it creates static links on the page.
Q: Is it possible for a plugin to add/remove/modify entries in a database table? (I know you you can do this with PHP, I'm asking within the context of a Tiki plugin)
Q: Can the plugin know the difference between 'preview' and 'save'? The database should not be altered on preview, lest the user cancel the page edit). The result would be broken links on the index page.

I'll have to figure out how entries are removed from the database when the user edits a page and removes occurrences of the plugin. If there is no plugin, there is nothing to send database statements. The result would be broken links in the table. I guess there is no question here. I'll have to figure that one out on my own. I have a couple ideas already - but not good ones. I'll cross that bridge when I come to it...

Back to the subject of general usefulness, if I may:

I referred to this as 'tagging' before, but I'm just starting to realize that 'index' is a much better word for it (even though I use my current approach for a page titled "Ship Index"). It's exactly like the index for a book, or if you prefer, the yearly index for a periodical. That makes it sound of much more global interest than you (or I) may have originally thought. I don't expect volunteers to suddenly come out of the woodwork, but perhaps some encouragement for me to pursue this. So I'll amend my idea:

{INDEXITEM(index=, key=, class=}{INDEXITEM}

notes: 'group' change to 'index', 'item' changed to 'key', 'list' dropped (when not listed, all you get is formatting, which can be done more easily and with less overhead)

The purpose of 'index' is to allow more than one index per site. Books are the same in that they can have multiple indexes. I have one on wine with a generic index and a index to Chateau, for example.

{INDEX(index=, key=, links=1|0, page=id, order=alpha|freq, linktext=title|?|?, format=list|table)}{INDEX}

notes: 'group' change to 'index', 'item' changed to 'key'


Long post, I know. Thanks for your time,

Greg

P.S. You may be wondering why I don't simply include a Google site search field. I wonder too. I guess I like two things about an index: 1) it is browsable 2) as long as the plugin code is good, it is always up to date (don't have to wait for Google to crawl it)