{"id":15022158,"url":"https://github.com/php/web-pres2","last_synced_at":"2025-10-19T22:31:55.934Z","repository":{"id":2273126,"uuid":"3229842","full_name":"php/web-pres2","owner":"php","description":"PHP presentation system","archived":false,"fork":false,"pushed_at":"2024-08-09T15:16:17.000Z","size":6053,"stargazers_count":19,"open_issues_count":2,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-29T21:34:04.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-01-20T21:20:48.000Z","updated_at":"2024-08-09T15:16:20.000Z","dependencies_parsed_at":"2024-04-15T14:24:58.311Z","dependency_job_id":"9b971d24-95c8-4188-bae5-fd87db798720","html_url":"https://github.com/php/web-pres2","commit_stats":{"total_commits":415,"total_committers":31,"mean_commits":"13.387096774193548","dds":"0.46506024096385545","last_synced_commit":"9b5e865148e8ea90bd8892b8d2f32c5ee84e1447"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fweb-pres2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fweb-pres2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fweb-pres2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fweb-pres2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php","download_url":"https://codeload.github.com/php/web-pres2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237224787,"owners_count":19275086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:57:32.364Z","updated_at":"2025-10-19T22:31:50.167Z","avatar_url":"https://github.com/php.png","language":"PHP","readme":"# PHP presentation system\n\nThis repo holds the PHP presentation system hosted on https://talks.php.net.\n\nYou can find the presentations under https://github.com/php/presentations.\n\nThis system works perfectly for PHP 5.3 and needs the XML extension.\n\n## Files \n\nBrief walkthrough of how this all hangs together:\n\nconfig.php            - User configurable paths and filenames\nflash.php             - Flash widget rendering embedded from objects.php\nfonts/                - Font files\nhelp.php              - Help file\nindex.php             - Prints list of available presentations\nobjects.php           - Top-level widget rendering\npresentations/        - Directory of presentation files (from separate CVS)\nshow.php              - Main slide display code\nXML_Presentation.php  - XML parser for the presentation files\nXML_Slide.php         - XML parser for the slide files\n\nWhen a user first enters the site index.php presents a list of presentations\nby walking through the presentations/ directory and parsing each *.xml file\nusing the XML_Presentation XML parser.  The filename of the presentation file\nwithout the extension becomes the id by which the presentation is known.  This\nstring is passed to show.php via PATH_INFO (eg. show.php/intro)\n\nNow we are in show.php.  Here we first parse $PATH_INFO to figure out which\npresentation file to read.  Open the presentation file and grab the list of \nslides.  First slide is #0 internally.  Will probably show it to the user as\nstarting at #1.  The presentation file itself looks like this:\n\n\u003cpresentation\u003e\n \u003ctitle\u003ePHP - Scripting the Web\u003c/title\u003e\n \u003cevent\u003eOSCON\u003c/event\u003e\n \u003clocation\u003eSan Diego\u003c/location\u003e\n \u003cdate\u003eJuly 22, 2002\u003c/date\u003e\n \u003cspeaker\u003eRasmus\u003c/speaker\u003e\n \u003cnavmode\u003eflash\u003c/navmode\u003e\n\n \u003cslide\u003eslides/slide1.xml\u003c/slide\u003e\n \u003cslide\u003eslides/slide2.xml\u003c/slide\u003e\n\n\u003c/presentation\u003e\n\nThat is, you start it with a \u003cpresentation\u003e tag, and have at least a title\ntag inside.  The others are optional.  Then a series of \u003cslide\u003e tags where\nyou put the relative filename (to the presentations dir) of each slide.\n\nThis particular presentation XML file ends up getting parsed into an\narray of objects that looks like this:\n\nArray\n(\n    [1] =\u003e _presentation Object\n        (\n            [title] =\u003e PHP - Scripting the Web\n            [navmode] =\u003e flash\n            [event] =\u003e OSCON\n            [location] =\u003e San Diego\n            [date] =\u003e July 22, 2002\n            [speaker] =\u003e Rasmus\n            [slides] =\u003e Array\n                (\n                    [0] =\u003e _pres_slide Object\n                        (\n                            [filename] =\u003e slides/slide1.xml\n                        )\n\n                    [1] =\u003e _pres_slide Object\n                        (\n                            [filename] =\u003e slides/slide2.xml\n                        )\n\n                )\n\n        )\n\n)\n\nTechnically you could put more than 1 presentation in the same file, but this\nisn't completely supported at this point.  This presentation object gets stored\nin $pres which is a session variable.  We will see why in a little bit.  So\nto get at the title of the presentation you would use:\n\n  $pres[1]-\u003etitle\n\nAnd to get the filename of the first slides you would use:\n\n  $pres[1]-\u003eslides[0]-\u003efilename\n\nThe slide XML files start with a \u003cslide\u003e tag and needs a \u003ctitle\u003e tag as well.\nThen it can have any combination of the following tags:\n\n\u003cblurb\u003e   Paragraph of text which can contain \u003ctitle\u003e and \u003ctext\u003e\n\u003clist\u003e    Bullet list which can contain \u003ctitle\u003e and \u003cbullet\u003e\n\u003cimage\u003e   Image which can contain \u003ctitle\u003e and \u003cfilename\u003e\n\u003cexample\u003e Example block which can contain \u003ctitle\u003e, \u003ctext\u003e or \u003cfilename\u003e          \n\nSee the example slides in the slides/ directory for more info.\n\nIf you look in objects.php you will see that each widget type has a $mode\nproperty and that the display() method for each one looks something like this:\n\n    function display() {\n        $this-\u003e{$this-\u003emode}();\n    }\n\nAnd then you can have html(), flash(), text(), svg(), jpg() methods for each\none.\n\n## Contributing\n\nHave a look at the TODO file for a list of things to start working on.  If\nwe all pitch in a bit we should all end up with cool-looking presentations\nthrough this very flexible system.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp%2Fweb-pres2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp%2Fweb-pres2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp%2Fweb-pres2/lists"}