MediaWiki integration?
| Author |
Message |
Hókipóki


Joined: Jul 15, 2006 Posts: 22 Location: Budapest, Hungary, EU
|
Post subject: Re: MediaWiki integration? Posted: Wed Aug 02, 2006 9:24 pm |
|
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(
Hókipóki's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Debian sarge/Apache1/4.1.11/9.1 cvs version |
|
| Back to top |
|
 |
SaintPeter


Joined: Apr 13, 2005 Posts: 162 Location: Roseville, CA
|
Post subject: Re: MediaWiki integration? Posted: Wed Aug 02, 2006 9:35 pm |
|
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.
_________________

SaintPeter's 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) |
|
| Back to top |
|
 |
SaintPeter


Joined: Apr 13, 2005 Posts: 162 Location: Roseville, CA
|
Post subject: Re: MediaWiki integration? Posted: Wed Aug 02, 2006 9:37 pm |
|
www.mediawiki.org/wiki...BeforeHTML
Easy Peasy. Time to break out the regular expressions!
_________________

SaintPeter's 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) |
|
| Back to top |
|
 |
Hókipóki


Joined: Jul 15, 2006 Posts: 22 Location: Budapest, Hungary, EU
|
Post subject: Re: MediaWiki integration? Posted: Wed Aug 02, 2006 9:50 pm |
|
Ummm. You are very enthousiastic!
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
cheers,
Hókipóki
Hókipóki's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Debian sarge/Apache1/4.1.11/9.1 cvs version |
|
| Back to top |
|
 |
SaintPeter


Joined: Apr 13, 2005 Posts: 162 Location: Roseville, CA
|
Post subject: Re: MediaWiki integration? Posted: Wed Aug 02, 2006 10:06 pm |
|
I'm playing with ParseAfterTidy now. So far I can't seem to get anything working. Don't hold your breath
_________________

SaintPeter's 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) |
|
| Back to top |
|
 |
Hókipóki


Joined: Jul 15, 2006 Posts: 22 Location: Budapest, Hungary, EU
|
Post subject: Re: MediaWiki integration? Posted: Wed Aug 02, 2006 10:22 pm |
|
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 :/
Hókipóki's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Debian sarge/Apache1/4.1.11/9.1 cvs version |
|
| Back to top |
|
 |
SaintPeter


Joined: Apr 13, 2005 Posts: 162 Location: Roseville, CA
|
Post subject: Re: MediaWiki integration? Posted: Wed Aug 02, 2006 10:39 pm |
|
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.

/me puts on his cape
It's off to CSS LAND!
/me flys off
SaintPeter's 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) |
|
| Back to top |
|
 |
Hókipóki


Joined: Jul 15, 2006 Posts: 22 Location: Budapest, Hungary, EU
|
Post subject: Re: MediaWiki integration? Posted: Thu Aug 03, 2006 6:28 am |
|
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.
Hókipóki's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Debian sarge/Apache1/4.1.11/9.1 cvs version |
|
| Back to top |
|
 |
SaintPeter


Joined: Apr 13, 2005 Posts: 162 Location: Roseville, CA
|
Post subject: Re: MediaWiki integration? Posted: Thu Aug 03, 2006 6:41 am |
|
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.
SaintPeter's 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) |
|
| Back to top |
|
 |
SaintPeter


Joined: Apr 13, 2005 Posts: 162 Location: Roseville, CA
|
Post subject: Re: MediaWiki integration? Posted: Thu Aug 03, 2006 9:21 pm |
|
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.
SaintPeter's 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) |
|
| Back to top |
|
 |
SaintPeter


Joined: Apr 13, 2005 Posts: 162 Location: Roseville, CA
|
Post subject: Re: MediaWiki integration? Posted: Sat Aug 05, 2006 8:50 am |
|
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.
SaintPeter's 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) |
|
| Back to top |
|
 |
Hókipóki


Joined: Jul 15, 2006 Posts: 22 Location: Budapest, Hungary, EU
|
Post subject: Re: MediaWiki integration? Posted: Sat Aug 05, 2006 5:11 pm |
|
Sorry for my disappearance 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.
Hókipóki's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Debian sarge/Apache1/4.1.11/9.1 cvs version |
|
| Back to top |
|
 |
SaintPeter


Joined: Apr 13, 2005 Posts: 162 Location: Roseville, CA
|
Post subject: Re: MediaWiki integration? Posted: Sat Aug 05, 2006 6:04 pm |
|
But wait, there's more. I've just finished up the package and will be uploading shortly.
_________________

SaintPeter's 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) |
|
| Back to top |
|
 |
SaintPeter


Joined: Apr 13, 2005 Posts: 162 Location: Roseville, CA
|
Post subject: Re: MediaWiki integration? Posted: Sat Aug 05, 2006 6:22 pm |
|
Posted:
www.dragonflycms.org/F...tml#112230
Mods, please sticky that thread and unsticky this one.
_________________

SaintPeter's 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) |
|
| Back to top |
|
 |
Phoenix


Joined: Apr 19, 2004 Posts: 8729 Location: Netizen
|
Post subject: Re: MediaWiki integration? Posted: Sat Aug 05, 2006 9:12 pm |
|
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
_________________ • DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin •
Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
 |
|
| Back to top |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|

|
User Info ![Show/hide content [x]](themes/dragonfly/images/minus.png)
 Welcome Anonymous
Last CVS commits ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Languages ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Community ![Show/hide content [x]](themes/dragonfly/images/minus.png)
 Support for DragonflyCMS in a other languages:
• Deutsch
• Español
X-links ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Preview theme ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.
|