public function getUsersOnlineList($sfunc)
 {
     $users = $this->_getOnlineUsers($sfunc);
     $onlineUsersList = array();
     $totalguests = $totalhidden = 0;
     foreach ($users as $user) {
         if ($user->userid) {
             if ($user->showOnline) {
                 $onlineUsersList[] = CKunenaLink::GetProfileLink($user->userid, $user->username);
             } else {
                 $totalhidden++;
             }
         } else {
             $totalguests++;
         }
     }
     // Show hidden users as quests:
     $totalguests += $totalhidden;
     if ($totalguests > 0) {
         if ($totalguests == 1) {
             $onlineUsersList[] = '(' . $totalguests . ') ' . JText::_('COM_KUNENA_WHO_ONLINE_GUEST');
         } else {
             $onlineUsersList[] = '(' . $totalguests . ') ' . JText::_('COM_KUNENA_WHO_ONLINE_GUESTS');
         }
     }
     return implode(', ', $onlineUsersList);
 }
Example #2
0
 function kunenaAvatar($userid)
 {
     $kunena_user = KunenaFactory::getUser((int) $userid);
     $username = $kunena_user->getName();
     // Takes care of realname vs username setting
     $avatarlink = $kunena_user->getAvatarLink('', $this->params->get('avatar_w'), $this->params->get('avatar_h'));
     return CKunenaLink::GetProfileLink($userid, $avatarlink, $username);
 }
Example #3
0
 /**
  * adds the link for the connect param
  * @since 1.7.3
  * @param  $user pass-by-reference
  * @return void
  */
 private function getUserLink(&$user)
 {
     $username = KunenaFactory::getUser($user['userid'])->getName();
     if ($user['leapcorrection'] == $this->timeo->format('z', true) + 1) {
         $subject = getSubject($username);
         $db = JFactory::getDBO();
         $query = "SELECT id,catid,subject,time as year FROM #__kunena_messages WHERE subject='{$subject}'";
         $db->setQuery($query, 0, 1);
         $post = $db->loadAssoc();
         if ($db->getErrorMsg()) {
             KunenaError::checkDatabaseError();
         }
         $catid = $this->params->get('bcatid');
         $postyear = new JDate($post['year'], $this->soffset);
         if (empty($post) && !empty($catid) || !empty($post) && !empty($catid) && $postyear->format('Y', true) < $this->timeo->format('Y', true)) {
             $botname = $this->params->get('swkbbotname', JText::_('SW_KBIRTHDAY_FORUMPOST_BOTNAME_DEF'));
             $botid = $this->params->get('swkbotid');
             $time = CKunenaTimeformat::internalTime();
             //Insert the birthday thread into DB
             $query = "INSERT INTO #__kunena_messages (catid,name,userid,email,subject,time, ip)\n\t\t    \t\tVALUES({$catid},'{$botname}',{$botid}, '','{$subject}', {$time}, '')";
             $db->setQuery($query);
             $db->query();
             if ($db->getErrorMsg()) {
                 KunenaError::checkDatabaseError();
             }
             //What ID get our thread?
             $messid = (int) $db->insertID();
             //Insert the thread message into DB
             $message = getMessage($username);
             $query = "INSERT INTO #__kunena_messages_text (mesid,message)\n                    VALUES({$messid},'{$message}')";
             $db->setQuery($query);
             $db->query();
             if ($db->getErrorMsg()) {
                 KunenaError::checkDatabaseError();
             }
             //We know the thread ID so we can update the parent thread id with it's own ID because we know it's
             //the first post
             $query = "UPDATE #__kunena_messages SET thread={$messid} WHERE id={$messid}";
             $db->setQuery($query);
             $db->query();
             if ($db->getErrorMsg()) {
                 KunenaError::checkDatabaseError();
             }
             // now increase the #s in categories
             CKunenaTools::modifyCategoryStats($messid, 0, $time, $catid);
             $user['link'] = CKunenaLink::GetViewLink('view', $messid, $catid, '', $username);
             $uri = JFactory::getURI();
             if ($uri->getVar('option') == 'com_kunena') {
                 $app =& JFactory::getApplication();
                 $app->redirect($uri->toString());
             }
         } elseif (!empty($post)) {
             $user['link'] = CKunenaLink::GetViewLink('view', $post['id'], $post['catid'], '', $username);
         }
     } else {
         $user['link'] = CKunenaLink::GetProfileLink($user['userid']);
     }
 }
Example #4
0
	function displayDefault($tpl = null) {
		$this->config = KunenaFactory::getConfig ();
		$document = JFactory::getDocument();
		$document->setTitle(JText::_('COM_KUNENA_STAT_FORUMSTATS') . ' - ' .      $this->config->board_title);

		require_once(KPATH_SITE.'/lib/kunena.link.class.php');
		$kunena_stats = KunenaForumStatistics::getInstance ( );
		$kunena_stats->loadAll();

		$this->assign($kunena_stats);
		$this->latestMemberLink = CKunenaLink::GetProfileLink($this->lastUserId);
		$this->userlist = CKunenaLink::GetUserlistLink('', intval($this->get('memberCount')));
		$this->statisticsURL = KunenaRoute::_('index.php?option=com_kunena&view=statistics');

		parent::display ();
	}
Example #5
0
                        <?php 
    //get the Moderator list for display
    $fb_queryName = $fbConfig->username ? "username" : "name";
    $kunena_db->setQuery("select m.userid, u.{$fb_queryName} AS username FROM #__fb_moderation AS m LEFT JOIN #__users AS u ON u.id=m.userid WHERE m.catid='{$catid}'");
    $modslist = $kunena_db->loadObjectList();
    check_dberror("Unable to load moderators.");
    ?>

                        <?php 
    if (count($modslist) > 0) {
        ?>
                         <div class = "jr-bottomarea-modlist fbs">
                        <?php 
        echo '' . _GEN_MODERATORS . ": ";
        foreach ($modslist as $mod) {
            echo '&nbsp;' . CKunenaLink::GetProfileLink($fbConfig, $mod->userid, $mod->username) . '&nbsp; ';
        }
        ?>
                             </div>
                            <?php 
    }
    ?>

                <!-- /Mod List -->
                </th>

                <th  class = "th-right fbs" align="right">
                    <?php 
    //(JJ) FINISH: CAT LIST BOTTOM
    if ($fbConfig->enableforumjump) {
        require_once KUNENA_PATH_LIB . DS . 'kunena.forumjump.php';
Example #6
0
					<span class="ktopic-posted-time" title="<?php 
        echo CKunenaTimeformat::showDate($message->time, 'config_post_dateformat_hover');
        ?>
">
						<?php 
        echo JText::_('COM_KUNENA_POSTED_AT') . ' ' . CKunenaTimeformat::showDate($message->time, 'config_post_dateformat');
        ?>
&nbsp;
					</span>

					<?php 
        if ($message->name) {
            ?>
					<br />
					<span class="ktopic-by"><?php 
            echo JText::_('COM_KUNENA_GEN_BY') . ' ' . CKunenaLink::GetProfileLink(intval($message->userid), $this->escape($message->name));
            ?>
</span>
					<?php 
        }
        ?>
					<!-- /By -->
				</div>
			</td>
		</tr>

		<?php 
    }
}
?>
		<?php 
Example #7
0
  <!-- /Avatar -->

                                                <!-- Latest Post -->
        <span class="topic_latest_post">
        <?php 
        if ($fbConfig->default_sort == 'asc') {
            if ($leaf->moved == 0) {
                echo CKunenaLink::GetThreadPageLink($fbConfig, 'view', $leaf->catid, $leaf->thread, $threadPages, $fbConfig->messages_per_page, _GEN_LAST_POST, $last_reply[$leaf->id]->id);
            } else {
                echo _KUNENA_MOVED . ' ';
            }
        } else {
            echo CKunenaLink::GetThreadPageLink($fbConfig, 'view', $leaf->catid, $leaf->thread, 1, $fbConfig->messages_per_page, _GEN_LAST_POST, $last_reply[$leaf->id]->id);
        }
        if ($leaf->name) {
            echo ' ' . _GEN_BY . ' ' . CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, stripslashes($last_reply[$leaf->id]->name), 'nofollow', 'topic_latest_post_user');
        }
        ?>
        </span>
        <!-- /Latest Post -->
        <br />
                                <!-- Latest Post Date -->
        <span class="topic_date">
        <?php 
        echo time_since($last_reply[$leaf->id]->time, time() + $fbConfig->board_ofset * 3600);
        ?>
 <?php 
        echo _KUNENA_AGO;
        ?>
        </span>
        <!-- /Latest Post Date -->
Example #8
0
            }
        }
        ?>
					<!-- /Avatar -->
					<!-- Latest Post -->
					<span class="ktopic-latest-post">
					<?php 
        if ($leaf->moved) {
            echo JText::_('COM_KUNENA_MOVED');
        } elseif ($this->topic_ordering == 'ASC') {
            echo CKunenaLink::GetThreadPageLink('view', intval($leaf->catid), intval($leaf->thread), $threadPages, intval($this->config->messages_per_page), JText::_('COM_KUNENA_GEN_LAST_POST'), intval($this->lastreply[$leaf->thread]->id));
        } else {
            echo CKunenaLink::GetThreadPageLink('view', intval($leaf->catid), intval($leaf->thread), 1, intval($this->config->messages_per_page), JText::_('COM_KUNENA_GEN_LAST_POST'), intval($this->lastreply[$leaf->thread]->id));
        }
        if ($leaf->name) {
            echo ' ' . JText::_('COM_KUNENA_GEN_BY') . ' ' . CKunenaLink::GetProfileLink(intval($this->lastreply[$leaf->thread]->userid), $this->escape($this->lastreply[$leaf->thread]->name), '', 'nofollow');
        }
        ?>
					</span>
					<!-- /Latest Post -->
					<br />
					<!-- Latest Post Date -->
					<span class="ktopic-date" title="<?php 
        echo CKunenaTimeformat::showDate($this->lastreply[$leaf->thread]->time, 'config_post_dateformat_hover');
        ?>
">
						<?php 
        echo CKunenaTimeformat::showDate($this->lastreply[$leaf->thread]->time, 'config_post_dateformat');
        ?>
					</span>
					<!-- /Latest Post Date -->
Example #9
0
	public function loadTopThankyous($limit=0) {
		$limit = $limit ? $limit : $this->_config->popthankscount;
		if (count($this->topThanks) < $limit) {
			$query = "SELECT targetuserid AS id, COUNT(targetuserid) AS count FROM `#__kunena_thankyou` GROUP BY targetuserid ORDER BY count DESC";
			$this->_db->setQuery ( $query, 0, $limit );
			$this->topThanks = $this->_db->loadObjectList ();
			KunenaError::checkDatabaseError();
			$top = reset($this->topThanks);
			if (empty($top->count)) {
				$this->topThanks = array();
				return;
			}
			foreach ($this->topThanks as $item) {
				$item->link = CKunenaLink::GetProfileLink($item->id);
				$item->percent = round(100 * $item->count / $top->count);
			}
			$top->title = JText::_('COM_KUNENA_STAT_TOP') .' '. $limit .' '. JText::_('COM_KUNENA_STAT_POPULAR') .' '. JText::_('COM_KUNENA_STAT_POPULAR_USER_THANKS_YOU');
			$top->titleName = JText::_('COM_KUNENA_USRL_USERNAME');
			$top->titleCount =  JText::_('COM_KUNENA_STAT_THANKS_YOU_RECEIVED');
		}
		return array_slice($this->topThanks, 0, $limit);
	}
Example #10
0
	<td class="kcol-mid kcol-ktopicviews">
		<span class="ktopic-views-number"><?php echo $this->formatLargeNumber ( $this->topic->hits );?></span>
		<span class="ktopic-views"> <?php echo JText::_('COM_KUNENA_GEN_HITS');?> </span>
	</td>

	<td class="kcol-mid kcol-ktopiclastpost">
		<div class="klatest-post-info">
			<?php if ($this->topic->ordering) echo $this->getIcon ( 'ktopicsticky', JText::_('COM_KUNENA_GEN_ISSTICKY') ); ?>
			<?php if (!empty($this->topic->avatar)) : ?>
			<span class="ktopic-latest-post-avatar"> <?php echo CKunenaLink::GetProfileLink ( $this->topic->last_post_userid, $this->topic->avatar ) ?></span>
			<?php endif; ?>

			<span class="ktopic-latest-post">
			<?php
				echo $this->getTopicLink ( $this->topic, 'last', JText::_('COM_KUNENA_GEN_LAST_POST') );
				echo ' ' . JText::_('COM_KUNENA_GEN_BY') . ' ' . CKunenaLink::GetProfileLink ( $this->topic->last_post_userid, $this->escape($this->topic->last_post_guest_name), '', 'nofollow' );
			?>
			</span>

			<br />
			<span class="ktopic-date" title="<?php echo KunenaDate::getInstance($this->topic->last_post_time)->toKunena('config_post_dateformat_hover'); ?>">
				<?php echo KunenaDate::getInstance($this->topic->last_post_time)->toKunena('config_post_dateformat'); ?>
			</span>
		</div>
	</td>

<?php if (!empty($this->topicActions)) : ?>
	<td class="kcol-mid ktopicmoderation"><input class ="kcheck" type="checkbox" name="topics[<?php echo $this->topic->id?>]" value="1" /></td>
<?php endif; ?>
</tr>
<?php if ($this->module) : ?>
Example #11
0
			?>
			<span class="ktopic-latest-post-avatar">
			<?php echo CKunenaLink::GetProfileLink ( intval($this->message->userid), $useravatar ) ?>
			</span>
			<?php
				endif;
			endif;
			?>
			<!-- /Avatar -->
			<!-- By -->
			<span class="ktopic-posted-time" title="<?php echo KunenaDate::getInstance($this->message->time)->toKunena('config_post_dateformat_hover'); ?>">
				<?php echo JText::_('COM_KUNENA_POSTED_AT') . ' ' . KunenaDate::getInstance($this->message->time)->toKunena('config_post_dateformat'); ?>&nbsp;
			</span>

			<?php if ($this->message->userid) : ?>
			<br />
			<span class="ktopic-by"><?php echo JText::_('COM_KUNENA_GEN_BY') . ' ' . CKunenaLink::GetProfileLink ( intval($this->message->userid), $this->escape($this->message->name) ); ?></span>
			<?php endif; ?>
			<!-- /By -->
		</div>
	</td>

<?php if (!empty($this->postActions)) : ?>
	<td class="kcol-mid ktopicmoderation"><input class ="kcheck" type="checkbox" name="posts[<?php echo $this->message->id?>]" value="1" /></td>
<?php endif; ?>
</tr>
<?php if ($this->module) : ?>
<tr>
	<td class="ktopicmodule" colspan="<?php echo empty($this->postActions) ? 5 : 6 ?>"><?php echo $this->module; ?></td>
</tr>
<?php endif; ?>
Example #12
0
    if ($fmessage->userid > 0) {
        echo CKunenaLink::GetProfileLink($fbConfig, $fmessage->userid, $msg_username);
    } else {
        echo $msg_username;
    }
    ?>
                    </span>
<?php 
    if ($fbConfig->userlist_usertype) {
        echo '<span class = "msgusertype">(' . $msg_usertype . ')</span>';
    }
    ?>
                    <br/>
<?php 
    if ($fmessage->userid > 0) {
        echo CKunenaLink::GetProfileLink($fbConfig, $fmessage->userid, $msg_avatar);
    } else {
        echo $msg_avatar;
    }
    ?>

				<?php 
    $gr_title = getFBGroupName($lists["userid"]);
    if ($gr_title->id > 1) {
        ?>

                    <span class = "view-group_<?php 
        echo $gr_title->id;
        ?>
"> <?php 
        echo $gr_title->title;
Example #13
0
		<?php 
            }
            ?>

	<?php 
        } elseif ($this->type == 'thanks') {
            ?>
		<?php 
            foreach ($this->stats as $stat) {
                ?>
		<tr class="krow<?php 
                echo ($i ^= 1) + 1;
                ?>
">
			<td class="kcol-first"><?php 
                echo CKunenaLink::GetProfileLink($stat->id, JString::substr(htmlspecialchars($stat->username), '0', $this->params->get('titlelength')));
                ?>
</td>
			<td class="kcol-last"><span class="kstats-hits-bg"><span class="kstats-hits" style="width:<?php 
                echo $this->getBarWidth($stat->receivedthanks);
                ?>
%;"><?php 
                echo CKunenaTools::formatLargeNumber($stat->receivedthanks, 3);
                ?>
</span></span></td>
		</tr>
		<?php 
            }
            ?>
	<?php 
        }
Example #14
0
					<?php 
        foreach ($this->topuserthanks as $topthanks) {
            $k = 1 - $k;
            if ($topthanks->receivedthanks == $this->topthanks) {
                $barwidth = 100;
            } else {
                $barwidth = round($topthanks->receivedthanks * 100 / $this->topthanks);
            }
            ?>
					<tr class = "k<?php 
            echo $this->escape($tabclass[$k]);
            ?>
">
						<td class="kcol-first">
							<?php 
            echo CKunenaLink::GetProfileLink(intval($topthanks->id));
            ?>
						</td>
						<td class="kcol-mid">
							<img class = "kstats-bar" src = "<?php 
            echo KUNENA_TMPLTMAINIMGURL . 'images/bar.png';
            ?>
" alt = "" height = "10" width = "<?php 
            echo intval($barwidth);
            ?>
%"/>
						</td>
						<td class="kcol-last">
							<?php 
            echo intval($topthanks->receivedthanks);
            ?>
Example #15
0
	public function profileIcon($name) {
		switch ($name) {
			case 'gender' :
				switch ($this->gender) {
					case 1 :
						$gender = 'male';
						break;
					case 2 :
						$gender = 'female';
						break;
					default :
						$gender = 'unknown';
				}
				$title = JText::_ ( 'COM_KUNENA_MYPROFILE_GENDER' ) . ': ' . JText::_ ( 'COM_KUNENA_MYPROFILE_GENDER_' . $gender );
				return '<span class="kicon-profile kicon-profile-gender-' . $gender . '" title="' . $title . '"></span>';
				break;
			case 'birthdate' :
				if ($this->birthdate) {
					$date = new JDate ( $this->birthdate, 0 );
					if ($date->toFormat('%Y')<1902) break;
					return '<span class="kicon-profile kicon-profile-birthdate" title="' . JText::_ ( 'COM_KUNENA_MYPROFILE_BIRTHDATE' ) . ': ' . KunenaDate::getInstance($this->birthdate)->toKunena( 'date', 0 ) . '"></span>';
				}
				break;
			case 'location' :
				if ($this->location)
					return '<span class="kicon-profile kicon-profile-location" title="' . JText::_ ( 'COM_KUNENA_MYPROFILE_LOCATION' ) . ': ' . $this->escape ( $this->location ) . '"></span>';
				break;
			case 'website' :
				$url = 'http://' . $this->websiteurl;
				if (! $this->websitename)
					$websitename = $this->websiteurl;
				else
					$websitename = $this->websitename;
				if ($this->websiteurl)
					return '<a href="' . $this->escape ( $url ) . '" target="_blank"><span class="kicon-profile kicon-profile-website" title="' . JText::_ ( 'COM_KUNENA_MYPROFILE_WEBSITE' ) . ': ' . $this->escape ( $websitename ) . '"></span></a>';
				break;
			case 'private' :
				$pms = KunenaFactory::getPrivateMessaging ();
				return $pms->showIcon ( $this->userid );
				break;
			case 'email' :
				// TODO: show email
				return; // '<span class="email" title="'. JText::_('COM_KUNENA_MYPROFILE_EMAIL').'"></span>';
				break;
			case 'profile' :
				if (! $this->userid)
					return;
				return CKunenaLink::GetProfileLink ( $this->userid, '<span class="profile" title="' . JText::_ ( 'COM_KUNENA_VIEW_PROFILE' ) . '"></span>' );
				break;
		}
	}
Example #16
0
        check_dberror("Unable to load moderators.");
        ?>

                        <?php 
        if (count($modslist) > 0) {
            ?>
        <div class = "fbbox-bottomarea-modlist">
          <?php 
            echo '' . _GEN_MODERATORS . ": ";
            $mod_cnt = 0;
            foreach ($modslist as $mod) {
                if ($mod_cnt) {
                    echo ', ';
                }
                $mod_cnt++;
                echo CKunenaLink::GetProfileLink($fbConfig, $mod->userid, $fbConfig->username ? $mod->username : $mod->name);
            }
            ?>
        </div>
        <?php 
        }
        ?>
        <!-- /Mod List -->
      </td>
      <td class="fb_list_categories"> <?php 
        if ($fbConfig->enableforumjump) {
            require KUNENA_PATH_LIB . DS . 'kunena.forumjump.php';
        }
        ?>
      </td>
    </tr>
						<th class="kcol-last kbanned-expire" width="32%"><?php echo JText::_('COM_KUNENA_BAN_EXPIRETIME'); ?></th>
					</tr>
				</thead>
				<tbody>
					<?php
					if ( $this->bannedusers ) :
						foreach ($this->bannedusers as $userban) :
							$bantext = $userban->blocked ? JText::_('COM_KUNENA_BAN_UNBLOCK_USER') : JText::_('COM_KUNENA_BAN_UNBAN_USER');
							$j++;
					?>
					<tr class="krow<?php echo ($i^=1)+1;?>">
						<td class="kcol-first kid">
							<?php echo $j; ?>
						</td>
						<td class="kcol-mid kbanned-user">
							<?php echo CKunenaLink::GetProfileLink ( intval($userban->userid) ) ?>
						</td>
						<td class="kcol-mid kbanned-from">
							<span><?php echo $userban->blocked ? JText::_('COM_KUNENA_BAN_BANLEVEL_JOOMLA') : JText::_('COM_KUNENA_BAN_BANLEVEL_KUNENA') ?></span>
						</td>
						<td class="kcol-mid kbanned-start">
							<span><?php echo KunenaDate::getInstance($userban->created_time)->toKunena('datetime') ?></span>
						</td>
						<td class="kcol-last kbanned-expire">
							<span><?php echo $userban->isLifetime() ? JText::_('COM_KUNENA_BAN_LIFETIME') : KunenaDate::getInstance($userban->expiration)->toKunena('datetime') ?></span>
						</td>
					</tr>
					<?php endforeach; ?>
					<?php else : ?>
					<tr class="krow2">
						<td colspan="5" class="kcol-first">
Example #18
0
						<?php if ($this->config->userlist_online) : ?>
						<td class="kcol-mid">
							<span class="kicon-button kbuttononline-<?php echo $profile->isOnline('yes', 'no') ?>"><span class="online-<?php echo $profile->isOnline('yes', 'no') ?>"><span><?php echo $profile->isOnline(JText::_('COM_KUNENA_ONLINE'), JText::_('COM_KUNENA_OFFLINE')); ?></span></span></span>
						</td>
						<?php endif; ?>

						<?php if ($this->config->userlist_avatar) : ?>
						<td class="kcol-mid"><?php echo !empty($uslavatar) ? CKunenaLink::GetProfileLink(intval($user->id), $uslavatar) : '&nbsp;' ?></td>
						<?php endif; ?>

						<?php if ($this->config->userlist_name) : ?>
						<td class="kcol-mid"><?php echo CKunenaLink::GetProfileLink(intval($user->id), $this->escape($user->name)); ?></td>
						<?php endif; ?>

						<?php if ($this->config->userlist_username) : ?>
						<td class="kcol-mid"><?php echo CKunenaLink::GetProfileLink(intval($user->id), $this->escape($user->username)); ?></td>
						<?php endif; ?>

						<?php if ($this->config->userlist_posts) : ?>
						<td class="kcol-mid"><?php echo intval($user->posts); ?></td>
						<?php endif; ?>

						<?php if ($this->config->userlist_karma) : ?>
						<td class="kcol-mid"><?php echo intval($user->karma); ?></td>
						<?php endif; ?>

						<?php if ($this->config->userlist_email) : ?>
						<td class="kcol-mid"><?php echo $user->email ? JHTML::_('email.cloak', $user->email) : '' ?></td>
						<?php endif; ?>

						<?php if ($this->config->userlist_usertype) : ?>
Example #19
0
    }
    ?>
							<tr class="krow<?php 
    echo ($i ^= 1) + 1;
    ?>
">
								<td colspan="4">
									<?php 
    if (empty($nbvoters)) {
        $nbvoters = "0";
    }
    echo JText::_('COM_KUNENA_POLL_VOTERS_TOTAL') . " <strong>" . $nbvoters . "</strong> ";
    if ($this->config->pollresultsuserslist && !empty($pollusersvoted)) {
        echo " ( ";
        foreach ($pollusersvoted as $row) {
            echo CKunenaLink::GetProfileLink(intval($row->userid)) . " ";
        }
        echo " ) ";
    }
    ?>
								</td>
							</tr>
							<?php 
    if ($this->my->id == "0") {
        ?>
							<tr class="krow2">
								<td colspan="4" class="kpoll-info"><?php 
        echo JText::_('COM_KUNENA_POLL_NOT_LOGGED');
        ?>
</td>
							</tr>
Example #20
0
	<?php elseif ( $this->type == 'posters' ) : ?>
		<?php foreach ( $this->stats as $stat) : ?>
		<tr class="krow<?php echo ($i^=1)+1;?>">
			<td class="kcol-first"><?php echo CKunenaLink::GetProfileLink($stat->userid, JString::substr ( htmlspecialchars ($stat->username), '0', $this->params->get ( 'titlelength' ) )); ?></td>
			<td class="kcol-last"><span class="kstats-hits-bg"><span class="kstats-hits" style="width:<?php echo $this->getBarWidth($stat->posts);?>%;"><?php echo CKunenaTools::formatLargeNumber($stat->posts, 3);?></span></span></td>
		</tr>
		<?php endforeach; ?>

	<?php elseif ( $this->type == 'profiles' ) : ?>
		<?php foreach ( $this->stats as $stat) : ?>
		<tr class="krow<?php echo ($i^=1)+1;?>">
			<td class="kcol-first"><?php echo CKunenaLink::GetProfileLink($stat->user_id, JString::substr ( htmlspecialchars ($stat->user), '0', $this->params->get ( 'titlelength' ) )); ?></td>
			<td class="kcol-last"><span class="kstats-hits-bg"><span class="kstats-hits" style="width:<?php echo $this->getBarWidth($stat->hits);?>%;"><?php echo CKunenaTools::formatLargeNumber($stat->hits, 3);?></span></span></td>
		</tr>
		<?php endforeach; ?>

	<?php elseif ( $this->type == 'thanks' ) : ?>
		<?php foreach ( $this->stats as $stat) : ?>
		<tr class="krow<?php echo ($i^=1)+1;?>">
			<td class="kcol-first"><?php echo CKunenaLink::GetProfileLink($stat->id, JString::substr ( htmlspecialchars ($stat->username), '0', $this->params->get ( 'titlelength' ) )); ?></td>
			<td class="kcol-last"><span class="kstats-hits-bg"><span class="kstats-hits" style="width:<?php echo $this->getBarWidth($stat->receivedthanks);?>%;"><?php echo CKunenaTools::formatLargeNumber($stat->receivedthanks, 3);?></span></span></td>
		</tr>
		<?php endforeach; ?>
	<?php endif; ?>
	<?php endif; ?>
	</table>
	<?php endif; ?>
	<?php if ($this->params->get( 'sh_statslink' )) : ?>
	<div class="kstats-all"><?php echo CKunenaLink::GetStatsLink(JText::_('MOD_KUNENASTATS_LINK')); ?></div>
	<?php endif; ?>
</div>
Example #21
0
    function showlist($ulrows, $total_results, $pageNav, $limitstart, $query_ext, $search = "")
    {
        $app =& JFactory::getApplication();
        $fbConfig =& CKunenaConfig::getInstance();
        $kunena_db =& JFactory::getDBO();
        if ($search == "") {
            $search = _KUNENA_USRL_SEARCH;
        }
        ?>

        <script type = "text/javascript">
            <!--
            function validate()
            {
                if ((document.usrlform.search == "") || (document.usrlform.search.value == ""))
                {
                    alert('<?php 
        echo _KUNENA_USRL_SEARCH_ALERT;
        ?>
');
                    return false;
                }
                else
                {
                    return true;
                }
            }
                    //-->
        </script>

        <?php 
        if ($fbConfig->joomlastyle < 1) {
            $boardclass = "fb_";
        }
        ?>
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr1">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr2">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr3">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr4">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr5">
        <table class = "fb_blocktable" id ="fb_userlist" border = "0" cellspacing = "0" cellpadding = "0" width="100%">
            <thead>
                <tr>
                    <th>
                        <table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
                            <tr>
                                <td align = "left">
                                    <div class = "fb_title_cover  fbm">
                                        <span class="fb_title fbl"> <?php 
        echo _KUNENA_USRL_USERLIST;
        ?>
</span>

                                        <?php 
        printf(_KUNENA_USRL_REGISTERED_USERS, $app->getCfg('sitename'), $total_results);
        ?>
                                    </div>
                                </td>

                                <td align = "right">
                                    <form name = "usrlform" method = "post" action = "<?php 
        echo CKunenaLink::GetUserlistURL();
        ?>
" onsubmit = "return validate()">
                                        <input type = "text"
                                            name = "search"
                                            class = "inputbox"
                                            style = "width:150px"
                                            maxlength = "100" value = "<?php 
        echo $search;
        ?>
" onblur = "if(this.value=='') this.value='<?php 
        echo $search;
        ?>
';" onfocus = "if(this.value=='<?php 
        echo $search;
        ?>
') this.value='';" />

                                        <input type = "image" src = "<?php 
        echo KUNENA_TMPLTMAINIMGURL . '/images/usl_search_icon.gif';
        ?>
" alt = "<?php 
        echo _KUNENA_USRL_SEARCH;
        ?>
" align = "top" style = "border: 0px;"/>
                                    </form>
                                </td>
                            </tr>
                        </table>
                    </th>
                </tr>
            </thead>

            <tbody>
                <tr>
                    <td class = "<?php 
        echo $boardclass;
        ?>
fb-userlistinfo">
                        <!-- Begin: Listing -->
                        <table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
                            <tr class = "fb_sth  fbs">
                                <th class = "th-1 frst <?php 
        echo $boardclass;
        ?>
sectiontableheader" align="center">
                                </th>

                                <?php 
        if ($fbConfig->userlist_online) {
            ?>

                                    <th class = "th-2 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_ONLINE;
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_avatar) {
            ?>

                                    <th class = "th-3 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_AVATAR;
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_name) {
            ?>

                                    <th class = "th-4 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_NAME;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=name&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=name&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_username) {
            ?>

                                    <th class = "th-5 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_USERNAME;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=username&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=username&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_group) {
            ?>

                                    <th class = "th-6 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_GROUP;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=group_id&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=group_id&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_posts) {
            ?>

                                    <th class = "th-7 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_POSTS;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=posts&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=posts&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_karma) {
            ?>

                                    <th class = "th-7 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_KARMA;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=karma&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=karma&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_email) {
            ?>

                                    <th class = "th-8 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_EMAIL;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=email&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=email&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_usertype) {
            ?>

                                    <th class = "th-9 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_USERTYPE;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=usertype&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=usertype&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_joindate) {
            ?>

                                    <th class = "th-10 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_JOIN_DATE;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=registerDate&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=registerDate&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                     </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_lastvisitdate) {
            ?>

                                    <th class = "th-11  <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_LAST_LOGIN;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=lastvisitDate&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=lastvisitDate&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

								  <?php 
        if ($fbConfig->userlist_userhits) {
            ?>
								<th class = "th-12 lst <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_HITS;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=uhits&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=uhits&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
								</th>
                                <?php 
        }
        ?>

                            </tr>

                            <?php 
        $i = 1;
        foreach ($ulrows as $ulrow) {
            $evenodd = $i % 2;
            if ($evenodd == 0) {
                $usrl_class = "sectiontableentry1";
            } else {
                $usrl_class = "sectiontableentry2";
            }
            $nr = $i + $limitstart;
            // Avatar
            $uslavatar = '';
            if ($fbConfig->avatar_src == "clexuspm") {
                $uslavatar = '<img  border="0" class="usl_avatar" src="' . MyPMSTools::getAvatarLinkWithID($ulrow->id, "s") . '" alt="" />';
            } else {
                if ($fbConfig->avatar_src == "cb") {
                    $kunenaProfile =& CKunenaCBProfile::getInstance();
                    $uslavatar = $kunenaProfile->showAvatar($ulrow->id);
                } else {
                    $kunena_db->setQuery("SELECT avatar FROM #__fb_users WHERE userid='{$ulrow->id}'");
                    $avatar = $kunena_db->loadResult();
                    if ($avatar != '') {
                        if (!file_exists(KUNENA_PATH_UPLOADED . DS . 'avatars/s_' . $avatar)) {
                            $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" />';
                        } else {
                            $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_' . $avatar . '" alt="" />';
                        }
                    } else {
                        $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_nophoto.jpg" alt="" />';
                    }
                }
            }
            //
            ?>

                                <tr class = "<?php 
            echo $boardclass;
            echo $usrl_class;
            ?>
  fbm">
                                    <td class = "td-1 frst fbs" align="center">
<?php 
            echo $nr;
            ?>
                                    </td>

                                    <?php 
            if ($fbConfig->userlist_online) {
                ?>

                                        <td class = "td-2">
                                            <?php 
                // online - ofline status
                $sql = "SELECT COUNT(userid) FROM #__session WHERE userid='{$ulrow->id}'";
                $kunena_db->setQuery($sql);
                $isonline = $kunena_db->loadResult();
                if ($isonline && $ulrow->showOnline == 1) {
                    echo isset($fbIcons['onlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['onlineicon'] . '" border="0" alt="' . _MODLIST_ONLINE . '" />' : '  <img src="' . KUNENA_URLEMOTIONSPATH . 'onlineicon.gif" border="0"  alt="' . _MODLIST_ONLINE . '" />';
                } else {
                    echo isset($fbIcons['offlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['offlineicon'] . '" border="0" alt="' . _MODLIST_OFFLINE . '" />' : '  <img src="' . KUNENA_URLEMOTIONSPATH . 'offlineicon.gif" border="0"  alt="' . _MODLIST_OFFLINE . '" />';
                }
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_avatar) {
                ?>

                                        <td class = "td-3" align="center">
                                      <?php 
                if (strlen($uslavatar)) {
                    echo CKunenaLink::GetProfileLink($fbConfig, $ulrow->id, $uslavatar);
                } else {
                    echo '&nbsp;';
                }
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_name) {
                ?>

                                        <td class = "td-4  fbm" align="center">
						<?php 
                echo CKunenaLink::GetProfileLink($fbConfig, $ulrow->id, $ulrow->name);
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_username) {
                ?>

                                        <td class = "td-5  fbm" align="center">
						<?php 
                echo CKunenaLink::GetProfileLink($fbConfig, $ulrow->id, $ulrow->username);
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_group) {
                ?>

                                        <td class = "td-6  fbs" align="center">
                                            <span class = "view-group_<?php 
                echo $ulrow->group_id;
                ?>
"> <?php 
                echo $ulrow->title;
                ?>
 </span>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_posts) {
                ?>

                                        <td class = "td-7  fbs" align="center">
<?php 
                echo $ulrow->posts;
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_karma) {
                ?>

                                        <td class = "td-7 fbs" align="center">
<?php 
                echo $ulrow->karma;
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_email) {
                echo "\t\t<td class=\"td-8 fbs\"  align=\"center\"><a href=\"mailto:{$ulrow->email}\">{$ulrow->email}</a></td>\n";
            }
            if ($fbConfig->userlist_usertype) {
                echo "\t\t<td  class=\"td-9 fbs\"  align=\"center\">{$ulrow->usertype}</td>\n";
            }
            if ($fbConfig->userlist_joindate) {
                echo "\t\t<td  class=\"td-10 fbs\"  align=\"center\">" . convertDate($ulrow->registerDate) . "</td>\n";
            }
            if ($fbConfig->userlist_lastvisitdate) {
                echo "\t\t<td  class=\"td-11 fbs\"  align=\"center\">" . convertDate($ulrow->lastvisitDate) . "</td>\n";
            }
            ?>

                                    <td class = "td-12 lst fbs" align="center">
									 <?php 
            if ($fbConfig->userlist_userhits) {
                ?>
									<?php 
                echo $ulrow->uhits;
                ?>

                                    <?php 
            }
            ?>
									 </td>

                            <?php 
            echo "\t</tr>\n";
            $i++;
        }
        ?>

        </table>

		<form name = "usrlform" method = "post" action = "<?php 
        echo CKunenaLink::GetUserlistURL();
        ?>
" onsubmit = "return false;">
        <table width = "100%"  class="fb_userlist_pagenav" border = "0" cellspacing = "0" cellpadding = "0">
            <tr class = "fb_sth  fbs">
                <th class = "th-1  fbm" align = "center" style = "text-align:center;">

                            <?php 
        // TODO: fxstein - Need to perform SEO cleanup
        echo $pageNav->getPagesLinks(CKunenaLink::GetUserlistURL($query_ext));
        ?>
                </th>
            </tr>
        </table>



        <table class = "fb_blocktable" id="fb_userlist_bottom" style="border-bottom:0px;margin:0;" border = "0" cellspacing = "0" cellpadding = "0" width="100%">
                <tr>
                    <th  class = "th-right  fbs" align="right" style="text-align:right">
                     <?php 
        echo $pageNav->getPagesCounter();
        ?>
 | <?php 
        echo _KUNENA_USRL_DISPLAY_NR;
        ?>
 <?php 
        echo $pageNav->getLimitBox(CKunenaLink::GetUserlistURL($query_ext));
        ?>
                </th>
            </tr>
        </table>
		</form>

        </td>
	</tr>
  </tbody>
</table>
        <!-- Finish: Listing -->

</div>
</div>
</div>
</div>
</div>
        <?php 
        //(JJ) BEGIN: WHOISONLINE
        if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/who/whoisonline.php')) {
            include KUNENA_ABSTMPLTPATH . '/plugin/who/whoisonline.php';
        } else {
            include KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'plugin/who/whoisonline.php';
        }
        //(JJ) FINISH: WHOISONLINE
        ?>
        <!-- Begin: Forum Jump -->
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr1">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr2">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr3">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr4">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr5">
        <table class = "fb_blocktable" id="fb_bottomarea"   border = "0" cellspacing = "0" cellpadding = "0">
            <thead>
                <tr>
                    <th  class = "th-right">
                        <?php 
        //(JJ) FINISH: CAT LIST BOTTOM
        if ($fbConfig->enableforumjump) {
            require_once KUNENA_PATH_LIB . DS . 'kunena.forumjump.php';
        }
        ?>
                    </th>
                </tr>
            </thead>
			<tbody><tr><td></td></tr></tbody>
		</table>
        </div>
</div>
</div>
</div>
</div>
        <!-- Finish: Forum Jump -->

<?php 
    }
Example #22
0
                <tr class = "<?php 
        echo $boardclass . '' . $tabclass[$k];
        ?>
">
                    <td class = "td-1">
                        <div style = "float: right; width: 14ex;">
                        </div>

                        <span>

                        <?php 
        if ($user->userid == 0) {
            echo $user->username;
        } else {
            echo CKunenaLink::GetProfileLink($fbConfig, $user->userid, $user->username);
        }
        ?>

                        </span>

                        <?php 
        if ($kunena_my->gid > 1) {
            ?>

                            (<?php 
            echo $user->userip;
            ?>
)

                        <?php 
Example #23
0
    ?>
						</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td rowspan="2" valign="top" class="kprofile-left  kauthor">
							<p><?php 
    echo $this->escape($mes->name);
    ?>
</p>
							<p><?php 
    $profile = KunenaFactory::getUser(intval($mes->userid));
    $useravatar = $profile->getAvatarLink('', '', 'profile');
    if ($useravatar) {
        echo CKunenaLink::GetProfileLink(intval($mes->userid), $useravatar);
    }
    ?>
</p>
						</td>
						<td class="kmessage-left khistorymsg">
							<div class="kmsgbody">
								<div class="kmsgtext">
									<?php 
    echo KunenaParser::parseBBCode($mes->message, $this);
    ?>
								</div>
							</div>
							<?php 
    if (!empty($this->attachmentslist[$mes->id])) {
        $this->displayAttachments($this->attachmentslist[$mes->id]);
Example #24
0
							<p><?php echo JText::_('COM_KUNENA_MODERATION_TITLE_SELECTED') ?>:</p>
							<div class="kmoderate-message">
								<h4><?php echo $this->message->subject ?></h4>
								<div class="kmessage-timeby">
									<span class="kmessage-time" title="<?php echo KunenaDate::getInstance($this->message->time)->toKunena('config_post_dateformat_hover'); ?>">
										<?php echo JText::_('COM_KUNENA_POSTED_AT')?> <?php echo KunenaDate::getInstance($this->message->time)->toKunena('config_post_dateformat'); ?>
									</span>
								<span class="kmessage-by"><?php echo JText::_('COM_KUNENA_BY')?> <?php echo CKunenaLink::GetProfileLink($this->message->userid, $this->message->name) ?></span></div>
								<div class="kmessage-avatar"><?php echo KunenaFactory::getAvatarIntegration()->getLink(KunenaFactory::getUser($this->message->userid)); ?></div>
								<div class="kmessage-msgtext"><?php echo KunenaHtmlParser::stripBBCode ($this->message->message, 300) ?></div>
								<div class="clr"></div>
							</div>

							<p>
							<?php echo JText::_('COM_KUNENA_MODERATE_THIS_USER') ?>:
								<strong><?php echo CKunenaLink::GetProfileLink($this->message->userid, $this->escape($this->message->name).' ('.$this->message->userid.')') ?></strong>
							</p>

							<ul>
								<li><label for="kmoderate-mode-selected" class="hasTip" title="<?php echo JText::_('COM_KUNENA_MODERATION_MOVE_SELECTED') ?> :: "><input type="radio" value="0" checked="checked" name="mode" id="kmoderate-mode-selected"><?php echo JText::_('COM_KUNENA_MODERATION_MOVE_SELECTED') ?></label></li>
								<li><label for="kmoderate-mode-newer" class="hasTip" title="<?php echo JText::sprintf ( 'COM_KUNENA_MODERATION_MOVE_NEWER', $this->escape($this->replies) ) ?> :: "><input type="radio" value="2" name="mode" id="kmoderate-mode-newer"><?php echo JText::sprintf ( 'COM_KUNENA_MODERATION_MOVE_NEWER', $this->escape($this->replies) ) ?></label></li>
							</ul>
							<br/>
							<?php else: ?>
							 <label><?php echo JText::_('COM_KUNENA_MODERATION_DEST') ?>:</label>
							<?php endif; ?>

							<div class="modcategorieslist">
								<label for="kmod_categories1"><?php echo JText::_('COM_KUNENA_MODERATION_DEST_CATEGORY') ?>:</label>
								<?php echo $this->categorylist ?>
						<th class="kbanned-expire" width="32%"><?php echo JText::_('COM_KUNENA_BAN_EXPIRETIME'); ?></th>
					</tr>
				</thead>
				<tbody>
					<?php
					if ( $this->bannedusers ) :
						foreach ($this->bannedusers as $userban) :
							$bantext = $userban->blocked ? JText::_('COM_KUNENA_BAN_UNBLOCK_USER') : JText::_('COM_KUNENA_BAN_UNBAN_USER');
							$j++;
					?>
					<tr class="krow<?php echo ($i^=1)+1;?>">
						<td class="kcol-first kid">
							<?php echo $j; ?>
						</td>
						<td class="kcol-mid kbanned-user">
							<a href="#"><?php echo CKunenaLink::GetProfileLink ( intval($userban->userid) ); ?> </a>
						</td>
						<td class="kcol-mid kbanned-from">
							<span><?php echo $userban->blocked ? JText::_('COM_KUNENA_BAN_BANLEVEL_JOOMLA') : JText::_('COM_KUNENA_BAN_BANLEVEL_KUNENA'); ?></span>
						</td>
						<td class="kcol-mid kbanned-start">
							<span><?php echo KunenaDate::getInstance($userban->created_time)->toKunena('datetime'); ?></span>
						</td>
						<td class="kcol-mid kbanned-expire">
							<span><?php echo $userban->isLifetime() ? JText::_('COM_KUNENA_BAN_LIFETIME') : KunenaDate::getInstance($userban->expiration)->toKunena('datetime'); ?></span>
						</td>
					</tr>
					<?php endforeach; ?>
					<?php else : ?>
					<tr class="krow2">
						<td colspan="5" class="kcol-first">
Example #26
0
        foreach ($topprofiles as $topprofile) {
            $k = 1 - $k;
            if ($topprofile->hits == $topprofil) {
                $barwidth = 100;
            } else {
                $barwidth = round($topprofile->hits * 100 / $topprofil);
            }
            ?>

    <tr class = "<?php 
            echo '' . $boardclass . '' . $tabclass[$k] . '';
            ?>
">
      <td  class="td-1"  align="left">
        <?php 
            echo CKunenaLink::GetProfileLink($fbConfig, $topprofile->user_id, $topprofile->user);
            ?>
</td>
      <td  class="td-2">
         <img class = "jr-forum-stat-bar" src = "<?php 
            echo KUNENA_TMPLTMAINIMGURL . '/images/bar.gif';
            ?>
" alt = "" height = "10" width = "<?php 
            echo $barwidth;
            ?>
%"/>
                                    </td>
      <td  class="td-3">
	  <?php 
            echo $topprofile->hits;
            ?>
				<span class="kpost-userposts"><?php echo JText::_('COM_KUNENA_POSTS') . intval($this->userposts); ?></span>
			<?php endif ?>
			<?php if ($this->userpoints) : ?>
				<span class="kpost-userposts"><?php echo JText::_('COM_KUNENA_AUP_POINTS') . intval($this->userpoints); ?></span>
			<?php endif ?>
			</div>
		</li>
		<?php if (!empty($this->personaltext)) : ?>
		<li class="kpost-personal">
			<?php echo $this->personaltext ?>
		</li>
		<?php endif ?>
		<?php endif; ?>
		<?php $avatar = $this->profile->getAvatarImage ('kavatar', 'welcome'); if ($avatar) : ?>
		<li class="kpost-avatar">
			<span class="kavatar"><?php echo CKunenaLink::GetProfileLink ( intval($this->profile->userid), $avatar ); ?></span>
		</li>
		<?php endif; ?>
		<li class="kpost-username">
			<?php echo $this->profile->getLink() ?>
		</li>
		<?php if (!empty($this->usertype)) : ?>
		<li class="kpost-usertype">
			<span class = "kmsgusertype">( <?php echo $this->escape($this->usertype) ?> )</span>
		</li>
		<?php endif ?>
		<?php if ($this->profile->exists()): ?>
		<?php if (!empty($this->userranktitle)) : ?>
		<li class="kpost-userrank">
			<?php echo $this->escape($this->userranktitle) ?>
		</li>
Example #28
0
<table class="kprofilebox">
	<tbody>
		<tr class="krow1">
			<?php if ($this->me->getAvatarImage('welcome')) : ?>
			<td class="kprofilebox-left">
				<?php echo $this->me->getAvatarImage('kavatar', 'welcome'); ?>
			</td>
			<?php endif; ?>
			<td class="kprofileboxcnt">
				<ul class="kprofilebox-link">
					<?php if (!empty($this->privateMessagesLink)) : ?><li><?php echo $this->privateMessagesLink ?></li><?php endif ?>
					<?php if (!empty($this->editProfileLink)) : ?><li><?php echo $this->editProfileLink ?></li><?php endif ?>
					<?php if (!empty($this->announcementsLink)) : ?><li><?php echo $this->announcementsLink ?></li><?php endif ?>
				</ul>
				<ul class="kprofilebox-welcome">
					<li><?php echo JText::_('COM_KUNENA_PROFILEBOX_WELCOME'); ?>, <strong><?php echo CKunenaLink::GetProfileLink ( intval($this->me->userid) ); ;?></strong></li>
					<li class="kms"><strong><?php echo JText::_('COM_KUNENA_MYPROFILE_LASTVISITDATE'); ?>:</strong> <span title="<?php echo KunenaDate::getInstance($this->me->lastvisitDate)->toKunena('ago'); ?>"><?php echo KunenaDate::getInstance($this->me->lastvisitDate)->toKunena('date_today'); ?></span></li>
					<?php if ($this->logout) : ?>
					<li>
					<form action="<?php echo KunenaRoute::_('index.php?option=com_kunena') ?>" method="post" name="login">
						<input type="submit" name="submit" class="kbutton" value="<?php echo JText::_('COM_KUNENA_PROFILEBOX_LOGOUT'); ?>" />
						<input type="hidden" name="option" value="<?php echo $this->logout['option']; ?>" />
						<?php if (!empty($this->logout['view'])) : ?>
						<input type="hidden" name="view" value="<?php echo $this->logout['view']; ?>" />
						<?php endif; ?>
						<input type="hidden" name="task" value="<?php echo $this->logout['task']; ?>" />
						<input type="hidden" name="<?php echo $this->logout['field_return']; ?>" value="[K=RETURN_URL]" />
						[K=TOKEN]
					</form>
					</li>
					<?php endif; ?>
Example #29
0
	function displayStatistics($tpl = null) {
		$cache = JFactory::getCache('com_kunena', 'output');
		if ($cache->start("{$this->template->name}.common.statistics", 'com_kunena.template')) return;

		// FIXME: refactor code
		$this->config = KunenaFactory::getConfig();
		require_once(KPATH_SITE.'/lib/kunena.link.class.php');
		$kunena_stats = KunenaForumStatistics::getInstance ( );
		$kunena_stats->loadGeneral();

		$this->assign($kunena_stats);
		$this->latestMemberLink = CKunenaLink::GetProfileLink($this->lastUserId);
		$this->statisticsURL = KunenaRoute::_('index.php?option=com_kunena&view=statistics');

		$result = $this->loadTemplate($tpl);
		if (JError::isError($result)) {
			return $result;
		}
		echo $result;
		$cache->end();
	}
Example #30
0
										<ul>
										<?php
										if ($this->config->avataroncat > 0) :
											$useravatar = KunenaFactory::getUser((int)$last->last_post_userid)->getAvatarImage('klist-avatar', 'list');
											if ($useravatar) : ?>
										<li class="klatest-avatar"> <?php echo CKunenaLink::GetProfileLink ( intval($last->last_post_userid), $useravatar ); ?></li>
										<?php endif; ?>
										<?php endif; ?>
										<li class="ktopic-title">
										<?php echo JText::_('COM_KUNENA_GEN_LAST_POST') . ': '. CKunenaLink::GetThreadPageLink ( 'view', intval($last->id), intval($last->last_topic_id), intval($last->getLastPostLocation()), intval($this->config->messages_per_page), KunenaHtmlParser::parseText($last->last_topic_subject, 30), intval($last->last_post_id) );?>
										</li>

										<li class="ktopic-details">
										<?php
											echo JText::_('COM_KUNENA_BY') . ' ';
											echo CKunenaLink::GetProfileLink ( intval($last->last_post_userid), $this->escape($last->last_post_guest_name) );
											echo KunenaDate::getInstance($last->last_post_time)->toSpan('config_post_dateformat','config_post_dateformat_hover');
										?>
										</li>
										</ul>
									</td>

									<?php else : ?>
									<td class="kcol-mid kcol-knoposts"><?php echo JText::_('COM_KUNENA_NO_POSTS'); ?></td>
									<?php endif ?>
									<td class="kcategory-actions">
										<?php echo CKunenaLink::GetCategoryActionLink ( 'unsubscribe', $this->category->id, JText::_('COM_KUNENA_BUTTON_UNSUBSCRIBE_CATEGORY'), 'nofollow', '', JText::_('COM_KUNENA_BUTTON_UNSUBSCRIBE_CATEGORY_LONG'), '&userid='.$this->me->userid ); ?>
									</td>
								</tr>
							</tbody>
						</table>