cldarcy / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

EXHIBIT. wibbit shows exhibitLocation only in preview-mode #135

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
tried the example from the wibbit homepage. The exhibit widget is only
visible in preview mode, after storing the wiki page only the table is visible.
In the html-source I found that in preview mode the three js-links are
there, in the stored page not.

I put wfExhibitAddHTMLHeader in OutputPage.php line 696:

if ($this->mArticleBodyOnly) {
                        $this->out($this->mBodytext);
                } else {
                        wfProfileIn( 'Output-skin' );
                        wfExhibitAddHTMLHeader( $this );
                        $sk->outputPage( $this );
                        wfProfileOut( 'Output-skin' );
                }

Any ideas what else to do?

mediawiki 1.11.0, wibbit svn trunk from 2008-07-29, debian etch

[Submitted by Harald Kollera on simile.mit.edu] 

Original issue reported on code.google.com by GabrielR...@googlemail.com on 4 Apr 2009 at 5:09

GoogleCodeExporter commented 8 years ago

Original comment by GabrielR...@googlemail.com on 4 Apr 2009 at 7:02

GoogleCodeExporter commented 8 years ago
Hi,

I had the same problem when installing the wibbit plugin on a mediawiki. The 
problem
is that mediawiki caches by default all the pages.

You have to do a little modification in the Exhibit_Main.php file on the 
includes
folder of the extension.

When a page is in the cache, the parser is not called, thus 
"Exhibit_getHTMLResult"
not being called.

And if "Exhibit_getHTMLResult" is not called, $exhibitEnabled is not set to 
true.
This variable is used to load the javascript files on the 
"wfExhibitAddHTMLHeader"
method.

So, the solution I found is to disable the cache of all pages that include 
exhibit.
To do this, simply change this:

function Exhibit_getHTMLResult( $input, $argv ) {
global $exhibitEnabled;
global $exhibitMap;
global $exhibitTimeline;

By this:

function Exhibit_getHTMLResult( $input, $argv, $parser ) {
global $exhibitEnabled;
global $exhibitMap;
global $exhibitTimeline;
# We disable the cache of the page in order to work properly
$parser->disableCache();

I hope this helps you.

Original comment by alejo.uoc on 14 Apr 2010 at 8:56