DocumentationTechnical → Theme Engine

Podcast Generator Theme Engine

Podcast Generator doesn't make use of any existing template engine (e.g. SMARTY) to handle graphical themes and skins, yet it adopts its own engine, based on simple strings replacement.

In Podcast Generator themes are located in the themes folder. Optionally, a file called functions.php can be added to each theme directory to define new strings or to overwrite the default text strings with custom content.

To ensure retro-compatibility with the previous versions, Podcast Generator 2.x uses a different theme engine (core/templates.php) than branch 1.x (core/themes.php). To use the newer theme engine while creating a new theme, a file called theme.xml (empty, at the moment) must be placed in the theme folder (see "default_modern" theme for an example).

The following table shows the list of the text strings that should be included in every theme, their recommended placement within the HTML document and the expected results:

String Recommended placement Result Version
-----PG_PAGETITLE----- <head> Display the title of the page 1.x, 2.x
-----PG_METATAGS----- <head> Generate Meta Tags (Author, Copyright, Description, Keywords) 1.x, 2.x
-----PG_JSLOAD----- <head> Generate Javascript calls (e.g. Admin pages with WYSIWYG editor etc..) 1.x, 2.x
----PG_PODCASTTITLE----- <body> Display podcast Title 1.x, 2.x
-----PG_PODCASTSUBTITLE---- <body> Display podcast subtitle 1.x, 2.x
-----PG_PODCASTDESC---- <body> Display podcast description 1.x, 2.x
-----PG_MENUADMIN----- <body> Display Admin menu 1.x, 2.x
-----PG_MENUHOME----- <body> Display Home menu 1.x, 2.x
-----PG_MENUARCHIVE----- <body> Display Podcast Archive menu 1.x, 2.x
-----PG_RIGHTBOX----- <body> Display box containing feed address and iTunes subscription button 1.x, 2.x
-----PG_FREEBOX----- <body> Display “Freebox”, an HTML box users can customize through a visual editor from the admin section 1.x, 2.x
-----PG_MAINBODY----- <body> Display the main content generated by the script (latest episodes, archive, admin interface etc...) 1.x, 2.x
-----PG_FOOTER----- <body> Display footer 1.x, 2.x
-----PG_FOOTER----- <body> Display footer 1.x, 2.x
-----PG2_URLRSSFEED----- <body> Display RSS feed URL 2.x
-----PG2_URLFORITUNES----- <body> Display RSS feed URL for iTunes (itpc://) 2.x
-----PG2_ADMINRIGHTBOX----- <body> Display a box in the Admin section (check for updates, server info, etc...) 2.x

Copyright ©2020 | Released under the GNU/GPL license | Source Code | Podcast Hosting | Credits