News - Features - Downloads - Forum - Team - Support - Switch View: Screen
Login - Registrierung - Passwort vergessen
Codepaste - Details
Weitere Infos zum Codepaste

Name Board Navlist - Latest topics
Autor de Jam2
CMS-Version Clansphere 2010
Datei board/navlist2.php
Datum 03.01.2011 um 11:21 Uhr
Beschreibung Navlist for latest board topics. Theme-Data: Standard navlist.tpl
Navlist für die letzten Forum Threads. Theme-Datei; Standard navlist.tpl
Alter Code Alter Code +-
 
1.
1. / 2. / ... 
 none
Neuer Code Neuer Code +-
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
1. / 2. / ... 
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$

$cs_lang cs_translate('board');
$cs_get cs_get('catid');
$cs_option cs_sql_option(__FILE__,'board');
require_once 
'mods/board/functions.php';


$data = array();

$tables  'threads thr INNER JOIN {pre}_board frm ON frm.board_id = thr.board_id';
$cells   'thr.threads_headline AS threads_headline, thr.threads_id AS threads_id, ';
$cells  .= 'thr.threads_last_time AS threads_last_time, frm.board_name AS board_name, frm.board_id AS board_id';
$cond    'frm.board_access <= \''.$account['access_board'].'\' AND frm.board_pwd = \'\'';

if(!empty(
$cs_get['catid'])) {
  
$cond .= ' AND frm.categories_id = ' $cs_get['catid'];
}
$order   'thr.threads_id DESC'
$data['threads'] = cs_sql_select(__FILE__,$tables,$cells,$cond,$order,0,$cs_option['max_navlist']);

if(empty(
$data['threads'])) {
  echo 
$cs_lang['no_new_posts'];
}
else {
  
$count_threads count($data['threads']);
  
  for (
$run 0$run $count_threads$run++) {
    
$data['threads'][$run]['threads_date'] = cs_date('unix',$data['threads'][$run]['threads_last_time'],1);
    
$data['threads'][$run]['threads_headline_short'] = strlen($data['threads'][$run]['threads_headline']) <= $cs_option['max_headline'] ? $data['threads'][$run]['threads_headline'] : cs_substr($data['threads'][$run]['threads_headline'],0,$cs_option['max_headline']-2) . '..';
    
$data['threads'][$run]['threads_headline_short'] = cs_secure($data['threads'][$run]['threads_headline_short']);
    
$data['threads'][$run]['threads_headline'] = cs_secure($data['threads'][$run]['threads_headline']);
    
$data['threads'][$run]['new_posts'] = last_comment($data['threads'][$run]['threads_id'], $account["users_id"], $account['users_limit']);
  }
  echo 
cs_subtemplate(__FILE__,$data,'board','navlist');
}
Zurück - Übersicht


Bitte Login benutzen, um Kommentare zu schreiben.


ClanSphere Project - Mailus - Imprint - Disclaimer - Scriptinfo