QuickOpenTagPlugin Pretty Links vs. Core Pretty Links

13 views
Skip to first unread message

Mike

unread,
Mar 14, 2010, 5:55:37 PM3/14/10
to TiddlyWiki
Mr. Baird or any other Javascript guru,

Reference:
http://groups.google.com/group/tiddlywiki/browse_thread/thread/63880dbd295305d1
http://mptw.tiddlyspot.com/#QuickOpenTagPlugin

QuickOpenTagPlugin has a version of pretty links, and the core
currently has a version of pretty links - but they do not have the
same functionality.

I am wondering if Quick OpenTagPlugin could use the core pretty links?

Not sure how big of a code change that would be, or if it would even
be possible.
(I think it would break all legacy mptw pretty links, because the
format is different)

Thoughts,

Mike

Message has been deleted
Message has been deleted
Message has been deleted

Mike

unread,
Mar 16, 2010, 8:00:54 AM3/16/10
to TiddlyWiki
So after some more research my problem is in the createTagButton
function:

createTagButton: function(place,tag,excludeTiddler) {
// little hack so we can do this: <<tag PrettyTagName|
RealTagName>>
var splitTag = tag.split("|");
var pretty = tag;
if (splitTag.length == 2) {
tag = splitTag[1];
pretty = splitTag[0];
}

var sp =
createTiddlyElement(place,"span",null,"quickopentag");

createTiddlyText(createTiddlyLink(sp,tag,false),pretty);

var theTag =
createTiddlyButton(sp,config.quickOpenTag.dropdownChar,

config.views.wikified.tag.tooltip.format([tag]),onClickTag);
theTag.setAttribute("tag",tag);
if (excludeTiddler)
theTag.setAttribute("tiddler",excludeTiddler);
return(theTag);
},

Working
core pretty links
allTags macro Replaced (Quick Open Link + Drop down)
tag macro Replaced (Quick Open Link + Drop down)

Not Working
tags macro -trying to remove custom pretty links from function- (Quick
Open Link + Drop down)

Just need to try and figure out what all is going on in the above
function so that I can remove the "custom pretty links" but retain
functionality. (Brain Surgery vs. Hacksaw)

Mike

On Mar 14, 4:55 pm, Mike <eris...@gmail.com> wrote:
> Mr. Baird or any other Javascript guru,
>

> Reference:http://groups.google.com/group/tiddlywiki/browse_thread/thread/63880d...http://mptw.tiddlyspot.com/#QuickOpenTagPlugin

Message has been deleted

Mike

unread,
Mar 16, 2010, 9:06:13 AM3/16/10
to TiddlyWiki
Could someone please change the title of this
from:
QuickOpenTagPlugin Pretty Links vs. Core Pretty Links
to:
QuickOpenTagPlugin Pretty tag vs. Core Pretty tag

Referring to QOTP <<tag PrettyTagName|RealTagName>> vs CORE <<tag
'pretty link' 'real link'>>

Thank You,

Mike

Message has been deleted

Mike

unread,
Mar 16, 2010, 11:18:27 AM3/16/10
to TiddlyWiki
Here is where I am:
01: createTagButton: function(place,tag,excludeTiddler,title,tooltip)
{
02:
03: var sp = createTiddlyElement(place,"span",null,"quickopentag");
04:// createTiddlyText(createTiddlyLink(sp,tag,false),tag)
05:
06: var btn = createTiddlyButton(sp,title||tag,(tooltip||
config.views.wikified.tag.tooltip).format([tag]),onClickTag);
07: btn.setAttribute("tag",tag);
08: if(excludeTiddler)
09: btn.setAttribute("tiddler",excludeTiddler);
10: return btn;
11: },

Have a problem getting line 04 to work and inserting
config.quickOpenTag.dropdownChar on line 06

Thoughts?

Mike

Mike

unread,
Mar 17, 2010, 7:41:24 AM3/17/10
to TiddlyWiki
I think this is the line I am stuck on. . .
(Reverted back to MPTW createTiddlyButton for createTagButton
function, removed (7) lines related to pretty tags)

createTiddlyText(createTiddlyLink(sp,title||tag,false),tag); //create
quick open link

title||tag seems to act in reverse in this line vs from the core code,
I am thinking it is a syntax problem. . .

Mike

Mike

unread,
Mar 20, 2010, 9:29:49 PM3/20/10
to TiddlyWiki
Thank You Mark S. !

http://www.strm.us/tw/examples_twgg/qotp_hack

Updated & Working :P

Mike

Reply all
Reply to author
Forward
0 new messages