chrickel.de Lichttechnik chrickel.de Lichttechnik
  Home arrow Oha...! arrow Rigging arrow Chef, der ging aber schwer rein!
Sunday, 23 July 2017
 
 
 
 
Navigation
Home
Funstuff
KnowHow
Oha...!
Downloads
Links
Blog
Oha Upload
Kontakt
Impressum
DieReferenz - News
L&Si news
We have 1 guest online
 
 
 
registerFunction( 'onPrepareContent', 'botjDownload' ); function botjDownload( $published, &$row, &$params, $page=0 ) { if (!$published) return; $dlchk = strpos( strtolower($row->text), '{jdownload' ); if ($dlchk === false) return; // path to the download-files. Edit, if you want to. $downloaddir="/images/stories/mosdl/"; while ($dlchk){ $botname=substr($row->text,strpos(strtolower($row->text),"{jdownload ")); $botname=substr($botname,0,strpos(strtolower($botname),"{/jdownload}")+12); // extract Filename $dlfilename=substr($botname,strpos($botname," ")); $dlfilename=trim(substr($dlfilename,1,strpos($dlfilename,"}")-1)); // extract linktext $dllinktext=substr($botname,strpos($botname,"}")); $dllinktext=substr($dllinktext,1,strpos($dlfilename,"{/jdownload}")-12); // check if there was a linktext - if not, display filename if ($dllinktext=="") { $dllinktext=$dlfilename; } // check if file exists if (file_exists($GLOBALS['mosConfig_absolute_path'].$downloaddir.$dlfilename)) { // YES - then replace Tag with Link $row->text=str_replace(trim($botname),''.$dllinktext.'',$row->text); } else { // NO - then just display linktext in italics $row->text=str_replace(trim($botname),"".$dllinktext."",$row->text); } $dlchk = strpos( strtolower($row->text), '{jdownload' ); } } ?>
Chef, der ging aber schwer rein! Print
Thursday, 13 March 2008

 

 
Next >

 
(C) 2017 chrickel.de Lichttechnik
Home | Funstuff | KnowHow | Oha...! | Downloads | Links | Blog |