Html within ask template doesn't work

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Html within ask template doesn't work

InterSpirit
I have a ask query in which I use "format = template".
Within the template I need to use "<html>Code</html>".
However the "Code" is not interpreted as HTML.

You can see an example here:
http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask

Of course I set "$wgRawHtml = true;".
I also tried the "Secure HTML" extension ("<shtml>").

If I include the template itself it's fine. But combined with the ask
query it won't work.

Is this a bug?

Regards,
Stefan
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Html within ask template doesn't work

Ad Strack van Schijndel
Stefan,

Did you try using the #tag 'Magic word'? I haven't tried it, but perhaps using #tag gives better results.
And I would use #tag anyway for assembly of html code.

Ad

Op Jan 13, 2016, om 2:14 PM heeft Stefan Seidner <[hidden email]> het volgende geschreven:

I have a ask query in which I use "format = template".
Within the template I need to use "<html>Code</html>".
However the "Code" is not interpreted as HTML.

You can see an example here:
http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask

Of course I set "$wgRawHtml = true;".
I also tried the "Secure HTML" extension ("<shtml>").

If I include the template itself it's fine. But combined with the ask
query it won't work.

Is this a bug?

Regards,
Stefan
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Html within ask template doesn't work

chris tharp-2
Hi Stefan,

The only way it will work is using the tag function: {{#tag:html | <-- HTML Content --> }}. I'm currently using it a lot with the extension:NamespaceHTML.

Inside the tag function you can use any valid HTML and wiki variables, but remember to be conscious of pipes | and any closing brackets }} since both will be read as wiki markers and end the HTML. The great thing about the tag function with HTML is you can have wiki variables inside the HTML statement.

Sent from my iPad

> On Jan 13, 2016, at 5:33 AM, Ad Strack van Schijndel <[hidden email]> wrote:
>
> Stefan,
>
> Did you try using the #tag 'Magic word'? I haven't tried it, but perhaps using #tag gives better results.
> And I would use #tag anyway for assembly of html code.
>
> Ad
>
> Op Jan 13, 2016, om 2:14 PM heeft Stefan Seidner <[hidden email]> het volgende geschreven:
>
> I have a ask query in which I use "format = template".
> Within the template I need to use "<html>Code</html>".
> However the "Code" is not interpreted as HTML.
>
> You can see an example here:
> http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask
>
> Of course I set "$wgRawHtml = true;".
> I also tried the "Secure HTML" extension ("<shtml>").
>
> If I include the template itself it's fine. But combined with the ask
> query it won't work.
>
> Is this a bug?
>
> Regards,
> Stefan
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Html within ask template doesn't work

Ad Strack van Schijndel
Good news that it works with #tag.
One thing I might add: you can easily nest #tag functions.
An example is a template we use for a button:

{{#tag: html
| {{#tag: a
| {{{Text|}}}
| href={{{Link|}}}
| class=btn {{{Class|}}}
| role=button
| target={{#switch: {{{Open mode|}}} | New tab=_blank | Same=_self }}
}} }}

Ad

Op Jan 13, 2016, om 4:34 PM heeft [hidden email] het volgende geschreven:

Hi Stefan,

The only way it will work is using the tag function: {{#tag:html | <-- HTML Content --> }}. I'm currently using it a lot with the extension:NamespaceHTML.

Inside the tag function you can use any valid HTML and wiki variables, but remember to be conscious of pipes | and any closing brackets }} since both will be read as wiki markers and end the HTML. The great thing about the tag function with HTML is you can have wiki variables inside the HTML statement.

Sent from my iPad

> On Jan 13, 2016, at 5:33 AM, Ad Strack van Schijndel <[hidden email]> wrote:
>
> Stefan,
>
> Did you try using the #tag 'Magic word'? I haven't tried it, but perhaps using #tag gives better results.
> And I would use #tag anyway for assembly of html code.
>
> Ad
>
> Op Jan 13, 2016, om 2:14 PM heeft Stefan Seidner <[hidden email]> het volgende geschreven:
>
> I have a ask query in which I use "format = template".
> Within the template I need to use "<html>Code</html>".
> However the "Code" is not interpreted as HTML.
>
> You can see an example here:
> http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask
>
> Of course I set "$wgRawHtml = true;".
> I also tried the "Secure HTML" extension ("<shtml>").
>
> If I include the template itself it's fine. But combined with the ask
> query it won't work.
>
> Is this a bug?
>
> Regards,
> Stefan
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Html within ask template doesn't work

InterSpirit
Thanks you two.
I didn't know about #tag before.

However so far I didn't manage to get it working in combination with <img>.

This for itself works, but it's again not rendered in my table (see
http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask) :

{{#tag: html|<img src="/mediawiki/images/e/ea/Website.gif" alt="Website"
width="14" height="13" />}}

I also tried this, but with no luck:

{{#tag: html
| {{#tag: img
| src=/mediawiki/images/e/ea/Website.gif
}} }}

Regards,
Stefan


-------- Original-Nachricht --------
Betreff: Re: [Semediawiki-user] Html within ask template doesn't work
Von: Ad Strack van Schijndel <[hidden email]>
An: [hidden email]
Kopie (CC): Stefan Seidner <[hidden email]>, SMW User mailinglist
<[hidden email]>
Datum: 13.01.2016 16:41

> Good news that it works with #tag.
> One thing I might add: you can easily nest #tag functions.
> An example is a template we use for a button:
>
> {{#tag: html
> | {{#tag: a
> | {{{Text|}}}
> | href={{{Link|}}}
> | class=btn {{{Class|}}}
> | role=button
> | target={{#switch: {{{Open mode|}}} | New tab=_blank | Same=_self }}
> }} }}
>
> Ad
>
> Op Jan 13, 2016, om 4:34 PM heeft [hidden email] het volgende geschreven:
>
> Hi Stefan,
>
> The only way it will work is using the tag function: {{#tag:html | <-- HTML Content --> }}. I'm currently using it a lot with the extension:NamespaceHTML.
>
> Inside the tag function you can use any valid HTML and wiki variables, but remember to be conscious of pipes | and any closing brackets }} since both will be read as wiki markers and end the HTML. The great thing about the tag function with HTML is you can have wiki variables inside the HTML statement.
>
> Sent from my iPad
>
>> On Jan 13, 2016, at 5:33 AM, Ad Strack van Schijndel <[hidden email]> wrote:
>>
>> Stefan,
>>
>> Did you try using the #tag 'Magic word'? I haven't tried it, but perhaps using #tag gives better results.
>> And I would use #tag anyway for assembly of html code.
>>
>> Ad
>>
>> Op Jan 13, 2016, om 2:14 PM heeft Stefan Seidner <[hidden email]> het volgende geschreven:
>>
>> I have a ask query in which I use "format = template".
>> Within the template I need to use "<html>Code</html>".
>> However the "Code" is not interpreted as HTML.
>>
>> You can see an example here:
>> http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask
>>
>> Of course I set "$wgRawHtml = true;".
>> I also tried the "Secure HTML" extension ("<shtml>").
>>
>> If I include the template itself it's fine. But combined with the ask
>> query it won't work.
>>
>> Is this a bug?
>>
>> Regards,
>> Stefan


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Html within ask template doesn't work

chris tharp-2
Try:

{{#tag: html|<img src="{{filepath:/mediawiki/images/e/ea/Website.gif}}"
alt="Website"
width="14" height="13" />}}


You can also allow the img tag itself and use it outside of the html tag.
Set $wgAllowImageTag = true; in your LocalSettings. Than it would only need
to be:

<img src="{{filepath:/mediawiki/images/e/ea/Website.gif}}" alt="Website"
width="14" height="13" />

See here for the ImageTag:
https://www.mediawiki.org/wiki/Manual:$wgAllowImageTag

And here for the filepath magic word:
https://www.mediawiki.org/wiki/Help:Magic_words




On Thu, Jan 14, 2016 at 1:11 PM, Stefan Seidner <[hidden email]>
wrote:

> Thanks you two.
> I didn't know about #tag before.
>
> However so far I didn't manage to get it working in combination with <img>.
>
> This for itself works, but it's again not rendered in my table (see
> http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask) :
>
> {{#tag: html|<img src="/mediawiki/images/e/ea/Website.gif" alt="Website"
> width="14" height="13" />}}
>
> I also tried this, but with no luck:
>
> {{#tag: html
> | {{#tag: img
> | src=/mediawiki/images/e/ea/Website.gif
> }} }}
>
> Regards,
> Stefan
>
>
> -------- Original-Nachricht --------
> Betreff: Re: [Semediawiki-user] Html within ask template doesn't work
> Von: Ad Strack van Schijndel <[hidden email]>
> An: [hidden email]
> Kopie (CC): Stefan Seidner <[hidden email]>, SMW User mailinglist
> <[hidden email]>
> Datum: 13.01.2016 16:41
> > Good news that it works with #tag.
> > One thing I might add: you can easily nest #tag functions.
> > An example is a template we use for a button:
> >
> > {{#tag: html
> > | {{#tag: a
> > | {{{Text|}}}
> > | href={{{Link|}}}
> > | class=btn {{{Class|}}}
> > | role=button
> > | target={{#switch: {{{Open mode|}}} | New tab=_blank | Same=_self }}
> > }} }}
> >
> > Ad
> >
> > Op Jan 13, 2016, om 4:34 PM heeft [hidden email] het volgende
> geschreven:
> >
> > Hi Stefan,
> >
> > The only way it will work is using the tag function: {{#tag:html | <--
> HTML Content --> }}. I'm currently using it a lot with the
> extension:NamespaceHTML.
> >
> > Inside the tag function you can use any valid HTML and wiki variables,
> but remember to be conscious of pipes | and any closing brackets }} since
> both will be read as wiki markers and end the HTML. The great thing about
> the tag function with HTML is you can have wiki variables inside the HTML
> statement.
> >
> > Sent from my iPad
> >
> >> On Jan 13, 2016, at 5:33 AM, Ad Strack van Schijndel <
> [hidden email]> wrote:
> >>
> >> Stefan,
> >>
> >> Did you try using the #tag 'Magic word'? I haven't tried it, but
> perhaps using #tag gives better results.
> >> And I would use #tag anyway for assembly of html code.
> >>
> >> Ad
> >>
> >> Op Jan 13, 2016, om 2:14 PM heeft Stefan Seidner <[hidden email]>
> het volgende geschreven:
> >>
> >> I have a ask query in which I use "format = template".
> >> Within the template I need to use "<html>Code</html>".
> >> However the "Code" is not interpreted as HTML.
> >>
> >> You can see an example here:
> >> http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask
> >>
> >> Of course I set "$wgRawHtml = true;".
> >> I also tried the "Secure HTML" extension ("<shtml>").
> >>
> >> If I include the template itself it's fine. But combined with the ask
> >> query it won't work.
> >>
> >> Is this a bug?
> >>
> >> Regards,
> >> Stefan
>
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Html within ask template doesn't work

chris tharp-2
Sorry little mistake in the last email:

Use just the file's name with filepath:

<img src="{{filepath:Website.gif}}" alt="Website"
width="14" height="13" />

Would work


On Thu, Jan 14, 2016 at 1:45 PM, chris tharp <[hidden email]> wrote:

> Try:
>
> {{#tag: html|<img src="{{filepath:/mediawiki/images/e/ea/Website.gif}}"
> alt="Website"
> width="14" height="13" />}}
>
>
> You can also allow the img tag itself and use it outside of the html tag.
> Set $wgAllowImageTag = true; in your LocalSettings. Than it would only need
> to be:
>
> <img src="{{filepath:/mediawiki/images/e/ea/Website.gif}}" alt="Website"
> width="14" height="13" />
>
> See here for the ImageTag:
> https://www.mediawiki.org/wiki/Manual:$wgAllowImageTag
>
> And here for the filepath magic word:
> https://www.mediawiki.org/wiki/Help:Magic_words
>
>
>
>
> On Thu, Jan 14, 2016 at 1:11 PM, Stefan Seidner <[hidden email]>
> wrote:
>
>> Thanks you two.
>> I didn't know about #tag before.
>>
>> However so far I didn't manage to get it working in combination with
>> <img>.
>>
>> This for itself works, but it's again not rendered in my table (see
>> http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask) :
>>
>> {{#tag: html|<img src="/mediawiki/images/e/ea/Website.gif" alt="Website"
>> width="14" height="13" />}}
>>
>> I also tried this, but with no luck:
>>
>> {{#tag: html
>> | {{#tag: img
>> | src=/mediawiki/images/e/ea/Website.gif
>> }} }}
>>
>> Regards,
>> Stefan
>>
>>
>> -------- Original-Nachricht --------
>> Betreff: Re: [Semediawiki-user] Html within ask template doesn't work
>> Von: Ad Strack van Schijndel <[hidden email]>
>> An: [hidden email]
>> Kopie (CC): Stefan Seidner <[hidden email]>, SMW User mailinglist
>> <[hidden email]>
>> Datum: 13.01.2016 16:41
>> > Good news that it works with #tag.
>> > One thing I might add: you can easily nest #tag functions.
>> > An example is a template we use for a button:
>> >
>> > {{#tag: html
>> > | {{#tag: a
>> > | {{{Text|}}}
>> > | href={{{Link|}}}
>> > | class=btn {{{Class|}}}
>> > | role=button
>> > | target={{#switch: {{{Open mode|}}} | New tab=_blank | Same=_self }}
>> > }} }}
>> >
>> > Ad
>> >
>> > Op Jan 13, 2016, om 4:34 PM heeft [hidden email] het volgende
>> geschreven:
>> >
>> > Hi Stefan,
>> >
>> > The only way it will work is using the tag function: {{#tag:html | <--
>> HTML Content --> }}. I'm currently using it a lot with the
>> extension:NamespaceHTML.
>> >
>> > Inside the tag function you can use any valid HTML and wiki variables,
>> but remember to be conscious of pipes | and any closing brackets }} since
>> both will be read as wiki markers and end the HTML. The great thing about
>> the tag function with HTML is you can have wiki variables inside the HTML
>> statement.
>> >
>> > Sent from my iPad
>> >
>> >> On Jan 13, 2016, at 5:33 AM, Ad Strack van Schijndel <
>> [hidden email]> wrote:
>> >>
>> >> Stefan,
>> >>
>> >> Did you try using the #tag 'Magic word'? I haven't tried it, but
>> perhaps using #tag gives better results.
>> >> And I would use #tag anyway for assembly of html code.
>> >>
>> >> Ad
>> >>
>> >> Op Jan 13, 2016, om 2:14 PM heeft Stefan Seidner <
>> [hidden email]> het volgende geschreven:
>> >>
>> >> I have a ask query in which I use "format = template".
>> >> Within the template I need to use "<html>Code</html>".
>> >> However the "Code" is not interpreted as HTML.
>> >>
>> >> You can see an example here:
>> >> http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask
>> >>
>> >> Of course I set "$wgRawHtml = true;".
>> >> I also tried the "Secure HTML" extension ("<shtml>").
>> >>
>> >> If I include the template itself it's fine. But combined with the ask
>> >> query it won't work.
>> >>
>> >> Is this a bug?
>> >>
>> >> Regards,
>> >> Stefan
>>
>>
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Html within ask template doesn't work

chris tharp-2
Hi Stefan

Thinking more about your problem leads me to think that everything returned inside the ask function is returned as wiki code. Therefore the answer may be more along the lines of wrapping the ask function inside the html tag function. Something like this:

{{#tag:html |
{{#ask:  

Instead of handling it inside the template. I could be completely wrong this about since I haven't tested it, but it seems something in the ask function strips html out.

This doesn't change my earlier emails: if you're only seeking to use the img tag it's easier to set that in the LocalSettings and use the filepath Magic word. But for more complex html, I'm thinking (which I could be totally wrong), the answer lies with wrapping the ask inside the tag html.

Sent from my iPhone

> On Jan 14, 2016, at 1:47 PM, chris tharp <[hidden email]> wrote:
>
> Sorry little mistake in the last email:
>
> Use just the file's name with filepath:
>
> <img src="{{filepath:Website.gif}}" alt="Website"
> width="14" height="13" />
>
> Would work
>
>
>> On Thu, Jan 14, 2016 at 1:45 PM, chris tharp <[hidden email]> wrote:
>> Try:
>>
>> {{#tag: html|<img src="{{filepath:/mediawiki/images/e/ea/Website.gif}}" alt="Website"
>> width="14" height="13" />}}
>>
>>
>> You can also allow the img tag itself and use it outside of the html tag. Set $wgAllowImageTag = true; in your LocalSettings. Than it would only need to be:
>>
>> <img src="{{filepath:/mediawiki/images/e/ea/Website.gif}}" alt="Website"
>> width="14" height="13" />
>>
>> See here for the ImageTag: https://www.mediawiki.org/wiki/Manual:$wgAllowImageTag
>>
>> And here for the filepath magic word: https://www.mediawiki.org/wiki/Help:Magic_words
>>
>>
>>
>>
>>> On Thu, Jan 14, 2016 at 1:11 PM, Stefan Seidner <[hidden email]> wrote:
>>> Thanks you two.
>>> I didn't know about #tag before.
>>>
>>> However so far I didn't manage to get it working in combination with <img>.
>>>
>>> This for itself works, but it's again not rendered in my table (see
>>> http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask) :
>>>
>>> {{#tag: html|<img src="/mediawiki/images/e/ea/Website.gif" alt="Website"
>>> width="14" height="13" />}}
>>>
>>> I also tried this, but with no luck:
>>>
>>> {{#tag: html
>>> | {{#tag: img
>>> | src=/mediawiki/images/e/ea/Website.gif
>>> }} }}
>>>
>>> Regards,
>>> Stefan
>>>
>>>
>>> -------- Original-Nachricht --------
>>> Betreff: Re: [Semediawiki-user] Html within ask template doesn't work
>>> Von: Ad Strack van Schijndel <[hidden email]>
>>> An: [hidden email]
>>> Kopie (CC): Stefan Seidner <[hidden email]>, SMW User mailinglist
>>> <[hidden email]>
>>> Datum: 13.01.2016 16:41
>>> > Good news that it works with #tag.
>>> > One thing I might add: you can easily nest #tag functions.
>>> > An example is a template we use for a button:
>>> >
>>> > {{#tag: html
>>> > | {{#tag: a
>>> > | {{{Text|}}}
>>> > | href={{{Link|}}}
>>> > | class=btn {{{Class|}}}
>>> > | role=button
>>> > | target={{#switch: {{{Open mode|}}} | New tab=_blank | Same=_self }}
>>> > }} }}
>>> >
>>> > Ad
>>> >
>>> > Op Jan 13, 2016, om 4:34 PM heeft [hidden email] het volgende geschreven:
>>> >
>>> > Hi Stefan,
>>> >
>>> > The only way it will work is using the tag function: {{#tag:html | <-- HTML Content --> }}. I'm currently using it a lot with the extension:NamespaceHTML.
>>> >
>>> > Inside the tag function you can use any valid HTML and wiki variables, but remember to be conscious of pipes | and any closing brackets }} since both will be read as wiki markers and end the HTML. The great thing about the tag function with HTML is you can have wiki variables inside the HTML statement.
>>> >
>>> > Sent from my iPad
>>> >
>>> >> On Jan 13, 2016, at 5:33 AM, Ad Strack van Schijndel <[hidden email]> wrote:
>>> >>
>>> >> Stefan,
>>> >>
>>> >> Did you try using the #tag 'Magic word'? I haven't tried it, but perhaps using #tag gives better results.
>>> >> And I would use #tag anyway for assembly of html code.
>>> >>
>>> >> Ad
>>> >>
>>> >> Op Jan 13, 2016, om 2:14 PM heeft Stefan Seidner <[hidden email]> het volgende geschreven:
>>> >>
>>> >> I have a ask query in which I use "format = template".
>>> >> Within the template I need to use "<html>Code</html>".
>>> >> However the "Code" is not interpreted as HTML.
>>> >>
>>> >> You can see an example here:
>>> >> http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask
>>> >>
>>> >> Of course I set "$wgRawHtml = true;".
>>> >> I also tried the "Secure HTML" extension ("<shtml>").
>>> >>
>>> >> If I include the template itself it's fine. But combined with the ask
>>> >> query it won't work.
>>> >>
>>> >> Is this a bug?
>>> >>
>>> >> Regards,
>>> >> Stefan
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Html within ask template doesn't work

InterSpirit
Thanks Chris for all your help!

Just for the record:
{{#tag: html|<img src="{{filepath:Website.gif}}" alt="Website"
width="14" height="13" />}}
works for itself, but not in #ask.

This (finally) works in #ask
$wgAllowImageTag = true;
and
<img src="{{filepath:Website.gif}}" alt="Website" width="14" height="13" />

Thanks again! :)

Cheers,
Stefan


-------- Original-Nachricht --------
Betreff: Re: [Semediawiki-user] Html within ask template doesn't work
Von: Chris Tharp <[hidden email]>
An: Stefan Seidner <[hidden email]>
Kopie (CC): SMW User mailinglist <[hidden email]>
Datum: 15.01.2016 00:34

> Hi Stefan
>
> Thinking more about your problem leads me to think that everything
> returned inside the ask function is returned as wiki code. Therefore
> the answer may be more along the lines of wrapping the ask function
> inside the html tag function. Something like this:
>
> {{#tag:html |
> {{#ask:  
>
> Instead of handling it inside the template. I could be completely
> wrong this about since I haven't tested it, but it seems something in
> the ask function strips html out.
>
> This doesn't change my earlier emails: if you're only seeking to use
> the img tag it's easier to set that in the LocalSettings and use the
> filepath Magic word. But for more complex html, I'm thinking (which I
> could be totally wrong), the answer lies with wrapping the ask inside
> the tag html.
>
> Sent from my iPhone
>
> On Jan 14, 2016, at 1:47 PM, chris tharp <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>> Sorry little mistake in the last email:
>>
>> Use just the file's name with filepath:
>>
>> <img src="{{filepath:Website.gif}}" alt="Website"
>> width="14" height="13" />
>>
>> Would work
>>
>>
>> On Thu, Jan 14, 2016 at 1:45 PM, chris tharp <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     Try:
>>
>>     {{#tag: html|<img
>>     src="{{filepath:/mediawiki/images/e/ea/Website.gif}}" alt="Website"
>>     width="14" height="13" />}}
>>
>>
>>     You can also allow the img tag itself and use it outside of the
>>     html tag. Set $wgAllowImageTag = true; in your LocalSettings.
>>     Than it would only need to be:
>>
>>     <img src="{{filepath:/mediawiki/images/e/ea/Website.gif}}"
>>     alt="Website"
>>     width="14" height="13" />
>>
>>     See here for the ImageTag:
>>     https://www.mediawiki.org/wiki/Manual:$wgAllowImageTag
>>
>>     And here for the filepath magic word:
>>     https://www.mediawiki.org/wiki/Help:Magic_words
>>
>>
>>
>>
>>     On Thu, Jan 14, 2016 at 1:11 PM, Stefan Seidner
>>     <[hidden email] <mailto:[hidden email]>> wrote:
>>
>>         Thanks you two.
>>         I didn't know about #tag before.
>>
>>         However so far I didn't manage to get it working in
>>         combination with <img>.
>>
>>         This for itself works, but it's again not rendered in my
>>         table (see
>>         http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask) :
>>
>>         {{#tag: html|<img src="/mediawiki/images/e/ea/Website.gif"
>>         alt="Website"
>>         width="14" height="13" />}}
>>
>>         I also tried this, but with no luck:
>>
>>         {{#tag: html
>>         | {{#tag: img
>>         | src=/mediawiki/images/e/ea/Website.gif
>>         }} }}
>>
>>         Regards,
>>         Stefan
>>
>>
>>         -------- Original-Nachricht --------
>>         Betreff: Re: [Semediawiki-user] Html within ask template
>>         doesn't work
>>         Von: Ad Strack van Schijndel <[hidden email]
>>         <mailto:[hidden email]>>
>>         An: [hidden email] <mailto:[hidden email]>
>>         Kopie (CC): Stefan Seidner <[hidden email]
>>         <mailto:[hidden email]>>, SMW User mailinglist
>>         <[hidden email]
>>         <mailto:[hidden email]>>
>>         Datum: 13.01.2016 16:41
>>         > Good news that it works with #tag.
>>         > One thing I might add: you can easily nest #tag functions.
>>         > An example is a template we use for a button:
>>         >
>>         > {{#tag: html
>>         > | {{#tag: a
>>         > | {{{Text|}}}
>>         > | href={{{Link|}}}
>>         > | class=btn {{{Class|}}}
>>         > | role=button
>>         > | target={{#switch: {{{Open mode|}}} | New tab=_blank |
>>         Same=_self }}
>>         > }} }}
>>         >
>>         > Ad
>>         >
>>         > Op Jan 13, 2016, om 4:34 PM heeft [hidden email]
>>         <mailto:[hidden email]> het volgende geschreven:
>>         >
>>         > Hi Stefan,
>>         >
>>         > The only way it will work is using the tag function:
>>         {{#tag:html | <-- HTML Content --> }}. I'm currently using it
>>         a lot with the extension:NamespaceHTML.
>>         >
>>         > Inside the tag function you can use any valid HTML and wiki
>>         variables, but remember to be conscious of pipes | and any
>>         closing brackets }} since both will be read as wiki markers
>>         and end the HTML. The great thing about the tag function with
>>         HTML is you can have wiki variables inside the HTML statement.
>>         >
>>         > Sent from my iPad
>>         >
>>         >> On Jan 13, 2016, at 5:33 AM, Ad Strack van Schijndel
>>         <[hidden email]
>>         <mailto:[hidden email]>> wrote:
>>         >>
>>         >> Stefan,
>>         >>
>>         >> Did you try using the #tag 'Magic word'? I haven't tried
>>         it, but perhaps using #tag gives better results.
>>         >> And I would use #tag anyway for assembly of html code.
>>         >>
>>         >> Ad
>>         >>
>>         >> Op Jan 13, 2016, om 2:14 PM heeft Stefan Seidner
>>         <[hidden email] <mailto:[hidden email]>> het
>>         volgende geschreven:
>>         >>
>>         >> I have a ask query in which I use "format = template".
>>         >> Within the template I need to use "<html>Code</html>".
>>         >> However the "Code" is not interpreted as HTML.
>>         >>
>>         >> You can see an example here:
>>         >> http://neu.distanzreiten.com/mediawiki/index.php/Html_in_ask
>>         >>
>>         >> Of course I set "$wgRawHtml = true;".
>>         >> I also tried the "Secure HTML" extension ("<shtml>").
>>         >>
>>         >> If I include the template itself it's fine. But combined
>>         with the ask
>>         >> query it won't work.
>>         >>
>>         >> Is this a bug?
>>         >>
>>         >> Regards,
>>         >> Stefan
>>
>>
>>

--
InterSpirit - Inhaber: Stefan Seidner
Kressenstraße 31
90419 Nürnberg
Tel.: +49 (0)911 923 487 99
Fax: +49 (0)322 239 44 828

InterSpirit.de <http://interspirit.de>
Für mehr Spirit im Netz
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user