sorrendben:
Kód:
function ImageCheck( $file, $directory='/images/M_images/', $param=NULL, $param_directory='/images/M_images/', $alt=NULL, $name=NULL, $type=1, $align='middle', $title=NULL, $admin=NULL ) {
global $mosConfig_absolute_path, $mosConfig_live_site, $mainframe;
Kód:
// outputs only path to image
$image = $mosConfig_live_site. $directory . $file;
Kód:
/**
* Checks to see if an image exists in the current templates image directory
* if it does it loads this image. Otherwise the default image is loaded.
* Also can be used in conjunction with the menulist param to create the chosen image
* load the default or use no image
*/
function ImageCheckAdmin( $file, $directory='/administrator/images/', $param=NULL, $param_directory='/administrator/images/', $alt=NULL, $name=NULL, $type=1, $align='middle', $title=NULL ) {
/*
global $mosConfig_absolute_path, $mosConfig_live_site, $mainframe;
elejétől végéig:
Kód:
/**
* Checks to see if an image exists in the current templates image directory
* if it does it loads this image. Otherwise the default image is loaded.
* Also can be used in conjunction with the menulist param to create the chosen image
* load the default or use no image
*/
function ImageCheck( $file, $directory='/images/M_images/', $param=NULL, $param_directory='/images/M_images/', $alt=NULL, $name=NULL, $type=1, $align='middle', $title=NULL, $admin=NULL ) {
global $mosConfig_absolute_path, $mosConfig_live_site, $mainframe;
$cur_template = $mainframe->getTemplate();
$name = ( $name ? ' name="'. $name .'"' : '' );
$title = ( $title ? ' title="'. $title .'"' : '' );
$alt = ( $alt ? ' alt="'. $alt .'"' : ' alt=""' );
$align = ( $align ? ' align="'. $align .'"' : '' );
// change directory path from frontend or backend
if ($admin) {
$path = '/administrator/templates/'. $cur_template .'/images/';
} else {
$path = '/templates/'. $cur_template .'/images/';
}
if ( $param ) {
$image = $mosConfig_live_site. $param_directory . $param;
if ( $type ) {
$image = '<img src="'. $image .'" '. $alt . $name . $align .' border="0" />';
}
} else if ( $param == -1 ) {
$image = '';
} else {
if ( file_exists( $mosConfig_absolute_path . $path . $file ) ) {
$image = $mosConfig_live_site . $path . $file;
} else {
// outputs only path to image
$image = $mosConfig_live_site. $directory . $file;
}
// outputs actual html <img> tag
if ( $type ) {
$image = '<img src="'. $image .'" '. $alt . $name . $title . $align .' border="0" />';
}
}
return $image;
}
/**
* Checks to see if an image exists in the current templates image directory
* if it does it loads this image. Otherwise the default image is loaded.
* Also can be used in conjunction with the menulist param to create the chosen image
* load the default or use no image
*/
function ImageCheckAdmin( $file, $directory='/administrator/images/', $param=NULL, $param_directory='/administrator/images/', $alt=NULL, $name=NULL, $type=1, $align='middle', $title=NULL ) {
/*
global $mosConfig_absolute_path, $mosConfig_live_site, $mainframe;
$cur_template = $mainframe->getTemplate();
$name = ( $name ? ' name="'. $name .'"' : '' );
$title = ( $title ? ' title="'. $title .'"' : '' );
$alt = ( $alt ? ' alt="'. $alt .'"' : ' alt=""' );
$align = ( $align ? ' align="'. $align .'"' : '' );
$path = '/administrator/templates/'. $cur_template .'/images/';
if ( $param ) {
$image = $mosConfig_live_site. $param_directory . $param;
if ( $type ) {
$image = '<img src="'. $image .'" '. $alt . $name . $align .' border="0" />';
}
} else if ( $param == -1 ) {
$image = '';
} else {
if ( file_exists( $mosConfig_absolute_path . $path . $file ) ) {
$image = $mosConfig_live_site . $path . $file;
} else {
// outputs only path to image
$image = $mosConfig_live_site. $directory . $file;
}
// outputs actual html <img> tag
if ( $type ) {
$image = '<img src="'. $image .'" '. $alt . $name . $title . $align .' border="0" />';
}
}
*/
Feltelepíti a fájlokat de az adatbázisban nem hoz létre táblákat, még kézzel se sikerült.
Egy kész oldalamat felmásoltam, amiben már benne van ez a komponens és az simán megy.
Az új telepítésnél van gondja valamilyen images/média fájlokkal, ill, az útvonalával.
Könyvjelzők