当前位置: 首页>>代码示例>>PHP>>正文


PHP comments_list函数代码示例

本文整理汇总了PHP中comments_list函数的典型用法代码示例。如果您正苦于以下问题:PHP comments_list函数的具体用法?PHP comments_list怎么用?PHP comments_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了comments_list函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render_entries

function render_entries($entries, $options)
{
    $content .= '<ul class="group_entries">' . "\n";
    foreach ($entries as $entry) {
        $options['user_id'] = $entry['user_id'];
        $content .= message_top($options);
        $content .= '<div style="border-bottom: 1px solid #ababab;">' . "\n";
        $content .= '<span class="timestamp">' . fix_time($entry['timestamp']) . '</span>' . "\n";
        $content .= '<h2 style="display: inline;">' . $entry['header'] . '</h2> - <a href="/traffa/profile.php?id=' . $entry['user_id'] . '">' . $entry['username'] . '</a> ' . "\n";
        $content .= $entry['gender'];
        $content .= date_get_age($entry['birthday']);
        $content .= '<p>' . "\n";
        $content .= nl2br(html_entity_decode($entry['content'])) . "\n";
        $content .= '</p>' . "\n";
        $content .= '</div>' . "\n";
        // ----START----
        $content .= $_GET['action'] != 'show' ? '<a href="/hamsterpaj/hamsterblogg.php?action=show&id=' . $entry['id'] . '">Kommentera &raquo;</a>' : '<a href="/hamsterpaj/hamsterblogg.php">&laquo; Tillbaka</a>';
        // ----END------
        $content .= message_bottom();
        if ($options['enable_comments'] == true) {
            $content .= rounded_corners_top();
            $content .= '<label>Kommentera:</label>' . "\n";
            $content .= comments_input_draw($entry['id'], 'hamsterblog');
            $content .= rounded_corners_bottom();
            $content .= '<div style="clear: both;"></div>' . "\n";
            $content .= comments_list($entry['id'], 'hamsterblog');
        }
    }
    $content .= '</ul>' . "\n";
    return $content;
}
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:31,代码来源:hamsterblog.lib.php

示例2: comments_list

 function comments_list()
 {
     if (!$_POST) {
         exit("ERROR: you must send \$ POST array. Read the docs");
     }
     //p($_POST);
     $comments = array();
     if ($_POST['to_table'] == false) {
         $_POST['to_table'] = $_POST['for'];
     }
     if ($_POST['to_table_id'] == false) {
         $_POST['to_table_id'] = $_POST['id'];
     }
     if ($_POST['to_table_id'] == false) {
         $_POST['to_table_id'] = $_POST['content_id'];
     }
     $comments['to_table'] = CI::model('core')->securityDecryptString($_POST['to_table']);
     $comments['to_table_id'] = CI::model('core')->securityDecryptString($_POST['to_table_id']);
     $comments['display'] = CI::model('core')->securityDecryptString($_POST['display']);
     $comments['to_table'] = CI::model('core')->guessDbTable($comments['to_table']);
     //print_r ( $comments );
     if ($comments['display'] == false) {
         $comments['display'] = 'default';
     }
     comments_list($content_id = $comments['to_table_id'], $display = $comments['display'], $for = $comments['to_table'], $display_params = array());
     /*	$comments = CI::model('comments')->commentsGet ( $comments );
     
     		$this->template ['comments'] = $comments;
     
     		$this->load->vars ( $this->template );
     		$layout = $this->load->file ( APPPATH . 'controllers/api/views/' . __FUNCTION__ . '.php', true );
     
     
     
     		$layout = CI::model('content')->applyGlobalTemplateReplaceables ( $layout );
     
     		CI::library('output')->set_output ( $layout );*/
     //var_dump ($content_filename_pre, $files );
 }
开发者ID:Gninety,项目名称:Microweber,代码行数:39,代码来源:comments.php

示例3: photos_display

function photos_display($photos, $wait_for_image_to_load)
{
    foreach ($photos as $photo) {
        $output .= '<div class="photo_full">' . "\n";
        $output .= '<div class="passepartout">' . "\n";
        $output .= '<p>' . $photo['date'] . ': <a href="/traffa/photos.php?ajax&user_id=' . $photo['user'] . '&image_id=' . $photo['id'] . '#photo" title="Länk till bilden">' . $photo['description'] . '</a><a href="/hamsterpaj/abuse.php?report_type=photo&reference_id=' . $photo['id'] . '" class="abuse_button"><img src="http://images.hamsterpaj.net/abuse.png" /></a>';
        if ($_SESSION['login']['id'] == 774586) {
            $output .= ' <img src="http://images.hamsterpaj.net/abuse.png" alt="Din mamma ;)" onclick=" /><br style="clear:both;" />';
        }
        $output .= '</p>' . "\n";
        $output .= '<span class="loading" id="loading"></span>' . "\n";
        $output .= '<img id="tha_image" src="' . IMAGE_URL . 'photos/full/' . floor($photo['id'] / 5000) . '/' . $photo['id'] . '.jpg" />';
        $output .= '</div>' . "\n";
        $output .= '</div>' . "\n";
        $comment_list_options = array();
        $comment_list_options['photo_owner'] = $photo['user'];
        if ($_SESSION['login']['id'] == $photo['user']) {
            //$comment_list_options['show_admin_controls'] = true;
            $categories = photos_get_categories(array('user' => $photo['user']));
            $output .= rounded_corners_top(array('color' => 'blue_deluxe'));
            $output .= '<form class="photo_edit" method="post">' . "\n";
            $output .= '<input type="hidden" name="action" value="update" />' . "\n";
            $output .= '<input type="hidden" name="photo_id" value="' . $photo['id'] . '" />' . "\n";
            $output .= '<input type="text" name="description" value="' . addslashes($photo['description']) . '" class="textbox" />' . "\n";
            $output .= '<select name="category" class="photo_category_selector">' . "\n";
            foreach ($categories as $category) {
                $selected = $photo['category'] == $category['id'] ? ' selected="selected"' : '';
                $output .= '<option value="' . $category['name'] . '"' . $selected . '>' . $category['name'] . '</option>' . "\n";
            }
            $output .= '<option value="new_category">Ny kategori</option>' . "\n";
            $output .= '</select>' . "\n";
            $output .= '<input type="submit" value="Uppdatera" class="button_80" />' . "\n";
            $output .= '</form>' . "\n";
            $output .= '<form class="photo_delete" method="post" action="/traffa/photos.php">' . "\n";
            $output .= '<input type="hidden" name="action" value="delete" />' . "\n";
            $output .= '<input type="hidden" name="photo_id" value="' . $photo['id'] . '" />' . "\n";
            $output .= '<input type="submit" value="Radera" class="photo_delete" />' . "\n";
            $output .= '</form>' . "\n";
            $output .= rounded_corners_bottom();
            // KOMMENTERING FÖR ÄGAREN
            $output .= rounded_corners_top(array('color' => 'blue_deluxe'));
            $output .= 'Du kan inte längre kommentera i det här fotoalbumet. Det beror på att vi håller på att byta ut det mot fotobloggen.';
            $output .= rounded_corners_bottom();
            // BILDTÄVLINGEN
            //$output .= rounded_corners_top(array('color' => 'blue_deluxe'), true);
            //$output .= '<span style="">Rita av en Sysop i paint! kolla in tävlingen <a href="/tavling.php">HÄR</a></span><span style="float: right; margin-top: -14px;">Bild-id: '.$photo['id'].'</span>';
            //$output .= rounded_corners_bottom(array('color' => 'blue_deluxe'), true);
            // END
            /*
            $query = 'UPDATE user_photos SET unread_comments = 0 WHERE id = "' . $photo['id'] . '" LIMIT 1';
            mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
            */
            cache_update_photo_comments();
        } else {
            if (is_privilegied('remove_photo')) {
                $output .= '<form class="photo_delete" method="post" action="/traffa/photos.php">' . "\n";
                $output .= '<input type="hidden" name="action" value="delete" />' . "\n";
                $output .= '<input type="hidden" name="photo_id" value="' . $photo['id'] . '" />' . "\n";
                $output .= '<input type="submit" value="Ta bort bild" class="photos_remove" />' . "\n";
                $output .= '</form>' . "\n";
                /*
                $output .= '';
                $output .= '<button class="button_90">Ta bort bild</button>' . "\n";
                */
            }
            $output .= rounded_corners_top(array('color' => 'blue_deluxe'));
            $output .= 'Du kan inte längre kommentera i det här fotoalbumet. Det beror på att vi håller på att byta ut det mot fotobloggen.';
            $output .= rounded_corners_bottom();
        }
        $output .= comments_list($photo['id'], 'photos', $comment_list_options);
    }
    return $output;
}
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:73,代码来源:photos.lib.php

示例4: comments_input_draw

    $labels[0] = 'Oigenkännlig';
    $labels[1] = 'Inte alls lik';
    $labels[2] = 'Igenkännbar';
    $labels[3] = 'Ganska lik';
    $labels[4] = 'Identisk';
    for ($i = 0; $i < 5; $i++) {
        echo '<button value="' . $i . '" class="button_100" style="margin-right: 20px;" onclick="window.location = \'/hamburgare/test.php?burger_vote=' . $i . '&burger=' . $_SESSION['burger']['current_burger'] . '\';">' . $labels[$i] . '</button>' . "\n";
    }
    echo '<div id="burger_compare">' . "\n";
    echo '<img src="' . IMAGE_URL . 'hamburgers/' . $_SESSION['burger']['current_burger'] . '_ad.jpg" />' . "\n";
    echo '<img src="' . IMAGE_URL . 'hamburgers/' . $_SESSION['burger']['current_burger'] . '_real.jpg" />' . "\n";
    echo '</div>' . "\n";
    echo '<h2>Kommentera burgaren</h2>' . "\n";
    echo comments_input_draw($_SESSION['burger']['current_burger'], 'burger');
    rounded_corners_top();
    echo comments_list($_SESSION['burger']['current_burger'], 'burger');
    rounded_corners_bottom();
} else {
    echo '<p>Går det att känna igen hamburgarna från kedjornas reklambilder? Gissa dig igenom och sätt betyg på 14 hamburgare i vårt hamburger-test!</p>' . "\n";
    if (isset($_GET['burger']) && isset($_GET['burger_vote']) && in_array($_GET['burger_vote'], array(0, 1, 2, 3, 4))) {
        $query = 'UPDATE burgers SET votes = votes + 1, score = score + ' . $_GET['burger_vote'] . ', average_score = score/votes WHERE id = "' . $_GET['burger'] . '"';
        mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
    }
    $query = 'SELECT id FROM burgers WHERE id NOT IN("' . implode('", "', $_SESSION['burger']['seen_burgers']) . '") ORDER BY RAND() LIMIT 1';
    $result = mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
    if (mysql_num_rows($result) == 1) {
        $data = mysql_fetch_assoc($result);
        $_SESSION['burger']['current_burger'] = $data['id'];
        $_SESSION['burger']['seen_burgers'][] = $data['id'];
        echo '<h2>Vilken hamburgare är detta?</h2>' . "\n";
        echo '<img src="' . IMAGE_URL . 'hamburgers/' . $data['id'] . '_real.jpg" id="burger_guess_image" />' . "\n";
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:test.php

示例5: photo_display_full

function photo_display_full($parameters)
{
    event_log_log('photo_display');
    $next_by_day = photo_get_photos(array('limit' => 1, 'photo_taken' => $parameters['image']['photo_taken'], 'order_direction' => 'ASC', 'internal_id_min' => $parameters['image']['internal_id']));
    $next_by_album = photo_get_photos(array('limit' => 1, 'album' => $parameters['image']['album'], 'order_direction' => 'ASC', 'internal_id_min' => $parameters['image']['internal_id']));
    $previous_by_day = photo_get_photos(array('limit' => 1, 'photo_taken' => $parameters['image']['photo_taken'], 'order_direction' => 'DESC', 'internal_id_max' => $parameters['image']['internal_id']));
    $previous_by_album = photo_get_photos(array('limit' => 1, 'album' => $parameters['image']['album'], 'order_direction' => 'DESC', 'internal_id_max' => $parameters['image']['internal_id']));
    echo '<div class="photo_full">' . "\n";
    echo '<div class="head">' . "\n";
    echo '<span class="date">' . $parameters['image']['photo_taken'] . '</span>' . "\n";
    if (strlen($parameters['image']['description']) > 0) {
        echo '<p class="photo_description">' . "\n";
        echo $parameters['image']['description'] . "\n";
        echo '</p>' . "\n";
    }
    echo '</div>' . "\n";
    // Photo with passepartout
    echo '<div class="photo_passepartout_outer">' . "\n";
    echo '<div class="photo_passepartout_inner">' . "\n";
    echo '<img src="' . PHOTO_FULL_IMAGE_URL . floor($parameters['image']['internal_id'] / 5000) . '/' . $parameters['image']['external_id'] . '.jpg" />' . "\n";
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '<div class="foot">' . "\n";
    echo '<div class="next">' . "\n";
    if ($next_by_day[0]['internal_id'] > 0) {
        echo '<a href="/fotoalbum/bild.php?photo=' . $next_by_day[0]['external_id'] . '"><button class="button_110">Samma dag &raquo;</button></a>' . "\n";
    }
    if ($next_by_album[0]['internal_id'] > 0) {
        echo '<a href="/fotoalbum/bild.php?photo=' . $next_by_album[0]['external_id'] . '"><button class="button_110">Samma album &raquo;</button></a>' . "\n";
    }
    echo '</div>' . "\n";
    echo '<div class="previous">' . "\n";
    if ($previous_by_day[0]['internal_id'] > 0) {
        echo '<a href="/fotoalbum/bild.php?photo=' . $previous_by_day[0]['external_id'] . '"><button class="button_110">&laquo; Samma dag</button></a>' . "\n";
    }
    if ($previous_by_album[0]['internal_id'] > 0) {
        echo '<a href="/fotoalbum/bild.php?photo=' . $previous_by_album[0]['external_id'] . '"><button class="button_110">&laquo; Samma album</button></a>' . "\n";
    }
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    $query = 'UPDATE photos SET unread_comments = 0 WHERE internal_id = "' . $parameters['image']['internal_id'] . '" LIMIT 1';
    mysql_query($query);
    echo '<h2>Kommentarer</h2>' . "\n";
    echo '<h5>Här kan du lämna din kommentar</h5>' . "\n";
    echo comments_input_draw($parameters['image']['internal_id'], 'photo');
    rounded_corners_top();
    echo comments_list($parameters['image']['internal_id'], 'photo');
    rounded_corners_bottom();
    // Count views
    if (!in_array($parameters['image']['internal_id'], $_SESSION['photos']['viewed_photos'])) {
        $_SESSION['photos']['viewed_photos'][] = $parameters['image']['internal_id'];
        $query = 'UPDATE photos SET view_count = view_count + 1 WHERE internal_id = "' . $parameters['image']['internal_id'] . '" LIMIT 1';
        mysql_query($query);
    }
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:56,代码来源:photo.lib.php

示例6: tests_calculate_score


//.........这里部分代码省略.........
                        $answers_to_save_sql[] = '(' . $_SESSION['login']['id'] . ', %TESTID%, ' . $data['question_id'] . ', ' . $question_answer_key . ')';
                    }
                    $total_score = $total_score + $question_answer[1];
                }
                if ($data['answer_type'] == 'single_answer') {
                    if ($this_question_max_score < $question_answer[1]) {
                        $this_question_max_score = $question_answer[1];
                    }
                } elseif ($data['answer_type'] == 'multiple_answers' && $question_answer[1] > 0) {
                    $this_question_max_score = $this_question_max_score + $question_answer[1];
                }
            }
            $max_score = $max_score + $this_question_max_score;
        }
        if ($max_score > 0 && $total_score > 0) {
            $score_percents_right = round($total_score / $max_score * 100);
            if ($max_score == $total_score) {
                $score_text_index = 'all';
            } else {
                $score_text_index = round($total_score / $max_score * 4) + 1;
                // 1-5
            }
            $score_color_index = round($total_score / $max_score * 4) + 1;
            // 1-5
        } else {
            $percents_right = 0;
            $score_color_index = 1;
            $score_text_index = 'zero';
            /*if($total_score < 0)
            		{
            			$score_text_index = 'below_zero';
            		}*/
        }
        $score_texts = array();
        //$score_texts['below_zero'] = 'Men du, det här gick inte så bra alls! Minuspoäng! %TOTAL_SCORE% av %MAX_SCORE%.';
        $score_texts['zero'] = 'Men du... Du fick noll poäng, dags att öva?';
        $score_texts['all'] = 'Gratulerar! Du fick alla rätt! (%MAX_SCORE% var max).';
        $score_texts[1] = 'Nä, det här var du inte så bra på. Du fick bara %TOTAL_SCORE% av %MAX_SCORE% poäng.';
        $score_texts[2] = 'Det gick väl sådär, du fick %TOTAL_SCORE% poäng av %MAX_SCORE% möjliga.';
        $score_texts[3] = 'Bättre kan du! Av %MAX_SCORE% fick du %TOTAL_SCORE%, alltså ungefär hälften.';
        $score_texts[4] = 'Du fick hyfast bra poäng, men ändå inte jättebra. Om du övar lite så kanske dina %TOTAL_SCORE% poäng blir maxpoäng (%MAX_SCORE%p).';
        $score_texts[5] = 'Gratulerar! Du fick %TOTAL_SCORE% poäng, vilket är nästan alla rätt. På det här testet kunde man som mest få %MAX_SCORE%.';
        if (!empty($custom_score_phrases)) {
            $score_texts = unserialize(stripslashes($custom_score_phrases));
        }
        $score_text = str_replace(array('%TOTAL_SCORE%', '%MAX_SCORE%'), array($total_score, $max_score), $score_texts[$score_text_index]);
        global $ui_options;
        $ui_options['stylesheets'][] = 'tests.css';
        $ui_options['stylesheets'][] = 'comments.css';
        $ui_options['javascripts'][] = 'comments.js';
        if ($custom_css == 'yes') {
            $ui_options['stylesheets'][] = $options['handle'];
        }
        ui_top($ui_options);
        //echo '<h1>Resultat av test</h1>';
        echo '<h2>' . $score_text . '</h2>';
        echo '<div class="score_meter"><div class="color_' . $score_color_index . '" style="width: ' . $score_percents_right * 3 . 'px">&nbsp;</div></div>';
        echo '<div class="score_meter_right">Din poäng: ' . $total_score . ' (' . $score_percents_right . '% av max)<br />Maxpoäng: ' . $max_score . '</div>';
        echo '<br style="clear: both" />';
        if (login_checklogin()) {
            if (count($answers_to_save_sql) > 0) {
                $query = 'SELECT id FROM tests WHERE handle = "' . $options['handle'] . '" LIMIT 1';
                $result = mysql_query($query) or report_sql_error($query);
                $data = mysql_fetch_assoc($result);
                $test_id = $data['id'];
                $query = 'INSERT INTO tests_user_score (user_id, test_id, score, timestamp) VALUES';
                $query .= ' (' . $_SESSION['login']['id'] . ', ' . $test_id . ', ' . $total_score . ', ' . time() . ')';
                $result = @mysql_query($query);
                // ...
                if ($result) {
                    $query = 'INSERT INTO tests_user_answers (user_id, test_id, question_id, answer_id) VALUES';
                    $query .= ' ' . str_replace('%TESTID%', $test_id, implode(', ', $answers_to_save_sql));
                } else {
                    echo 'Poängen sparades inte eftersom att du redan gjort testet en gång.';
                }
            } else {
                echo 'Du måste svara på någon av frågorna!';
            }
        } else {
            echo 'Om du loggar in så kan vi spara dina poäng också!';
        }
        echo '</p><br /><br />' . "\n";
        echo '<h2>Folk som gjort testet</h2>';
        echo rounded_corners_top();
        echo tests_get_last_test_completers(array('test_id' => $test_id, 'limit' => 4));
        echo '<br style="clear: both" />';
        echo rounded_corners_bottom();
        echo rounded_corners_top();
        echo 'Kommentera testet: ' . comments_input_draw($test_id, 'tests');
        echo comments_list($test_id, 'tests');
        echo rounded_corners_bottom();
        echo '<p>';
        echo '<a href="/tests/">Tillbaka till testernas förstasida.</a>';
        echo '</p>';
    } else {
        global $ui_options;
        ui_top($ui_options);
        jscript_go_back();
    }
}
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:101,代码来源:index.php

示例7: url_param

    <p>The image you have requested doesn't exists.</p>
  </div>
  <div align="right" style="padding: 10px" class="clear gall_nav"> <a href="#" class="gallery_prev">Previous</a>&nbsp;|&nbsp;<a href="#" class="gallery_next">Next</a> &nbsp;&nbsp;</div>
  <? $media = CI::model('core')->mediaGet('table_content', url_param('id'), $media_type = 'picture', $order = "ASC", $queue_id = false, $no_cache = false, $id = false);
	 
	$media = $media['pictures'];
	?>
  <? if(!empty($media)): ?>
  <? $i=0 ; foreach($media as $item):
	// var_dump($item);

	?>
  <div class="gallery_item img_id_<? print $item['id']; ?>" id="gimage_<? print  $i ?>"> <a href="#gimage_<? if($media[$i+1] != false): ?><? print  $i+1; ?><? else: ?>0<? endif; ?>"> <span class="imgpreload"><? print CI::model('core')->mediaGetThumbnailForMediaId($item['id'], $size_width = 500, $size_height = false); ?></span> </a>
    <div class="gallery_item_comments">
      <? $update_element = md5(serialize($item));
  $this->template ['comments_update_element'] = $update_element;
	$this->load->vars ( $this->template );
  ?>
      <? comment_post_form($item['id'],'dashboard/index_item_comments.php', 'media')  ?>
      <div id="<? print $update_element ?>">
        <? comments_list($item['id'], 'dashboard/index_item_comments_list.php', 'media')  ?>
      </div>
    </div>
  </div>
  <? $i++; endforeach; ?>
  <? endif; ?>
</div>
<? /*
            END GALLERY
 */ ?>
开发者ID:Gninety,项目名称:Microweber,代码行数:30,代码来源:my_pictures_albums_view.php

示例8: comment_post_form

</a></span>
    <?php 
        $i++;
    }
    ?>
  </div>
  <br />
  <?php 
}
?>
 <br />
 <h2 class="coment-title">Post your comment</h2>

    <? comment_post_form($the_post['id']); ?>
    <div class="c"> </div>
  <? comments_list($the_post['id'], 'default'); ?>

  <br /><br />
</div>
<div class="inner_video_side">

    <div class="bluebox">
        <div class="blueboxcontent">
            <div class="video_list_item" style="margin: 10px auto;">
                <a class="mw_blue_link" href="#">The worst ! ever ! American idol ! FUNNY</a>
                <a style="background-image: url(&quot;http://pecata/dev.microweber.com/public_html/skide/userfiles/media/pictures/150_150/no.gif&quot;);" class="img" href=""> </a>
                <a href="javascript:mw.content.Vote('','', '');" class="user_activity_likes left"><strong>0</strong><span></span></a>
                <a href="" class="user_activity_comments right"><strong id="post-likes-339">1</strong><span></span></a>
            </div>
            <div class="video_list_item" style="margin: 10px auto;">
                <a class="mw_blue_link" href="#">The worst ! ever ! American idol ! FUNNY</a>
开发者ID:Gninety,项目名称:Microweber,代码行数:31,代码来源:movie_night_list.php

示例9: render_full_article

function render_full_article($article)
{
    if (empty($article)) {
        $out .= rounded_corners_top(array('color' => 'red'));
        $out .= '<h1>Den här artikeln kunde tyvärr inte hittas</h1>' . "\n";
        $out .= '<a href="?action=list"><< Gå till listan över artiklar</a>' . "\n";
        $out .= rounded_corners_bottom(array('color' => 'red'));
    } else {
        $out .= render_article($article);
        if ($article['photo_category_id'] > 0) {
            $options['category'] = $article['photo_category_id'];
            $photos = photos_fetch($options);
            $out .= '<h2>Tillhörande bilder</h2>' . "\n";
            $out .= photos_list($photos);
        }
        if ($article['showauthor'] == 1) {
            $out .= render_author($article['author']);
        }
        if (isset($article['forum_category_id']) && $article['forum_category_id'] != 0) {
            $all_categories_list = discussion_forum_categories_fetch(array('id' => $article['forum_category_id']));
            $category = array_pop($all_categories_list);
            $forum_security = forum_security(array('action' => 'view_category', 'category' => $category));
            if ($forum_security == true) {
                $path_to_category = discussion_forum_path_to_category(array('id' => $category['id']));
                $locator_options['categories'] = $path_to_category;
                unset($options);
                $options['max_levels'] = 0;
                $options['parent'] = $category['id'];
                $categories = discussion_forum_categories_fetch($options);
                $out .= discussion_forum_categories_list($categories);
                $out .= '<h2>Trådar</h2>' . "\n";
                $post_options['forum_id'] = $category['id'];
                $post_options['threads_only'] = true;
                $post_options['order_by_sticky'] = true;
                $post_options['page_offset'] = $request['page_offset'];
                $post_options['url_lookup'] = true;
                $threads = discussion_forum_post_fetch($post_options);
                //$threads['url'] = $path_to_trailing_category = array_pop($path_to_category) . '/' . $thread['handle'] . '/sida_1.php';
                $out .= discussion_forum_thread_list($threads);
                $path_to_trailing_category = array_pop($path_to_category);
                $out .= '<a href="' . $path_to_trailing_category['url'] . '">Skapa en egen tråd länkad till artikeln</a>' . '<br style="clear: both;" />';
                forum_update_category_session(array('category' => $category, 'threads' => $threads));
            }
        }
        if ($article['commentable'] == 1) {
            $out .= rounded_corners_top(array('color' => 'blue_deluxe'));
            if ($article['rankable'] == 1) {
                $out .= rank_input_draw($article['id'], 'articles');
            }
            $out .= comments_input_draw($article['id'], 'articles');
            $out .= '<div style="clear: both;"></div>' . "\n";
            $out .= rounded_corners_bottom();
            $out .= comments_list($article['id'], 'articles');
        }
    }
    if (is_privilegied('articles_admin')) {
        $out .= '<a href="/artiklar/index.php?action=admin&article=edit&id=' . $article['id'] . '">Ändra i artikeln</a>' . "\n";
    }
    return $out;
}
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:60,代码来源:articles.lib.php

示例10: rounded_corners_top

        $entry .= rounded_corners_top();
        $entry .= '<h2 style="margin-top: 0;">Foton från samma datum</h2>' . "\n";
        $entry .= photos_list_mini($photos);
        $entry .= '<div style="clear: both;"></div>' . "\n";
        $entry .= rounded_corners_bottom();
    }
    $entry .= '<p>' . nl2br($data['text']) . '</p>' . "\n";
    if ($user_id == $_SESSION['login']['id'] || is_privilegied('remove_diary_post')) {
        $entry .= '<a href="?user_id=' . $user_id . '&action=remove&id=' . $data['id'] . '">Ta bort dagboksinlägget</a>' . "\n";
    }
    // Comments
    $entry .= rounded_corners_top(array('color' => 'blue_deluxe'));
    $entry .= comments_input_draw($data['id'], 'blog');
    $entry .= '<div style="clear: both;"></div>' . "\n";
    $entry .= rounded_corners_bottom(array('color' => 'blue_deluxe'));
    $entry .= comments_list($data['id'], 'blog');
}
$short_months = array(1 => 'Jan', 2 => 'Feb', 3 => 'Mar', 4 => 'Apr', 5 => 'Maj', 6 => 'Jun', 7 => 'Jul', 8 => 'Aug', 9 => 'Sept', 10 => 'Okt', 11 => 'Nov', 12 => 'Dec');
$query = 'SELECT id, date, title FROM blog WHERE user = "' . $user_id . '" AND is_removed = 0 ORDER BY id DESC';
$result = mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
while ($data = mysql_fetch_assoc($result)) {
    $entries[$data['date']] = $data;
    $month = $short_months[date('n', strtotime($data['date']))] . date(' -y', strtotime($data['date']));
    if (!in_array($month, $months)) {
        $months[date('Y-m', strtotime($data['date']))] = $month;
    }
}
$output .= rounded_corners_top(array('color' => 'blue_deluxe'));
$output .= '<select id="diary_date_selector">' . "\n";
$i = 0;
foreach ($months as $ymd => $month) {
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:31,代码来源:diary.php

示例11: post_link






<div><span class="st_sharethis" st_url="<? print post_link($post_data["id"]); ?>" st_title="<? print addslashes($post_data["content_title"]); ?>" displayText="Share this"></span>

 <a href="#" class="user_activity_comments"><strong><? print comments_count($post_data['id'], false); ?></strong><span></span><strong>Comments</strong></a> <a  class="user_activity_likes right"  href="<? print voting_link($post_data['id'], '#post-likes-'.$post_data['id']); ?>"><strong id="post-likes-<? print ($post_data['id']); ?>"><? print votes_count($post_data['id'], false ); ?></strong> Like</a> </div>
  </div>
  <? $update_element = md5(serialize($post_data));
  $this->template ['comments_update_element'] = $update_element;
	$this->load->vars ( $this->template );
  ?>
  <? comment_post_form($post_data['id'],'dashboard/index_item_comments.php')  ?>
  <div id="<? print $update_element ?>">
    <? comments_list($post_data['id'], 'dashboard/index_item_comments_list.php')  ?>
  </div>
  
  
  

 <? else : ?>
 
 
 
 
 
  <? if($dashboard_user == user_id()) : ?>
  <a href="#" onclick="$('.video_type').slideDown()" class="mw_btn_s right" ><span>Add new video</span></a>
  <h2>My videos</h2>
  <? else: ?>
开发者ID:Gninety,项目名称:Microweber,代码行数:26,代码来源:my_videos.php

示例12: array

$ui_options['menu_path'] = array('chat', 'statistik');
$ui_options['title'] = 'Undersökningar på Hamsterpaj';
$ui_options['stylesheets'][] = 'comments.css';
$ui_options['javascripts'][] = 'comments.js';
$request = poll_get_action($_SERVER['REQUEST_URI']);
switch ($request['action']) {
    case 'view_poll':
        $output .= poll_render($request['poll']);
        $output .= '<h2>Visa undersökningen i forumet</h2>' . "\n";
        $output .= '<p>Använd detta ID-nummer om du vill infoga undersökningen i vårt forum: <strong>' . $request['poll']['id'] . '</strong></p>' . "\n";
        $output .= '<h2>Lägg till på din blogg eller websida</h2>' . "\n";
        $output .= '<p>Du kan lägga till denna omröstning på din blogg eller hemsida. Kopiera bara koden nedanför och klistra in den där du vill ha undersökningen. <strong>Denna kod fungerar inte i vårt forum!</strong></p>' . "\n";
        $output .= '<input type="text" class="poll_embed_code" value=\'&lt;script type="text/javascript" language="javascript" src="http://www.hamsterpaj.net/poll/embed.php?poll=' . $request['poll']['id'] . '"&gt;&lt;/script&gt;\' />' . "\n";
        $output .= '<h2>Kommentera omröstningen</h2>' . "\n";
        $output .= comments_input_draw($request['poll']['id'], 'poll');
        $output .= comments_list($request['poll']['id'], 'poll');
        break;
    case 'index':
        $output .= '<h1>Här kan man göra sina enga undersökningar</h1>' . "\n";
        if (login_checklogin()) {
            $output .= '<h2>Gör en ny undersökning</h2>';
            $output .= poll_form();
            $polls = poll_fetch(array('author' => $_SESSION['login']['id'], 'limit' => 100));
            if (count($polls) > 0) {
                $output .= '<h1>Dina undersökningar</h1>' . "\n";
                $output .= '<ul class="poll_list">' . "\n";
                foreach ($polls as $poll) {
                    $output .= '<li>' . date('Y-m-d', $poll['timestamp']) . ' <a href="/poll/' . $poll['handle'] . '.html">' . $poll['question'] . '</a></li>' . "\n";
                }
                $output .= '</ul>' . "\n";
            }
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:index.php

示例13: comments_new

        if ($content_check === 1) {
            comments_new($_POST['item_id'], $_POST['item_type'], $_SESSION['login']['id'], $_POST['comment']);
        } else {
            $output .= 'Vår server tyckte att ditt meddelande bröt mot våra regler, så det sparades inte. Kommentar: ' . $content_check . "\n";
        }
    }
    if (isset($_POST['return_list'])) {
        $output .= comments_list($_POST['item_id'], $_POST['item_type']);
        echo $output;
    }
} elseif ($_GET['action'] == 'comments_list_all') {
    echo '<style type="text/css">@import url(\'/stylesheets/ui.css.php?\');</style>' . "\n";
    echo '<div id="content">' . "\n";
    echo comments_list($_GET['item_id'], $_GET['item_type'], array('list_style' => 'compact', 'limit' => 'no_limit'));
    echo '</div>';
} elseif ($_GET['action'] == 'comment_remove') {
    if (is_numeric($_GET['id'])) {
        comments_remove($_GET['id']);
    } else {
        echo 'You h4xx0r...';
    }
} elseif ($_GET['action'] == 'comment_answer') {
    if (is_numeric($_GET['id'])) {
        comment_answer($_GET['id'], $_GET['reply']);
        $output .= comments_list($_GET['item_id'], 'photos');
        echo $output;
    } else {
        jscript_alert('hejdå');
        echo 'You h4xx0r...';
    }
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:comments.php

示例14: mysql_query

echo '<h1>Jämför alla burgare</h1>' . "\n";
echo '<p>' . "\n";
echo 'Här visas alla burgare vi jämförde. Vi tog även ett gruppfoto som kan laddas ned som <a href="http://images.hamsterpaj.net/hamburgers/gruppfoto.jpg" target="_blank">högupplöst bakgrundsbild</a>.<br />' . "\n";
echo 'Alla foton har tagits av Dan Lindgren för Hamsterpajs räkning, och vi är tacksamma om du nämner detta när du wärschar bilderna.' . "\n";
echo '</p>' . "\n";
$query = 'SELECT * FROM burgers ORDER BY vendor, name';
$result = mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
while ($data = mysql_fetch_assoc($result)) {
    $labels[0] = 'Oigenkännlig';
    $labels[1] = 'Inte alls lik';
    $labels[2] = 'Igenkännbar';
    $labels[3] = 'Ganska lik';
    $labels[4] = 'Identisk';
    echo '<h2>' . $data['name'] . ' från ' . $data['vendor'] . '</h2>' . "\n";
    echo '<p>' . round($data['correct_ratio'] * 100) . '% rätta gissningar, snittbetyg: ' . $labels[round($data['average_score'])] . '</p>' . "\n";
    echo '<div id="burger_compare">' . "\n";
    echo '<img src="' . IMAGE_URL . 'hamburgers/' . $data['id'] . '_ad.jpg" />' . "\n";
    echo '<img src="' . IMAGE_URL . 'hamburgers/' . $data['id'] . '_real.jpg" />' . "\n";
    echo '</div>' . "\n";
    echo '<h4>Kommentarer till ' . $data['name'] . '</h4>' . "\n";
    rounded_corners_top();
    echo comments_list($data['id'], 'burger');
    rounded_corners_bottom();
    echo '<hr style="margin-top: 20px; margin-bottom: 20px;" />';
}
event_log_log('burgers_overview');
ui_bottom();
?>


开发者ID:Razze,项目名称:hamsterpaj,代码行数:28,代码来源:alla_burgare.php

示例15: array

  <div class="hr">&nbsp;</div>
  <div class="bluebox">
    <div class="bluebox_content">
      <?
 
  $params= array();
$params['display']= 'post_item_video_sidebar.php';
 
$params['items_per_page'] = 3;
$params['category'] = $active_categories[0];
$params['curent_page'] = rand(1,5);
 get_posts($params);

   
  ?>
      <a href="<? print category_link($active_categories[0]); ?>" class="more">See more videos</a> </div>
  </div>
</div>
<div class="c">&nbsp;</div>
<br />
  <? include(TEMPLATE_DIR.'banner_wide.php')	; ?>  <br />  
<br />
<div class="c">&nbsp;</div>
<h2>Comments</h2>
<? comments_list($post['id'])  ?>
<br />
<div class="c">&nbsp;</div>
<br />
<h2 class="coment-title">Post your comment</h2>
<? comment_post_form($post['id'])  ?>
开发者ID:Gninety,项目名称:Microweber,代码行数:30,代码来源:education_inner_videos.php


注:本文中的comments_list函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。