コード例 #1
0
         if ($attachment_File) {
             // checkbox should be checked only if the corresponding file id is in the final attachments array
             $checked = in_array($attachment_ID, $final_attachments);
             $list_options[] = array('preview_attachment' . $attachment_ID, 1, '', $checked, false, $attachment_File->get('name'));
         }
     }
     if (!empty($list_options)) {
         // display list
         $Form->checklist($list_options, 'comment_attachments', T_('Attached files'));
     }
     // memorize all attachments ids
     $Form->hidden('preview_attachments', $comment_attachments);
 }
 if ($Item->can_attach()) {
     // Display attach file input field
     $Form->input_field(array('label' => T_('Attach files'), 'note' => '<br />' . get_upload_restriction(), 'name' => 'uploadfile[]', 'type' => 'file', 'size' => '30'));
 }
 $comment_options = array();
 if (!is_logged_in(false)) {
     // User is not logged in:
     $comment_options[] = '<label><input type="checkbox" class="checkbox" name="comment_cookies" tabindex="7"' . ($comment_cookies ? ' checked="checked"' : '') . ' value="1" /> ' . T_('Remember me') . '</label>' . ' <span class="note">(' . T_('For my next comment on this site') . ')</span>';
     // TODO: If we got info from cookies, Add a link called "Forget me now!" (without posting a comment).
     $msgform_class_start = '';
     $msgform_class_end = '';
     if ($email_is_detected) {
         // Set a class when comment contains a email
         $msgform_class_start = '<div class="comment_recommended_option">';
         $msgform_class_end = '</div>';
     }
     $comment_options[] = $msgform_class_start . '<label><input type="checkbox" class="checkbox" name="comment_allow_msgform" tabindex="8"' . ($comment_allow_msgform ? ' checked="checked"' : '') . ' value="1" /> ' . T_('Allow message form') . '</label>' . ' <span class="note">(' . T_('Allow users to contact me through a message form -- Your email will <strong>not</strong> be revealed!') . ')</span>' . $msgform_class_end;
     // TODO: If we have an email in a cookie, Add links called "Add a contact icon to all my previous comments" and "Remove contact icon from all my previous comments".
コード例 #2
0
 * @copyright (c)2003-2016 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package evoskins
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $cookie_name, $cookie_email, $cookie_url;
global $comment_allowed_tags;
global $comment_cookies, $comment_allow_msgform;
global $checked_attachments;
// Set this var as global to use it in the method $Item->can_attach()
global $PageCache, $Session;
global $Blog, $dummy_fields;
// Default params:
$params = array_merge(array('disp_comment_form' => true, 'form_title_start' => '<div class="' . ($Session->get('core.preview_Comment') ? 'panel-danger' : '') . '">' . '<h4 class="comment-form--title"><strong>', 'form_title_end' => '</strong></h4><div class="comment-form--body">', 'form_title_text' => T_('Leave A Comment'), 'form_comment_text' => T_('Comment'), 'form_submit_text' => T_('Post comment'), 'form_params' => array('comments_disabled_before' => '<p class="alert alert-warning">', 'comments_disabled_after' => '</p>'), 'policy_text' => '', 'author_link_text' => 'name', 'textarea_lines' => 10, 'default_text' => '', 'preview_block_start' => '', 'preview_start' => '<div class="evo_comment evo_comment__preview panel panel-warning" id="comment_preview">', 'comment_template' => '_item_comment.inc.php', 'preview_end' => '</div>', 'preview_block_end' => '', 'before_comment_error' => '<p><em>', 'comment_closed_text' => '#', 'after_comment_error' => '</em></p>', 'before_comment_form' => '', 'after_comment_form' => '</div></div>', 'form_comment_redirect_to' => $Item->get_feedback_url($disp == 'feedback-popup', '&'), 'comment_image_size' => 'fit-1280x720', 'comment_attach_info' => get_icon('help', 'imgtag', array('data-toggle' => 'tooltip', 'data-placement' => 'bottom', 'data-html' => 'true', 'title' => htmlspecialchars(get_upload_restriction(array('block_after' => '', 'block_separator' => '<br /><br />'))))), 'comment_mode' => ''), $params);
$comment_reply_ID = param('reply_ID', 'integer', 0);
$email_is_detected = false;
// Used when comment contains an email strings
// Consider comment attachments list empty
$comment_attachments = '';
// Default renderers:
$comment_renderers = array('default');
/*
 * Comment form:
 */
$section_title = $params['form_title_start'] . $params['form_title_text'] . $params['form_title_end'];
if ($params['disp_comment_form'] && $Item->can_comment($params['before_comment_error'], $params['after_comment_error'], '#', $params['comment_closed_text'], $section_title, $params)) {
    // We want to display the comments form and the item can be commented on:
    echo $params['before_comment_form'];
    // INIT/PREVIEW:
コード例 #3
0
			</script>

			<p class="uploadfileinputs"><a href="#" onclick="addAnotherFileInput(); return false;" class="small"><?php 
echo T_('Add another file');
?>
</a></p>

			<div class="upload_foot">
				<input type="submit" value="<?php 
echo format_to_output(T_('Upload to server now'), 'formvalue');
?>
" class="ActionButton btn btn-primary" >

				<p class="note">
					<?php 
echo get_upload_restriction();
?>
				</p>
			</div>

		</td>
		</tr>
	</tbody>
</table>


<?php 
$Widget->disp_template_raw('block_end');
$Form->end_form();
// End payload block:
$this->disp_payload_end();
コード例 #4
0
if (!empty($cat)) {
    // Display breadcrumbs if some category is selected
    skin_widget(array('widget' => 'breadcrumb_path', 'block_start' => '<nav><ol class="breadcrumb">', 'block_end' => '</ol></nav>', 'separator' => '', 'item_mask' => '<li><a href="$url$">$title$</a></li>', 'item_active_mask' => '<li class="active">$title$</li>'));
}
?>

			<?php 
// ------------------------ TITLE FOR THE CURRENT REQUEST ------------------------
request_title(array('title_before' => '<h1 class="page_title">', 'title_after' => '</h1>', 'title_single_disp' => false, 'title_page_disp' => false, 'format' => 'htmlbody', 'category_text' => '', 'categories_text' => '', 'catdir_text' => '', 'front_text' => '', 'posts_text' => '', 'register_text' => '', 'login_text' => '', 'lostpassword_text' => '', 'account_activation' => '', 'msgform_text' => '', 'user_text' => '', 'users_text' => '', 'display_edit_links' => false));
// ----------------------------- END OF REQUEST TITLE ----------------------------
?>


	<?php 
// -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
skin_include('$disp$', array('comment_start' => '<div class="evo_comment panel panel-default">', 'comment_end' => '</div>', 'comment_post_before' => '<span class="panel-title in-response">', 'comment_post_after' => '</span>', 'comment_title_before' => '<div class="panel-heading">', 'comment_title_after' => '<div class="clearfix"></div></div><div class="panel-body">', 'comment_avatar_before' => '<div class="evo_comment_avatar">', 'comment_avatar_after' => '</div>', 'comment_rating_before' => '<div class="evo_comment_rating">', 'comment_rating_after' => '</div>', 'comment_text_before' => '<div class="evo_comment_text">', 'comment_text_after' => '</div>', 'comment_info_before' => '<div class="evo_comment_footer clear text-muted"><small>', 'comment_info_after' => '</small></div></div>', 'comment_attach_info' => get_icon('help', 'imgtag', array('data-toggle' => 'tooltip', 'data-placement' => 'bottom', 'data-html' => 'true', 'title' => htmlspecialchars(get_upload_restriction(array('block_after' => '', 'block_separator' => '<br /><br />')))))));
// Note: you can customize any of the sub templates included here by
// copying the matching php file into your skin directory.
// ------------------------- END OF MAIN CONTENT TEMPLATE ---------------------------
?>


			</main>

		</div><!-- .col -->

		<?php 
if ($Skin->is_left_navigation_visible()) {
    // Display a left column with navigation only for several pages
    ?>
			<!-- =================================== START OF SIDEBAR =================================== -->
コード例 #5
0
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package evoskins
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $cookie_name, $cookie_email, $cookie_url;
global $comment_allowed_tags;
global $comment_cookies, $comment_allow_msgform;
global $checked_attachments;
// Set this var as global to use it in the method $Item->can_attach()
global $PageCache;
global $Blog, $dummy_fields;
// Default params:
$params = array_merge(array('disp_comment_form' => true, 'form_title_start' => '<h3>', 'form_title_end' => '</h3>', 'form_title_text' => T_('Leave a comment'), 'form_comment_text' => T_('Comment text'), 'form_submit_text' => T_('Send comment'), 'form_params' => array(), 'policy_text' => '', 'author_link_text' => 'name', 'textarea_lines' => 10, 'default_text' => '', 'preview_block_start' => '', 'preview_start' => '<div class="bComment" id="comment_preview">', 'comment_template' => '_item_comment.inc.php', 'preview_end' => '</div>', 'preview_block_end' => '', 'before_comment_error' => '<p><em>', 'comment_closed_text' => '#', 'after_comment_error' => '</em></p>', 'before_comment_form' => '', 'after_comment_form' => '', 'form_comment_redirect_to' => $Item->get_feedback_url($disp == 'feedback-popup', '&'), 'comment_image_size' => 'fit-400x320', 'comment_attach_info' => '<br />' . get_upload_restriction(), 'comment_mode' => ''), $params);
$comment_reply_ID = param('reply_ID', 'integer', 0);
$email_is_detected = false;
// Used when comment contains an email strings
// Consider comment attachments list empty
$comment_attachments = '';
/*
 * Comment form:
 */
$section_title = $params['form_title_start'] . $params['form_title_text'] . $params['form_title_end'];
if ($params['disp_comment_form'] && $Item->can_comment($params['before_comment_error'], $params['after_comment_error'], '#', $params['comment_closed_text'], $section_title, $params)) {
    // We want to display the comments form and the item can be commented on:
    echo $params['before_comment_form'];
    // INIT/PREVIEW:
    if ($Comment = $Session->get('core.preview_Comment')) {
        // We have a comment to preview