Extension talk:PhpTags Widgets

Jump to navigation Jump to search

About this board

Slick Widget seems not to work with Extension:Header Footer

7
Christharp (talkcontribs)

HI

I have my wiki set up to only allow phptags inside the template namespace, like so:

<pre>$wgPhpTagsNamespaces = array( NS_TEMPLATE => true);</pre>

Transinclusion of templates works to every namespace. But when I tried to add a template to the header defined in the Extension:HeaderFooter the template with phptags template works fine directly on Mediawiki page, but fails on every page that the header is included on. Example:

I edit MediaWiki:Hf-nsheader- per the instructions in the Extension:HeaderFooter and add the following template:Phptags Icon Search Bar. It looks and works great on the Mediawiki page, but when I go to any other page I see all icons arranged vertically down and the slick slide is no longer working.

Any thoughts on this? Thanks again @Pastakhov for a wonderful and great extension.

Christharp (talkcontribs)

So to see if it's not some strange double transinclusion thing: phptags in template --> template in Mediawiki header page ---> Mediawiki header in every Main Space page I changed my LocalSettings to:

$wgPhpTagsNamespaces = array( NS_TEMPLATE => true, NS_MEDIAWIKI => true );

And now I get this error:

PhpTags Fatal error: Extension PhpTags is disabled for the namespace "". in Command line code on line 

Which suggests to me that the header added is not treated as a normal transinclusion since the error message is suggesting that phptags is not enabled in the Main Space. Just to check I also just added NS_MAIN to the array allowing phptags and the Fatal error message disappeared, but than Slick still doesn't work (however phptags does work -- I tested with:

<phptag>

$foo = 'hello world';
echo ucfirst( $foo . "!!!\n" );
</phptag>

Once again thanks for a great extension @pastakhov

Pastakhov (talkcontribs)

Hi @Christharp,

If I'm not mistaken, Extension:HeaderFooter just copy wikitext from MediaWiki:Hf-nsheader- to every pages before parsing.

Thus you should enable PhpTags for namespaces where you use Extension:HeaderFooter with phptags.

In your case, it is NS_MAIN instead of NS_MEDIAWIKI and you should write to LocalSettings:

$wgPhpTagsNamespaces = array( NS_TEMPLATE => true, NS_MAIN => true );

You are welcome :-) I'm glad that you happy with my extensions :-)

Christharp (talkcontribs)

Hi @Pastakhov

Sorry I don't think I was clear ; I also enabled php tags in the Main Space. The Slick Widget still fails to work, except for on the actual Mediawiki header page. Every page the header is included into the Widget fails; however php tags works. Any thoughts? I'll check the JavaScript in the console tomorrow (my time PST) and report back what it says. Thanks again

Pastakhov (talkcontribs)

Is it public wiki?

Christharp (talkcontribs)

Hi @Pastakhov

Sorry for the delay in answering. It's not a publc wiki, but I could give you access. Currently I have the wiki on the amazon cloud and I'm building it out. It changes the ip every time I have it live. So I could leave it live and email you the ip, user name, and password.

Additionally I just checked and found the same problem happens if I post the Slick Widget in the Mediawiki:Sitenotice. That you should be able to check on your own wiki foxway. However a basic phptags "Hello World" works fine so it's clearly something with the widget slick. I also just checked it with all the widgets from Widgets and Vega will not work, but font awesome does. All the best to you. Thank again.

Pastakhov (talkcontribs)

I'll try to do same on my wiki and debug this week.

Widgets use JS and CSS. And they must be added in certain time. Widgets work with MW Parser butExtension:HeaderFooter and Mediawiki:Sitenotice work with a Skin.

Maybe problem is here.

Reply to "Slick Widget seems not to work with Extension:Header Footer"
Christharp (talkcontribs)

Hi

The slick widget has stopped working in a new wiki I just created with version 1.24. The only error I'm seeing in browser console is: Error: Unknown dependency: jquery.

My guess, and it's purely a guess, is the slick widget is using the wrong version of jquery since 1.24 changed the version of jquery from 1.8.3 to 1.11.1.

Christharp (talkcontribs)

Additionally getting the following errors with Vega:

[Vega Log] LOAD: /wiki/PhpTags/Widgets/Vega/Data/Groups?action=raw
load.php?debug=false&lang=en&modules=ext.PhpTagsWidgets.libs.d3%2Ctopojson|ext.PhpTagsWidgets.onRea…:253 [Vega Err] URL is not whitelisted: /wiki/PhpTags/Widgets/Vega/Data/Groups?action=raw
load.php?debug=false&lang=en&modules=ext.PhpTagsWidgets.libs.d3%2Ctopojson|ext.PhpTagsWidgets.onRea…:253 [Vega Log] LOAD: /wiki/PhpTags/Widgets/Vega/Data/Miserables?action=raw
load.php?debug=false&lang=en&modules=ext.PhpTagsWidgets.libs.d3%2Ctopojson|ext.PhpTagsWidgets.onRea…:253 [Vega Err] URL is not whitelisted: /wiki/PhpTags/Widgets/Vega/Data/Miserables?action=raw
load.php?debug=false&lang=en&modules=ext.PhpTagsWidgets.libs.d3%2Ctopojson|ext.PhpTagsWidgets.onRea…:253 [Vega Log] LOAD: /wiki/PhpTags/Widgets/Vega/Data/Miserables?action=raw
load.php?debug=false&lang=en&modules=ext.PhpTagsWidgets.libs.d3%2Ctopojson|ext.PhpTagsWidgets.onRea…:253 [Vega Err] URL is not whitelisted: /wiki/PhpTags/Widgets/Vega/Data/Miserables?action=raw
load.php?debug=false&lang=en&modules=ext.PhpTagsWidgets.libs.d3%2Ctopojson|ext.PhpTagsWidgets.onRea…:253 [Vega Log] LOAD: /wiki/PhpTags/Widgets/Vega/Data/Iris?action=raw
load.php?debug=false&lang=en&modules=ext.PhpTagsWidgets.libs.d3%2Ctopojson|ext.PhpTagsWidgets.onRea…:253 [Vega Err] URL is not whitelisted: /wiki/PhpTags/Widgets/Vega/Data/Iris?action=raw
Pastakhov (talkcontribs)

Hi, you should define $wgPhpTagsWidgetVegaDomainWhiteList variable in LocalSettings.php as an array of whitelisted domains.

For example, on http://test.foxway.org it is $wgPhpTagsWidgetVegaDomainWhiteList = array( 'test.foxway.org' );

Christharp (talkcontribs)

Hi, thanks I'll try that.

But I assume that only solves the Vega problem. I'm much more concerned about the fact that slick has stopped working in Mediaiwki 1.24. Any thoughts on how to fix? (See first message) all the best to you

Pastakhov (talkcontribs)

I will check and fix it as soon as possible. In theory it must work in 1.24 but I cannot check it right now.

Pastakhov (talkcontribs)

It is fixed in version 1.3.3. Thanks for bug reporting!

Christharp (talkcontribs)

Thanks. I'll upload version 1.3.3 later today (my time PST).

On a serious note, thank you for an interesting and exciting extension. Very few make them, and fewer still support them -- so a whole hardy thanks to you.

All the best to you. Have a great new year.

Christharp (talkcontribs)

Hi

Tested the new version and it works great!. Noticed one problem -- I copied your page from foxway: http://test.foxway.org/wiki/PhpTags/Widgets/Slick onto the new wiki and found the last one, the Right to Left version, is still not working.

I'll report any other errors I find. All the best to you

Pastakhov (talkcontribs)

Hi! It is strange because it works on my local test wiki version 1.24. Thanks for the report, I will check it again on other wiki.

Christharp (talkcontribs)

Hi

Found a conflict with another extension. Everything is working now. All the best to you.

Reply to "Not working in 1.24"

Thanks for slick & anyway to make responsive

3
Christharp (talkcontribs)

Hi

I've been creating a icon driven search bar with the slick widget. I originally had designed this search bar using javascript, but the version using phptags widgets slick just all around looks better. My only problem with it is I'm using the Foreground skin, a responsive skin build on the Foundation Framework (which is funny since I now have two versions of Font Awesome), and the slick widget doesn't seem to be responsive. I've spaced my icons more to not have it look bad on smaller devices, but I was wondering if there is anyway to make the Phptags version of Slick responsive. For example maybe a way to have slick set to show (slidestoshow'=>'6') but have it reduce that number on smaller devices (in other words a media query for the phptags widgets).

Thanks again for some great extensions. I'll send you a link to the website I'm building when it goes live. All the best to you.

Pastakhov (talkcontribs)

Hi, I'm going to make PhpTags Widgets to be responsive (include slick widget) and even I'm going to make widgets that have all features of Foundation Framework.

But it is great work and I do not see any easy way to do it right now, because first of all it depends on the skin.

You can try to set width for Slick and for all slides and set property variableWidth = true like there. It will be as responsive :-)

I'm waiting the link to your website, Good luck!

Christharp (talkcontribs)

Thanks I'll try that today. And thanks for a wonderful and great extension.

Reply to "Thanks for slick & anyway to make responsive"
There are no older topics