I need to include some custom JavaScript dynamically when a new article is
created. I can see that includes/Article.php has the function
insertNewArticle and hooks which I could use. I have read up the hooks
functions and that doesn't seem to be a solution for what I need.
I am able to redirect to a new page with the necessary JavaScript after the
article is saved, but I would rather do it within the wiki app standards, if
possible.
This JavaScript code is to be included conditionally, the conditional
statement is being handled fine via an "if" statement.
any suggestions are welcome.
Hey all,
I've created two new extensions that relate to describing the structure of a
wiki.
1) GraphDataStructure - This class allows you to obtain a graph data
structure (nodes and edges) for your wiki. It looks in the database for all
articles, categories, images, templates, etc and creates a node record for
these. Next, it finds the relationships between the nodes (page links,
category association, redirects, image and template uses, etc). Once you
have a set of nodes and edges, you can export the result set as XML. It is
also possible to set an active node from a Title object and prune all nodes
and edges not connected to this node. The class can also take the XML it
exports and construct a new instance of the object.
2) SpecialGraphStructure - This is a front-end for the above extension at
[[Special:GraphStructure]]. This special page provides a web interface to
obtain XML for various sets of nodes, articles, etc. It also has a caching
mechanism for GraphDataStructure. The way it works is the first time it
loads, the graph data structure for the entire wiki is created (a
resource-intensive operation for large wikis). The graph data structure is
serialized for future reference. For subsequent requests for graphs, the
serialized data is read in and the appropriate nodes and edges are extracted
and XML is returned. The graphs for each query are cached, for optimal
performance. The cache also cleans itself, for convenience.
It is worth noting that the extension creates a graph structure for your
entire wiki, then scans this structure to extract necessary information.
For this reason, the extension will be significantly slower on large wikis.
I have it working on a wiki with ~4000 nodes, and the speed cost is minimal
(after initial population anyway).
By themselves, these extensions aren't that exciting (unless you are the
kind of person who enjoys a machine-readable format of your wiki structure.
This is why I am working on another extension, SpecialGraphviz, which takes
the XML output from Special::GraphStructure and converts it to Graphviz
markup. In the prototype of this extension, I have a new tab/action on
articles called "Visualize" which displays a Graphviz rendering of the
article's relationship to other articles. The rendering is also an image
map, so you can click on the nodes and be taken to the appropriate wiki
page.
These extensions are in my Subversion repository at
http://opensource.case.edu/svn/MediaWikiHacks/extensions/.
You may view a demo of SpecialGraphStructure at
http://wiki.case.edu/Special:GraphStructure
If you have any suggestions or feature requests, just send me an e-mail.
Gregory Szorc
gregory.szorc(a)gmail.com
I am developing a website, which has MediaWiki as the default page and
phpBB as the forum where "community portal" links to. Both the
MediaWiki and phpBB are on the same server.
I need this feature for my website:
1. User only has to register once, then he/she will be a member in
both the wiki and forum;
2. After user logs on in either the forum or wiki, he/she will have
logged on in the other.
3. After user logs out in either the forum or wiki, he/she will have
logged out in the other.
Can you help me? Thanks very much!!
As an admin on Anarchopedia, one guy asked me to open "disability
Anarchopedia". You can see our talk on the page
http://eng.anarchopedia.org/index.php/User_talk:Millosh#Dear_Millosh.2C
(from this heading to the rest of the page).
Hm. There is no problem to open one or more MediaWikis, but the same
MediaWiki engine would to nothing. I was thinking about changing of
Monobook skin, but it seems that it is not enough.
As this is not only Anarchopedia-related question; as well as it
should be implemented on Wikimedian projects, too; as well as this is
important issue -- I would like to hear is there any good solution for
people with disabilities so they can be able to equally contribute to
MediaWiki projects?
I was thinking about using Emacs (it has wiki interface and I am sure
that I found that it has some interfaces for persons with
disabilities), but Emacs is too complex...
Is there anything else which can be used? If not, is there a people
who are willing to work on such issue? If not, may WMF fund a project
with aim to solve this problem?
Hi, I would like to be able to include/transclude an excerpt from a page.
Can anyone suggest how to do this with MediaWiki?
I have been thinking about several things:
- set up a separate name space like Talk, and associate and place each
excerpt as a subpage to a page's excerpt page
- transclude a section, sort of like how Edit of a section works
- add new tags and hooks
- use noinclude and includeonly in a clever way using macros
Has anyone done something like this, and care to share some experiences?
Thanks
- henrik
Hi,
I got my MediaWiki installation working (1.71)... now I just need to add
the extension Makesysop.php
How do I set it so that the following happens:
http://meta.wikimedia.org/w/index.php?title=Special%3ALog&type=rights&user=
&page=
What I wanted to happen is for user rights to be displayed as:
Testuser changed group membership for Testuser1@testwiki1 from (none) to
sysop, bureaucrat, checkuser, developer
Testuser changed group membership for Anewuser from sysop to sysop,
bureaucrat
I assume I need to install MediaWiki several times... this correct??
Thanks
Bekki
--------------------------------------------------------------------
Get your free email address at http://www.merseymail.com/
Hello,
I am still having this problem, although I believe that it is specific
to the settings of MediaWiki, seeing that I have other MediaWiki
installations (also 1.7.1) on the same server, and they do not have
this problem.
When a user loads the recent changes page on my wiki, the CPU
utilization on my server goes up to 99 to 100% for a single Apache
process, and that process stays alive for *exactly* 60 seconds (which
also happens to be the cutoff time for PHP scripts on my server).
This only happens *after* the recent changes page has been sent to the
browser, and the connection has been closed (I have KeepAlive off).
I have no idea what is going on, and any help would be greatly appreciated.
Thanks,
Kasimir Gabert
--
Kasimir Gabert
Hello there, this is the second time i post this question on this
mailinglist, because i haven't had any reactions the previous time and
in the meanwhile i still could not find a solution myself, so here we
go again (for a last attempt, don't worry ;-):
I am trying to show different images, dependent on some conditions:
Scenario 1: if the current page(name) is the same as a given pagename,
image_1.gif is shown.
Scenario 2: if the current page(name) is not the same as the given pagename, the
existence of the given pagename is checked:
Scenario 2a: if the given pagename exists, image_2a.gif is shown.
Scenario 2b: if the given pagename does not exist, image_2b.gif is shown.
So i wrote:
{{if:
{{ifeq:
{{NAMESPACE}}:{{PAGENAME}} | {{NAMESPACE}}:{{BASEPAGENAME}}/subpage | true
}}
| [[Image = image_1.gif]]
| {{ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}/subpage
| [[Image = image_2a.gif]]
| [[Image = image_2b.gif]]
}}
}}
The problem is that image_1.gif does not appear, even if
{{NAMESPACE}}:{{PAGENAME}} has the same value as
{{NAMESPACE}}:{{BASEPAGENAME}}/subpage (e.g. image_2a.gif appears then
instead, because the given pagename
{{NAMESPACE}}:{{BASEPAGENAME}}/subpage" exists). Does the
parserfunction "ifeq" compares the values litterally without
interpreting the magicwords?
I don't think there is any mistake in the above wiki-code because when
i substitute "{{NAMESPACE}}:{{PAGENAME}}" by "a" and
{{NAMESPACE}}:{{BASEPAGENAME}}/subpage" by "a", so that the comparison
is "a=a" (which is true) the image_1.gif is correctly displayed.
Does anyone know whether the magicwords in the parserfunction "ifeq"
are recognized and what the cause of the problem is? If this
parserfunction does not interpret magic words, is there another
solution to display image_1.gif in case the pagename is the same as a
given pagename?
Thanks in advance!
B.