Esempio n. 1
0
    ?>
</div>
		<div class="qHCol qEdit"></div>
		<div class="qHCol qDelete"></div>
		<div class="clr">&nbsp;</div>
	</div>
	
	
	<ul id="photoq">
	
		<?php 
    for ($i = 0; $i < $qLength; $i++) {
        //get the i-th photo from the queue
        $currentPhoto =& $this->_queue->getQueuedPhoto($i);
        //construct the url to the fullsize image
        $imgUrl = PhotoQHelper::getRelUrlFromPath($currentPhoto->getPath());
        $path = $currentPhoto->getAdminThumbURL();
        $deleteLink = 'edit.php?page=whoismanu-photoq.php&action=delete&entry=' . $currentPhoto->getId();
        $deleteLink = function_exists('wp_nonce_url') ? wp_nonce_url($deleteLink, 'photoq-deleteQueueEntry' . $currentPhoto->getId()) : $deleteLink;
        ?>
	
			<li id="photoq-<?php 
        echo $currentPhoto->getId();
        ?>
" class='photoqEntry'>
				<div class="qCol qPosition"><?php 
        echo $i + 1;
        ?>
</div>
				<div class="qCol qThumb">
					<a class="img_link" href="<?php 
Esempio n. 2
0
 /**
  * Display current watermark <img> tag or the string 'None' if there is no watermark.
  *
  */
 function showCurrentWatermark()
 {
     $path = get_option("wimpq_watermark");
     if (!$path) {
         _e('None', 'PhotoQ');
     } else {
         $size = getimagesize($path);
         echo '<img class="watermark" width="' . $size[0] . '" height="' . $size[1] . '" alt="PhotoQ Watermark" src="../' . PhotoQHelper::getRelUrlFromPath($path) . '" />';
     }
 }
Esempio n. 3
0
 function getUrl()
 {
     $siteUrl = preg_replace('/\\/*$/', '', get_option('siteurl'));
     return $siteUrl . "/" . PhotoQHelper::getRelUrlFromPath($this->_path);
 }
Esempio n. 4
0
    /**
     * Shows the edit/enter info form for one photo.
     *
     * @param mixed $this	The photo to be edited.
     */
    function showPhotoEditForm()
    {
        global $current_user;
        //if we have post values (common info) we take those instead of db value.
        $descr = attribute_escape($_POST['img_descr']) ? attribute_escape(stripslashes($_POST['img_descr'])) : $this->getDescription();
        $tags = attribute_escape($_POST['tags_input']) ? attribute_escape(stripslashes($_POST['tags_input'])) : $this->getTagString();
        $selectedAuthor = attribute_escape($_POST['img_author']) ? attribute_escape(stripslashes($_POST['img_author'])) : $this->getAuthor();
        $fullSizeUrl = PhotoQHelper::getRelUrlFromPath($this->getPath());
        // output photo information form
        $path = $this->getAdminThumbURL($this->_oc->getValue('photoQAdminThumbs-Width'), $this->_oc->getValue('photoQAdminThumbs-Height'));
        $authors = get_editable_user_ids($current_user->id);
        ?>
		
		<div class="main info_group">
			<div class="info_unit"><a class="img_link" href="<?php 
        echo $fullSizeUrl;
        ?>
" title="Click to see full-size photo" target="_blank"><img src='<?php 
        echo $path;
        ?>
' alt='<?php 
        echo $this->getName();
        ?>
' /></a></div>
			<div class="info_unit"><label><?php 
        _e('Title', 'PhotoQ');
        ?>
:</label><br /><input type="text" name="img_title[]" size="30" value="<?php 
        echo $this->getTitle();
        ?>
" /></div>
			<div class="info_unit"><label><?php 
        _e('Description', 'PhotoQ');
        ?>
:</label><br /><textarea style="font-size:small;" name="img_descr[]" cols="30" rows="3"><?php 
        echo $descr;
        ?>
</textarea></div>
			
			<?php 
        //this makes it retro-compatible
        if (function_exists('get_tags_to_edit')) {
            ?>
			<div class="info_unit"><label><?php 
            _e('Tags (separate multiple tags with commas: cats, pet food, dogs)', 'PhotoQ');
            ?>
:</label><br /><input type="text" name="tags_input[]" class="tags-input" size="50" value="<?php 
            echo $tags;
            ?>
" /></div>
			<?php 
        }
        ?>
			
			<div class="info_unit"><label><?php 
        _e('Slug', 'PhotoQ');
        ?>
:</label><br /><input type="text" name="img_slug[]" size="30" value="<?php 
        echo $this->getSlug();
        ?>
" /></div>
			<div class="info_unit"><label><?php 
        _e('Post Author', 'PhotoQ');
        ?>
:</label><?php 
        wp_dropdown_users(array('include' => $authors, 'name' => 'img_author[]', 'multi' => true, 'selected' => $selectedAuthor));
        ?>
</div>
			<input type="hidden" name="img_id[]" value="<?php 
        echo $this->getId();
        ?>
" />
			<input type="hidden" name="img_position[]" value="<?php 
        echo $this->getPosition();
        ?>
" />
		</div>
		<?php 
        PhotoQHelper::showMetaFieldList($this->getId());
        ?>
		<div class="wimpq_cats info_group"><?php 
        PhotoQHelper::showCategoryCheckboxList($this->getId(), $this->_oc->getValue('qPostDefaultCat'), $this->getSelectedCats());
        ?>
</div>
		<div class="clr"></div>
	<?php 
    }
Esempio n. 5
0
 function getUrl()
 {
     return PhotoQHelper::getRelUrlFromPath($this->_path);
 }