Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Tag Selector Field for blog


Reply

3 Posts   1982 Views

Avatar
Nathan Cox

1 November 2007 at 1:53pm (Last edited: 1 November 2007 1:56pm), Community Member, 99 Posts

Hi,

Just thought I'd share something I've been working on: a new form field, TagSetField, for selecting tags when you're posting with the blog module, inspired by the tagging in the del.icio.us plugin for Firefox.

To make it go you can put TagSetField.php into the project's /code folder and copy the styles from tagsetfield.css into you're theme's stylesheet (they're for BlackCandy).

In blog/code/BlogHolder.php's BlogEntryForm method replace

new TextField("Tags","Tags"),

with

new TagSetField("Tags","Tags", $this->Children()->toDropDownMap('Tags', 'Tags')),

to enable it for front-end blog editing.

It needs refining, but it works.

Hey, I can't see the attached files...is that not how it works? You can get the files [url=http://www.flyingmonkey.co.nz/assets/tagset.zip]here[/url]

Avatar
Tim

1 November 2007 at 3:19pm Core Development Team, 201 Posts

Thanks for your contributions Nathan :-)

Avatar
Ingo

1 November 2007 at 10:13pm Forum Moderator, 801 Posts

great idea! just one suggestion: we prever to have javascript in external files (rather that customScript()). at the moment, this means an additional http-request and slows things down, but it leaves the opportunity to implement a serverside minifying/combining/caching in a future release (something we're currnently discussing to make the CMS load faster)