Example #1
0
function comments_usercount($userid = 0, $template = 'commentcount')
{
    global $apx, $db, $set;
    $userid = (int) $userid;
    if (!$userid) {
        return;
    }
    include BASEDIR . getmodulepath('comments') . 'functions.php';
    $tmpl = new tengine();
    $apx->lang->drop('commentcount', 'comments');
    $tmpl->assign('COUNT', comments_count($userid));
    $tmpl->assign('USERID', $userid);
    $tmpl->parse('functions/' . $template, 'comments');
}
Example #2
0
       </date>
       
       
       
   
   
   

    
    
    
    
    
    
    
    <div>  <a href="#" class="user_activity_comments"><strong><? print comments_count($log_check['rel_table_id'], false); ?></strong><span></span><strong>Comments</strong></a> <a  class="user_activity_likes right"  href="<? print voting_link($log_check['to_table_id'], '#post-likes-'.$log_check['to_table_id'], $log_check['to_table']); ?>"><strong id="post-likes-<? print ($log_check['to_table_id']); ?>"><? print votes_count($log_check['to_table_id'], false,$log_check['to_table'] ); ?></strong> Like</a> </div>
  </div>
  <? $update_element = md5(serialize($log_check));
  $this->template ['comments_update_element'] = $update_element;
	$this->load->vars ( $this->template );
  ?>
  <? comment_post_form($log_check['rel_table_id'],'dashboard/index_item_comments.php', $log_check['rel_table'])  ?>
  <div id="<? print $update_element ?>">
    <? comments_list($log_check['rel_table_id'], 'dashboard/index_item_comments_list.php', $log_check['rel_table'])  ?>
  </div>
  <!--<div class="comment_area">
    <div class="comment_area_content">
      <form method="post" action="#">
        <a href="#" class="user_photo" style="background-image: url(<?php 
print TEMPLATE_URL;
?>
<? $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>
Example #4
0
for ($i = 1; $i <= 10; $i++) {
    $apx->tmpl->assign('CUSTOM' . $i . '_NAME', replace($set['user']['cusfield_names'][$i - 1]));
    $apx->tmpl->assign('CUSTOM' . $i, replace($res['custom' . $i]));
}
//Forum-Variablen
if ($apx->is_module('forum')) {
    if ($res['forum_lastactive'] == 0) {
        $res['forum_lastactive'] = $res['lastactive'];
    }
    $apx->tmpl->assign('FORUM_LASTACTIVE', (int) $res['forum_lastactive']);
    $apx->tmpl->assign('FORUM_POSTS', (int) $res['forum_posts']);
    $apx->tmpl->assign('FORUM_FINDPOSTS', HTTPDIR . $set['forum']['directory'] . '/search.php?send=1&author=' . urlencode($res['username']));
}
//Kommentare
if ($apx->is_module('comments')) {
    $apx->tmpl->assign('COMMENTS', comments_count($res['userid']));
}
//Interaktionen
$link_buddy = iif($user->info['userid'] && $user->info['userid'] != $_REQUEST['id'] && !$user->is_buddy($res['userid']), mklink('user.php?action=addbuddy&amp;id=' . $res['userid'], 'user,addbuddy,' . $res['userid'] . '.html'));
$link_sendpm = iif($user->info['userid'] && $user->info['userid'] != $_REQUEST['id'], mklink('user.php?action=newpm&amp;touser='******'userid'], 'user,newpm,' . $res['userid'] . '.html'));
$link_sendmail = iif(($user->info['userid'] || $set['user']['sendmail_guests']) && $user->info['userid'] != $_REQUEST['id'], mklink('user.php?action=newmail&amp;touser='******'userid'], 'user,newmail,' . $res['userid'] . '.html'));
$link_ignore = iif($user->info['userid'] && $user->info['userid'] != $_REQUEST['id'] && !$user->ignore($res['userid'], $reason), mklink('user.php?action=ignorelist&amp;add=1&amp;username='******'username']), 'user,ignorelist.html?add=1&amp;username='******'username'])));
$apx->tmpl->assign('LINK_BUDDY', $link_buddy);
$apx->tmpl->assign('LINK_SENDPM', $link_sendpm);
$apx->tmpl->assign('LINK_SENDEMAIL', $link_sendmail);
$apx->tmpl->assign('LINK_IGNORE', $link_ignore);
//Links zu anderen Funktionen
user_assign_profile_links($apx->tmpl, $res);
//Inhalt melden
$link_report = "javascript:popupwin('user.php?action=report&amp;contentid=profile:" . $_REQUEST['id'] . "',500,300);";
$apx->tmpl->assign('LINK_REPORT', $link_report);
Example #5
0
function post_meta($disqus_shortname, $author, $date, $comments, $views, $category)
{
    $out = '';
    if ($author == 'view') {
        $out .= '<div><span>' . __('By', 'corporative') . '</span> ' . get_the_author_link() . '</div>';
    }
    if ($date == 'view') {
        $out .= '<div><span>' . __('In', 'corporative') . '</span> ' . get_the_time('F j, Y') . '</div>';
    }
    if ($category == 'view') {
        $out .= '<div><span>' . __('On', 'corporative') . '</span> ' . get_the_category_list(', ') . '</div>';
    }
    if ($comments == 'view') {
        $out .= '<div>' . comments_count($disqus_shortname) . '</div>';
    }
    if ($views == 'view') {
        $out .= '<div>' . getPostViews(get_the_ID()) . '</div>';
    }
    return $out;
}
  <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>
<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>
Example #8
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>
Example #9
0
function user_info($userid = 0, $template = 'information')
{
    global $set, $db, $apx, $user;
    $userid = (int) $userid;
    if (!$userid) {
        return;
    }
    $tmpl = new tengine();
    $apx->lang->drop('profile', 'user');
    //Verwendete Variablen auslesen
    $parse = $tmpl->used_vars('functions/' . $template, 'user');
    $res = $db->first("SELECT * FROM " . PRE . "_user WHERE userid='" . $userid . "' LIMIT 1");
    $userid = $res['userid'];
    if (!$res['userid']) {
        return;
    }
    list($groupname) = $db->first("SELECT name FROM " . PRE . "_user_groups WHERE groupid='" . $res['groupid'] . "' LIMIT 1");
    $age = 0;
    if ($res['birthday']) {
        $bd = explode('-', $res['birthday']);
        $birthday = intval($bd[0]) . '. ' . getcalmonth($bd[1]) . iif($bd[2], ' ' . $bd[2]);
        if ($bd[2]) {
            $age = date('Y') - $bd[2];
            if (intval(sprintf('%02d%02d', $bd[1], $bd[0])) > intval(date('md'))) {
                $age -= 1;
            }
        }
    }
    $tmpl->assign('USERID', $res['userid']);
    $tmpl->assign('USERNAME', replace($res['username']));
    $tmpl->assign('GROUP', replace($groupname));
    $tmpl->assign('REGDATE', $res['reg_time']);
    $tmpl->assign('REGDAYS', floor((time() - $res['reg_time']) / (24 * 3600)));
    $tmpl->assign('LASTACTIVE', (int) $res['lastactive']);
    $tmpl->assign('IS_ONLINE', iif(!$res['pub_invisible'] && $res['lastactive'] + $set['user']['timeout'] * 60 >= time(), 1, 0));
    $tmpl->assign('EMAIL', replace($res['email']));
    $tmpl->assign('EMAIL_ENCRYPTED', replace(cryptMail($res['email'])));
    $tmpl->assign('HIDEMAIL', $res['pub_hidemail']);
    $tmpl->assign('HOMEPAGE', replace($res['homepage']));
    $tmpl->assign('ICQ', replace($res['icq']));
    $tmpl->assign('AIM', replace($res['aim']));
    $tmpl->assign('YIM', replace($res['yim']));
    $tmpl->assign('MSN', replace($res['msn']));
    $tmpl->assign('SKYPE', replace($res['skype']));
    $tmpl->assign('REALNAME', replace($res['realname']));
    $tmpl->assign('CITY', replace($res['city']));
    $tmpl->assign('PLZ', replace($res['plz']));
    $tmpl->assign('COUNTRY', replace($res['country']));
    $tmpl->assign('INTERESTS', replace($res['interests']));
    $tmpl->assign('WORK', replace($res['work']));
    $tmpl->assign('GENDER', (int) $res['gender']);
    $tmpl->assign('BIRTHDAY', $birthday);
    $tmpl->assign('AGE', $age);
    $tmpl->assign('SIGNATURE', $user->mksig($res, 1));
    $tmpl->assign('AVATAR', $user->mkavatar($res));
    $tmpl->assign('AVATAR_TITLE', $user->mkavtitle($res));
    //Custom-Felder
    for ($i = 1; $i <= 10; $i++) {
        $tmpl->assign('CUSTOM' . $i . '_NAME', replace($set['user']['cusfield_names'][$i - 1]));
        $tmpl->assign('CUSTOM' . $i, replace($res['custom' . $i]));
    }
    //Forum-Variablen
    if ($apx->is_module('forum')) {
        if ($res['forum_lastactive'] == 0) {
            $res['forum_lastactive'] = $res['lastactive'];
        }
        $tmpl->assign('FORUM_LASTACTIVE', (int) $res['forum_lastactive']);
        $tmpl->assign('FORUM_POSTS', (int) $res['forum_posts']);
        $tmpl->assign('FORUM_FINDPOSTS', HTTPDIR . $set['forum']['directory'] . '/search.php?send=1&author=' . urlencode($res['username']));
    }
    //Kommentare
    if ($apx->is_module('comments') && in_array('COMMENTS', $parse)) {
        require_once BASEDIR . getmodulepath('comments') . 'functions.php';
        $tmpl->assign('COMMENTS', comments_count($res['userid']));
    }
    //Interaktionen
    $link_buddy = iif($user->info['userid'] && !$user->is_buddy($res['userid']), mklink('user.php?action=addbuddy&amp;id=' . $res['userid'], 'user,addbuddy,' . $res['userid'] . '.html'));
    $link_sendpm = iif($user->info['userid'], mklink('user.php?action=newpm&amp;touser='******'userid'], 'user,newpm,' . $res['userid'] . '.html'));
    $link_sendmail = iif($user->info['userid'], mklink('user.php?action=newmail&amp;touser='******'userid'], 'user,newmail,' . $res['userid'] . '.html'));
    $tmpl->assign('LINK_BUDDY', $link_buddy);
    $tmpl->assign('LINK_SENDPM', $link_sendpm);
    $tmpl->assign('LINK_SENDEMAIL', $link_sendmail);
    //Links zu den Profil-Funktionen
    require_once dirname(__FILE__) . '/functions.php';
    user_assign_profile_links($tmpl, $res);
    //Buddyliste
    $tabledata = array();
    if ($res['pub_showbuddies'] && in_array('BUDDY', $parse)) {
        $data = $db->fetch("SELECT friendid FROM " . PRE . "_user_friends WHERE userid='" . $res['userid'] . "'");
        $buddies = get_ids($data, 'friendid');
        if (count($buddies)) {
            $data = $db->fetch("SELECT userid,username,groupid,reg_time,realname,gender,city,plz,country,city,lastactive,pub_invisible,avatar,avatar_title,birthday,pub_hidemail,custom1,custom2,custom3,custom4,custom5,custom6,custom7,custom8,custom9,custom10 FROM " . PRE . "_user WHERE userid IN (" . implode(',', $buddies) . ") ORDER BY username ASC");
            if (count($data)) {
                foreach ($data as $res) {
                    ++$i;
                    $age = 0;
                    if ($res['birthday']) {
                        $bd = explode('-', $res['birthday']);
                        $birthday = intval($bd[0]) . '. ' . getcalmonth($bd[1]) . iif($bd[2], ' ' . $bd[2]);
                        if ($bd[2]) {
                            $age = date('Y') - $bd[2];
                            if (intval(sprintf('%02d%02d', $bd[1], $bd[0])) > intval(date('md'))) {
                                $age -= 1;
                            }
                        }
                    }
                    $tabledata[$i]['ID'] = $res['userid'];
                    $tabledata[$i]['USERID'] = $res['userid'];
                    $tabledata[$i]['NAME'] = replace($res['username']);
                    $tabledata[$i]['USERNAME'] = replace($res['username']);
                    $tabledata[$i]['GROUPID'] = $res['groupid'];
                    $tabledata[$i]['EMAIL'] = replace(iif(!$res['pub_hidemail'], $res['email']));
                    $tabledata[$i]['EMAIL_ENCRYPTED'] = replace(iif(!$res['pub_hidemail'], cryptMail($res['email'])));
                    $tabledata[$i]['ONLINE'] = iif(!$res['pub_invisible'] && $res['lastactive'] + $set['user']['timeout'] * 60 >= time(), 1, 0);
                    $tabledata[$i]['ISONLINE'] = $tabledata[$i]['ONLINE'];
                    $tabledata[$i]['REALNAME'] = replace($res['realname']);
                    $tabledata[$i]['GENDER'] = $res['gender'];
                    $tabledata[$i]['CITY'] = replace($res['city']);
                    $tabledata[$i]['PLZ'] = replace($res['plz']);
                    $tabledata[$i]['COUNTRY'] = $res['country'];
                    $tabledata[$i]['REGTIME'] = $res['reg_time'];
                    $tabledata[$i]['REGDAYS'] = floor((time() - $res['reg_time']) / (24 * 3600));
                    $tabledata[$i]['LASTACTIVE'] = $res['lastactive'];
                    $tabledata[$i]['AVATAR'] = $user->mkavatar($res);
                    $tabledata[$i]['AVATAR_TITLE'] = $user->mkavtitle($res);
                    $tabledata[$i]['BIRTHDAY'] = $birthday;
                    $tabledata[$i]['AGE'] = $age;
                    //Custom-Felder
                    for ($ii = 1; $ii <= 10; $ii++) {
                        $tabledata[$i]['CUSTOM' . $ii . '_NAME'] = $set['user']['cusfield_names'][$ii - 1];
                        $tabledata[$i]['CUSTOM' . $ii] = compatible_hsc($res['custom' . $ii]);
                    }
                    //Interaktions-Links
                    if ($user->info['userid']) {
                        $tabledata[$i]['LINK_SENDPM'] = mklink('user.php?action=newpm&amp;touser='******'userid'], 'user,newpm,' . $res['userid'] . '.html');
                        $tabledata[$i]['LINK_SENDEMAIL'] = mklink('user.php?action=newmail&amp;touser='******'userid'], 'user,newmail,' . $res['userid'] . '.html');
                    }
                    //Nur Buddy-Liste
                    if ($buddylist) {
                        $tabledata[$i]['LINK_DELBUDDY'] = mklink('user.php?action=delbuddy&amp;id=' . $res['userid'], 'user,delbuddy,' . $res['userid'] . '.html');
                    }
                }
            }
        }
    }
    $tmpl->assign('BUDDY', $tabledata);
    //Template ausgeben
    $tmpl->parse('functions/' . $template, 'user');
}
Example #10
0
<? $author = get_user($the_post['created_by']); ?>

<div class="video_list_item"> <a class="mw_blue_link" href="<? print post_link($the_post['id']); ?>"><? print $the_post['content_title'];  ?></a> <a style="background-image: url('<? print thumbnail($the_post['id'], 120  ); ?>');" class="img" href="<? print post_link($the_post['id']); ?>"> </a> <a href="<? print post_link($the_post['id']); ?>" class="user_activity_comments right"><strong id=""><? print comments_count($the_post['id']); ?></strong><span></span></a> 

<? if($the_post['created_by'] == user_id()): ?>

<a href="javascript:add_edit_vid('<? print $the_post['id'] ?>');" class="left"><span><u>Edit</u></span></a>
<? endif; ?>


</div>
Example #11
0
 
<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> </div>