Difference between revisions of "S5SlideShow"

From BITPlan Wiki
Jump to navigation Jump to search
 
(43 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{Link|target=https://phabricator.wikimedia.org/T241706|title=Please comment here}}
 +
{{Extension
 +
|name=S5SlideShow
 +
|url=https://www.mediawiki.org/wiki/Extension:S5SlideShow
 +
|purpose=Slideshow presentation from Wikimarkup
 +
|since=2009
 +
|storemode=property
 +
}}
 +
 +
= S5 =
 +
* https://en.wikipedia.org/wiki/S5_(file_format)
 +
* https://meyerweb.com/eric/tools/s5/s5-intro.html
 +
* https://en.wikipedia.org/wiki/Web-based_slideshow#S5-based_slideshows
 +
* https://github.com/todd-a-jacobs/s5
 +
 +
= Example Slideshows =
 +
click "slideshow" on any of the talk pages
 +
{{#ask: [[Category:Talk]]
 +
|format=table
 +
}}
 +
 +
= Links =
 
* https://www.mediawiki.org/wiki/Extension:S5SlideShow
 
* https://www.mediawiki.org/wiki/Extension:S5SlideShow
 
* http://wiki.4intra.net/S5SlideShow
 
* http://wiki.4intra.net/S5SlideShow
 +
* https://github.com/mediawiki4intranet/S5SlideShow/issues
 +
* https://phabricator.wikimedia.org/T241706
 +
== Alternatives ==
 +
* https://gitlab.com/hydrawiki/extensions/javascriptslideshow
 +
 +
= Forks =
 +
* https://github.com/hexmode/S5SlideShow
 +
* https://github.com/WolfgangFahl/S5SlideShow
 +
= Packagist =
 +
* https://packagist.org/packages/mediawiki/s5-slide-show
 +
 +
= Issues =
 
* https://phabricator.wikimedia.org/T241706
 
* https://phabricator.wikimedia.org/T241706
  
 +
== Call to undefined method WikitextContent:getText() ==
 +
<pre>
 +
Exception encountered, of type "Error"
 +
[c34bfba970bc2aa84ca0a212] /index.php?title=SWMConTalk2015-10&action=slide Error from line 254 of extensions/S5SlideShow/src/Render.php: Call to undefined method WikitextContent::getText()
 +
Backtrace:
 +
#0 extensions/S5SlideShow/src/Render.php(348): S5SlideShow\Render->loadContent()
 +
#1 extensions/S5SlideShow/src/Action.php(90): S5SlideShow\Render->genSlideFile(boolean)
 +
#2 includes/MediaWiki.php(493): S5SlideShow\Action->show()
 +
</pre>
 +
<source lang='bash'>
 +
/srv/www/mediawiki/code/extensions/S5SlideShow$ gitinfo
 +
== Remote URL: origin https://github.com/WolfgangFahl/S5SlideShow (fetch)
 +
origin https://github.com/WolfgangFahl/S5SlideShow (push)
 +
</source>
 +
{{commit|host=https://github.com|path=WolfgangFahl|project=S5SlideShow|subject=fixes Call to undefined method WikitextContent::getText() for MW 1.27.3 env see https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Translate/+/538756/3/TranslateHooks.php as an example|name=Wolfgang Fahl|date=2020-02-07 10:29:10 +0100|hash=6ed5a2a|storemode=subobject|viewmode=line}}
 +
 +
== Class 'S5SlideShow\Hooks not found ==
 +
<pre>
 +
Exception encountered, of type "Error"
 +
[120789ca59e7b0366a3b81ea] /index.php?title=SWMConTalk2015-10&action=slide Error from line 293 of /hd/owei/srv/www/mediawiki/code/extensions/S5SlideShow/src/Render.php: Class 'S5SlideShow\Hooks' not found
 +
Backtrace:
 +
#0 /hd/owei/srv/www/mediawiki/code/extensions/S5SlideShow/src/Render.php(271): S5SlideShow\Render->parse(string)
 +
</pre>
 +
<source lang='bash' highlight='1'>
 +
grep "Hooks::" *.php
 +
Render.php: $prev = Hooks::$parsingSlide;
 +
Render.php: Hooks::$parsingSlide = true;
 +
Render.php: Hooks::$parsingSlide = $prev;
 +
Render.php: Hooks::$styles['print'] = 'print.css';
 +
Render.php: foreach ( Hooks::$styles as $k => $file ) {
 +
</source>
 +
{{commit|host=https://github.com|path=WolfgangFahl|project=S5SlideShow|subject=fixes Class 'S5SlideShow\Hooks not found|name=Wolfgang Fahl|date=2020-02-08 08:59:39|hash=54a50873165b20ef93981f7f5ce60f920dc30a5b|storemode=subobject|viewmode=line}}
 +
== Class 'Wikimedia\AtEase\AtEase' not found ==
 +
Superfluous by now.
 +
=== composer.local.json ===
 +
<source lang='json'>
 +
{
 +
"require": {
 +
"wikimedia/at-ease": "*"
 +
}
 +
}
 +
</source>
 +
<source lang='bash'>
 +
php composer.phar update
 +
</source>
 +
 +
== PPNode_DOM properties ==
 +
* https://doc.wikimedia.org/mediawiki-core/1.23.1/php/classPPNode__DOM.html
  
 +
<pre>
 +
Notice: Undefined property: PPNode_DOM::$ownerDocument in extensions/S5SlideShow/src/Render.php on line 176
 +
Notice: Undefined property: PPNode_DOM::$childNodes in extensions/S5SlideShow/src/Render.php on line 177
 +
Notice: Trying to get property 'length' of non-object in extensions/S5SlideShow/src/Render.php on line 193
 +
</pre>
 +
{{commit|host=https://github.com|path=WolfgangFahl|project=S5SlideShow|subject=fixes invalid yatil subpath content|name=Wolfgang Fahl|date=2020-02-08 15:28:51 +0100|hash=8aadf71|storemode=subobject|viewmode=line}}
 +
{{commit|host=https://github.com|path=WolfgangFahl|project=S5SlideShow|subject=fixes namespace reference and avoids use of AtEase|name=Wolfgang Fahl|date=2020-02-08 18:05:52 +0100|hash=1b7821e|storemode=subobject|viewmode=line}}
 +
{{commit|host=https://github.com|path=WolfgangFahl|project=S5SlideShow|subject=fixes template path and autoloading of Skin.php|name=Wolfgang Fahl|date=2020-02-09 08:20:17 +0100|hash=8d9c1a1|storemode=subobject|viewmode=line}}
 +
{{commit|host=https://github.com|path=WolfgangFahl|project=S5SlideShow|subject=fixes node access|name=Wolfgang Fahl|date=2020-02-09 08:37:04 +0100|hash=bcabc8f|storemode=subobject|viewmode=line}}
 +
 +
== Trying to get property nodeName of None object ==
 +
{{commit|host=https://github.com|path=WolfgangFahl|project=S5SlideShow|subject=fixes Trying to get property nodeName of None object|name=Wolfgang Fahl|date=2020-02-09 08:50:14 +0100|hash=539a5e8|storemode=subobject|viewmode=line}}
 +
== Argument 1 passed to S5SlideShow\Skin::setupSkinUserCss() must be an instance of S5SlideShow\OutputPage, ==
 +
<pre>
 +
TypeError: Argument 1 passed to S5SlideShow\Skin::setupSkinUserCss() must be an instance of S5SlideShow\OutputPage, instance of OutputPage given, called in /var/www/html/mediawiki-1.33.2/includes/OutputPage.php on line 3127 and defined in /var/www/html/mediawiki-1.33.2/extensions/S5SlideShow/src/Skin.php:33
 +
Stack trace:
 +
</pre>
 +
{{commit|host=https://github.com|path=WolfgangFahl|project=S5SlideShow|subject=remove type hint (could also add namespace)|name=Wolfgang Fahl|date=2020-02-09 11:03:03 +0100|hash=99dcfe7|storemode=subobject|viewmode=line}}
 +
 +
== typo extension.json ParserGetVariablValueSwitch ==
 +
<pre>
 +
Original exception: [fba9fa950b264030360a7267] /index.php/Hauptseite MWException from line 176 of /var/www/mediawiki/code/includes/Hooks.php: Invalid callback S5SlideShow\S5SlideShowHooks::ParserGetVariablValueSwitch in hooks for ParserGetVariableValueSwitch
 +
</pre>
 +
{{commit|host=https://github.com|path=WolfgangFahl|project=S5SlideShow|subject=fixes typo|name=Wolfgang Fahl|date=2020-02-09 15:49:19 +0100|hash=06e58ba|storemode=subobject|viewmode=line}}
 +
== Authors ==
 +
{{commit|host=https://github.com|path=WolfgangFahl|project=S5SlideShow|subject=adds author hexmode and links|name=Wolfgang Fahl|date=2020-02-09 16:14:36 +0100|hash=6fbca98|storemode=subobject|viewmode=line}}
 +
 +
= type on file_get_contents and wrong __DIR__ =
 +
{{commit|host=https://github.com|path=WolfgangFahl|project=S5SlideShow|subject=fixes file_get_contents call - looks good|name=Wolfgang Fahl|date=2020-02-09 17:03:41 +0100|hash=c51ab7e|storemode=subobject|viewmode=line}}
 +
 +
= Code =
 +
== Debugging ==
 +
{{Link|target=PHP Mediawiki Eclipse debugging}}
 
== extension.json ==
 
== extension.json ==
 
<source lang='json'>
 
<source lang='json'>
 
{
 
{
 
     "name": "S5SlideShow",
 
     "name": "S5SlideShow",
     "author": "Vitaliy Filippov",
+
     "namemsg": "s5slide-name",
 +
    "descriptionmsg": "s5slide-desc",
 +
    "version": "0.3",
 +
    "license-name": "GPL-2.0+",
 +
    "type": "parserhook",
 
     "url": "https://www.mediawiki.org/wiki/Extension:S5SlideShow",
 
     "url": "https://www.mediawiki.org/wiki/Extension:S5SlideShow",
     "license-name": "GPL-2.0+",
+
     "requires": {
    "version": "0.1.33",
+
        "MediaWiki": ">= 1.27.3"
    "namemsg": "s5SlideShow",
 
    "descriptionmsg": "s5SlideShow-desc",
 
    "manifest_version": 1,
 
    "MessagesDirs": {
 
        "S5SlideShow": [ "i18n" ]
 
 
     },
 
     },
     "AutoloadClasses": {
+
     "author": [
         "SpecialS5SlideShow": "specials/SpecialS5SlideShow.php",
+
         "Vitaliy Filippov",
         "S5SlideShow": "S5SlideShow.class.php",
+
         "Wolfgang Fahl"
        "S5SkinArticle": "S5SlideShow.class.php",
+
    ],
        "S5SlideShowHooks": "S5SlideShowHooks.php"
+
    "Actions": {
 +
"slide": "S5SlideShow\\Action"
 
     },
 
     },
 
     "Hooks": {
 
     "Hooks": {
 +
  "ImageBeforeProduceHTML": [
 +
            "S5SlideShow\\S5SlideShowHooks::ImageBeforeProduceHTML"
 +
],
 
         "ParserFirstCallInit": [
 
         "ParserFirstCallInit": [
             "S5SlideShowHooks::ParserFirstCallInit"
+
             "S5SlideShow\\S5SlideShowHooks::ParserFirstCallInit"
 
         ],
 
         ],
 
         "ArticleFromTitle": [
 
         "ArticleFromTitle": [
             "S5SlideShowHooks::ArticleFromTitle"
+
             "S5SlideShow\\S5SlideShowHooks::ArticleFromTitle"
 
         ],
 
         ],
 
         "AlternateEdit": [
 
         "AlternateEdit": [
             "S5SlideShowHooks::AlternateEdit"
+
             "S5SlideShow\\S5SlideShowHooks::AlternateEdit"
 
         ],
 
         ],
 
         "MagicWordwgVariableIDs": [
 
         "MagicWordwgVariableIDs": [
             "S5SlideShowHooks::MagicWordwgVariableIDs"
+
             "S5SlideShow\\S5SlideShowHooks::MagicWordwgVariableIDs"
 
         ],
 
         ],
 
         "ParserGetVariableValueSwitch": [
 
         "ParserGetVariableValueSwitch": [
             "S5SlideShowHooks::ParserGetVariablValueSwitch"
+
             "S5SlideShow\\S5SlideShowHooks::ParserGetVariableValueSwitch"
 
         ]
 
         ]
 
     },
 
     },
 
     "SpecialPages": {
 
     "SpecialPages": {
         "S5SlideShow": "SpecialS5SlideShow"
+
         "S5SlideShow": "S5SlideShow\\SpecialS5SlideShow"
 +
    },
 +
    "MessagesDirs": {
 +
        "S5SlideShow": [
 +
            "i18n"
 +
        ]
 
     },
 
     },
 
     "ExtensionMessagesFiles": {
 
     "ExtensionMessagesFiles": {
         "S5SlideShowAlias": "S5SlideShow.alias.php"
+
         "S5SlideShowI18n": "src/I18n.php"
 +
    },
 +
    "AutoloadClasses": {
 +
        "S5SlideShow\\S5SlideShowHooks": "src/S5SlideShowHooks.php",
 +
        "S5SlideShow\\SpecialS5SlideShow": "src/Special.php",
 +
        "S5SlideShow\\Action": "src/Action.php",
 +
        "S5SlideShow\\Render": "src/Render.php",
 +
        "S5SlideShow\\Skin": "src/Skin.php"
 
     },
 
     },
     "type": "other"
+
     "config": {
 +
"_prefix": "egS5",
 +
"Scaled": false,
 +
"DefaultStyle": "default",
 +
"BrowserScaleHack": true,
 +
"SlideTemplateFile": "extensions/S5SlideShow/slide.htm",
 +
"SlideCenterMark": "(center)",
 +
"SlideHeadingMark": false,
 +
"SlideIncMark": "(step)"
 +
},
 +
    "manifest_version": 1
 
}
 
}
 
</source>
 
</source>

Latest revision as of 18:17, 13 March 2021

Please comment here

Extension
edit
name  S5SlideShow
url  https://www.mediawiki.org/wiki/Extension:S5SlideShow
purpose  Slideshow presentation from Wikimarkup
since  2009
wiki  

S5

Example Slideshows

click "slideshow" on any of the talk pages

 
Build Your Own Self Driving Vehicle with Java
EMWConTalk2023-04
Graph Approaches for Software Engineeering
Mediawiki 1.35 Migration
SMWConTalk2015-05
SMWConTalk2015-05-01
SMWConTalk2015-10
SMWConTalk2016-09
SMWConTalk2017-10
SMWConTalk2018-12
SMWConTalk2019-09
SMWConTalk2020-04
SMWConTalk2022-10
SMWConTalk2024-11

Links

Alternatives

Forks

Packagist

Issues

Call to undefined method WikitextContent:getText()

Exception encountered, of type "Error"
[c34bfba970bc2aa84ca0a212] /index.php?title=SWMConTalk2015-10&action=slide Error from line 254 of extensions/S5SlideShow/src/Render.php: Call to undefined method WikitextContent::getText()
Backtrace:
#0 extensions/S5SlideShow/src/Render.php(348): S5SlideShow\Render->loadContent()
#1 extensions/S5SlideShow/src/Action.php(90): S5SlideShow\Render->genSlideFile(boolean)
#2 includes/MediaWiki.php(493): S5SlideShow\Action->show()
/srv/www/mediawiki/code/extensions/S5SlideShow$ gitinfo
== Remote URL: origin	https://github.com/WolfgangFahl/S5SlideShow (fetch)
origin	https://github.com/WolfgangFahl/S5SlideShow (push)
Commit
host  https://github.com
path  WolfgangFahl
project  S5SlideShow
subject  fixes Call to undefined method WikitextContent::getText() for MW 1.27.3 env see https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Translate/+/538756/3/TranslateHooks.php as an example
name  Wolfgang Fahl
date  2020-02-07 10:29:10 +0100
hash  6ed5a2a


Class 'S5SlideShow\Hooks not found

Exception encountered, of type "Error"
[120789ca59e7b0366a3b81ea] /index.php?title=SWMConTalk2015-10&action=slide Error from line 293 of /hd/owei/srv/www/mediawiki/code/extensions/S5SlideShow/src/Render.php: Class 'S5SlideShow\Hooks' not found
Backtrace:
#0 /hd/owei/srv/www/mediawiki/code/extensions/S5SlideShow/src/Render.php(271): S5SlideShow\Render->parse(string)
grep "Hooks::" *.php
Render.php:		$prev = Hooks::$parsingSlide;
Render.php:		Hooks::$parsingSlide = true;
Render.php:		Hooks::$parsingSlide = $prev;
Render.php:			Hooks::$styles['print'] = 'print.css';
Render.php:		foreach ( Hooks::$styles as $k => $file ) {
Commit
host  https://github.com
path  WolfgangFahl
project  S5SlideShow
subject  fixes Class 'S5SlideShow\Hooks not found
name  Wolfgang Fahl
date  2020-02-08 08:59:39
hash  54a50873165b20ef93981f7f5ce60f920dc30a5b

Class 'Wikimedia\AtEase\AtEase' not found

Superfluous by now.

composer.local.json

{
	"require": {
		"wikimedia/at-ease": "*"
	}
}
php composer.phar update

PPNode_DOM properties

Notice: Undefined property: PPNode_DOM::$ownerDocument in extensions/S5SlideShow/src/Render.php on line 176
Notice: Undefined property: PPNode_DOM::$childNodes in extensions/S5SlideShow/src/Render.php on line 177
Notice: Trying to get property 'length' of non-object in extensions/S5SlideShow/src/Render.php on line 193
Commit
host  https://github.com
path  WolfgangFahl
project  S5SlideShow
subject  fixes invalid yatil subpath content
name  Wolfgang Fahl
date  2020-02-08 15:28:51 +0100
hash  8aadf71


Commit
host  https://github.com
path  WolfgangFahl
project  S5SlideShow
subject  fixes namespace reference and avoids use of AtEase
name  Wolfgang Fahl
date  2020-02-08 18:05:52 +0100
hash  1b7821e


Commit
host  https://github.com
path  WolfgangFahl
project  S5SlideShow
subject  fixes template path and autoloading of Skin.php
name  Wolfgang Fahl
date  2020-02-09 08:20:17 +0100
hash  8d9c1a1


Commit
host  https://github.com
path  WolfgangFahl
project  S5SlideShow
subject  fixes node access
name  Wolfgang Fahl
date  2020-02-09 08:37:04 +0100
hash  bcabc8f


Trying to get property nodeName of None object

Commit
host  https://github.com
path  WolfgangFahl
project  S5SlideShow
subject  fixes Trying to get property nodeName of None object
name  Wolfgang Fahl
date  2020-02-09 08:50:14 +0100
hash  539a5e8

Argument 1 passed to S5SlideShow\Skin::setupSkinUserCss() must be an instance of S5SlideShow\OutputPage,

TypeError: Argument 1 passed to S5SlideShow\Skin::setupSkinUserCss() must be an instance of S5SlideShow\OutputPage, instance of OutputPage given, called in /var/www/html/mediawiki-1.33.2/includes/OutputPage.php on line 3127 and defined in /var/www/html/mediawiki-1.33.2/extensions/S5SlideShow/src/Skin.php:33
Stack trace:
Commit
host  https://github.com
path  WolfgangFahl
project  S5SlideShow
subject  remove type hint (could also add namespace)
name  Wolfgang Fahl
date  2020-02-09 11:03:03 +0100
hash  99dcfe7


typo extension.json ParserGetVariablValueSwitch

Original exception: [fba9fa950b264030360a7267] /index.php/Hauptseite MWException from line 176 of /var/www/mediawiki/code/includes/Hooks.php: Invalid callback S5SlideShow\S5SlideShowHooks::ParserGetVariablValueSwitch in hooks for ParserGetVariableValueSwitch
Commit
host  https://github.com
path  WolfgangFahl
project  S5SlideShow
subject  fixes typo
name  Wolfgang Fahl
date  2020-02-09 15:49:19 +0100
hash  06e58ba

Authors

Commit
host  https://github.com
path  WolfgangFahl
project  S5SlideShow
subject  adds author hexmode and links
name  Wolfgang Fahl
date  2020-02-09 16:14:36 +0100
hash  6fbca98


type on file_get_contents and wrong __DIR__

Commit
host  https://github.com
path  WolfgangFahl
project  S5SlideShow
subject  fixes file_get_contents call - looks good
name  Wolfgang Fahl
date  2020-02-09 17:03:41 +0100
hash  c51ab7e


Code

Debugging

PHP Mediawiki Eclipse debugging

extension.json

{
    "name": "S5SlideShow",
    "namemsg": "s5slide-name",
    "descriptionmsg": "s5slide-desc",
    "version": "0.3",
    "license-name": "GPL-2.0+",
    "type": "parserhook",
    "url": "https://www.mediawiki.org/wiki/Extension:S5SlideShow",
    "requires": {
        "MediaWiki": ">= 1.27.3"
    },
    "author": [
        "Vitaliy Filippov",
        "Wolfgang Fahl"
    ],
    "Actions": {
	"slide": "S5SlideShow\\Action"
    },
    "Hooks": {
  	"ImageBeforeProduceHTML": [
            "S5SlideShow\\S5SlideShowHooks::ImageBeforeProduceHTML"
		],
        "ParserFirstCallInit": [
            "S5SlideShow\\S5SlideShowHooks::ParserFirstCallInit"
        ],
        "ArticleFromTitle": [
            "S5SlideShow\\S5SlideShowHooks::ArticleFromTitle"
        ],
        "AlternateEdit": [
            "S5SlideShow\\S5SlideShowHooks::AlternateEdit"
        ],
        "MagicWordwgVariableIDs": [
            "S5SlideShow\\S5SlideShowHooks::MagicWordwgVariableIDs"
        ],
        "ParserGetVariableValueSwitch": [
            "S5SlideShow\\S5SlideShowHooks::ParserGetVariableValueSwitch"
        ]
    },
    "SpecialPages": {
        "S5SlideShow": "S5SlideShow\\SpecialS5SlideShow"
    },
    "MessagesDirs": {
        "S5SlideShow": [
            "i18n"
        ]
    },
    "ExtensionMessagesFiles": {
        "S5SlideShowI18n": "src/I18n.php"
    },
    "AutoloadClasses": {
        "S5SlideShow\\S5SlideShowHooks": "src/S5SlideShowHooks.php",
        "S5SlideShow\\SpecialS5SlideShow": "src/Special.php",
        "S5SlideShow\\Action": "src/Action.php",
        "S5SlideShow\\Render": "src/Render.php",
        "S5SlideShow\\Skin": "src/Skin.php"
    },
    "config": {
		"_prefix": "egS5",
		"Scaled": false,
		"DefaultStyle": "default",
		"BrowserScaleHack": true,
		"SlideTemplateFile": "extensions/S5SlideShow/slide.htm",
		"SlideCenterMark": "(center)",
		"SlideHeadingMark": false,
		"SlideIncMark": "(step)"
	},
    "manifest_version": 1
}