Several people expressed interest in this hack.
Since my attachment got stripped, I've put the
diff below.
This change probably doesn't make sense as an RFE
because it is useful only on intranets AFAIK...
Parser.php (1.3.8) diff:
1037,1044d1036
< # JBA inserted code here
< # Replace P4:// with stuff to point at P4WEB.
< # Allows links of the form P4://depot/the/file
< # Replace p4machine:8081 w/ your p4web mach:port
< $text = preg_replace(
< "#P4://([^ \]]+)(\s|]|$)#U",
< 'http://p4machine:8081//${1}?ac=64${2}',
< $text);
< # JBA end of code insertion
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo
Hi,
I would really like full text indexing to be installed so advanced searching
would be possible. However, the database dump I used has the table 'cur' as
a table type of 'InnoDB'. If I'm not mistaken, fulltext indexes can only be
created on tables of type MyISAM, correct?
If so, are there any problems with switching from a table type of InnoDB to
MyISAM? Or am I possibly barking up the complete wrong tree here? (Is the
"Search" button on MediaWiki supposed to return fulltext results from the
get-go?)
Thanks for pointers. I am going to continue to research this on my own, but
figure someone on here can at least tell me if I'm looking in the right
direction.
Andrew
I'm not sure about your other questions but as to changing the navigation, its not very straight forward. I created instructions for myself on the steps to add a nav link.
First: In the template/xhtml_slim.pt file add your link. Search for 'id="p-nav"'. Copy and past one of the links, everything inside and include the <li></li> tags. Rename the id to be "n-somethingdifferent" and the href to be {nav_urls/somethingdifferent/href}". The i18 translate stuff needs to be changed to "string:Title_Of_Wiki_Page" in wiki link format (spaces replaced with underscores).
Example: <li id="n-basic_course_outline"><a href="${nav_urls/basiccourseoutline/href" i18n:translate="string:Basic_Course_Outline">Basic Course Outline</a></li>
Second: edit the include/SkinPHPTal.php file. buildNavUrls function (search for 'function buildNavUrls'), add your new link to the nav_urls array.
for the key, use the 'somethingdifferent' text from the first step in href. Then in the makel18nUrl call put the title of the Wiki Page, the same as the i18 translate call in the first step.
Example: $nav_urls['basiccourseoutline'] = array('href' => htmlspecialchars( $this->makeI18nUrl('Basic_Course_Outline')));
Third: In a browser type this url: http://yourdomain/wikiroot/index.php/MediaWiki:Wiki_Page_Title where Wiki_Page_Title is your page title for the new link, like ours which is 'Basic_Course_Outline'. That page should be blank, so edit it and add the display title for the linke, ie: Basic Course Outline. Only that text, which now created a description for the link. Sometimes adding an to the end of the text in this step will fix a problem where the link gets truncated. Don't understand this at all.
Fourth: Go to the special pages, and then all system messages. Edit the Monobook.js page. add 'ta['n-basic_course_outline'] = new Array( '','Basic Course Outline');', switching out your <li id=".."> and your page name. Save and you should now have a new nav Link.
-----Original Message-----
From: Muzaffer Ozakca [mailto:mozakca@indiana.edu]
Sent: Thursday, December 02, 2004 3:07 PM
To: mediawiki-l(a)Wikimedia.org
Subject: [Mediawiki-l] Newbie: Adding actions and navigation...
I have a couple newbie questions, I'm not sure this is the right list,
though.
1. How can I add a new action to the action bar (where edit, discussion,
etc. reside). I think this might require some change in the source code. It
looks like actions are handled in index.php and other pages.
2. How can I add a new item to the navigation panel on the left? I saw posts
about changing a link using Special->All system messages but not quite sure
how to add a new one. Will it require code modification?
3. I also want to add a template feature which somewhat seems harder. Has
anyone done that? What I have in mind is, when a new page is created
(edited), a predefined template will be placed for users to modify.
Thanks
Muzaffer
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
I'm trying to set up a main page with some elements similar to the
Wikipedia, but would like to have a weekly featured article.
{{CURRENTWEEK}} (giving the week of the year number 0-52) is not
currently an available variable, but I suspect I could cobble together a
method to calculate it, if I knew where in MediaWiki to stick it.
Is there any way to get the current week? if not, is there a text
suggesting where/how to hack it in?
Amgine
I have a couple newbie questions, I'm not sure this is the right list,
though.
1. How can I add a new action to the action bar (where edit, discussion,
etc. reside). I think this might require some change in the source code. It
looks like actions are handled in index.php and other pages.
2. How can I add a new item to the navigation panel on the left? I saw posts
about changing a link using Special->All system messages but not quite sure
how to add a new one. Will it require code modification?
3. I also want to add a template feature which somewhat seems harder. Has
anyone done that? What I have in mind is, when a new page is created
(edited), a predefined template will be placed for users to modify.
Thanks
Muzaffer
Hey everyone,
I'm new to MediaWiki, but so far I'm loving it. Powerful, full featured
- definitely the best of the bunch. I have a couple of questions, and
I've been searching around with no luck, so I thought someone could
point me in the right direction:
1. Uploading files
I've seen in mentioned in mail postings and such that people are
uploading files to the server with MediaWiki, but I can't seem to find
where/how to do this. Can anyone shed some light?
2. Downloadable Skins?
I think I already know the answer (the answer being "not currently"),
but is there a general place to obtain skins/themes?
Thanks,
Tom
Hi
I have read here that i must run maintenance/rebuildtextindex.php for
fulltext search.
My wikipedia is functional and works smoothly :)
Well, i installed a php client ;) and then run the script.
- First it complains about AdminSettings.php that i hade forgotten
so i copy Adminsettings.sample to it and run again
- it says (in french) that
"for technical reasons, it is impossible for the moment
to connect the database"
the wiki is nice and running, the database also !
What did i miss ? (i setup my first apache / sql server a few days ago, just
for wikipedia :)
thanks in advance. Regards
Alain
Brion Vibber wrote:
> I wrote:
>
> > # Rewrite http://wiki.domain.tld/article properly, this is the main
rule
> > RewriteRule ^(.*)$ /index.php/$1 [L,QSA]
>
> This will fail for page titles containing "?"
>
> To get full coverage, use the rewrite patch for Apache 1.3.x (in the
maintenance subdirectory) which converts ampersands, and send those as a
query string instead of path_info.
Hmmmm, I don't feel comfortable patching my stock Apache 2.0.52 as
it makes future upgrades more complex. I guess that means only
partial loss of the index.php, except for cases where "index.php?"
is used.
My current setup:
------- LocalSettings.php -----------------------------------
$wgScriptPath = "";
$wgScript = $wgScriptPath . "/index.php";
$wgRedirectScript = $wgScriptPath . "/redirect.php";
## If using PHP as a CGI module, use the ugly URLs
$wgArticlePath = "${wgScript}/$1";
-------------------------------------------------------------
------- httpd.conf ------------------------------------------
RewriteEngine On
# Redirect old /wiki/ URLs
RewriteRule ^/wiki/(.*)$ http://www.rapdict.org/$1 [R,L]
# Redirect "/index.php/" URLs
RewriteRule ^/index.php/(.*)$ http://www.rapdict.org/$1 [R,L]
# Don't rewrite "/index.php?" URLs
RewriteCond %{REQUEST_URI} !^/index.php\?
# Don't rewrite requests for files in MediaWiki subdirectories,
# MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt
RewriteCond %{REQUEST_URI} !^/(stylesheets|images|skins)/
RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php
RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html
RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteCond %{REQUEST_URI} !^/robots.txt
# Rewrite "/Article" to "/index.php/Article" for internal use
RewriteRule ^(.*)$ /index.php/$1 [L,QSA]
-------------------------------------------------------------
To avoid the double requests (logically) appearing in the Apache
logfile, I have patched the function getLocalURL() in Title.php
by adding one line at line 418, just before "return $url":
------ Title.php --------------------------------------------
$url = str_replace( "/index.php/", "", $url);
-------------------------------------------------------------
That seems to do the trick for pretty much all links.
> -- brion vibber (brion @ pobox.com)
Thanks for the help!
Greetings,
Patrick
--
_______________________________________________________________
Patrick Atoon _____________________ mailto:patricka@two4u.com
_______________________________________ http://www.two4u.com/
--
_______________________________________________________________
Patrick Atoon ___________________ mailto:patricka@rapdict.org
_____________________________________ http://www.rapdict.org/
The attachment did not make it, so I filed
Bug 981 in MediaZilla with an example implementation
for this dotdot syntax RFE.
JA
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo
Hi, I was trying to make some minor changes to the copy right message
displayed on the "edit page" (the one that says "Please note that all
contributions to Marketing are considered to be released under the GNU
Free Documentation..."). I traced it back to language.php file where it
says "'copyrightwarning' => "Please note that all contributions to
{{SITENAME}}" and therefore I made the changes, however, after saving
the changes, it still shows the original message. Can someone help me on
this?
Thanks,
Simon