intigrating just part of wikimedia into drupal ?

public
group: Wiki
Tenchi - Tue, 2008-02-12 10:59

I like wikimedia as it is, the syntax and everything are very good for most documents, the only thing I don't like, is the discussion pages. is it possible to just have the discussion (talk) pages link into drupal ? instead of going for full integration. How hard would that be ? auth would have to be shared between drupal and wiki, which has already been done. the hard part would be to have wiki generate forum posts in drupal when a page is created, or, and much preferred, have discussion forum created only when someone clicks the discussion link, and of course open the forum post if it already exsist, in an i-frame or something within the wiki page. (not the whole forum, just the forum post that is linked to that wiki page) buy simply allowing talk pages to go back to drupal, and allow searching from within drupal to encompass the wiki, would be best option because it would also allow to keep up with wikimedia, so these modification would be easy to change if a jump in wikimedia version changed the way things were searched for \ talk pages displayed. I may also be able to provide some financial support to anyone willing to do this.

I like your idea

Ricco - Tue, 2008-02-12 11:50

I have worked with both drupal and mediawiki, and I see what you are getting at, and yes, I agree. i would would be willing to work on this. I have installations of both. Feel free to contact me, so that I can get more of your ideas.

Let's talk the two different pages at the moment. The article and the discussion page. I like the mediawiki article page, cause you can tell if there is a article in the link or not based on the color. I have not researched, but I do not believe drupal offers this. At least my drupal wiki installs all show the same colored link for pages that exist in the to TO link and not. That is the great advantage of the mediawiki thingy.

As for the mediawiki discussion page, yes, I like the individual owned comments, and the threadedness that drupal offers with them. The drupal handles comments the same wether they are on a page or a forum (forums are simply handled with taxonomy).

I have never considered trying to handle logins seemlessly with the two. That certainly would allow it quite seemlessly. you seem to say that exists. I have not seen that, but I have not searched, or even looked. If you can give me any info about that, I bet I can do what it seems you are asking, and it would be something I think would be pretty handy.

Cheers! Ricco

Is this a feature request?

cwgordon7@drupal.org's picture
cwgordon7@drupal.org - Wed, 2008-02-13 01:15

     I like the mediawiki article page, cause you can tell if there is a article in the link or not based on the color.

Is this a feature request? Cuz this is about two lines of code, definitely not worth using mediawiki over :P. If it is, just post a feature request. It'll be done surprisingly fast.

Two lines of code are, approximately:

<?php
if (!node_load(array('title' => $title))) {
 
$class .= ' broken';
}
?>

Ok, so it's three lines ;).
All that would be left to do is write css for the a.broken link type. Positively easy.


It seems much more complex than that

Ricco - Wed, 2008-02-13 07:00

The code you have specified seems to do a particular thing. It will tell you if a particilar link on the page is "broken" (does not have a target).

But the overall task is much grander.

*First you must gather all the wiki hyper link references on a page
*then you must process through each of those references and make some kind of a hash table that keeps track of each link and if it is broken or not broken
*then you must do the actual replacement of the html? in filter.module

the string to work on is $text in filter.module
* the function to adjust is;
*
function _filter_html($text, $format)
* just prior to;
** return trim($text);

insert psudo code;
if (module_exists('wikitools')) {
$wiki_path = wikitools_wiki_path($text);
// Do preg_replace stuff here on pattern This data is the title">
}

your note of "do replacement" is not enough. Each occurance must be checked. both broken and unbroken links show up in the html the same. there is no difference noticable in the existing code to indicate if the link is broken or unbroken.

here you will see a broken and unbroken link in the result html;

<div class="entrytext">
<p><a class="" style="" href="/wiki/main">unbroken link</a><br />
<a class="" style="" href="/wiki/bad">broken link</a></p>
<p>The wiki is like....

there is no noticable way to tell the difference, unless you create a array, check each link, and then replace the html code based on the values in that array.

Would be a great feature. I know although I do use a drupal wiki, I find I also still use mediawiki cause the coloring of the links in mediawiki are very useful to the page visitor. To say nothing of their addition indication if a link is to an external site with the small icon after the link for external links.

Hopefully one day Drupal will include these features in their wiki offering.

Cheers!

Well there are a couple ways

Tenchi - Tue, 2008-02-12 13:15

Well there are a couple ways to tackle auth,
Emu - http://drupal.org/node/46541 - maybe outdated
CAS - http://wiki.case.edu/CaseWiki:External_Authentication
LDAP - http://drupal.org/project/ldap_integration
those let wiki and drupal keep seperate DB's

there is also a mediawiki extension that may be easier:
http://www.mediawiki.org/wiki/AuthDrupal

what version of drupal are you working with ?

i also have installations of both, but need to redo my drupal installation so seems starting from scratch would be a good time to get this down, I can let you mess with both the wiki and my drupal if it would help. neither are really ready so its ok to break anything.

Drupal and Mediawiki are

billfitzgerald's picture
billfitzgerald - Wed, 2008-02-13 07:24

Drupal and Mediawiki are also both OpenID enabled.


FunnyMonkey
Tools for Teachers


I just am testing the AuthDrupal

Ricco - Tue, 2008-02-12 13:44

Just installed with; http://www.mediawiki.org/wiki/AuthDrupal you mentioned. It seemed to make some sense. I am getting a; Fatal error: Call to undefined function: newfromsession() in

Having a hard time even finding the function... hence it being undefined.

I will look at the other two methods you mention. the LDAP & CAS

Question, it you know. The AuthDrupal, does not actually synchronoize tables right? It simply allows a valid user of the drupal to bypass and be given that login name in th mediawiki right? The drupal user does not have to actually exist in the mediawiki table? that seems the who point, not having to maintain the two tables.

I will be playing around with the common login today. Once I get it done, we can talk about your specific ideas.

you can find me in #webulite.com on dal.net

you can get their via my chat applet on http://webulite.com

come talk with me.

Cheers!