This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $item->fieldname; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Output file name 1 | |
echo $item->fieldname->file_name[0]; | |
// Output file name 2 | |
echo $item->fieldname->file_name[1] | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach($item->fields->fieldname->fullurl as $key => $url) { | |
// Output an image with title and url | |
echo '<img alt="'.$item->fields->fieldname->title[$key].'" src="'.$url.'">'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bootstrapping PHPThumb library | |
require_once(GSPLUGINPATH.'imanager/phpthumb/ThumbLib.inc.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo getResized($item->fields->images, 1, $x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo getResized($item->fields->images, 1, 200); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo getResized($item->fields->images, 1, 0, 200); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach($item->fields->images->file_name as $key => $name) { | |
echo getResized($item->fields->images, $key, 0, 200).'<br>'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for($i=0; $i<count($item->fields->images->file_name); $i++) { | |
echo getResized($item->fields->images, $i, 0, 200).'<br>'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Returns resized image | |
* With the first call creates thumbnail and cached it | |
* | |
* @param object $image - A Field object of an item | |
* @param integer $id - An index of the field value | |
* @param integer $width - Thumb width | |
* @param integer $height - Thumb height | |
* |