On Wed, Jul 19, 2017 at 2:53 PM, Johnny Guo <jguo1400(a)gmail.com> wrote:
I was wondering if it was possible to have a MediaWiki
section inside a
Drupal website and how it would be done.
Any more details on what you're trying to accomplish?
Are you talking about a "headless" or "decoupled" content reuse
API? Drupal allows PHP code in pages, and MW has an API. So, if all you
want to do is have some wiki page content show up on your Drupal site, you
can do that with a few lines of PHP code.
This wiki content:
is re-used via API on this Drupal 7 page:
By writing a few lines of PHP code in the Drupal page:
$apiQuery = "?action=parse&page=Rates&format=json";
$MwApi = new \eqt\wikireport\MwApi('https://freephile.org/w/api.php');
$data = $MwApi->data;
The autoload.php file in the first line above is something I generated with
Composer for the WikiReport project, and essentially all it does is load a
very basic class that I wrote to make queries to the MediaWiki API:
There are all kinds of possibilities, so I'm just guessing at what you're
trying to accomplish.
MediaWiki-l mailing list
To unsubscribe, go to: