$_instance
$_instance : \MOD_layoutbits
Singleton instance
Collection of functions that create elements for a page.
An example for its use: $layoutbits = MOD_layoutbits::get(); // get the singleton instance $id = $geo->getCityID($cityname);
$_instance : \MOD_layoutbits
Singleton instance
linkWithPicture(string $username, $picfile, string $mode) : string
function LinkWithPicture build a link with picture and Username to the member profile.
Optional parameter status can be used to alter the link. Old version found in FunctionsTools.php
Usually it is more convenient to use smallUserPic_userId($userId) or smallUserPic_username($username)
string | $username | |
$picfile | ||
string | $mode | can be used to enable 'map_style' |
html-formatted link with picture
linkWithPictureVar(string $username, string $height, string $width, string $quality, string $picfile, string $style) : string
function LinkWithPicture build a link with picture and Username to the member profile.
Optional parameter status can be used to alter the link. Old version found in FunctionsTools.php
Usually it is more convenient to use smallUserPic_userId($userId) or smallUserPic_username($username)
string | $username | |
string | $height | of picture |
string | $width | of picture |
string | $quality | of picture |
string | $picfile | alternative picture path |
string | $style | css-class for the image-tag |
html-formatted link with picture
truncate_words(string $text, int $limit, string $ellipsis) : string
Truncate a string with full words
string | $text | Input string |
int | $limit | length of truncated version |
string | $ellipsis | Trailing characters indicating ellipsis,
|
Truncated version of string
getGenderTranslated( $gender, $hideGender, $addGenderText) : string
Returns a string with the gender if that isn't hidden. Translated of the form 'Gender: male/female/other'
$gender | ||
$hideGender | ||
$addGenderText |
'Gender: male/female/other/ translated or empty string
_getThumb( $file, $max_x, $max_y, $quality, $thumbdir, $mode)
Thumbnail creator. (by markus5, Markus Hutzler 25.02.2007) tested with GD Version: bundled (2.0.28 compatible) with GIF Read Support: Enabled with JPG Support: Enabled with PNG Support: Enabled
this function creates a thumbnail of a JPEG, GIF or PNG image file: path (with /)!!! max_x / max_y delimit the maximal size. default = 100 (it keeps the ratio) the quality can be set. default = 85 this function returns the thumb filename or null
modified by Fake51 $mode specifies if the new image is based on a cropped and resized version of the old, or just a resized $mode = "square" means a cropped version $mode = "ratio" means merely resized
$file | ||
$max_x | ||
$max_y | ||
$quality | ||
$thumbdir | ||
$mode |