So i should check for the hooks in the renderExample function right? I have
pasted the code in the extension file below. Will that work
Also the reference information should be entered into the page table also? Or
should it just be in the reference and referencelinks table?.
<?php
$wgExtensionFunctions[] = "wfReferenceExtension";
function wfReferenceExtension()
{
global $wgParser;
$wgParser->setHook("ref","renderReference");
}
function renderReference($input)
{
$referenceText = $input;
//to separate id and the refname to display
$reference = explode(" ",$referenceText);
//get the actual display reference
$refDisplay = $reference[0]."]";
//to get teh actual reference Id to insert into the table
$tempId = $reference[1];
$temp = explode("]",$tempId);
$refId = $temp[0];
$wgHooks['ArticleSaveComplete'][] = array
('myAddReferenceFunction',$refId);
$output = "$refDisplay";
return $output;
}
function myAddReferenceFunction($refId)
{
//db functions
}
?>
Thanks
> I have created a table called reference links similar to the imagelinks
table.
> When a user enters his reference using an external link his reference gets
> entered into the reference table and in the textarea he can actually see the
> <ref>23</ref>, where the 23 is the refId from the reference table. I want to
> insert this info in the referencelinks table only when article is finally
> saved and not previewed. But when a user hits preview it should show actually
> pull up the reference name from the database and show that and similarly for
> preview.
Check the hooks ArticleSave and ArticleSaveComplete. Wait for those to
be called before commiting data to the DB.
--
Amruta
Could anyone please tell me which function gets called on the 'Save Page'
submit action. I am making chnages to a existing page in the locally
installed wiki. I want to add some data to tables that i have added to the
wiki database. Once a user its submit i want to be able to identify my
tagged text from the text and then insert it. So for this i want ot figure
out whihc function will get called when a user hits 'Save Page' button on
edit page.
Thanks
Hi,
I want to use my wiki for two different things:
The first part just as a normal homepage where no user (only me =>
sysop) can make changes.
The second part should be a FAQ, Forum and a 'usual wiki'. For the
changes here users shouldn't
have to be logged in.
How can I make this? I use Media Wiki 1.5.
Thanks, Martin
hi,
I am running mediawiki on Fedora Core 4
I did try to install Ocaml usinf rpm. Please see
below.
[root@localhost ~]# rpm -ivh
ocaml-3.08.3-3.rhfc4.src.rpm
warning: ocaml-3.08.3-3.rhfc4.src.rpm: Header V3 DSA
signature: NOKEY, key ID ab9c7dae
1:ocaml
########################################### [100%]
[root@localhost ~]# ocaml
bash: ocaml: command not found
[root@localhost ~]#
I download the rpm from rpm.nogin.org
Any suggestions
Thanks
jc
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
Hello kind helpers...
I'm installing MediaWiki on a new site and have a snag I'm hoping to get some advice for:
Installed at synapse-technology.com/wiki
Created blank MySQL database, database user with admin priveleges
Changed permissions on /config folder to 777
browsed to synapse-technology.com/wiki folder
- I get this:
MediaWiki 1.5.2 You'll have to set the wiki up first!
So...I click on the link to start the setup process, but I get this msg:
Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster(a)synapse-technology.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
---------------------------------
Apache/1.3.34 Server at www.synapse-technology.com Port 80 Any ideas? This installation is on a hosting service, ace-host.net Any suggestions are welcome. Thanks in advance, Jose
---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
Those who want to take MediaWiki beyond Wikipedia might get some
inspiration from http://en.wikipedia.org/wiki/WikiCalc
VisiCalc creator (in 1979) Dan Bricklin has combined his old idea
with a wiki. Version 0.1 of wikiCalc is now in alpha testing.
--
Lars Aronsson (lars(a)aronsson.se)
Aronsson Datateknik - http://aronsson.se
I'd like to make pages that accept form input, go off and query
MySQL, and display results. For example, voting on proposals,
maintaining a distributed book/video library, or time sheet logging.
It would be really cool to make this an extension, so it could be
configured and embedded in any page -- especially if it could still
function if the page is protected from editing. I suppose the
alternative is a Special page.
Having played with some extensions, I'm having trouble
conceptualizing how form-based interaction would work. What would the
form target page be? I suppose it could be the same page, branching
off the existence of GET or POST data to figure out if the form was
being sent or received.
I'm not asking anyone to solve the problem for me -- just post some
URLs of things that are similar to what I'm looking for. I once came
across a voting system, but have been unable to find it (or anything
similar) on Meta.
Thanks in advance for any advice offered!
:::: Express your individuality through brand-name conformity!
:::: Jan Steinman <http://www.Bytesmiths.com>
> From: n.milletti(a)indire.it
>
> Dear friends, I don't not care about namespaces, categories, or
> other stuff. I want only have, in the left box, a list of links,
> like:
> - poetry
> - history
> - etc.
> But strange as it might seem, this basic function is not intuitive
> at all...
Go edit MediaWiki:Sidebar
and put in it:
* navigation
** poetry page|poetry
** history|history
** other stuff|etc.
Search meta.wikipedia.org for "sidebar" for full instructions.
:::: "Are you all right?"
:::: "No, I'm 5/6ths right. My mother's maiden name is Wright, which
makes me half wright, and my middle name is Wright, which is 1/3rd
wright, for a total of 5/6ths."
:::: Jan Wright Steinman <http://www.Bytesmiths.com/Van>
Hi,
I tried to install ocaml and then do make at /math
directory
but I got the following error msg when I tried to do
make
[root@localhost math]# make
ocamlopt -c util.ml
make: ocamlopt: Command not found
make: *** [util.cmx] Error 127
[root@localhost math]# ocamlopt
bash: ocamlopt: command not found
ocaml seems to be installed but no ocamlopt
any suggestion?
thanks
jc
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
Hi,
I have two questions:
1.) I plan an automated numering like this:
[N1] askfd asfj alsdfjaldksöf
[N2] asldkjf asdlkjfadslköj
[N3] asdjflsdjfkd
Is this possible? I tried "[N#]" but this doesn't work.
2.) How can I make indetions in an enumeration block?
I need to have line breaks within an enumeration block:
Example:
1 some Text
2 some other Text
*this should be some more right*
3 her comes number 3
1 some Text
2 some other Text
* so it is ok*
3 her comes number 3
Any idea?
Thanks, Martin