[Mediawiki-l] webpage in frame in wiki-page
Dantman
dan_the_man at telus.net
Sun Jun 3 13:06:17 UTC 2007
I did something similar for phpMyAdmin.
<?php
/**
* The MediaMyAdmin Extension's task's are:
* - Use of phpMyAdmin via MediaWiki
*
* @package DantmanAdminExtensions
* @subpackage MediaMyAdmin
* @author Daniel Friesen (http://www.wikia.com/wiki/User:Dantman) (dan_the_man at telus.net)
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public Licence 2.0 or later
*/
if( !defined( 'MEDIAWIKI' ) ) die( "This is an extension to the MediaWiki package and cannot be run standalone." );
$wgExtensionFunctions[] = 'efMediaMyAdminSetup';
require_once( "$IP/includes/SpecialPage.php" );
$wgExtensionCredits['specialpage'][] = array(
'name' => 'MediaMyAdmin',
'author' => 'Daniel Friesen(aka: Dantman)',
);
function efMediaMyAdminSetup() {
global $wgMessageCache, $wgUser, $wgRequest, $wgOut;
SpecialPage::addPage( new SpecialMediaMyAdmin() );
$wgMessageCache->addMessages(
array(
'mediamyadmin' => "MediaMyAdmin",
'mediamyadmin-height' => "500px"
)
);
}
/**
* Constructor
*/
class SpecialMediaMyAdmin extends SpecialPage {
function SpecialMediaMyAdmin() {
global $wgRequest;
SpecialPage::SpecialPage( 'MediaMyAdmin', 'mediamyadmin', true, false, 'default', false );
}
/**
* Execute
*/
function execute( $par = null ) {
global $wgUser, $wgOut, $wgRequest, $egPhpMyAdmin;
if ( !$wgUser->isAllowed( 'mediamyadmin' ) ) {
$wgOut->permissionRequired( "mediamyadmin" );
return false;
}
# Don't allow blocked users
if ( $wgUser->isBlocked() ) {
$wgOut->blockedPage();
return false;
}
$this->setHeaders();
$wgOut->addHeadItem( 'MediaMyAdminStyle', "<style type='text/css'>
/*/*/ /*<![CDATA[*/
#p-cactions #ca-nstab-special, .firstHeading { display: none !important; }
#content {
padding: 0px 0px 0px 0px;
}
#MediaMyAdminWindow {
margin: -15px 0px 0px 0px;
width: 100%;
height: ".wfMsgHtml('mediamyadmin-height').";
border: 0px;
}
/*]]>*/ /* */
</style>"
);
$wgOut->addHTML(
Xml::openElement( 'iframe', array(
'src' => $egPhpMyAdmin,
'id' => 'MediaMyAdminWindow'
) ).
Xml::closeElement( 'iframe' )
);
}
}
?>
It's quite a simple rip of code. But you can modify it to do the same
for just about anything you want. I did the same for the FireStats
interface, but I guess I won't be using either on Wiki-Tools.com.
~Daniel Friesen of The Gaiapedia and Wikia Graphical Entertainment Project
freie-wohnung wrote:
> Hi,
> i'd like to display a webpage in a frame on a specific wiki-page. Is that
> possible?
> I'd like to put the webinterface of Mailman and perhaps an archive of my
> mailinglist on a site of my wiki. It would be cool to have this in a frame
> and not as a link.
> Thanks for your help,
> Marc
>
>
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>
--
~Daniel Friesen of The Gaiapedia and Wikia Graphical Entertainment Project
More information about the MediaWiki-l
mailing list