Ejemplo n.º 1
0
            echo 'class="field-error" ';
        }
        ?>
value="<?php 
        echo plogger_get_form_author();
        ?>
" size="28" tabindex="1" />
						<label for="author"><?php 
        echo plog_tr('Name');
        ?>
</label> (<?php 
        echo plog_tr('required');
        ?>
)
						<input type="hidden" name="parent" value="<?php 
        echo plogger_get_picture_id();
        ?>
" />
						<input type="hidden" name="redirect" value="<?php 
        echo str_replace('&', '&amp;', $_SERVER['REQUEST_URI']);
        ?>
#comment-post" />
						<?php 
        echo plogger_get_form_token();
        ?>
					</p>
					<p>
						<input type="text" name="email" id="email" <?php 
        if (plogger_is_form_error('email')) {
            echo 'class="field-error" ';
        }
Ejemplo n.º 2
0
px; height: <?php 
        echo $div_height;
        ?>
px;">
						<a href="<?php 
        echo plogger_get_picture_url();
        ?>
"><?php 
        echo $imgtag;
        ?>
</a><br />
						<span><?php 
        echo plogger_get_picture_caption();
        ?>
 <?php 
        echo plogger_download_checkbox(plogger_get_picture_id());
        ?>
</span>
					</div><!-- /tag -->
				</li><!-- /thumbnail -->
<?php 
    }
    ?>
			</ul><!-- /slides -->
<?php 
} else {
    ?>
			<div id="no-pictures-msg">
				<h2><?php 
    echo plog_tr('No Images');
    ?>
Ejemplo n.º 3
0
function plog_picture_manager($id, $from, $limit)
{
    plogger_init_pictures(array('type' => 'album', 'value' => $id, 'from' => $from, 'limit' => $limit));
    // create javascript initiation function for editable elements
    if (plogger_has_pictures()) {
        $output .= '<script type="text/javascript">';
        $output .= "Event.observe(window, 'load', init, false);";
        $output .= "function init() {";
        while (plogger_has_pictures()) {
            plogger_load_picture();
            $output .= "makeEditable('picture-description-" . plogger_get_picture_id() . "'); makeEditable('picture-caption-" . plogger_get_picture_id() . "');";
        }
        $output .= "}";
        $output .= '</script>';
    }
    // reset the picture array
    plogger_init_pictures(array('type' => 'album', 'value' => $id, 'from' => $from, 'limit' => $limit));
    if (plogger_has_pictures()) {
        $output .= '<table style="width: 100%" cellpadding="4">
			   <col style="width: 15px;"/><tr class="header"><td class="table-header-left">&nbsp;</td>';
        $output .= '<td width="65" class="table-header-middle">' . plog_tr('Thumb') . '</td>';
        $output .= '<td class="table-header-middle">' . plog_tr('Filename') . '</td>';
        $output .= '<td class="table-header-middle">' . plog_tr('Caption') . '</td>';
        $output .= '<td class="table-header-middle">' . plog_tr('Description') . '</td>';
        $output .= '<td class="table-header-middle">' . plog_tr('Allow comments') . '</td>';
        $output .= '<td class="table-header-right">' . plog_tr('Actions') . '</td></tr>';
        $counter = 0;
        while (plogger_has_pictures()) {
            if ($counter % 2 == 0) {
                $table_row_color = "color-1";
            } else {
                $table_row_color = "color-2";
            }
            $counter++;
            plogger_load_picture();
            $id = plogger_get_picture_id();
            $output .= "<tr class='{$table_row_color}'>";
            $output .= "<td><input type='checkbox' name='selected[]' value='" . $id . "'/></td>";
            $thumbpath = plogger_get_picture_thumb();
            $imgtag = '<div class="img-shadow"><img src="' . $thumbpath . '" title="' . plogger_get_picture_caption() . '" alt="' . plogger_get_picture_caption() . '" /></div>';
            //$target = 'plog-thumbpopup.php?src='.$id;
            //$java = "javascript:this.ThumbPreviewPopup('$target')";
            $output .= '<td><a href="' . plogger_get_picture_thumb(THUMB_LARGE) . '" rel="lightbox" title="' . plogger_get_picture_caption() . '">' . $imgtag . '</a></td>';
            $output .= "<td><strong><a class='folder' href='?level=comments&amp;id=" . $id . "'>" . basename(plogger_get_source_picture_path()) . "</a></strong></td>";
            $output .= "<td><p id=\"picture-caption-" . plogger_get_picture_id() . "\">" . plogger_get_picture_caption() . "&nbsp;</p></td>";
            $output .= "<td><p id=\"picture-description-" . plogger_get_picture_id() . "\">" . plogger_get_picture_description() . "&nbsp;</p></td>";
            $allow_comments = 1 == plogger_picture_allows_comments() ? "Yes" : "No";
            $output .= "<td>" . $allow_comments . "</td>";
            $output .= '<td><a href="?action=edit-picture&amp;id=' . $id;
            if (isset($_GET["entries_per_page"])) {
                $output .= '&amp;entries_per_page=' . intval($_GET["entries_per_page"]);
            }
            if (isset($_GET["plog_page"])) {
                $output .= '&amp;plog_page=' . intval($_GET["plog_page"]);
            }
            $output .= '"><img style="display:inline" src="../graphics/edit.gif" alt="' . plog_tr('Edit') . '" title="' . plog_tr('Edit') . '"></a>';
            $parent_id = $_REQUEST["id"];
            $output .= '<a href="?action=1&amp;selected%5B%5D=' . $id . '&amp;level=pictures&amp;delete_checked=1&amp;id=' . $parent_id;
            if (isset($_GET["entries_per_page"])) {
                $output .= '&amp;entries_per_page=' . intval($_GET["entries_per_page"]);
            }
            if (isset($_GET["plog_page"])) {
                $output .= '&amp;plog_page=' . intval($_GET["plog_page"]);
            }
            $output .= '"
		onClick="return confirm(\'' . plog_tr('Are you sure you want to delete this item?') . '\');"><img style="display:inline" src="../graphics/x.gif" alt="' . plog_tr('Delete') . '" 					title="' . plog_tr('Delete') . '"></a></td>';
            $output .= "</tr>";
        }
        $output .= '<tr class="header"><td colspan="7"></td></tr></table>';
        $output .= "</table>";
    } else {
        $output .= '<p class="actions">' . sprintf(plog_tr('Sadly, there are no pictures yet.  Why don\'t you <a href="%s">upload some?</a>'), 'plog-upload.php') . '</p>';
    }
    return $output;
}
Ejemplo n.º 4
0
        print "<p>No comments yet.</p>";
    }
    if (plogger_picture_allows_comments()) {
        if (plogger_comment_post_error()) {
            print "<p class='errors'>Comment did not post!  Please fill in required fields.</p>";
        }
        if (plogger_comment_moderated()) {
            print "<p class='actions'>Your comment was placed in moderation, please wait for approval.  \r\n\t\t\tDo not submit comment again!</p>";
        }
        global $config;
        print '<a name="comment-post"></a><h2 class="comment-heading">Post a comment:</h2>
		      <form action="' . $config["gallery_url"] . 'plog-comment.php" method="post" id="commentform">
		      <p>
			<input type="text" name="author" id="author" class="textarea" value="" size="28" tabindex="1" />
			<label for="author">Name</label> (required) <input type="hidden" name="comment_post_ID" value="40" />
			<input type="hidden" name="parent" value="' . plogger_get_picture_id() . '" />
		      </p>
		      <p>
			<input type="text" name="email" id="email" value="" size="28" tabindex="2" />
			<label for="email">E-mail</label> (required, but not publicly displayed)
		      </p>
		      <p>
			<input type="text" name="url" id="url" value="" size="28" tabindex="3" />
			<label for="url">Your Website (optional)</label>
		      </p>
		      <p>
			<label for="comment">Your Comment</label>
			<br /><textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea>
		      </p>
		      <p>
			<input class="submit" name="submit" type="submit" tabindex="5" value="Post Comment!" />
Ejemplo n.º 5
0
if (plogger_has_pictures()) {
    while (plogger_has_pictures()) {
        plogger_load_picture();
        print '<div id="inner_wrapper"> <div id="big-picture-container">
			   <div><h2 class="date">' . plogger_get_picture_date() . '</h2></div>';
        $picture_caption = trim(plogger_get_picture_caption());
        if ($picture_caption != '' || !isset($picture_caption)) {
            echo '<div><h2 id="picture_caption">' . $picture_caption . '</h2></div>';
        }
        // generate XHTML with thumbnail and link to picture view.
        $imgtag = '<img class="photos-large" src="' . plogger_get_picture_thumb(THUMB_LARGE) . '" title="' . $capt . '" alt="' . $capt . '" />';
        $detail_link = plogger_get_detail_link();
        $prev_link = plogger_get_prev_picture_link();
        $next_link = plogger_get_next_picture_link();
        print '<div id="nav-link-img-prev">' . $prev_link . '</div>
			   <div id="nav-link-img-next">' . $next_link . '</div>';
        print '<div id="picture-holder">
					<a accesskey="v" href="' . plogger_get_source_picture_url() . '">' . $imgtag . '</a>
			   </div>';
        print '<p id="picture_description">' . plogger_get_picture_description() . '</p>';
        print '
		<div id="exif-toggle-container"><div id="exif_toggle">' . $detail_link . '</div></div>';
        print generate_exif_table(plogger_get_picture_id());
        // display comments for selected picture
        print plogger_display_comments();
        print '</div>';
    }
} else {
    print "No such image";
}
plogger_get_footer();
function plog_picture_manager($id, $from, $limit)
{
    global $config, $empty;
    $output = '';
    plogger_init_pictures(array('type' => 'album', 'value' => $id, 'from' => $from, 'limit' => $limit, 'sortby' => !empty($config['default_sortby']) ? $config['default_sortby'] : 'id', 'sortdir' => !empty($config['default_sortdir']) ? $config['default_sortdir'] : 'ASC'));
    // Create javascript initiation function for editable elements
    if (plogger_has_pictures()) {
        $output .= "\n\t\t" . '<script type="text/javascript">';
        $output .= "\n\t\t\t" . 'Event.observe(window, \'load\', init, false);';
        $output .= "\n\t\t\t" . 'function init() {' . "\n";
        while (plogger_has_pictures()) {
            plogger_load_picture();
            $output .= "\t\t\t\tmakeEditable('picture-description-" . plogger_get_picture_id() . "');\n\t\t\t\tmakeEditable('picture-caption-" . plogger_get_picture_id() . "');\n";
        }
        $output .= "\t\t\t" . '}';
        $output .= "\n\t\t" . '</script>';
    }
    // Reset the picture array
    plogger_init_pictures(array('type' => 'album', 'value' => $id, 'from' => $from, 'limit' => $limit, 'sortby' => !empty($config['default_sortby']) ? $config['default_sortby'] : 'id', 'sortdir' => !empty($config['default_sortdir']) ? $config['default_sortdir'] : 'ASC'));
    if (plogger_has_pictures()) {
        $allow_comment = $config['allow_comments'] ? plog_tr('Allow Comments') : '&nbsp;';
        $output .= "\n\t\t" . '<table style="width: 100%;" cellpadding="3" cellspacing="0">
			<col style="width: 15px;" />
			<tr class="header">
				<th class="table-header-left align-center width-15"><input name="allbox" type="checkbox" onclick="checkToggle(document.getElementById(\'contentList\'));" /></th>
				<th class="table-header-middle align-center width-150">' . plog_tr('Thumb') . '</th>
				<th class="table-header-middle align-left width-175">' . plog_tr('Filename') . '</th>
				<th class="table-header-middle align-left">' . plog_tr('Caption') . '/' . plog_tr('Description') . '</th>
				<th class="table-header-middle align-center width-125">' . $allow_comment . '</th>
				<th class="table-header-right align-center width-100">' . plog_tr('Actions') . '</th>
			</tr>';
        $counter = 0;
        while (plogger_has_pictures()) {
            if ($counter % 2 == 0) {
                $table_row_color = 'color-1';
            } else {
                $table_row_color = 'color-2';
            }
            $counter++;
            plogger_load_picture();
            $id = plogger_get_picture_id();
            $output .= "\n\t\t\t" . '<tr class="' . $table_row_color . '">';
            $output .= "\n\t\t\t\t" . '<td class="align-center width-15"><p class="margin-5"><input type="checkbox" name="selected[]" value="' . $id . '" /></p></td>';
            $thumbpath = plogger_get_picture_thumb();
            $imgtag = '<img src="' . $thumbpath . '" title="' . plogger_get_picture_caption('clean') . '" alt="' . plogger_get_picture_caption('clean') . '" />';
            $output .= "\n\t\t\t\t" . '<td class="align-center width-150"><div class="img-shadow"><a href="' . plogger_get_picture_thumb(THUMB_LARGE) . '" rel="lightbox" title="' . plogger_get_picture_caption('code') . '">' . $imgtag . '</a></div></td>';
            $output .= "\n\t\t\t\t" . '<td class="align-left width-175"><p class="margin-5"><strong><a href="' . $_SERVER['PHP_SELF'] . '?level=comments&amp;id=' . $id . '">' . basename(plogger_get_source_picture_path()) . '</a></strong><br /><br /><span>' . sprintf(plog_tr('Comments: %d'), plogger_picture_comment_count()) . '</span></p></td>';
            $output .= "\n\t\t\t\t" . '<td class="align-left vertical-top">
					<p class="margin-5 no-margin-bottom"><strong>' . plog_tr('Caption') . ':</strong></p>
					<p class="margin-5 no-margin-top" id="picture-caption-' . plogger_get_picture_id() . '">' . plogger_get_picture_caption() . '</p>
					<p class="margin-5 no-margin-bottom"><strong>' . plog_tr('Description') . ':</strong></p>
					<p class="margin-5 no-margin-top" id="picture-description-' . plogger_get_picture_id() . '">' . plogger_get_picture_description() . '</p>
				</td>';
            if ($config['allow_comments']) {
                $allow_comments = 1 == plogger_picture_allows_comments() ? plog_tr('Yes') : plog_tr('No');
            } else {
                $allow_comments = '&nbsp;';
            }
            $output .= "\n\t\t\t\t" . '<td class="align-center width-125"><p class="margin-5">' . $allow_comments . '</p></td>';
            $output .= "\n\t\t\t\t" . '<td class="align-center width-100"><p class="margin-5"><a href="?action=edit-picture&amp;id=' . $id;
            if (isset($_GET['entries_per_page'])) {
                $output .= '&amp;entries_per_page=' . intval($_GET['entries_per_page']);
            }
            if (isset($_GET['plog_page'])) {
                $output .= '&amp;plog_page=' . intval($_GET['plog_page']);
            }
            $output .= '"><img style="display: inline;" src="' . $config['gallery_url'] . 'plog-admin/images/edit.gif" alt="' . plog_tr('Edit') . '" title="' . plog_tr('Edit') . '" /></a>';
            $parent_id = $_REQUEST['id'];
            $output .= '&nbsp;&nbsp;&nbsp;<a href="?action=move-delete&amp;selected%5B%5D=' . $id . '&amp;level=pictures&amp;delete_checked=1&amp;id=' . $parent_id;
            if (isset($_GET['plog_page'])) {
                $output .= '&amp;plog_page=' . intval($_GET['plog_page']);
            }
            $output .= '" onclick="return confirm(\'' . plog_tr('Are you sure you want to delete this item?') . '\');"><img style="display: inline;" src="' . $config['gallery_url'] . 'plog-admin/images/x.gif" alt="' . plog_tr('Delete') . '" title="' . plog_tr('Delete') . '" /></a></p></td>';
            $output .= "\n\t\t\t" . '</tr>';
        }
        $output .= "\n\t\t\t" . '<tr class="footer">
				<td class="align-left invert-selection" colspan="6"><a href="#" onclick="checkToggle(document.getElementById(\'contentList\')); return false;">' . plog_tr('Toggle Checkbox Selection') . '</a></td>
			</tr>
		</table>' . "\n";
    } else {
        $output .= "\n\n\t\t" . '<p class="actions">' . sprintf(plog_tr('Sadly, there are no pictures yet. Why don\'t you <a title="upload images" href="%s" style="font-weight: bold;">upload some</a>?'), 'plog-upload.php') . '</p>' . "\n";
        $empty = true;
    }
    return $output;
}