This Forum has been archived

Visit the new Forums
Forums: Index Community Central Forum Verbatim
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 3644 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

Does anyone have any experience with the <verbatim>. Can I find documentation for them any where? It seems to me they always output inside < > thingies, so if the output would be true, they output <true>. Duskey(talk) 19:05, August 15, 2010 (UTC)

What are you talking about? What wiki, what feature, can you give an example? --◄mendel► 21:28, August 15, 2010 (UTC)
Instead of just:
Duskey(talk) 21:39, August 15, 2010 (UTC)
Verbatim tags parse as he contents of the MediaWiki page named as the contents originally inside the tags. Eg, MediaWiki:True in your example. Link to what you're talking about. Joey (talk) 22:14, August 15, 2010 (UTC)
Ah, nice; so <verbatim>forum-url</verbatim> gives me Forum:Index, and <verbatim>hsgkjsdfh</verbatim> gives me <hsgkjsdfh> because the page MediaWiki:hsgkjsdfh doesn't exist.
The question is, Duskey, what do you want the "verbatim" tag to do? --◄mendel► 06:17, August 16, 2010 (UTC) & 06:19, August 16, 2010 (UTC)
If you want the tag to work liek it does on TWiki, you might want to try the <pre> tag instead:
::The question is, Duskey, what do you want the "verbatim" tag to do? --<span class="sigpic">[[User:M.mendel|◄mendel►]]</span> 06:17, August 16, 2010 (UTC) & 06:19, August 16, 2010 (UTC)
Like that? --◄mendel► 06:23, August 16, 2010 (UTC)
And what's the difference between <verbatim> and using {{int:whatever}}?. <verbatim>edit</verbatim> and {{int:edit}} produce the same results for me: Edit and Edit respectively (note that my UI is not in english, so both shows the internationalized message "edit" in your language, so it may be different than the contents of MediaWiki:Edit. --Ciencia Al Poder (talk) -WikiDex 16:00, August 16, 2010 (UTC)
What a strange tag. -- Fandyllic (talk · contr) 9:20 AM PST 16 Aug 2010
The difference seems to be that "int" is documented and "verbatim" is not. --◄mendel► 20:08, August 16, 2010 (UTC)
The difference is int: acts as mediawiki and still limits what html you can use on pages (things like anchors, img, script tags, etc that aren't allowed to be on normal wiki pages due to localsettings.php) after it parses, while verbatim parses as the html itself bypassing the mediawiki limit. Eg, take this is an example. It's a good alternative for a lot of the uses of inserting html into pages via js that don't actually really need js. Joey (talk) 22:47, August 16, 2010 (UTC)
Neat! Very insightful and useful, Joey; thanks!
Verbatim doesn't parse any wikicode, not even regular links; it completely bypasses the wikicode parser. int: is more like transclusion, but with the language setting applied. That's actually extremely useful, "verbatim" would solve the problem in Forum:Adding a timeline to your wikia. because they could add an iframe that way.
Another difference: int can take parameters, e.g. MediaWiki:1movedto2_redir is moved [[$1]] to [[$2]] over redirect, so ''{{int:1movedto2_redir}}'' and ''{{int:1movedto2_redir|firstpage|secondpage}}'' give moved $1 to $2 over redirect and moved firstpage to secondpage over redirect (''moved [[firstpage]] to [[secondpage]] over redirect'').
I've made a demo at Forum:Verbatim/demo. --◄mendel► 07:05, August 17, 2010 (UTC)
I think your demo broke :s Duskey(talk) 11:30, August 17, 2010 (UTC)
Why? --◄mendel► 22:30, August 17, 2010 (UTC)

Verbatim with parameters

I want it to run a javascript in a template. The template looks like this. It then outputs online or offline.

<script src="{{{1}}}&style=javascript" type="text/javascript">

I guess the problem is that while the template exists{{Templatenamehere}} does not, resulting in the additional < > tags. The ideal scenario here is if I can include the output in parser functions so I can display images and add additional text based on the output. Can anyone think of any clever solutions to do this? I have access to MediaWiki. Maybe transclude a mediawiki page instead of a template and then that verbatims the template? Hmmm. Duskey(talk) 11:30, August 17, 2010 (UTC)

You can't run JavaScript like that. You have to call it from MediaWiki:Common.js --Pcj (TC) 11:55, August 17, 2010 (UTC)
No, because you can't pass parameters into verbatim. You can only call MediaWiki: pages with verbatim, because of the security risk it could produce if anyone could create pages to insert with that tag. And that's why you can't pass parameters to a verbatim tag, because parameters could introduce extra dangerous code. --Ciencia Al Poder (talk) -WikiDex 16:13, August 17, 2010 (UTC)
Solution 1: Replace {{{1}}} with {{PAGENAME}} and delete all pages with strange names.
Solution 2: Replace {{{1}}} with a template call that uses a #switch: to translate from {{PAGENAME}} to a nick; that way, users can have this on their userpage without you cluttering up your MediaWiki: namespace. Protect that template so that only sysops can edit it. That way, users can put this on their own userpage to show the output for their own nick, and abuse is prevented.
Solution 3: if you want to show the output for several users on a single page, make a MediaWiki page for each user. --◄mendel► 22:30, August 17, 2010 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.