I wont spoil all the fun for you. This is broken in some small way - it
writes out the new link instead of changing all the links. I developed it in
the firefox address bar, using the firefox error console to let me know when
it was broken.
javascript:links=document.getElementsByTagName("a");for (var link in
links){if(links[link].className=="new"){links[link].href='
On Tue, Jan 6, 2009 at 11:10 PM, Ekompute .info <ekompute(a)gmail.com> wrote:
LOL, from the frying pan into the fire! Thank you,
Brian, for taking your
time. I guess I will have to live with it for a while.
(P/S: I know that modifying mediawiki directly is bad and that's why I dare
not upgrade.)
PM Poon
On Wed, Jan 7, 2009 at 2:04 PM, Brian <Brian.Mingus(a)colorado.edu> wrote:
I don't like modifying mediawiki directly
because the changes often get
lost
during upgrades, but if you can find a way to do that OK.. Probably isn't
too hard to find grepping through the source.
Otherwise, you might try jQuery if you are new to javascript, since it
abstracts a lot of complicated things away:
http://stackoverflow.com/questions/179713/how-to-change-the-href-for-a-hype…
You basically have to figure out how to say, "Take all hyperlinks in
class
new and change their href attribute to be
http://en.wikipedia.org/wikiplus
their innerHTML attribute"
I just learned that using FireBug.
On Tue, Jan 6, 2009 at 10:55 PM, Ekompute .info <ekompute(a)gmail.com>
wrote:
> Hi, I find it so difficult even after I download Firebug. The right
panel
didn't say anything of Comon.css and Common.js, only main.css.
How about tweaking the mediawiki files? Maybe I will find that easier
because I do go in and tinker with it, sometimes.
PM Poon
On Wed, Jan 7, 2009 at 1:40 PM, Ekompute .info <ekompute(a)gmail.com>
wrote:
>
>> Hahaha, when one does not know, everything is difficult.... Let me
give
it
> a try.
>
> PM Poon
>
>
> On Wed, Jan 7, 2009 at 1:37 PM, Brian <Brian.Mingus(a)colorado.edu>
wrote:
>>
>>> Download Firefox and the FireBug extension. Open FireBug, click the
>>> inspect
>>> button. Click on a red link. FireBug will show you all the code
related
> >>> to
> >>> it. You can override the css and javascript by editing the wiki
files
>>> MediaWiki:Common.css and MediaWiki:Common.js. I don't know why you
>>> suppose
>>> editing the mediawiki source code would be easier. This is much
easier.
> >>> You
> >>> do have to figure out how to do it, but this is really a trival
kind
of
> >>> programming.
> >>>
> >>>
> >>> On Tue, Jan 6, 2009 at 10:33 PM, Ekompute .info <
ekompute(a)gmail.com>
> >>> wrote:
> >>>
> >>> > Hi, thank you for your answer. I can't find any redlinks in
the
two
> >>> files.
> >>> > Would there be a simpler method by going to the Mediawiki source
> files
> >>> and
> >>> > edit it directly by putting [[Wikipedia:<redlink>]] to it?
If it
> could
> >>> be
> >>> > done in one file, it would be easier for me, because I am not
good
at
>>> > programming.
>>> >
>>> > PM Poon
>>> >
>>> > On Wed, Jan 7, 2009 at 1:23 PM, Brian <Brian.Mingus(a)colorado.edu
> >>> wrote:
> >>> >
> >>> > > Using css and javascript in MediaWiki:Common.css and
> >>> MediaWiki:Common.js.
> >>> > > Find all the red links, prefix their href attribute to
Wikipedia.
>>> > >
>>> > > On Tue, Jan 6, 2009 at 9:47 PM, Ekompute .info <
ekompute(a)gmail.com
>
>>> > wrote:
>>> > >
>>> > > > Hi, I am writing an encyclopedia fork. Since I am doing it
alone,
I
>>> > have
>>> > > a
>>> > > > lot of redlinks. I would like to redirect all these red links
to
> >>> > > Wikipedia,
> >>> > > > while maintaining its color as still red. How should I
go
about
>> doing
>> > it?
>> > > >
>> > > > PM Poon
>> > > > _______________________________________________
>> > > > MediaWiki-l mailing list
>> > > > MediaWiki-l(a)lists.wikimedia.org
>> > > >
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > You have successfully failed!
>> > > _______________________________________________
>> > > MediaWiki-l mailing list
>> > > MediaWiki-l(a)lists.wikimedia.org
>> > >
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>> > >
>> > _______________________________________________
>> > MediaWiki-l mailing list
>> > MediaWiki-l(a)lists.wikimedia.org
>> >
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>> >
>>
>>
>>
>> --
>> You have successfully failed!
>> _______________________________________________
>> MediaWiki-l mailing list
>> MediaWiki-l(a)lists.wikimedia.org
>>
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>
>
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
--
You have successfully failed!
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l