Example #1
0
                ?>
" data-user-profile="1"><img src="<?php 
                echo useravatar($comment['user_id'], 'middle');
                ?>
" class="avatar" width="30" height="30"></a></div>
					<div class="shareinfo"><a href="<?php 
                echo spUrl('pub', 'index', array('uid' => $comment['user_id']));
                ?>
" data-user-id="<?php 
                echo $comment['user_id'];
                ?>
" data-user-profile="1"><?php 
                echo $comment['nickname'];
                ?>
</a><p><?php 
                echo parse_message(sysSubStr($comment['comment_txt'], 50, true));
                ?>
</p></div>
				</div>
				<?php 
            }
            ?>
			</div>
			<div class="share_comments commentdiv hide" id="<?php 
            echo $share['share_id'] . '_commentdiv';
            ?>
">
		  		<div class="comment">
					<div class="shareface"><img src="<?php 
            echo base_url($current_user['avatar_local'] . '_middle.jpg');
            ?>
Example #2
0
function twitter_update()
{
    twitter_ensure_post_action();
    $status = stripslashes(trim($_POST['status']));
    $statusArr = array();
    if ($status) {
        $status = line_united($status);
        $length = function_exists('mb_strlen') ? mb_strlen($status, 'utf-8') : strlen(utf8_decode($status));
        if ($length > 140) {
            switch (setting_fetch('longtext', 'r')) {
                case 'a':
                    $statusArr[] = sysSubStr($status, 140, true);
                    break;
                case 'd':
                    $num = ceil($length / 100);
                    for ($i = 0; $i < $num; $i++) {
                        $cnum = $i + 1;
                        $cstart = 100 * $i;
                        $cend = 100 * ($i + 1);
                        $statusArr[] = "({$cnum}/{$num}) " . mb_substr($status, $cstart, $cend, 'utf-8');
                    }
                    arsort($statusArr);
                    break;
                case 'r':
                    $statusArr[] = $status;
                    break;
            }
        } else {
            $statusArr[] = $status;
        }
        $request = API_URL . 'statuses/update.json';
        foreach ($statusArr as $status) {
            $post_data = array('source' => 'dabr', 'status' => $status);
            $in_reply_to_id = (string) $_POST['in_reply_to_id'];
            if (is_numeric($in_reply_to_id)) {
                $post_data['in_reply_to_status_id'] = $in_reply_to_id;
            }
            if (setting_fetch('buttongeo') == 'yes') {
                // Geolocation parameters
                list($lat, $long) = explode(',', $_POST['location']);
                $geo = 'N';
                if (is_numeric($lat) && is_numeric($long)) {
                    $geo = 'Y';
                    $post_data['lat'] = $lat;
                    $post_data['long'] = $long;
                    // $post_data['display_coordinates'] = 'false';
                    // Turns out, we don't need to manually send a place ID
                    /*                      $place_id = twitter_get_place($lat, $long);
                                            if ($place_id) {
                                                // $post_data['place_id'] = $place_id;
                                            }
                    */
                }
                setcookie_year('geo', $geo);
            }
            $b = twitter_process($request, $post_data);
        }
    }
    twitter_refresh($_POST['from'] ? $_POST['from'] : '');
}
Example #3
0
 public function tgroup()
 {
     $num_per_page = $this->settings['ui_layout']['pin_pagenum'];
     $num_per_page = $num_per_page ? $num_per_page : 15;
     $tg = $this->spArgs("tg");
     $wf = $this->spArgs("wf");
     if (is_numeric($tg)) {
         $ptx_share = spClass('ptx_share');
         $segment = spClass('Segment');
         if ($this->page == 1 && $tg) {
             $ptx_tag = spClass('ptx_tag');
             $this->tag_group = $ptx_tag->get_tag_group(" ptx_tag.tag_id = '" . $tg . "'");
             $tag_group = $this->tag_group[0] ? $this->tag_group[0] : NULL;
         }
         $args = array("page" => "2", "wf" => "1");
         if ($tag_group) {
             $this->seo_title($tag_group['tag_group_name_cn'] . $tag_group['category_name_cn']);
             $this->seo_keyword(sysSubStr(str_replace(',', ' ', $tag_group['tags']), 100));
             $conditions['keyword'] = $segment->convert_to_py(str_replace(',', ' ', $tag_group['tags']));
             $args['tg'] = $tg;
             if ($this->settings['ui_layout']['orgin_post']) {
                 $conditions['orgin_post'] = 1;
             }
             $this->tgroup = $tag_group;
             $this->nextpage_url = spUrl("pin", "tgroup", $args);
             $shares = $ptx_share->search($conditions, $this->page, $num_per_page);
             $this->pages = createTPages($ptx_share->spPager()->getPager(), 'pin', 'tgroup', $conditions);
             $shares = $this->add_ads($shares);
             $this->waterfallView($shares, 'pin');
             $need_header_footer = $wf == '1' ? false : true;
             $this->output("pin/index", $need_header_footer);
         }
     }
 }
Example #4
0
    echo $val->id;
    ?>
" /></td>
		<td><?php 
    echo $val->id;
    ?>
</td>
		<td class="tleft"><a href="#" onclick="bookShow(<?php 
    echo $val->id;
    ?>
);return false;"><?php 
    echo keyHH($val->name, @$key['name']);
    ?>
</a></td>
		<td><?php 
    echo sysSubStr($val->content, 42, true);
    ?>
</td>
		<td><?php 
    echo keyHH($val->ctime, @$key['ctime']);
    ?>
</td>
		<td><?php 
    echo keyHH($val->admin, @$key['admin']);
    ?>
</td>
		<td><?php 
    echo keyHH($val->rtime, @$key['rtime']);
    ?>
</td>
	</tr>