MediaWiki integration?
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAdd-Ons & Blocks
Author Message
Hókipóki
Newbie


Joined: Jul 15, 2006
Posts: 22
Location: Budapest, Hungary, EU

PostPost subject: Re: MediaWiki integration?
Posted: Wed Aug 02, 2006 9:24 pm
Reply with quote

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
View user's profile Visit poster's website
SaintPeter
Heavy poster


Joined: Apr 13, 2005
Posts: 162
Location: Roseville, CA

PostPost subject: Re: MediaWiki integration?
Posted: Wed Aug 02, 2006 9:35 pm
Reply with quote

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
View user's profile Visit poster's website
SaintPeter
Heavy poster


Joined: Apr 13, 2005
Posts: 162
Location: Roseville, CA

PostPost subject: Re: MediaWiki integration?
Posted: Wed Aug 02, 2006 9:37 pm
Reply with quote

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
View user's profile Visit poster's website
Hókipóki
Newbie


Joined: Jul 15, 2006
Posts: 22
Location: Budapest, Hungary, EU

PostPost subject: Re: MediaWiki integration?
Posted: Wed Aug 02, 2006 9:50 pm
Reply with quote

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


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
View user's profile Visit poster's website
SaintPeter
Heavy poster


Joined: Apr 13, 2005
Posts: 162
Location: Roseville, CA

PostPost subject: Re: MediaWiki integration?
Posted: Wed Aug 02, 2006 10:06 pm
Reply with quote

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


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
View user's profile Visit poster's website
Hókipóki
Newbie


Joined: Jul 15, 2006
Posts: 22
Location: Budapest, Hungary, EU

PostPost subject: Re: MediaWiki integration?
Posted: Wed Aug 02, 2006 10:22 pm
Reply with quote

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
View user's profile Visit poster's website
SaintPeter
Heavy poster


Joined: Apr 13, 2005
Posts: 162
Location: Roseville, CA

PostPost subject: Re: MediaWiki integration?
Posted: Wed Aug 02, 2006 10:39 pm
Reply with quote

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


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
View user's profile Visit poster's website
Hókipóki
Newbie


Joined: Jul 15, 2006
Posts: 22
Location: Budapest, Hungary, EU

PostPost subject: Re: MediaWiki integration?
Posted: Thu Aug 03, 2006 6:28 am
Reply with quote

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
View user's profile Visit poster's website
SaintPeter
Heavy poster


Joined: Apr 13, 2005
Posts: 162
Location: Roseville, CA

PostPost subject: Re: MediaWiki integration?
Posted: Thu Aug 03, 2006 6:41 am
Reply with quote

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
View user's profile Visit poster's website
SaintPeter
Heavy poster


Joined: Apr 13, 2005
Posts: 162
Location: Roseville, CA

PostPost subject: Re: MediaWiki integration?
Posted: Thu Aug 03, 2006 9:21 pm
Reply with quote

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
View user's profile Visit poster's website
SaintPeter
Heavy poster


Joined: Apr 13, 2005
Posts: 162
Location: Roseville, CA

PostPost subject: Re: MediaWiki integration?
Posted: Sat Aug 05, 2006 8:50 am
Reply with quote

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
View user's profile Visit poster's website
Hókipóki
Newbie


Joined: Jul 15, 2006
Posts: 22
Location: Budapest, Hungary, EU

PostPost subject: Re: MediaWiki integration?
Posted: Sat Aug 05, 2006 5:11 pm
Reply with quote

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.

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
View user's profile Visit poster's website
SaintPeter
Heavy poster


Joined: Apr 13, 2005
Posts: 162
Location: Roseville, CA

PostPost subject: Re: MediaWiki integration?
Posted: Sat Aug 05, 2006 6:04 pm
Reply with quote

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
View user's profile Visit poster's website
SaintPeter
Heavy poster


Joined: Apr 13, 2005
Posts: 162
Location: Roseville, CA

PostPost subject: Re: MediaWiki integration?
Posted: Sat Aug 05, 2006 6:22 pm
Reply with quote

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
View user's profile Visit poster's website
Phoenix
Site Admin


Joined: Apr 19, 2004
Posts: 8729
Location: Netizen

PostPost subject: Re: MediaWiki integration?
Posted: Sat Aug 05, 2006 9:12 pm
Reply with quote

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, MyBB, vBulletin

Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAdd-Ons & Blocks All times are GMT
Go to page Previous  1, 2, 3, 4  Next
Page 3 of 4


Jump to:  
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

stopsoftwarepatents.eu petition banner
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.8739 seconds with 16 DB Queries in 0.11 seconds
Memory Usage: 3.03 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy