Broken URL types & better templating
Forum » The Community / General community discussion » Broken URL types & better templating
started by: andrewdoullandrewdoull
on: 1210546620|%e %b %Y, %H:%M %Z|agohover
number of posts: 14
rss icon RSS: new posts
summary:
How do you escape () in a URL?
Broken URL types & better templating
andrewdoullandrewdoull 1210546620|%e %b %Y, %H:%M %Z|agohover

Hi,

I've just started setting up a wiki and I've discovered several problems with the WikiDot syntax I haven't been able to resolve.

1. If I want to create an entry that has a : in it (Such as 'Infinity: The Quest for Earth'), how do I escape this correctly without creating a new category.

2. URL links containing a right bracket don't work e.g. linking to a wikipedia entry like [http://http://en.wikipedia.org/wiki/Rogue_(computer_game) Rogue] breaks. How do I escape these (hint @@ doesn't work).

3. The whole category/templating system feels very limited compared to MediaWiki. I don't want to have to rewrite an entry every time I create a template - I just want to specify variables that I can drop into the template. I also don't want to have to specify that an entry uses a template by forcing the entry to be game:Rogue everywhere I want to link to Rogue that happens to use the game template, it would be much easier to have to do this on the destination page, so I can just reference it as Rogue elsewhere.

e.g. the MediaWiki equivalent is:

Infobox VG| title = The Elder Scrolls II: Daggerfall
| image = [Cover art.gif|256px]
| developer = [[Bethesda Softworks]]
| publisher = Bethesda Softworks
| designer =
| series = ''[[The Elder Scrolls]]''
| engine = [[XnGine]]
| released = {{vgrelease|NA=[[August 31]], [[1996]]
vgrelease|EU=1996
| genre = First-person [[computer role-playing game]]
| modes = [[Single player]]
| ratings = [[ESRB]]: M
| platforms = [[MS-DOS]]
| media = [[CD-ROM]]
| requirements =
| input =
}}

4. How do you handle soft redirects e.g.
The Elder Scrolls II: Daggerfall
From Wikipedia, the free encyclopedia
(Redirected from Daggerfall)

Thanks in advance. There are other decisions that you guys have made that are completely on the money (Google Analytics integration being one).

Andrew

unfold Broken URL types & better templating by andrewdoullandrewdoull, 1210546620|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
Helmuti_pdorfHelmuti_pdorf 1210582276|%e %b %Y, %H:%M %Z|agohover

I do not understand all questions i think - but I will try to reply:

1) use a specifi and clear "category" for such naming problems.

Example: default:Ininity: The Quest for Earth this will create a page with the url:

http://your-site-name.wikidot.com/default:infinity:the-quest-for-earth

1.1) and change the title of the page to "Infinity: The Quest for Earth" - at the beginning only the partial name before the colon uis taken ( Infinity) …
1.2) every link (@[[[default:infinity:the-quest-for-earth]]]) should have the complete long name used..

2) the broken URL :

if you get problems with such special characters you have to specify the url with the %-sign and the (hex!- equivalent of ansi) chacracter-code instead of such special characters.
Your Example:

[*//http://en.wikipedia.org/wiki/Rogue_(computer_game) Rogue] will not work because of the "ending" brackets.

test: [*//http://en.wikipedia.org/wiki/Rogue_(computer_game) Rogue]

If you detect such unusable characters than you should replace the character ")" with "%29"

[*http://en.wikipedia.org/wiki/Rogue_(computer_game%29 Rogue]

Rogue

3) I do not understand the question….

4) redirects are normal in wkidot - search for it in the syntax or modules or solutions … only the problem you will get if you wnat to edit the redirected page itself - than you have to use the url adress with a specific namung convention.

[http://www.wikidot.com/doc:redirect-module]

last edited on 1210583379|%e %b %Y, %H:%M %Z|agohover by Helmuti_pdorf + show more
unfold Re: Broken URL types & better templating by Helmuti_pdorfHelmuti_pdorf, 1210582276|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
Helmuti_pdorfHelmuti_pdorf 1210583106|%e %b %Y, %H:%M %Z|agohover

about the question 3:
Have a look on the discussion about a technic to do such tricky usages:

[http://community.wikidot.com/forum/t-58403/if-then-else-conditionals]

Another tricky discussions was here:

[http://community.wikidot.com/forum/t-58448/invisible-parameters-in-infoboxes]

Hope i have understand your question…

unfold Re: Broken URL types & better templating by Helmuti_pdorfHelmuti_pdorf, 1210583106|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
andrewdoullandrewdoull 1210983840|%e %b %Y, %H:%M %Z|agohover

Hi,

Thanks for the replies. Its not clear anywhere in the basic documentation how to do includes as discussed in the links you've referred to - maybe that should be revised some how.

Regards,

Andrew Doull

unfold Re: Broken URL types & better templating by andrewdoullandrewdoull, 1210983840|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
andrewdoullandrewdoull 1210984304|%e %b %Y, %H:%M %Z|agohover

Hi,

Just to confirm what I mean: the include functionality needs to be explicitly documented on the template page. The hero examples listed to are great, but since I cannot edit these pages, I cannot see the source code required to implement it. And therefore there is no point linking to the examples.

Andrew

unfold Re: Broken URL types & better templating by andrewdoullandrewdoull, 1210984304|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
Helmuti_pdorfHelmuti_pdorf 1211005260|%e %b %Y, %H:%M %Z|agohover

Hi Andrew!

There is y very new implementation done with "live templates" ( as you asked for):

[http://www.wikidot.com/doc:templates]

Have a look ! This is so new, that nobody has really tested it….

unfold Re: Broken URL types & better templating by Helmuti_pdorfHelmuti_pdorf, 1211005260|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
ErichSteinboeckErichSteinboeck 1211059732|%e %b %Y, %H:%M %Z|agohover

> cannot see the source code required to implement it

Have a look at the these Community HowTo's — you should see the needed source there:

unfold Re: Broken URL types & better templating by ErichSteinboeckErichSteinboeck, 1211059732|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
andrewdoullandrewdoull 1211093221|%e %b %Y, %H:%M %Z|agohover

Thanks for the reponse everyone.

One more question.

How do I include a wiki reference in an include? At the moment, the 3 right-square brackets appear to trigger the include terminator, which is two right square brackets. Any workarounds or is this a basic syntax problem?

unfold Re: Broken URL types & better templating by andrewdoullandrewdoull, 1211093221|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
Helmuti_pdorfHelmuti_pdorf 1211099784|%e %b %Y, %H:%M %Z|agohover

As I know - an include tag can only reference to an "internal" page of the same wiki!

If you need the content of an "outside" page inerted you have to use the iframe tag…

last edited on 1211102868|%e %b %Y, %H:%M %Z|agohover by Helmuti_pdorf + show more
unfold Re: Broken URL types & better templating by Helmuti_pdorfHelmuti_pdorf, 1211099784|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
andrewdoullandrewdoull 1211179709|%e %b %Y, %H:%M %Z|agohover

Hi,

Its not the case of wanting to include a page outside the wiki. It's that the internal variables can't be links to other wiki pages.

For instance, looking at wikipedia, the majority of info boxes contain links to elsewhere in the wiki. But if I try the same syntax in an include, it breaks horribly because the 3 right-square brackets appears to trigger the include terminator, which is two right square brackets.

e.g. in the include syntax

include pcg-game-box name=Angband
| developer=Andrew Sidwell
| released=1990

if I want to replace Andrew Sidwell with a link to the wiki article on Andrew Sidwell, I end up terminating the include instead with ]]] being recognised as the include terminator.

unfold Re: Broken URL types & better templating by andrewdoullandrewdoull, 1211179709|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
ErichSteinboeckErichSteinboeck 1211179838|%e %b %Y, %H:%M %Z|agohover

> How do I include a wiki reference in an include?
> At the moment, the 3 right-square brackets appear to trigger the include terminator

Are you asking about the problem that the following code doesn't work?

[[include template name=[[[reference]]]
| attribute=value]]

If so, here are workarounds. Either:

Don't split the include over several lines:

[[include template name=[[[reference]]] | attribute=value]]

Or, move the pipe symbol to the end of any line ending with …]]]:

[[include template name=[[[reference]]] |
attribute=value]]

Or, put a space after the closing …]]]:

[[include template name=[[[reference]]](instead of this text insert a single blank here)
| attribute=value]]

unfold Re: Broken URL types & better templating by ErichSteinboeckErichSteinboeck, 1211179838|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
andrewdoullandrewdoull 1211180284|%e %b %Y, %H:%M %Z|agohover

Thanks for the quick response.

I'm not sure which syntax issue is the most intuitive. I guess moving the pipe is going to be best.

unfold Re: Broken URL types & better templating by andrewdoullandrewdoull, 1211180284|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
Helmuti_pdorfHelmuti_pdorf 1211181063|%e %b %Y, %H:%M %Z|agohover

Question:

At your page [http://pcg.wikidot.com/pcg-games:angband]
I would use the long URL of the wikipedia ( with [*http..]. ) instead of the 3 [[[....]]]
like the web site variable.

[[include pcg-game-box name=Angband
| image=@@
| image-caption=@@
| screenshot=@@
| screenshot-caption=@@
| developer=Andrew Sidwell et al.
| publisher=@@
| designer=@@
| series=@@
| engine=@@
| released=@@
| genre=Fantasy
| modes=@@
| rating=@@
| platforms=Widely ported
| media=@@
| requirements=@@
| input=Keyboard
| latest_release_version=3.0.9b
| latest_release_date=March 19, 2008
| license=Moria / Angband license
| download=@@
| website=[*http://rephial.org rephial.org]
| pcg-types=Runtime random level generation
]]
last edited on 1211181247|%e %b %Y, %H:%M %Z|agohover by Helmuti_pdorf + show more
unfold Re: Broken URL types & better templating by Helmuti_pdorfHelmuti_pdorf, 1211181063|%e %b %Y, %H:%M %Z|agohover
Re: Broken URL types & better templating
BrunhildaBrunhilda 1211379548|%e %b %Y, %H:%M %Z|agohover

For wikipedia links — why don't you use http://tinyurl.com/ ?

You put in the long unpleasant and awful link from wikipedia, and get very short and cute little link that is much more manageable and it works the same! I use it a lot in my wiki, since I have to put URLs in cyrillic, and they are very, but veeeeery long and unpleasant ….

unfold Re: Broken URL types & better templating by BrunhildaBrunhilda, 1211379548|%e %b %Y, %H:%M %Z|agohover
new post
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.