Currently using path: etc. is limiting. If I want to add a flash video I can't use path: as it doesn't include a src or href tag. I would suggest using &path& as it won't be used as often and it is how the token module handles tokens. If someone wants to add &path& and not have it replaced they can use &path&

Hopefully patch to follow soon.

Comments

redndahead’s picture

It should say "If someone wants to add &path& and not have it replaced they can use &path&"

redndahead’s picture

I would prefer the paths to change in advanced help, but in case someone wants a little hack to get that path in their help files using js here is what I use:

var dummyPath = '<a href="path:]">';
pathArray = dummyPath.split('"');
helpPath = pathArray[1].substr(0,pathArray[1].length - 1);
redndahead’s picture

Will be submitting the patch shortly. Just wondering if you would like the using-advanced-help.html file to only use the &path:&, have instructions for both ways or use &path:& but say something about the path: being the old way of doing things?

Also would you like me to update the current advanced_help help files to reflect this new syntax?

merlinofchaos’s picture

It should document both and mention path: as being the 'old' way of doing things.

redndahead’s picture

Status: Active » Needs review
StatusFileSize
new4.74 KB

Here is the patch. Pretty straightforward mainly needs a review on the language of the help topic on using tokens.

merlinofchaos’s picture

Hn,mmm. The way this is implemented worries me. & is a legal character in a URI and you did &path:foo& rather than &path& foo like I was expecting. Does that break if & is part of the URL?

redndahead’s picture

StatusFileSize
new4.78 KB
new4.68 KB

Hmm thought I replied to this already. It definitely does. Made the change, it should now be:
&path&myfile.jpg
&base_url&myfile.jpg
&topic:module/topic&

The module name and topic would not be allowed to have an & in them. Is this even allowed? If this is going to cause a problem maybe we can do:

&&path:foo&&
&&base_url:foo&&
&&topic:module/topic&&

Preference? Both patches are attached.

merlinofchaos’s picture

& is not valid in a module name and we can arbitrarily say it's not valid in a topic name. This looks better, I'll go with this later this week. Thanks!

redndahead’s picture

StatusFileSize
new4.34 KB

The previous patch had a missing .'/' in the path url. This one corrects that and adds some cleanup.

merlinofchaos’s picture

Status: Needs review » Fixed

Finally committed. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.