Hi Kev
No doubt that Erics plugin is the most versatile plugin for changing
almost anything in a TW "on the market"
- but RenameTagPlugin helps you to keep track of your tags on the fly.
If you make - or already have a tiddler titled Security - and rename
it to (for example): security then the plugin will ask you if you want
to rename the tag Security to security in the tiddlers tagged
Security...
It's very handy - and intuitive.
However I don't remember where I got it from - and it doesn't say so
in the plugin code - so here's a copy (be aware of googlegroups
textwrapping!!)
Copy this to a tiddler called: RenameTags and tag it : systemConfig:
config.renameTags = {
prompts: {
rename: "Rename the tag '%0' to '%1' in %2 tidder%3?",
remove: "Remove the tag '%0' from %1 tidder%2?"
},
removeTag: function(tag,tiddlers) {
for (var i=0;i<tiddlers.length;i++) {
store.setTiddlerTag(tiddlers[i].title,false,tag);
}
},
renameTag: function(oldTag,newTag,tiddlers) {
for (var i=0;i<tiddlers.length;i++) {
store.setTiddlerTag(tiddlers[i].title,false,oldTag); //
remove old
store.setTiddlerTag(tiddlers[i].title,true,newTag); //
add new
}
},
storeMethods: {
saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,
saveTiddler: function
(title,newTitle,newBody,modifier,modified,tags,fields) {
if (title != newTitle) {
var tagged = this.getTaggedTiddlers(title);
if (tagged.length > 0) {
// then we are renaming a tag
if
(confirm(config.renameTags.prompts.rename.format
([title,newTitle,tagged.length,tagged.length>1?"s":""])))
config.renameTags.renameTag(title,newTitle,tagged);
if (!this.tiddlerExists(title) &&
newBody == "")
// dont create unwanted tiddler
return null;
}
}
return this.saveTiddler_orig_renameTags
(title,newTitle,newBody,modifier,modified,tags,fields);
},
removeTiddler_orig_renameTags:
TiddlyWiki.prototype.removeTiddler,
removeTiddler: function(title) {
var tagged = this.getTaggedTiddlers(title);
if (tagged.length > 0)
if
(confirm(config.renameTags.prompts.remove.format
([title,tagged.length,tagged.length>1?"s":""])))
config.renameTags.removeTag(title,tagged);
return this.removeTiddler_orig_renameTags(title);
}
},
init: function() {
merge(TiddlyWiki.prototype,this.storeMethods);
}
}
config.renameTags.init();
YS Måns Mårtensson
On 5 Sep., 22:19, kev <[email protected]> wrote:
> I have some tiddlers tagged "security" and some tagged "Security" -
> very annoying cos after all this time I still can't type
> accurately! :)
>
> If I select the tag from the tag list and then open the Tag tiddler I
> get a nice list of the tiddlers. I seem to remember that there was a
> simple way of retagging all of the tiddlers at the same time? Or not?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---