On 25/05/05, Crit Van Tuyl <critster(a)gmail.com> wrote:
> What I am trying to do is add website info from Alexa Internet (traffic
> button) for the Template "Company_Info".
>
> I do know my users and my intention is to only allow Admins the ability to
> add it. I did read a little on the extensions today. Not sure how it works
> yet. Any guidance or suggestions are welcome.
Only letting Admins add particular content is probably not going to
work with the editting model of MediaWiki. People have thought before
of only allowing such code to operate on protected pages, but this
presents problems like someone tricking an admin into protecting a
page which already has such content, or someone taking advantage of
the template inclusion mechanism to manipulate the content of a
protected page, etc.
Since you have a single specific purpose in mind, I strongly suggest
that you use the extension approach, similar to the charInsert code I
linked to in my last message - it should be far easier anyway. If you
made it set a hook for the tag "alexa", and made the output something
along the lines of "<script
type='yadayada'>getAlexaInfo('$data')</script>" (obviously,
"getAlexaInfo()" would be a JavaScript function defined in a site-wide
file such as wikibits.js or the [[MediaWiki:monobook.js]] page), then
users could simply type "<alexa>Company name</alexa>" anywhere they
liked.
So based on CharInsert, the extension file (which you just "include()"
in your LocalSettings.php file) could look something like the
following:
----
if( !defined( 'MEDIAWIKI' ) ) {
die();
}
$wgExtensionFunctions[] = 'setupAlexaJS';
function setupAlexaJS() {
global $wgParser;
$wgParser->setHook( 'alexa', 'insertAlexaJS' );
}
function insertAlexaJS($data) {
# you'd want to add some "sanitizing" of the string passed in $data here
# to make sure users couldn't trick their way into inserting
arbitrary JavaScript
# i.e. escape or remove anything that's not just plain text in JS's eyes
return "<script type='yadayada'>getAlexaInfo('$data')</script>";
}
Hope this all makes sense!
--
Rowan Collins BSc
[IMSoP]
Hi!
On my server, where I have got 2 wikis installed I have got the same problem:
When I enter date on the command prompt, the server returns:
Tue May 24 04:19:53 CEST 2005
This time is correct.
Then I go to the Time Zone settings, I get the following output:
Site 1:
Current time on Server: 02:21
Local time: 03:21
Site 2:
Current time on Server: 02:22
Local time: 04:22
Why? And how can this be fixed?
What should I enter into the difference field - the Time difference to
UTC (including summer time or without?) ?
FYI: Both sites run on the same server.
Any Ideas?
Thanks
Hello,
i moved my own wiki to another hoster, but now the wiki dont work correctly.
After the import of the dump, can i read the article without problems,
but it isnt possible to login:
"1054: Unknown column 'user_token' in 'field list' (localhost)".
As yet i use MediaWiki 1.3.5 no MediaWiki 1.4.4.
I use PMA for the export/import with the option "REPLACE"
Any soultion ?
regards
Stephan
Hello,
I need my user logins to be of a certain format, and despite my attempts to
communicate this to my users, they are still not getting it right.
To this end (and others): is there a means for the make the
create-new-login process effectively "request" their login creation for
approval by a sysop?
Also, is there a means (whether or not it's tied in with above process) to
verify the email address of a new login?
-Matt
Ive readed
http://meta.wikimedia.org/wiki/Help:Template_names%2C_variable_names_and_pa…
and http://meta.wikimedia.org/wiki/Help:Templates#Parameters , but
I'm weak in english, and I dont fully understand this pages. I've
looked on Polish wikipedia about examples but i didnt found anything
interesting.
On my wiki (about football) i have thousends of matches, like that:
12.06.1993
Football Team 1 - Football Team 2 1:3
Scorers: Team 1 Scorer - Team 2 Scorer I (43min), Team 2 Scorer II
(65,81 min)
Team 1: Player 1, Player 2, Player 3, Player 4 ...
Team 2: Player 5, Player 6, Player 7 (32 min Player 8), Player 9 ...
[[12.06.1993 Football Team 1 - Football Team 2|Read more...]]
but writing it manualy is very long, about few days toi make only one season.
It is possible to make this in template, and only give variables then
calling it? It will be very hard becouse numbers of goal scorers and
subsidions is different in different matches. Can someone give my
example or explain to how do it?
Wiadomość wysłana przez program DRACO ORGANIZER http://www.dshome.pl
Hi!
I am running a site at http://neu.aglug.net. On this site I'd liove to
add a text block with 2 Images below the footer block. The new block
should be visible on all pages.
Is this possible?
If yes, how?
Thanks.
With the recent rash of wikispam attacks, I decided to install the
SpamBlacklist extension on my mediawiki.
It seems to be working, but I can't seem to tailor it. I downloaded
the blacklist from meta to wikimedia_blacklist, and I set up the file
list with:
$wgSpamBlacklistFiles = array (
"$IP/extensions/SpamBlacklist/wikimedia_blacklist", // Wikimedia's list
// database title
"DB: wikidb Spam_blacklist",
);
I created an article in the main namespace called "Spam blacklist" and
put the following regex fragment in it:
p21\.info
I tried to resave an article from one of the spammers with a link to
this site and it wasn't caught.
I messed around and while trying to isolate the problem I put that
line into the beginning of the wikimedia_blacklist file, and it
worked!
So I took it out and tried again, and sure enough it failed to trap
it. So question 1 is
What's wrong with my setup in pointing to the local Spam blacklist
article, should it be in a different namespace perhaps?
Then I put the line back into the file so that at least I'd be
blocking p21.info until I refreshed the master list, but it then again
failed to work. I tried again by picking another domain in the master
list, and it got blocked.
So question #2 is why changes to the master list aren't effective?
Looking at the extension code, it seems to be talking about somehow
caching the reg exp list, but how that works is cryptic to me. Any
advice or insight? Perhaps this is also why the database article
isn't working either.