예제 #1
0
function make_table($rows, $hds, $class = "", $id = "", $ucols = [], $scols = [], $pcols = [])
{
    // isset($hds) || ($hds = array_keys($rows[0]));
    $t = make_tag("table", $class, $id);
    $thead = make_tag("thead");
    $thead["children"][] = make_tag("tr");
    // table headers
    foreach ($hds as $th) {
        $c = make_tag("th");
        $c["data"] = $th;
        $thead["children"][0]["children"][] = $c;
    }
    $tbody = make_tag("tbody");
    foreach ($rows as $row) {
        $r = make_tag("tr");
        for ($i = 0; $i < count($hds); $i++) {
            $col = $hds[$i];
            $c = make_tag("td");
            if (in_array($i, $ucols)) {
                $c["children"][] = user_link($row[$col]);
            } else {
                if (in_array($i, $scols)) {
                    $c["children"][] = soc_link($row[$col]);
                } else {
                    if (in_array($i, $pcols)) {
                        $c["children"][] = post_link($row["post_id"], $row[$col], $row["society"]);
                    } else {
                        $c["children"][] = span($row[$col]);
                    }
                }
            }
            $r["children"][] = $c;
        }
        $tbody["children"][] = $r;
    }
    $t["children"][] = $thead;
    $t["children"][] = $tbody;
    return $t;
}
예제 #2
0
  <? if($seller['custom_fields']['paypal']) : ?>
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="<? print $seller['custom_fields']['paypal'] ?>">
    <input type="hidden" name="amount" value="<?php 
print $post["custom_fields"]['price'];
?>
">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="item_name" value="Buy <?php 
print addslashes($post['content_title']);
?>
 from <?php 
print addslashes(user_name($seller['id']));
?>
 - link <? print post_link($post['id']); ?>">
    <input type="hidden" name="item_number" value="<?php 
print addslashes($post['id']);
?>
">
    <input type="hidden" name="button_subtype" value="services">
    <input type="hidden" name="no_note" value="0">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
    <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
  </form>
  <? else :  ?>
  <a href="javascript:mw.users.UserMessage.compose(<?php 
echo $seller['id'];
?>
예제 #3
0
파일: rss2.php 프로젝트: un1coin/ovn-space
<?php 
foreach ((array) $posts as $bb_post) {
    ?>
		<item>
			<title><?php 
    post_author();
    ?>
 <?php 
    _e('on');
    ?>
 "<?php 
    topic_title($bb_post->topic_id);
    ?>
"</title>
			<link><?php 
    post_link();
    ?>
</link>
			<pubDate><?php 
    bb_post_time(array('format' => 'D, d M Y H:i:s +0000', 'localize' => false));
    ?>
</pubDate>
			<dc:creator><?php 
    post_author();
    ?>
</dc:creator>
			<guid isPermaLink="false"><?php 
    post_id();
    ?>
@<?php 
    bb_uri();
예제 #4
0
파일: post.php 프로젝트: ak826843/bmf
 /**
  * Add new comment to topic
  */
 public function comment()
 {
     $this->load->model('comment');
     $comment['post_id'] = param('post_id');
     if (empty($comment['post_id'])) {
         set_flash_error('Ошибка в параметрах комментария');
         redirect();
     }
     $post = $this->post->find($comment['post_id'], 1);
     if (empty($post)) {
         set_flash_error('Такого топика не существует');
         redirect();
     }
     $comment['parent_id'] = param('parent_id');
     $comment['text'] = prepare_text(param('text', TRUE, FALSE));
     if (empty($comment['text'])) {
         set_flash_error('Вы не написали свой комментарий к топику');
         redirect(post_link($post));
     }
     $comment['user_id'] = $this->current_user['id'];
     $comment['added_at'] = now2mysql();
     $id = $this->comment->save($comment);
     if ($id) {
         set_flash_ok('Спасибо за ваш комментарий');
     } else {
         set_flash_error('Извините, но произошла ошибка и ваш комментарий сохранить не удалось');
     }
     redirect(post_link($post) . '#com' . $id);
 }
예제 #5
0
파일: index.php 프로젝트: ak826843/bmf
?>

<div class="row">
    <div class="span12">
        <?php 
foreach ($posts as $post) {
    ?>
            <div id="post-<?php 
    echo $post['id'];
    ?>
" class="post">
                <?php 
    echo $this->template->render('blog/_author', array('post' => $post));
    ?>
                <h2><a href="<?php 
    echo post_link($post);
    ?>
"><?php 
    echo form_prep($post['title']);
    ?>
</a> <?php 
    echo post_control($post);
    ?>
</h2>                
                <?php 
    echo $post['cut'];
    ?>
            </div>
            <hr/>
        <?php 
}
예제 #6
0
function get_page_for_post($post_id)
{
    $url = post_link($post_id);
    $page = CI::model('content')->getPageByURLAndCache($url);
    //p($url_page);
    return $page;
}
예제 #7
0
 $games = $games['posts'];

 
 @shuffle( $games);
 ?>
  <h2>New Toys</h2>
  <ul class="new-toys">
    <? foreach($games as $item):
   $item = get_post($item['id']);
   ?>
    <li> <a class="img" href="<? print post_link($item['id']); ?>"><img src="<? print thumbnail($item['id'], 120) ?>" alt="" /></a>
      <div class="toy_desc">
        <h4><a href="<? print post_link($item['id']); ?>"><? print $item['content_title']; ?></a></h4>
        <span><? print character_limiter(codeClean($item['content_body']), 100); ?></span> <strong class="red">$<? print $item["custom_fields"]['price'];?> </strong>
        <div class="c" style="padding-bottom: 5px;"></div>
        <a href="<? print post_link($item['id']); ?>" class="right">See more</a> </div>
    </li>
    <? endforeach; ?>
  </ul>
</div>
<div id="wall">
  <h1 id="results_holder_title" style="display:none" ></h1>
  <div class="top_games" id="results_holder" style="display:none"></div>
  <?php 
if (count($active_categories) == 1) {
    ?>
  <h1 id="top_games_holder_title" ><? print $page['content_title'] ?></h1>
  <br />
  <div class="top_games" id="top_games_holder">
    <microweber module="posts/most_popular_from_categories" category="1" />
  </div>
예제 #8
0
					<th>操作</th>
				</tr>
				</thead>
				<tbody>
				<?php 
    foreach ($__data as $v) {
        ?>
					<tr id="post_list_<?php 
        echo $v['id'];
        ?>
">
						<td>【<?php 
        echo $v['id'];
        ?>
】<a class="glyphicon glyphicon-eye-open" rel="external" href="<?php 
        echo post_link($v['post_name']);
        ?>
?preview=true"><?php 
        echo $v['post_title'];
        ?>
</a></td>
						<td><?php 
        echo $v['post_time'];
        ?>
</td>
						<td><?php 
        echo $v['post_category'];
        ?>
</td>
						<td><?php 
        echo $v['post_status'] ? "已发布" : "草稿";
예제 #9
0
<?  $the_post = get_post($the_post['id']); ?>
<div class="video_list_item">
  <a href="<? print post_link($the_post['id']); ?>" class="mw_blue_link">
      <? print $the_post['content_title'];  ?>
  </a>
  <a href="<? print post_link($the_post['id']); ?>" class="img" style="background-image:url(<? print thumbnail($the_post['id'], 150) ?>)"> </a>
  <a class="user_activity_likes left" href="<? print voting_link($the_post['id'], '#post-likes-'.$the_post['id']); ?>">
      <strong><? print votes_count($the_post['id']); ?></strong><span></span>
  </a>
  <? /*
  <a class="user_activity_comments right" href="<? print post_link($the_post['id']); ?>">
      <strong id="post-likes-<? print ($the_post['id']); ?>"><? print comments_count($the_post['id']); ?></strong><span></span>
  </a>
  */ ?>
  <span class="right red"><strong>$ <? print $the_post['custom_fields']['price'];  ?> </strong></span>
</div>
예제 #10
0
파일: list.php 프로젝트: Gninety/Microweber
<? endif; ?>
<?  else : ?>

<? if($file): ?>
<? foreach($posts['posts'] as $post): ?>
<?
	$try_file1 = TEMPLATE_DIR . $file.'.php';
$this->template ['the_post'] = $post;
				$this->load->vars ( $this->template );
				
				$content_filename = $this->load->file ( $try_file1, true );
				print $content_filename;
?>

<? endforeach; ?>
<?  else : ?>


<? if(!$display and !$file): ?>

<ul class="posts-list">
  <? foreach($posts['posts'] as $post): ?>
 
  <li> <a href="<? print post_link($post['id']); ?>" class="img" style="background-image: url('<? print thumbnail($post['id'], 150) ?>')"><span></span></a> <strong><a href="<? print post_link($post['id']); ?>"><? print $post['content_title'] ?></a></strong>
    <p><? print $post['content_description'];  ?></p>
  </li>
  <? endforeach; ?>
</ul>
<? endif; ?>
<? endif; ?>
<? endif; ?>
예제 #11
0
 <h2><? print $post_data['content_title']; ?></h2>
 <br />
<? print html_entity_decode($post_data['content_body']); ?>


<div class="my__embed">
 <? print html_entity_decode( $post_data['custom_fields']['embed_code']); ?>

</div>





<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>
  
  
  
예제 #12
0
 function taxonomyGetUrlForId($id)
 {
     //return false ;
     if (intval($id) == 0) {
         return false;
     }
     $function_cache_id = false;
     $args = func_get_args();
     foreach ($args as $k => $v) {
         $function_cache_id = $function_cache_id . serialize($k) . serialize($v);
     }
     $function_cache_id = __FUNCTION__ . md5($function_cache_id);
     $taxonomy_id = intval($id);
     $cache_group = 'taxonomy/' . $taxonomy_id;
     $cache_content = CI::model('core')->cacheGetContentAndDecode($function_cache_id, $cache_group);
     if ($cache_content != false) {
         return $cache_content;
     } else {
         $data = array();
         $data['id'] = $id;
         $data = CI::model('taxonomy')->getSingleItem($id);
         if (empty($data)) {
             return false;
         }
         //$this->load->model ( 'Content_model', 'content_model' );
         global $cms_db_tables;
         //global $CI;
         $table = $cms_db_tables['table_taxonomy'];
         $table_content = $cms_db_tables['table_content'];
         $content = array();
         $content['content_subtype'] = 'blog_section';
         $content['content_subtype_value'] = $id;
         //$orderby = array ('id', 'desc' );
         //$q = " select * from $table_content where content_subtype ='blog_section' and content_subtype_value={$id} limit 0,1";
         //$q = CI::model('core')->dbQuery ( $q, __FUNCTION__ . md5 ( $q ), $cache_group );
         $content = $this->getContentAndCache($content, $orderby);
         //$content = $q [0];
         $content = $content[0];
         $url = false;
         if (!empty($content)) {
             if ($content['content_type'] == 'page') {
                 $url = page_link($content['id']);
             }
             if ($content['content_type'] == 'post') {
                 $url = post_link($content['id']);
             }
         }
         if ($url != false) {
             return $url;
         }
         $parent_ids = CI::model('taxonomy')->getParentsIds($data['id']);
         foreach ($parent_ids as $item) {
             $content = array();
             $content['content_subtype'] = 'blog_section';
             $content['content_subtype_value'] = $item;
             $orderby = array('id', 'desc');
             $q = " select * from {$table_content} where content_subtype ='blog_section' and content_subtype_value={$item} limit 0,1";
             //$q = CI::model('core')->dbQuery ( $q, __FUNCTION__ . md5 ( $q ), $cache_group );
             $content = $this->getContentAndCache($content, $orderby);
             //$content = CI::model('content')->getContentAndCache ( $content, $orderby );
             //$content = $q [0];
             $content = $content[0];
             $url = false;
             if (!empty($content)) {
                 if ($content['content_type'] == 'page') {
                     $url = page_link($content['id']);
                     //$url = $url . '/category:' . $data ['taxonomy_value'];
                     $url = $url . '/categories:' . $data['id'];
                 }
                 if ($content['content_type'] == 'post') {
                     $url = post_link($content['id']);
                 }
             }
             if ($url != false) {
                 CI::model('core')->cacheWriteAndEncode($url, $function_cache_id, $cache_group);
                 return $url;
             }
         }
         return false;
     }
     //var_dump ( $parent_ids );
 }
예제 #13
0
function get_dashboard_action($log_id)
{
    global $CI;
    $log = get_log_item($log_id);
    $data = $log;
    $to_return = array();
    switch ($data['to_table']) {
        case 'table_users_statuses':
            $stat = CI::model('statuses')->statusGetById(intval($data['to_table_id']));
            $stat = html_entity_decode($stat['status']);
            if (stristr($stat, 'http://') == true) {
                $term = 'shared a link';
                $stat = auto_link($stat);
                $embedly = true;
            } else {
                $term = 'said ';
                $embedly = false;
            }
            $to_return['allow_comments'] = true;
            $to_return['allow_likes'] = true;
            if ($embedly == false) {
                $to_return['msg'] = "{$term} " . $stat;
            } else {
                $to_return['msg'] = "<div class='embedly'>{$term} " . $stat . "</div>";
            }
            break;
        case 'table_users':
            $to_return['msg'] = "updated profile";
            $to_return['allow_comments'] = false;
            $to_return['allow_likes'] = false;
            break;
        case 'table_messages':
            $to_return['msg'] = "send a message to " . $data['to_table_id'] . ".. must be implemented";
            $to_return['allow_comments'] = false;
            $to_return['allow_likes'] = false;
            break;
        case 'table_comments':
            $to_return['allow_comments'] = true;
            $to_return['allow_likes'] = true;
            $comm = CI::model('comments')->commentGetById($data['to_table_id']);
            //p($comm);
            if ($comm['to_table'] == 'table_content') {
                $content_data = CI::model('content')->contentGetByIdAndCache($comm['to_table_id']);
                $url = CI::model('content')->getContentURLByIdAndCache($comm['to_table_id']);
                $comm_txt = $comm['comment_body'];
                $comm_txt = html_entity_decode($comm_txt);
                $comm_txt = auto_link($comm_txt);
                $thumb = thumbnail($content_data['id'], 90);
                //p($comm);
                $to_return['msg'] = "commented on <a href='{$url}'>{$content_data['content_title']}</a><br> {$comm_txt}";
                $to_return['msg'] .= "<div class='post_item'><div style='height:10px;'>&nbsp;</div><a href='{$url}'><img class='embed_img' src='{$thumb}' border='0'></a><h3 style='padding-bottom:5px;'><a href='{$url}'>{$content_data['content_title']}</a></h3> {$desc}  {$emded_txt} \t</div>";
            }
            if ($comm['rel_table'] == 'table_content') {
                $content_data = CI::model('content')->contentGetByIdAndCache($comm['rel_table_id']);
                $url = CI::model('content')->getContentURLByIdAndCache($comm['rel_table_id']);
                $comm_txt = $comm['comment_body'];
                $comm_txt = html_entity_decode($comm_txt);
                $comm_txt = auto_link($comm_txt);
                $thumb = thumbnail($content_data['id'], 90);
                //p($comm);
                $to_return['msg'] = "commented on <a href='{$url}'>{$content_data['content_title']}</a><br> {$comm_txt}";
                $to_return['msg'] .= "<div class='post_item'><div style='height:10px;'>&nbsp;</div><a href='{$url}'><img class='embed_img' src='{$thumb}' border='0'></a><h3 style='padding-bottom:5px;'><a href='{$url}'>{$content_data['content_title']}</a></h3> {$desc}  {$emded_txt} \t</div>";
            }
            if ($comm['to_table'] == 'table_users_statuses') {
            }
            break;
        case 'table_votes':
            $to_return['allow_comments'] = false;
            $to_return['allow_likes'] = false;
            $vote = CI::model('votes')->voteGetById($data['to_table_id']);
            if ($vote['to_table'] == 'table_content') {
                $more = CI::model('core')->getCustomFields('table_content', $vote['to_table_id']);
                $content_data = CI::model('content')->contentGetByIdAndCache($vote['to_table_id']);
                $url = CI::model('content')->getContentURLByIdAndCache($vote['to_table_id']);
                $to_return['msg'] = "liked <a href='{$url}'>{$content_data['content_title']}</a>";
                if ($more['embed_code']) {
                    $emded_txt = "<textarea>" . html_entity_decode($more['embed_code']) . "</textarea>";
                } else {
                    $emded_txt = false;
                }
                $thumb = thumbnail($content_data['id'], 90);
                $desc = codeClean($content_data['content_body']);
                $desc = character_limiter($desc, 140, '...');
                $desc = str_ireplace("\n", ' ', $desc);
                $desc = str_ireplace('\\n', ' ', $desc);
                $to_return['msg'] .= "<div class='post_item'><div style='height:10px;'>&nbsp;</div><a href='{$url}'><img class='embed_img' src='{$thumb}' border='0'></a><h3 style='padding-bottom:5px;'><a href='{$url}'>{$content_data['content_title']}</a></h3> {$desc}  {$emded_txt} \t</div>";
                break;
            } else {
            }
        case 'table_content':
            $content_data = CI::model('content')->contentGetById($data['to_table_id']);
            if (empty($content_data)) {
                CI::model('notifications')->logDeleteById($data['id']);
            } else {
                $more = CI::model('core')->getCustomFields('table_content', $content_data['id']);
                $url = post_link($data['to_table_id']);
                $to_return['allow_comments'] = true;
                $to_return['allow_likes'] = true;
                $to_return['msg'] = "published <a href='{$url}'>{$content_data['content_title']}</a>";
                if ($more['embed_code']) {
                    $emded_txt = "<textarea>" . html_entity_decode($more['embed_code']) . "</textarea>";
                } else {
                    $emded_txt = false;
                }
                $thumb = thumbnail($content_data['id'], 90);
                $desc = codeClean($content_data['content_body']);
                $desc = character_limiter($desc, 140, '...');
                $desc = str_ireplace("\n", ' ', $desc);
                $desc = str_ireplace('\\n', ' ', $desc);
                $to_return['msg'] .= "<div class='post_item'><div style='height:10px;'>&nbsp;</div><a href='{$url}'><img class='embed_img' src='{$thumb}' border='0'></a><h3 style='padding-bottom:5px;'><a href='{$url}'>{$content_data['content_title']}</a></h3> {$desc}  {$emded_txt} \t</div>";
                break;
            }
        case 'table_followers':
            $data = CI::model('core')->getById($data['to_table'], $data['to_table_id']);
            //p($data);
            if (!empty($data)) {
                $to_return['allow_comments'] = false;
                $to_return['allow_likes'] = false;
                $data2 = CI::model('users')->getUserById($data['follower_id']);
                $url = profile_link($data['follower_id']);
                $name = CI::model('users')->getPrintableName($data['follower_id']);
                $thumb = user_thumbnail($data['follower_id'], 70);
                $to_return['msg'] = "is friend with <a href='{$url}' class='user_photo' style='background-image:url({$thumb})'></a><a href='{$url}'>{$name}</a>";
            }
            break;
        default:
            p($data);
            break;
    }
    $to_return['allow_votes'] = $to_return['allow_likes'];
    return $to_return;
}
예제 #14
0
<div class="game_item" onclick="window.location.href='<?php 
print $the_post['content_title'];
?>
'">

  <span class="gametitle"><?php 
print $the_post['content_title'];
?>
</span>

  <a title="<?php 
print $the_post['content_title'];
?>
" href="<?php 
print post_link($the_post['id']);
?>
" class="img" style="background-image: url('<?php 
print thumbnail(array('id' => $the_post['id'], 'size' => 150));
?>
')"> </a>


</div>
예제 #15
0
<a title="<?php 
print $post['content_title'];
?>
" href="<?php 
print post_link($post['id']);
?>
" class="img" style="background-image: url('<?php 
print thumbnail(array('id' => $post['id'], 'size' => 150));
?>
')"></a>
 
예제 #16
0
<div class="post_list"><a class="img" href="<? print post_link($the_post['id']); ?>" style="background-image: url('<? print thumbnail($the_post['id'], 150); ?>')"></a>
  <div class="post_list_content"> <span class="author">Posted by <? print user_name($the_post['created_by'], 'full'); ?></span>
    <h3><a href="<? print post_link($the_post['id']); ?>"><? print $the_post['content_title'];  ?></a></h3>
    <p><? print character_limiter($the_post['content_body_nohtml']);  ?> </p>
  </div>
  <div class="c">&nbsp;</div>
  <div class="user_activity_bar"> <a class="mw_blue_link left" href="<? print post_link($the_post['id']); ?>">Read more</a>
    <div> <span class="st_sharethis" st_url="<? print post_link($the_post["id"]); ?>" st_title="<? print addslashes($the_post["content_title"]); ?>" displayText="Share this"></span> <a class="user_activity_comments" href="#"><span><? print comments_count($the_post['id']); ?></span>Comments</a> <a class="user_activity_likes" href="#"><span><? print votes_count($the_post['id']); ?></span>Like</a> </div>
  </div>
</div>
예제 #17
0
  <h2 class="nomargin"><? print $post["content_title"]; ?></h2>
<div class="richtext">
    <img src="<? print thumbnail($post['id'], 250); ?>" vspace="5" hspace="5" align="left" style="float:left;margin-right:10px;" /><? print $post["the_content_body"]; ?> <br />
  <div class="user_activity_bar">
    <div>
       <span class="st_sharethis" st_url="<? print post_link($post["id"]); ?>" st_title="<? print addslashes($post["content_title"]); ?>" displayText="Share this"></span>

        <div id="share_<? print $post['id'] ?>" class="xhidden">
           <a target="_blank" class="share_facebook" href="http://www.facebook.com/sharer.php?u=<? print post_link($post['id']); ?>&t=<? print $post["content_title"]; ?>">Facebook</a>

           <a target="_blank" class="share_twitter" href="http://twitter.com/home?status=Currently reading <? print post_link($post['id']); ?>">Twitter</a>

        </div>


        <a class="user_activity_comments" href="<? print post_link($post['id']); ?>"><strong><? print comments_count($post['id']); ?></strong><span></span><strong>Comments</strong></a> <a class="user_activity_likes" href="<? print voting_link($post['id'], '#post-likes-'.$post['id']); ?>"><strong id="post-likes-<? print ($post['id']); ?>"><? print votes_count($post['id']); ?></strong><span></span><strong >Like</strong></a> </div>
  </div>
</div>
<div class="post_list" align="center"> <a href="#"><img src="<?php 
print TEMPLATE_URL;
?>
static/img/demo/list_posts_banner.jpg" alt="" /></a> </div>
<h2 style="padding: 10px 0">Comments</h2>

  <? comments_list($post['id'])  ?>


<br /> <br />
<h2 class="coment-title">Post your comment</h2>
<? comment_post_form($post['id'])  ?>
<div class="c">&nbsp;</div>
예제 #18
0
<div class="product_item product_item_slide"> <a class="product" href="<? print post_link($the_post['id']) ?>"> <span class="img" style="background-image: url('<? print thumbnail($the_post['id'], 250);  ?>')">&nbsp;</span>
<strong>  <editable  post="<? print $the_post['id'] ?>" field="content_title"><? print $the_post['content_title'] ?></editable> </strong>
  <span class="best_seller">&nbsp;</span> </a>
  <div class="c" style=" padding-bottom: 5px;">&nbsp;</div>

  <a href="<? print post_link($the_post['id']) ?>" class="lbuy right">Details</a> </div>
예제 #19
0
파일: edit.php 프로젝트: ttym7993/Linger
?>
" method="post">
	<div class="row">
		<div class="col-sm-9">
			<div class="form-group">
				<label class="control-label" for="InputTitle">标题</label>
				<input id="InputTitle" name="title" value="<?php 
echo $__info['post_title'];
?>
" type="text" class="form-control input-lg">

				<p class="help-block">访问:<a rel="external" href="<?php 
echo post_link($__info['post_name']);
?>
"><?php 
echo post_link($__info['post_name']);
?>
</a></p>
			</div>
			<div class="form-group">
				<label class="control-label" for="InputContent">内容</label>
				<textarea class="form-control" name="content" rows="10" id="InputContent"><?php 
echo $__info['post_content'];
?>
</textarea>
			</div>
			<div class="form-group">
				<label class="control-label" for="InputKeyword">关键字</label>
				<input type="text" class="form-control" name="keyword" value="<?php 
echo $__info['post_keyword'];
?>
예제 #20
0
 /**
  * 获取评论类型信息
  * @param string    $type
  * @param int|int[] $id
  * @return array|false
  */
 public function getCommentTypeInfo($type, $id)
 {
     if (!isset($this->type_list[$type])) {
         return false;
     }
     $rt = [];
     switch ($type) {
         case 'pictures':
             $s = $this->db->select("pictures", ['id', 'pic_name', 'users_id'], ['id' => $id]);
             if (isset($s[0]['users_id'])) {
                 foreach ($s as $v) {
                     $i = [];
                     $i['title'] = ($v['pic_name'] ?: _("Number of ") . $v['id']) . " [" . _("PICTURE") . "]";
                     $i['link'] = picture_link($v['id']);
                     $i['user_id'] = $v['users_id'];
                     $rt[$v['id']] = $i;
                 }
             }
             break;
         case 'gallery':
             $s = $this->db->select("gallery", ['id', 'gallery_title', 'users_id'], ['id' => $id]);
             if (isset($s[0]['users_id'])) {
                 foreach ($s as $v) {
                     $i = [];
                     $i['title'] = $v['gallery_title'] . " [" . _("GALLERY") . "]";
                     $i['link'] = gallery_link($v['id']);
                     $i['user_id'] = $v['users_id'];
                     $rt[$v['id']] = $i;
                 }
             }
             break;
         case 'posts':
             $s = $this->db->select("posts", ['id', 'post_title', 'post_name', 'users_id'], ['id' => $id]);
             if (isset($s[0]['users_id'])) {
                 foreach ($s as $v) {
                     $i = [];
                     $i['title'] = $v['post_title'] . " [" . _("POST") . "]";
                     $i['link'] = post_link($v['post_name']);
                     $i['user_id'] = $v['users_id'];
                     $rt[$v['id']] = $i;
                 }
             }
             break;
         default:
             return false;
     }
     if (!is_array($id)) {
         $rt = reset($rt);
         if (empty($rt['title'])) {
             Log::write(_("Comment get type data error."));
             return false;
         }
     } else {
         if (($v = reset($id)) === false || !isset($rt[$id[$v]]['user_id'])) {
             return false;
         }
     }
     return $rt;
 }
<? $author = get_user($the_post['created_by']); ?>

<div class="post_list">

<a href="<? print site_url('skide/userbase/action:profile/username:'******'created_by'], 'username'); ?>" class="user_photo left" style="margin-right: 7px;background-image: url('<? print user_thumbnail( $the_post['created_by'], 50) ?>')"></a>
<div class="post_list_content"> <span class=""><? print user_name($the_post['created_by']); ?></span><br />
  <span class="question_text"><? print $the_post['content_title'];  ?></span> <a href="javascript:add_edit_question('<? print $the_post['id'] ?>');" class="mw_btn_x reply_btn"><span><strong>Edit</strong></span></a> <a class="user_activity_comments right" href="<? print post_link($the_post['id']); ?>"><strong id="post-likes-<? print ($the_post['id']); ?>"><? print comments_count($the_post['id']); ?></strong><span></span></a> </div>
<div class="c">&nbsp;</div>


</div>
예제 #22
0
    ?>
<div id="results-relevant" class="search-results">
	<h4><?php 
    _e('Relevant Questions');
    ?>
</h4>
	<ol>
<?php 
    foreach ($relevant as $topic) {
        ?>
		<li<?php 
        alt_class('relevant');
        ?>
>
			<a class="result" href="<?php 
        post_link($topic->post_id);
        ?>
"><?php 
        echo bb_show_topic_context($q, get_topic_title());
        ?>
</a>
			<span class="freshness"><?php 
        printf(__('Posted by <a href="%1$s">%2$s</a> on %3$s'), get_user_profile_link($topic->topic_id), get_topic_author(), bb_datetime_format_i18n(get_topic_start_time(array('format' => 'timestamp'))));
        ?>
</span>
			<p><?php 
        echo bb_show_context($q, $topic->post_text);
        ?>
</p>
		</li>
<?php 
예제 #23
0
function get_excerpt($post, $numwords = 10)
{
    $string = '';
    $url = post_link($post);
    $string .= '<h2>' . anchor($url, e($post->post_title)) . '</h2>';
    $string .= '<p class="pubdate">' . e($post->publication_date) . '</p>';
    $string .= '<p>' . e(text_trunk(strip_tags($post->post_content), $numwords)) . '</p>';
    $string .= '<p>' . anchor($url, 'Read more ›', array('post_title' => e($post->post_title))) . '</p>';
    return $string;
}
예제 #24
0
<div class="post_list">

<? $author = get_user($the_post['created_by']); ?>

<a href="<? print site_url('skide/userbase/action:profile/username:'******'created_by'], 'username'); ?>" class="user_photo left" style="margin-right: 7px;background-image: url('<? print user_thumbnail( $the_post['created_by'], 50) ?>')"></a>
<div class="post_list_content">

  <div style="float: left;width:305px;">
    <span class=""><? print user_name($the_post['created_by']); ?></span>
    <div class="question_text"> <a href="<? print post_link($the_post['id']); ?>"> <? print $the_post['content_title'];  ?></a></div>
  </div>
  <a href="<? print post_link($the_post['id']); ?>" class="mw_btn_x reply_btn right"><span><strong>Reply</strong></span></a>
        
  <a class="user_activity_comments right" style="margin: 8px 5px 0 0" href="<? print post_link($the_post['id']); ?>">
      <strong id="post-likes-<? print ($the_post['id']); ?>"><? print comments_count($the_post['id']); ?></strong><span></span>
  </a>

</div>
<div class="c">&nbsp;</div>
</div>
function post_anchor_link($force_full = false)
{
    if (defined('DOING_AJAX') || $force_full) {
        post_link();
    } else {
        echo '#post-' . get_post_id();
    }
}
예제 #26
0
파일: list.php 프로젝트: Gninety/Microweber
  <? $c = CI::model ( 'taxonomy' )->getTaxonomiesForContent($the_post['id'], $taxonomy_type = 'categories'); 
 print $the_post['content_description']  ;

 ?>
 
 <? $stats = CI::model ( 'stats' )->get_visits_by_url(post_link($the_post['id'])); ?>
 Views: <? print $stats ?>
 
  <? $comments = CI::model ( 'comments' )->commentsGetCountForContentId(($the_post['id'])); ?>
 Comments: <? print $comments ?>


  <? print $the_post['content_description'] ?>

  <div class="post_btns_holder">
    <a class="xbtn" href="<? print  post_link($the_post['id']);  ?>" target="_blank">Read</a>
    <a class="xbtn" href="<? print ADMIN_URL ?>/action:post_edit/id:<? print $the_post['id'] ?>">Edit</a>
    <a class="xbtn" href="#" onclick="mw.content.del('<? print $the_post['id'] ?>','#post_<? print $the_post['id'] ?>');">Delete</a>
  </div>




  <div class="post_info">
    <div class="post_title"><? print $the_post['content_title'] ?></div>
    <div class="post_id"><? print $the_post['id'] ?></div>
  </div>
</div>
<? endforeach; ?>

<? if($params['keyword'] == false):?>
예제 #27
0
 */
global $candy_options;
?>
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
    <?php 
ob_start();
if (has_post_thumbnail()) {
    the_post_thumbnail();
} elseif (get_post_format() == 'link') {
    post_link($post->ID);
} elseif (get_post_format() == 'gallery') {
    post_gallery($post->ID);
} elseif (get_post_format() == 'quote') {
    post_quote($post->ID);
} elseif (get_post_format() == 'audio') {
    post_audio($post->ID);
} elseif (get_post_format() == 'video') {
    post_video($post->ID);
}
$post_thumbnail = ob_get_contents();
ob_end_clean();
?>
    <?php 
if (!empty($post_thumbnail)) {
    ?>
예제 #28
0
  <br />
  <br />
  <h3 class="title">Dealers lists</h3>
  <? endif ; ?>
  

  
  
  
  <br />
  <?  foreach($posts as $post):  ?>
  <? $cf = get_custom_fields_for_content( $post['id']);
		
		//p($cf);
		?>
  <div class="search_result"> <a href="<? print post_link($post['id']); ?>" class="img" style="background-image: url('<? print thumbnail($post['id'], 200);  ?>')"></a>
    <div class="search_result_content">
      <ul>
        <li><strong><? print $post['content_title'] ?></strong></li>
        <? foreach( $cf as $c) :?>
        <li><strong><? print $c['config']['name']; ?>:</strong> <? print $c['custom_field_value']; ?></li>
        <? endforeach; ?>
      </ul>
    </div>
  </div>
  <? endforeach;  ?>
  <mw module="content/paging" />
  <? else :?>
  
  <h2 class="title"><? print $post['content_title'] ?></h2>
  <br />
예제 #29
0
파일: news.php 프로젝트: ak826843/bmf
<div id="news">
    <a href="" class="arrow left"></a>
    <a href="" class="arrow right"></a>
    <h3 class="title">Новости</h3>
    <div id="news_carousel">
        <div>
        <ul>
        <?php 
if (!empty($top_news)) {
    foreach ($top_news as $n) {
        $preview = empty($n['preview']) ? '' : '<img src="/files/posts/' . $n['preview'] . '" alt="" />';
        ?>
            <li><a href="<?php 
        echo post_link($n);
        ?>
"><?php 
        echo $preview;
        ?>
 <?php 
        echo $n['title'];
        ?>
</a></li>
            <?php 
    }
}
?>
        </ul>
        </div>
    </div>
    <!--
    <div class="block n1">
예제 #30
0
<div class="video_list_item">
    <a href="<? print post_link($the_post['id']); ?>" class="mw_blue_link"><? print character_limiter($the_post['content_title'], 20);  ?></a>
    <a href="<? print post_link($the_post['id']); ?>" class="img" style="background-image:url(<? print thumbnail($the_post['id'], 150) ?>)"> </a>
    <a class="user_activity_likes left" href="<? print voting_link($the_post['id'], '#post-likes-'.$the_post['id']); ?>">
       <strong><? print votes_count($the_post['id']); ?></strong>
        <span></span>
    </a>
    <a class="user_activity_comments right" href="<? print post_link($the_post['id']); ?>">
        <strong id="post-likes-<? print ($the_post['id']); ?>"><? print comments_count($the_post['id']); ?></strong>
        <span></span>
    </a>
</div>