Hi,
I have recently installed Mediawiki as part of my website. Because I am integrating it into an existing site I need to be able to link to stuff already there. The issue I am currently having is that the site is accessed via two URLs (internal and external). For this reason I need links refering to the existing site to be relative.
Has anyone got any suggestions as to the changes I would need to make in the Wiki source? Also, is this limitation by philosphy or by coding practicality?
Andre
I'm wondering about lending a machine to be used as a Squid Cache for
wikipedia in my country (Brazil), like it was made once for France.
I'm an individual, not a company, so I can only buy a single machine with
the following spec:
2x Opteron 2210
16GB RAM
2x 73gb sas 15k (which I expect to use as RAID 1)
Instead I could build myself two unstable low spec white boxes, but don't
like that option.
So I'm asking if that is wikipedia interest and if that machine can handle
the load (remember that's only for Brazil).
I don't have bandwidth and rackspace yet but have some people in mind.
Best regards,
Fernando Fagundes
Hi,
I ended finding a solution that I am happy with, even if it isn't perfect. For the benefit of others:
Using the orginal define of EXT_LINK_BRACKETED in Parser.php I removed \b (word break). Then in DefaultSettings.php I added '/' to the $wgUrlProtocols array. This provides the nessary functionality but causes a warning, in Parser.php at the line which reads:
if ( strpos( wfUrlProtocols(), substr($protocol, 0, strpos($protocol, ':')) ) !== false )
this is because it assumes to find ':' but does not find it, so I changed it to:
if ( strpos($protocol, ':') && strpos( wfUrlProtocols(), substr($protocol, 0, strpos($protocol, ':')) ) !== false )
Andre
"Christensen, Courtney" wrote
>
> >For this reason I need links refering to the existing site to be
> relative.
> >Has anyone got any suggestions as to the changes I would need to make
> in >the Wiki source?
>
>
> I think a first suggestion would be to write an extension that takes
> <siteLink href="../myOldSite/page.html">Link</siteLink> and returns <a
> href="../myOldSite/page.html">Link</a>
I'll look into that.
> Or really if your users are that savvy then just write out a link
> surrounded by <nowiki> tags. (i.e. <nowiki><a
> href="../link">Link</a></nowiki> )
>
Tried this, but it just displays the HTML of what is between the nowiki tags.
In the meantime I have identified that the parsing is being done
in the Parser.php class, using the relative expression, defined
by the following code:
define( 'EXT_LINK_BRACKETED', '/\[(\b(' . wfUrlProtocols() . ')'.
EXT_LINK_URL_CLASS.'+) *('.EXT_LINK_TEXT_CLASS.'*?)\]/S' );
this is used by the preg_split method creating an array of groups
of four elements where elements n to n+3 are: url, protocol, text
and trail. I have attempted to come up with a regular expression
that will allow me to identify the bracketed sections that start
with '/':
define( 'EXT_REL_LINK_BRACKETED','/\[(\/([A-Za-z0-9_-]*)'.
'+) *('.EXT_LINK_TEXT_CLASS.'*?)\]/S' );
but this fails when I put it together:
define( 'EXT_REL_LINK_BRACKETED','\[(\/([A-Za-z0-9_-]*)'.
'+) *('.EXT_LINK_TEXT_CLASS.'*?)\]' );
define( 'EXT_LINK_BRACKETED', '/('.EXT_REL_LINK_BRACKETED.')|(\[(\b(' . wfUrlProtocols() . ')'.
EXT_LINK_URL_CLASS.'+) *('.EXT_LINK_TEXT_CLASS.'*?)\])/S' );
I am not a regex expert, so there is probably something obvious
I am doing wrong.
Andre
hi everybody,
is it possible to show/hide links in the sidebar related to what kind of
group a user belongs°!? i thought maybe could i write a javascript in
the sidebarpage°ß1 or isn't it possible°!? what do i have to do to
implement it°!? cn anybody help me°!?
On Dec 17, 2007 6:44 PM, <raymond(a)svn.wikimedia.org> wrote:
> Revision: 28612
> Author: raymond
> Date: 2007-12-17 23:44:29 +0000 (Mon, 17 Dec 2007)
>
> Log Message:
> -----------
> * Rename new message 'filetype-separator' (r28530) to the more generic message name 'comma-separator'.
> Can be useful for other still hardcoded comma separations.
I was thinking more flexibility was better than less. German has
about the same punctuation as English, but some languages have pretty
weird punctuation conventions, AFAIK. I'm not sure what would make
you choose a semicolon instead of a comma right now or vice versa, as
far as English goes, but if there is any good reason I'm not sure the
same logic would always apply in other languages. So if for some
reason one particular list has some odd property (say, in English,
possibly including items with commas in them), that language might
want to use a different punctuation mark (like a semicolon instead of
a comma, in the English example).
Whereas if we have a bunch of different separator messages for
different types of lists, that all contain pretty much the same
content, what's the problem? Most localizers can ignore them, and
those who can't can easily copy-paste and change several separators
rather than just one. This is a similar philosophy to how we have at
least six different messages containing the text "Go".
On Dec 16, 2007 10:01 PM, <werdna(a)svn.wikimedia.org> wrote:
> Revision: 28576
> Author: werdna
> Date: 2007-12-17 03:01:30 +0000 (Mon, 17 Dec 2007)
>
> Log Message:
> -----------
> * Ignore case in checking for a changed email address in Special:Preferences.
> * Bug reported by MZMcBride.
Is this a good idea? E-mail addresses *are* case-sensitive according
to spec. There are probably a few random places out there that treat
them as such. Why would you change your e-mail address'
capitalization if there's no difference, anyway?