This is an old revision of the document!


Containing of php-file/-variables

By the example Frontpage slideshow http://www.joomlaworks.gr/

Forum: http://forum.phpwcms.org/viewtopic.php?p=109397#p109397

Put on a new script into template/more inc_script/frontend_render, e.g. frontpageslideshow.php

Example

<?php
 
// Replacement Tag {FPSS}
if(strpos($content['all'], '{FPSS}')) {
 
initMootools();
 
// START of "Frontpage Slideshow" settings
ob_start();
 
   $nameOfSlideshowToDisplay = "demoslideshow";                // Enter the name of your slideshow. Slideshows are in folders inside /fpss/slideshows/.
   $URLofyoursite = rtrim(PHPWCMS_URL, '/');                   // Enter your site's URL.
   $AbsoluteServerPathofyoursite = rtrim(PHPWCMS_ROOT, '/');      // Enter the root path of your site on the server.
 
   $target = ''; // So eine schlechtes Script
 
   // do not edit below this line
   include_once($AbsoluteServerPathofyoursite."/fpss/mod_fpslideshow.php");
 
$FPSS = ob_get_contents();
 
$content['all'] = str_replace('{FPSS}', $FPSS, $content['all']);
 
ob_end_clean();
 
// END of "Frontpage Slideshow" settings
 
}
?>

Wichtig! Bei der Konfiguration darauf achten, dass eigentlich Mootools bereits im System enthalten ist. Das kann also zu Problemen führen. Nicht jQuery mit MooTools mixen! Eventuell in der Konfiguration ganz die JavaScript jQuery/MooTools ausschalten.

Look to it that

Importantly! Look to it that during configuration MooTools is contained in the system already actually. That can lead thus to problems. Do not mix jQuery with MooTools! Possibly switch to off the javascript jQuery/MooTools in the configuration.

At the slideshow configuration thus the following is meaningful:

// --- Slideshow engine settings --- //
$engine = "mootools";
$disablelib = 1;
$optimizejs = 0;

Put the fpss folder into the normal phpwcms root.

english/technics/contain-php-file-variables.1240639529.txt.gz · Last modified: 2018/06/03 18:07 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0