Not logged in. · Lost password · Register
Forum: General Help and Support Syntax and Usage RSS
[(for case) Solved] Is there a syntax to directly link to media-files in "same" ns?
Avatar
Samana Johann #1
Member since Jun 2018 · 123 posts · Location: Aural/Cambodia
Group memberships: Members
Show profile · Link to this post
Subject: [(for case) Solved] Is there a syntax to directly link to media-files in "same" ns?
Valued DW-team and user,

just looking for a way to link direct to media-files in the corresponding mediafile directory.

[[mediafile|text/picture]], mediafile here would require the whole path, so "difficult" to perform it with relative path and/or file-name. Thought of it might possible work like a standlink to a file [[{{mediafile}}|text/picture]], it wouldn't work.

To give an idea about the practical case. Putting a teaser picture as link, and by clicking it, the original picture would open. [[{{original.jpg}}|{{teaser_original}}]], appearing and functioning like this:

[Image: http://accesstoinsight.eu/_media/de/lib/thai/sao_small.jpg]
This post was edited on 2018-10-01, 22:26 by Samana Johann.
Avatar
Michaelsy #2
Member since Jun 2015 · 569 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
This should insert an image that belongs to the current namespace:

{{.:image1.jpg}}
(untested)

But this refers to the current namespace too:
{{image1.jpg}}

This means wiki links are namespace relative by default.

See: https://www.dokuwiki.org/namespaces

Further informations about embedding and linking images and other media files:
https://www.dokuwiki.org/images

[url=http://accesstoinsight.eu/_media/de/lib/thai/sao.jpg][img]http://accesstoinsight.eu/_media/de/lib/thai/sao_small.jpg[/img][/url]
Oops! Very advanced forum using! Never seen before. Never known before.

The equivalent in DokuWiki is something like this:
{{:bookcover:vom-glueck-2014.jpg?direct&44|}}

Examples: http://www.pg-dus.de/literatur

HTH - Michael Sy.
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
This post was edited 5 times, last on 2018-09-26, 06:50 by Michaelsy.
Avatar
Samana Johann #3
Member since Jun 2018 · 123 posts · Location: Aural/Cambodia
Group memberships: Members
Show profile · Link to this post
Mr Michael, sadhu for care.

But this refers to the current namespace too:
{{image1.jpg}}

This means wiki links are namespace relative by default.

Only if "simple" link as it seems, not if link and display is different. e.g [[...|...]]

There is no info found about this use. It's "no problem" just using the whole path, but how to relative refer to media, since the root as to be added normaly after the site url like _media/..../file.jpg.

The equivalent html to this bbc or like searched use of dw-syntax is something like that:

<a href="ariyadhamma/ariyadhamma.jpg" title="Click to see a bigger picture"><img width="80" src="ariyadhamma/ariyadhamma_small.jpg" alt="[Ariyadhamma Mahathera]"></a>

While dw has no problem to understand {{ }} as refering to the media root for imbedding pics, it looks like it does not work for a link to a picture but my person is somehow sure that there is a trick avaliable.

My person does not understand Mr Michaels sample for now.
This post was edited 2 times, last on 2018-09-28, 12:10 by Samana Johann.
Avatar
Michaelsy #4
Member since Jun 2015 · 569 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
Suggestion: Please open a new disk at the german forum. It is much easier for me to read and write in German.
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
Avatar
Samana Johann #5
Member since Jun 2018 · 123 posts · Location: Aural/Cambodia
Group memberships: Members
Show profile · Link to this post
See also German topic: Ist da ein Syntax um direkt zu einem Mediafile im entsprechenden NS zu linken?
Avatar
Samana Johann #6
Member since Jun 2018 · 123 posts · Location: Aural/Cambodia
Group memberships: Members
Show profile · Link to this post
From the German topic(s): There seems to be no Syntax and no direct replacement of this html-"usual".

If a text is used as "display"-element of the certain link:

{{file?linkonly|text}} (as found in detail on medias on dw-wiki)

Generous provided solutions:

  • Making an own page for linked mediafile/picture.
  • using Textinsert-Plugins to produce an absolut path for the media-file by creating a macro.

See also generous solution search in this topic and Mr. Virks inspiration.
This post was edited on 2018-10-01, 22:25 by Samana Johann.
Avatar
Michaelsy #7
Member since Jun 2015 · 569 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
Just so that does not get lost. As already written by me in the german thread, a text link can be simple realized:

{{img_a1.png?linkonly|Hier klicken für großes Bild}}

HTH - Michael Sy.

Edit: Oops there are two edits overlapped. (The text-link is now already mentioned above)
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
This post was edited on 2018-10-01, 22:36 by Michaelsy.
Avatar
Samana Johann #8
Member since Jun 2018 · 123 posts · Location: Aural/Cambodia
Group memberships: Members
Show profile · Link to this post
Aside of the additional feature to popup, this share by Mr. schplurtz on another place seems to fit to all kinds, here mentioned, well:

https://www.dokuwiki.org/plugin:popupviewer
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-12-16, 07:05:14 (UTC +01:00)