Tuesday, June 27 in 2017
Module Frontpage Slideshow
LEPTON CMS
Pageviews 40,516
Currently online: 11
Modul: x_find_class
Author: Dietrich Roland Pehlke
Nick: aldus
Version: 0.1.7
State: RC1
License: GNU - General Public License
Platform: 2.7
Last info: 2008-10-11
Rating:
59.0
414 votes
1 2 3 4 5
Download: here
Forum: here
Description: A simple codemodul to find a specific tag matching a given class,
and if so, includes additional JS or CSS files.

If you are in the need to include more than one JS/CSS file, you
can pass an array with the file-paths.

Also: this is build and tested for WB 2.7.x and PHP 5.2.x,
but untested under WB 2.6.x and PHP 4.3.0.

Info: Update 0.1.7
- Bugfix in the regex.
- Additional test inside "__file_exists"
- Minor cosmetic changes

Update 0.1.6
- Additional "header" for the javascripts

 

Code example

 

if (function_exists("find_my_class") ) {
$path_to_css = array (
WB_URL."/modules/x_find_class/test.css"
);
$path_to_js = array (
WB_URL."/modules/x_find_class/test.js"
);

ob_start();
page_content();
$content = ob_get_contents();
ob_end_clean();

find_my_class($content, "pre", "code", $path_to_css, $path_to_js);
}
TagCloud