Support ⇒ Modules & Blocks ⇒ MediaWiki integration? ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & Blocks

MediaWiki integration? Reply to topic

Go to page Previous 1, 2, 3, 4 Next

I'm stuck with PHP4, so 1.7.1 is not an option for me.

I'm thinking about using a hook to work around this post/get change. Can we just grab the html source after the rendering, but before the actual output, and change get to post?

It smells ugly 8(

I'm trying desperately to think out of the box. Can there be another possible workaround?

The modified skin is just an "addon". With your chroot idea, we don't have to modify ANY wiki code. The DragonflyModule.php extension too is just an add on.

If it can be avoided, I wouldn't modify core wiki code 8(

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Debian sarge/Apache1/4.1.11/9.1 cvs version


If there is a post render hook, it would not be that difficult to scan for <form etc. The fact that it's a standard HTML Tag means that it has to be fairly easily parseable. Also, we have a limited number of cases to test against. It would also mean we could undo the "htmlspecialchars" badness that occurs on some of these outputs.

/me goes to look at the documentation on hooks.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.9/Apache 1.3.36/MySQL 4.1.18/PHP 5.1.4/CPG Nuke 9.1.0.8 (Modified)


www.mediawiki.org/wiki...BeforeHTML

Easy Peasy. Time to break out the regular expressions!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.9/Apache 1.3.36/MySQL 4.1.18/PHP 5.1.4/CPG Nuke 9.1.0.8 (Modified)


Ummm. You are very enthousiastic! not worthy

I suggest you take a look into this hook:
www.mediawiki.org/wiki...rAfterTidy
to me it looks better. But I'm tired, its 14 minutes to midnight here, and I had a long day, so dunno for sure.

I sincerely hope when in the morning I look into this forum, you will have solved all the problems and I only has to install the wiki files Cool

cheers,
Hókipóki

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Debian sarge/Apache1/4.1.11/9.1 cvs version


I'm playing with ParseAfterTidy now. So far I can't seem to get anything working. Don't hold your breath Smile

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.9/Apache 1.3.36/MySQL 4.1.18/PHP 5.1.4/CPG Nuke 9.1.0.8 (Modified)


I had a hazy idea. Not my brightest ever. You can call me crazy if you want.

Create a wiki.php in the Dragonfly root, containing only this:
<?php
$_GET['name'] = 'MediaWiki';
include('index.php');
?>

And modify the link hooks in the extension as follows:
$url = str_replace("index.php?", "wiki.php?", $url);
$url = str_replace("index.php/", "wiki.php?title=", $url);

Now I'm falling off my chair, asleep :/

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Debian sarge/Apache1/4.1.11/9.1 cvs version


OMG! It works!
Brilliant, sir, absolutly BRILLIANT!

Unless I am sadly mistaken, once we get the .CSS issues resolved, we should have an out of the box MediaWiki solution.

Dancing

/me puts on his cape
It's off to CSS LAND!
/me flys off

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.9/Apache 1.3.36/MySQL 4.1.18/PHP 5.1.4/CPG Nuke 9.1.0.8 (Modified)


With a similar trick we could probably avoid modifying even the wiki index.php (ie dont put the chroot calls directly in the index.php, but instead, in a similar wrapper index.php).

I'm not entirely sure this wrapper hack above really works, and what side effects it might have. I'll test it in the late evening. Now I'm off to work.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Debian sarge/Apache1/4.1.11/9.1 cvs version


Did that, works well.

See attached index.php. Rename the current index.php to "windex.php" and drop this one in.

I also modified the DragonflyModule.php to remove the header capture. What I discovered, as I was poking the CSS, is that the header function is actually called a large number of times for each page render. That's why I kept coming up with 2 borders on one page and 4-5 on another. I remove that function capture and put an OpenTitle()/CloseTitle() in the new index.php which worked like a charm.

Now comes the hard part, apperently. The CSS is one of the most complicated I've ever seen. It's crazy-go-nuts. I'm thinking the best way to hit it is to strip it down the the barest of bare HTML and build back up from there. What makes that hard is the complete lack of code/data seperation. This method of rendering better be REALLY dang efficient, becuase it's a monumental pain to modify.

We'll see how it goes.
Attachment: peter_changes.zip
Description
Filename peter_changes.zip
Filesize 1.79 KiB
Downloaded 380 Time(s)
You are not allowed to view/download this attachment

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.9/Apache 1.3.36/MySQL 4.1.18/PHP 5.1.4/CPG Nuke 9.1.0.8 (Modified)


Ok, I spent the morning hacking the dragonfly.php and main.css files. I now have a reasonable, but not perfect looking skin for the site. I also made it so it doesn't overwhelm the site CSS.

I also pulled the Search out of the site and put it in a block-MediaWiki_Search. I figure that can be associated with the main module.

Methadology:
In all cases, I left the code in Dragonfly.php (from Monobook.php) completly in-tact. However, I did move <div> blocks as wholes to get them on top or on the bottom, as needed. I then poked the CSS the best I could. I typically worked by HTML commenting out functional blocks and changing their CSS until they worked/looked like I wanted. Then I'd uncomment another block, rinse, repeat.

Ideas:
The main question is what to do with the navigation and toolbox blocks. I am not experienced enough in css to make them look like what I REALLY want them to look like. What I was thinking was that it'd be possible to use the "JScookmenu" functionality already in Dragonfly to have some tidy little menus at the top of the main interface.

Theoretically, it may be possible to make some nice little DHTML pop-up menus, but I'm not sure that they work cross-platform.

I welcome any additions/modifications/insight.

Please see attached my modified files.
Attachment: mediawiki.zip
Description MediaWiki mods
Filename mediawiki.zip
Filesize 9.68 KiB
Downloaded 380 Time(s)
You are not allowed to view/download this attachment

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.9/Apache 1.3.36/MySQL 4.1.18/PHP 5.1.4/CPG Nuke 9.1.0.8 (Modified)


I have ported all of the "Portlets" (also known as the annoying boxes on the left) to use the JSCookMenu found in the Adminstration module. I've cleaned up my code and am adding comments, as needed.

Tomorrow I will start a new thread with an "Alpha" release of this module. I need more time to package it then I can spend tonight.

I'm reasonably confident that I've got about 90% code stability here. There are still some minor things that don't work right, particularly the CSS behind the 'Actions' on the top of the page, but I am confident we can blaze through these.

Special thanks to Hókipóki for writting the original code extension code.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.9/Apache 1.3.36/MySQL 4.1.18/PHP 5.1.4/CPG Nuke 9.1.0.8 (Modified)


Sorry for my disappearance Sad I bought a new car (my first new car), and had to work a bit, I've had no time to assist you! I'm downloading your uploaded files now.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Debian sarge/Apache1/4.1.11/9.1 cvs version


But wait, there's more. I've just finished up the package and will be uploading shortly.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.9/Apache 1.3.36/MySQL 4.1.18/PHP 5.1.4/CPG Nuke 9.1.0.8 (Modified)


Posted:
www.dragonflycms.org/F...tml#112230

Mods, please sticky that thread and unsticky this one.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.9/Apache 1.3.36/MySQL 4.1.18/PHP 5.1.4/CPG Nuke 9.1.0.8 (Modified)


I stickied this topic (and will keep it that way) because of the importance of the process moreso than the result. It may give others some ideas on bridging stuff like ecommerce shops Smile

DonationsPro for DragonflyCMS & SMF

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

All times are UTC
Go to page Previous 1, 2, 3, 4 Next


Jump to: