/**
 * BB Alt Linked Embed code callback
 * @param ARRAY $photo
 * @return string
 */
function photo_bb_code_alt_linked($photo)
{
    return "[URL=" . view_photo_link($photo) . "][IMG]%IMAGE_URL%[/IMG][/URL]";
}
Beispiel #2
0
                                 <a href="<?php 
        echo view_photo_link($photo);
        ?>
"><?php 
        echo $photo['photo_title'];
        ?>
</a><br />
                                 <?php 
        echo $photo['photo_description'] ? $photo['photo_description'] : lang('No description available');
        ?>
<br/><br/>
                                 Views: <?php 
        echo $photo['views'];
        ?>
 &ndash; Collection: <a href="<?php 
        echo view_photo_link($photo, 'view_collection');
        ?>
"><?php 
        echo $photo['collection_name'];
        ?>
</a><br />
                                 Dimensions: <?php 
        echo $p['o']['width'] . 'x' . $p['o']['height'];
        ?>
 &ndash; Filesize: <?php 
        echo $p['o']['size']['kilobytes'] . ' kb';
        ?>
                             </td>
                         </tr>
                     </table>
                     <hr size="1" noshade>
/**
 * This function get photo details, setups an array for content.
 * This also serves as an example on how to use custom callback
 * for subscription type
 * 
 * @author Fawaz Tahir <*****@*****.**>
 * @param type $id
 * @return array|boolean
 */
function get_subscription_photo($id)
{
    global $cbphoto, $userquery;
    $photo = $cbphoto->get_photo($id, true);
    if ($photo) {
        $fields = array('photo_description', 'photo_tags', 'collection_id', 'collection_name', 'views', 'file_directory', 'server_url', 'broadcast', 'date_added');
        $fields = get_photo_fields($fields);
        foreach ($fields as $field) {
            if ($field == 'photo_details') {
                continue;
            }
            $details[$field] = $photo[$field];
        }
        $details['title'] = $photo['photo_title'];
        $details['description'] = $photo['photo_descritpion'];
        $details['tags'] = tags($photo['photo_tags'], "photos");
        $details['heading'] = sprintf(lang('<a href="%s">%s</a> added a new photo in <a href="%s">%s</a>'), $userquery->profile_link($photo), name($photo), collection_links($photo), $photo['collection_name']);
        $details['link'] = view_photo_link($photo);
        $details['thumb'] = get_image_url($photo, 'm');
        return $details;
    }
    return false;
}