A couple of questions: 1) I would like to create a template as this: <pre> <?php $language='{{{lang}}}'; $name='{{{name}}}'; ...... ?> </pre> but doesn't work. How can I do?
2) Can I set a default value to a parameter?
Many thanks,
Giovanni
On 09/06/05, Giovanni Putignano gputignano@tiscali.it wrote:
A couple of questions:
- I would like to create a template as this:
<pre> <?php $language='{{{lang}}}'; $name='{{{name}}}'; ...... ?> </pre>
but doesn't work. How can I do?
The wiki-syntax "<pre>" implies both an HTML "<pre>" and a wiki-syntax "<nowiki>" (i.e. it suppresses all wiki markup). However, any line beginning with one or more spaces is interpretted as pre-formatted (i.e. HTML "<pre>") without suppressing markup, so your example should work if you remove the "<pre>" and "</pre>" and make sure each line is indented slightly.
- Can I set a default value to a parameter?
No. See http://bugzilla.wikimedia.org/show_bug.cgi?id=364 for discussion of whether this is necessary and possible, and how it would/should work.
On 6/9/05, Giovanni Putignano gputignano@tiscali.it wrote:
A couple of questions:
- I would like to create a template as this:
<pre> <?php $language='{{{lang}}}'; $name='{{{name}}}'; ...... ?> </pre>
but doesn't work. How can I do?
If you are trying to add PHP code to be executed, this is not available for critical security reasons.
-- Jamie ------------------------------------------------------------------- http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail! Have lots of invites. Gmail now has 2GB.
I put this code in my index.php file of the wiki directory:
if (eregi("googlebot",$_SERVER['HTTP_USER_AGENT'])) { mail("my.address@my.isp", "Googlebot - ".$_SERVER['REQUEST_URI'], "Google has visited: ".$_SERVER['REQUEST_URI']); }
and in just an hour I'm getting lots of messages. EG: ================ I don't mind this:
Google has visited: /GenWiki/index.php?title=Police_district_of_Strelno ================ But would rather not have this:
Google has visited: /GenWiki/index.php?title=Special:Recentchanges&hideminor=0&hideliu=0&hidebots=1&limit=50&from=20050224023354
Google has visited: /GenWiki/index.php?title=Special:Recentchangeslinked&target=User:Schmerse&days=14&limit=500&hideminor=0
Google has visited: /GenWiki/index.php?title=Talk:Catholic_parish_of_Lewkow&action=edit
Google has visited: /GenWiki/index.php?title=Image:Posen_kr_Pleschen.jpg&curid=0&action=history ================
How can I steer the Googlebot?
James
=James Birkholz= wrote:
How can I steer the Googlebot?
http://www.robotstxt.org/wc/exclusion.html
-- brion vibber (brion @ pobox.com)
I can see how to exclude certain directories, but how can I prevent the Recent Changes pages, and the edit and history pages of articles from being crawled?
At 08:41 PM 6/9/05, Brion Vibber wrote:
=James Birkholz= wrote:
How can I steer the Googlebot?
=James Birkholz= wrote:
I can see how to exclude certain directories, but how can I prevent the Recent Changes pages, and the edit and history pages of articles from being crawled?
Set $wgArticlePath to be distinct from $wgScriptPath, end exclude the script path.
-- brion vibber (brion @ pobox.com)
At 09:27 PM 6/9/05, Brion Vibber wrote:
=James Birkholz= wrote:
I can see how to exclude certain directories, but how can I prevent the Recent Changes pages, and the edit and history pages of articles from being crawled?
Set $wgArticlePath to be distinct from $wgScriptPath, end exclude the script path.
-- brion vibber (brion @ pobox.com)
I'll need more direction than that. Let's say this is my current, from LocalSettings.php:
$wgSitename = "My Wiki";
$wgScriptPath = "/MyWiki"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php";
## If using PHP as a CGI module, use the ugly URLs # $wgArticlePath = "$wgScript/$1"; $wgArticlePath = "$wgScript?title=$1";
================ If I set $wgScriptPath to a sister directory to /MyWiki, say /Foo, would I modify the constants to this: ?
$wgScriptPath = "/Foo"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php"; $wgArticlePath = "MyWiki?title=$1";
or should it be the other way around?
$wgScriptPath = "/MyWiki"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php"; $wgArticlePath = "/Foo?title=$1";
If so, how would that affect the ugly URLs? This would be a virtual directory, with nothing in it, right? Should something else be done? I tried the last change and it didn't change anything in the URL, even after a hard refresh.
TIA, James
mediawiki-l@lists.wikimedia.org