Hi, what could be the cause of "Expression error: Unrecognised word 'error'
" for the template, cite news and cite journal? It cannot even recognize the
single word, "Suicide".
PM Poon
Hallo to all of you there.
I'm trying to have a way to speed up development of the initial setup of
my wiki before moving to the remote server. I mean, I want to do and see
changes in a wiki page with *just* the following steps (not one more!):
1) edit a file in my favourite text editor
2) Alt-TAB to the web browser window with the wiki page shown
3) press F5
(Of course this can also be reduced to just two steps if a keyboard
shortcut is configured to focus on the web browser window and force a page
refresh).
Summying up, what I would like to accomplish is editing all (or almost
all) the wiki by editing plain .txt files, with all the wiki pages on
localhost containing just the custom magic word
"__GET_CONTENT_FROM_FILE__" (or a {{gcff:}} functions, or whatever).
So, first I've disabled cache in LocalSettings.php:
$wgEnableParserCache = false;
$wgCachePages = false;
Then, I've tried hacking "includes/parser/Parser.php", function parse(),
like specified in the bottom of this message [1] (yes I know that hooks
probably can be used for this sort of things, but I've not studied them
and I'm in a hurry, so just making an attempt to see if and how this is
feasible: I need to speed up wiki development because I'm short of time ;)
There I check for the presence of the custom magic word
"__GET_CONTENT_FROM_FILE__" at the beginning of the $text variable, and if
found I replace $text with contents retrieved from a file following some
conventions for the filename, if it exists.
This is sorta working, but not like I would like: let me explain.
I'm using SMW and Semantic Forms (but probably this is not important
here); anyway, I have e.g. a template called "Test", and a form which
generates pages that use the Test template when accessed and rendered.
So let's say I have the page "Test Page", showing content using the "Test"
template.
If I am with browser on page "Template:Test", I can immediately see any
change I do into the "Template;Test.txt" file, just by hitting F5.
But, if I am with browser on page "Test Page", it doesn't reflect changes
done in the "Template;Test.txt" file: in fact, it uses the Test template
content retrieved from the database, i.e. by MediaWiki standard behaviour.
So I'm here asking: how can I hack things in order to have everything
retrieved from txt files, as long as the first word in the content is
"__GET_CONTENT_FROM_FILE__" and the file (following a name convention,
e.g. replacing ":" with ";" to the page name and appending ".txt") exists?
I don't need a clean solution, just a way to make it work and let me
continue development (i.e. fine-tuning templates, forms appearance,
several start-up pages contents, etc.), without having to write code in
the textarea and do a button click to save, and then another click to
re-edit, etc.).
Or, is someone able to arrange an extension doing what I've explained?
I repeat the "summying up": what I would like to accomplish is editing all
(or almost all) the wiki by editing plain .txt files, with all the wiki
pages on localhost containing just the custom magic word
"__GET_CONTENT_FROM_FILE__" (or a {{gcff:}} functions, or whatever).
I underline this is only for local development, then the "real" wiki (on
the remote server) will be a standard one. So security issues and whatever
are not a concern.
---------------------------------------------------------------------
[1] Here it is my hack attempt (works for simple page but fails for my
main purposes as explained above):
public function parse( $text, Title $title, ParserOptions $options,
$linestart = true, $clearState = true, $revid = null ) {
/* hack: Get Content From File */
if (substr($text, 0, 25) == '__GET_CONTENT_FROM_FILE__'){
$gcff__directory = 'extensions/ContentFromFile/sources';
// if the path has a slash at the end we remove it here
if(substr($gcff__directory,-1) == '/')
{
$gcff__directory = substr($gcff__directory, 0, -1);
}
// if the path is not valid or is not a directory ...
if(!file_exists($gcff__directory) || !is_dir($gcff__directory) ||
!is_readable($gcff__directory))
{
// do nothing, go on with normal behaviour using the page content
retrieved from the database
} else {
// we open the directory
if($gcff__handle = opendir($gcff__directory)){
// calculate the file name (via conventions)
$gcff__filename = str_replace(':', ';', $title->mPrefixedText) .'.txt';
$gcff__filepath = $gcff__directory .'/'. $gcff__filename;
if(is_file($gcff__filepath)){
// get the page content from the file
$text = utf8_encode(file_get_contents($gcff__filepath));
}
// close the directory
closedir($gcff__handle);
}
}
}
#.........(and then here follows the original code of MediaWiki parse
function)............
}
--
Antonio
MediaWiki version: 1.10.1
PHP version: 5.2.9
MySQL version: 5.0.89
URL: http://www.futurenovo.com
A recent failed upgrade of cpanel broke my installation, requiring a
reinstall of perl and mysql. Following this, images no longer displayed on
my wiki pages - they just show as the namespace and filename, i.e.,
Image:Filename.jpg inline with the text. No error is reported related to the
image. Drilling down to the actual image location will display the image in
the browser window.
Since this happened and I couldn't fix it, I migrated the installation to a
new server (more memory, fresh install) expecting the issue to be resolved
but it hasn't. I use GD and have tried the following:
1. Installed ImageMagic and made appropriate changes to LocalSettings.php -
no change, reverted to GD settings.
2. Tweaked PHP
3. ran /scripts/rebuildImages.php - no errors, but 0 of 66 images changed.
Likewise oldimages
4. ran the following on the image table:
ALTER TABLE image ADD COLUMN img_name2 varchar(255);
UPDATE image SET img_name2=img_name;
UPDATE image SET img_name=img_name2;
ALTER TABLE image DROP COLUMN img_name2;
5. uploaded a new image and attempted to include in a page without success
I understand the MW version is old, but I have a lot of custom extensions,
etc that I don't want to have to rewrite so I don't want to upgrade. And I
seriously doubt it would change the image issue. (I haven't made any mods to
the MW install itself.) Note: Some of my extensions on some pages (not Home)
need to be adjusted since the migration, but the image problem is identical
to what was happening on the old server. Ideas anyone?
How can I #if test the user's current skin name in a template? I have a
template that I would like to include different images based on the
user's skin.
I do "svn update" every few weeks.
I enjoy reading the
=== Configuration changes in 1.xx ===
=== New features in 1.xx ===
=== Bug fixes in 1.xx ===
== API changes in 1.xx ==
contained in RELEASE-NOTES, and have even devised a way,
$ cp RELEASE-NOTES /tmp/r
$ svn update
$ diff /tmp/r RELEASE-NOTES
to get a very rough idea of what changed between rOLDER and rNEWER.
Alas, when we cross a 1.15/1.16, 1.16/1.17 boundary one is forced to try something like
$ perl -nwle 'print if /=== Configuration changes in 1.16 ===/../== Compatibility ==/' /tmp/r > /tmp/r2
$ sed '/== MediaWiki 1.15 ==/q' mediawiki/HISTORY|diff -U0 - /tmp/r2
All this diff stuff is getting quite insane. Isn't there something more precise,
like Debian's apt-listchanges...
Isn't there a SVN command that can print exactly those
=== Configuration changes in 1.xx ===
=== New features in 1.xx ===
=== Bug fixes in 1.xx ===
== API changes in 1.xx ==
for my given rOLDER to rNEWER space in time? (and nothing more verbose please.)
How is RELEASE-NOTES generated? I can't find how in my SVN tree.
P.S., shouldn't all lines be === above? One is ==.
I would like to have more then one language for my wiki ! (Other said, the french one...)
So I exported Template:Languages, Template:Languages/Lang and Template:Languages/Title as I saw on www.mediawiki.org !
I imported the xml in my wiki pages.
Made a second "Main Page/fr" to be sure ... before adding the code {{Languages:Main Page}}, even added a second as "Template:Languages/fr"
It doesn't work on my wiki ...
I'm sure I also need to download more to get the functions working...
I aslo tried to extend with the ParserFunctions from REL1.15.1 ... got even more problems ...
Could somebody help , please ? A list of all pages to export would be great !!!!
Thanks !
Didier Houbrechts
http://www.aena.behttp://dhvg.ckcs-kcs.dyndns.org (online pedigrees for Ckcs & Kcs/Ets)
Huib Laurens <sterkebak(a)gmail.com> wrote:
>Hi,
>
>What version of php and mediawiki are you using and do you have
>something from the errorlog ?
>
>Best,
>Huib
Adding php error_reporting exposed this as a low php mem issue (first
time I've used MW).
Thanks!
--
MK <halfcountplus(a)intergate.com>
Does anyone here use Flagged Revisions? After install, saving an edit
as an anon user leads to a blank white screen and the save does not
occur. This happens (less consistantly) with all accounts, inc.
admin. Unincluding flagged revs immediately solves.
I'd really like to use the extension but am at a loss as to what the
problem could be.
--
MK <halfcountplus(a)intergate.com>
Welcome to mediawiki-l. This mailing list exists for discussion and questions
about the MediaWiki software[0]. Important MediaWiki-related announcements
(such as new versions) are also posted to this list.
Other resources.
If you only wish to receive announcements, you should subscribe to
mediawiki-announce[1] instead.
MediaWiki development discussion, and all Wikimedia technical questions, should
be directed to the wikitech-l[2] mailing list.
Several other MediaWiki-related lists exist:
- mediawiki-api[5] for API discussions,
- mediawiki-enterprise[6] for discussion of MediaWiki in the enterprise,
- mediawiki-cvs[7] for notification of commits to the Subversion repository,
- mediawiki-i18n[8] for discussion of MediaWiki internationalisation support,
- wikibugs-l[9] for notification of changes to the bug tracker.
List administrivia (unsubscribing, list archives).
To unsubscribe from this mailing list, visit [12]. Archives of previous postings
can be found at [3].
This list is also gatewayed to the Gmane NNTP server[4], which you can use to
read and post to the list.
Posting to the list.
Before posting to this list, please read the MediaWiki FAQ[10]. Many common
questions are answered here. You may also search the list archives to see if
your question has been asked before.
Please try to ask your question in a way that enables people to answer you.
Provide all relevant details, explain your problem clearly, etc. You may
wish to read [13], which explains how to ask questions well.
To post to the list, send mail to <mediawiki-l(a)lists.wikimedia.org>. This is a
public list, so you should not include confidential information in mails you
send.
When replying to an existing thread, use the "Reply" or "Followup" feature of
your mail client, so that clients that understand threading can sort your
message properly. When quoting other messages, please use the "inline" quoting
style[11], for clarity.
When creating a new thread, do not reply to an existing message and change the
subject. This will confuse peoples' mail readers, and will result in fewer
people reading your mail. Instead, compose a new message for your post.
Messages posted to the list have the "Reply-To" header set to the mailing list,
which means that by default, replies will go to the entire list. If you are
posting a reply which is only interesting to the original poster, and not the
list in general, you should change the reply to only go to that person. This
avoids cluttering the list with irrelevant traffic.
About this message.
This message is posted to the list once per week by <river(a)wikimedia.org>.
Please contact me if you have any questions or concerns about this mailing.
References.
[0] http://www.mediawiki.org/
[1] http://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
[2] http://lists.wikimedia.org/mailman/listinfo/wikitech-l
[3] http://lists.wikimedia.org/pipermail/mediawiki-l/
[4] http://dir.gmane.org/gmane.org.wikimedia.mediawiki
[5] http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
[6] http://lists.wikimedia.org/mailman/listinfo/mediawiki-enterprise
[7] http://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[8] http://lists.wikimedia.org/mailman/listinfo/mediawiki-i18n
[9] http://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[10] http://www.mediawiki.org/wiki/FAQ
[11] http://en.wikipedia.org/wiki/Posting_style#Inline_replying
[12] http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
[13] http://www.catb.org/~esr/faqs/smart-questions.html
Dear all,
I would like to ask please help me working with any of the mediawiki
extension with which I can play video, which has been saved locally on the
mediawiki server.
Tried several extensions without any luck.
Thanks very much
Lokesh Kumar (Research Scholar)
Network Multimedia and Computing Group,
Department of Informatics, University of Beira Interior,
6201-001, Covilha, Portugal