Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 3
Seite [1]
microz


Rock the board




Beiträge: 86
# Thema - 14.10.2007 um 06:40 Uhr
hi

It is possible that the {board:navlist} show only the last items of a specific forum?

?mod=board&action=list&id=1

If it is so, any suggestions on how to do it: p (i'm not programmer)


navlist.php +-
 
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 2007 - www.clansphere.net
// $Id: navlist.php 143 2006-08-01 05:05:45Z hajo $

$cs_lang cs_translate('board');

$cs_usertime cs_sql_select(__FILE__,'users','users_readtime',"users_id = '" $account["users_id"] . "'");
$cs_readtime cs_time() - $cs_usertime['users_readtime'];

$data = array();
$figures 20;

$tables  'threads thr INNER JOIN {pre}_board frm ON frm.board_id = thr.board_id ';
$tables .= 'LEFT JOIN {pre}_read red ON thr.threads_id = red.threads_id AND red.users_id = ''.$account['users_id'].''';
$cells   'thr.threads_headline AS threads_headline, thr.threads_id AS threads_id, ';
$cells  .= 'thr.threads_last_time AS threads_last_time';
$cond    'frm.board_access <= ''.$account['access_board'].'' AND board_pwd = ''';
if(!empty(
$account['users_id'])) {
  
$cond   .= ' AND thr.threads_last_time > '' . $cs_readtime . '' AND (thr.threads_last_time > red.read_since OR red.threads_id IS NULL)';
}
$order   'thr.threads_last_time DESC'
$data['threads'] = cs_sql_select(__FILE__,$tables,$cells,$cond,$order,0,8);

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'],2);
    
$data['threads'][$run]['threads_headline'] = cs_secure($data['threads'][$run]['threads_headline']);
    
$data['threads'][$run]['threads_headline_short'] = strlen($data['threads'][$run]['threads_headline']) <= $figures ?
      
$data['threads'][$run]['threads_headline'] : substr($data['threads'][$run]['threads_headline'],0,$figures-2) . '..';
  }
  echo 
cs_subtemplate(__FILE__,$data,'board','navlist');
}

?>


navlist.tpl +-
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
1. / 2. / ... 
 {loop:threads}
<
table width="100%" border="0" class="navsolo">
  <
tr>
    <
td><a href="{url:board_thread}&where={threads:threads_id}" title="{threads:threads_headline}">{threads:threads_headline_short}</a></td>
  </
tr>
</
table>


{
stop:threads}




grettings

Inaktiv
Fr33z3m4n ClanSphere Team


Medal of Honor




Herkunft: Hamm
Beiträge: 11094
# Antwort: 1 - 14.10.2007 um 09:46 Uhr
Hi

 
1.
1. / 2. / ... 
 $cond    'frm.board_access <= ''.$account['access_board'].'' AND board_pwd = ''';


change to

 
1.
1. / 2. / ... 
 $cond    'frm.board_access <= ''.$account['access_board'].'' AND board_pwd = '' AND board_id = 'yourid'';


yourid = board_id


------------------
mfg
Patrick "Fr33z3m4n" Jaskulski

Antoine de Saint-Exupéry: Wenn Du ein Schiff bauen willst, so trommle nicht Männer zusammen, um Holz zu beschaffen, Aufgaben zu verteilen, sondern lehre die Männer die Sehnsucht nach dem endlosen weiten Meer.

Inaktiv
|
microz
Thread-Ersteller


Rock the board




Beiträge: 86
# Antwort: 2 - 14.10.2007 um 19:44 Uhr
You could write without / Because not appear''''


So be?

$cond = 'frm.board_access <= /''.$account['access_board'].'/' AND board_pwd = /'/' AND board_id =1 /'/'';




another question :p

When someone reviews the post, automatically disappears from navlist, as I leave it fixed



thx

pd:by google :(


Zuletzt editiert von microz am 14.10.2007 um 19:59 Uhr (7x Editiert)
Inaktiv
|
Fr33z3m4n ClanSphere Team


Medal of Honor




Herkunft: Hamm
Beiträge: 11094
# Antwort: 3 - 16.10.2007 um 11:20 Uhr
You could write without / Because not appear''''

Sorry copy&paste Bug

 
1.
2.
1. / 2. / ... 
 
$cond    
"frm.board_access <= '".$account['access_board']."' AND board_pwd = '' AND board_id = 'yourid'";


When you read the post/thread, it will mark as read, and disappears from navlist.

When come an new post, it will be able to navlist.




------------------
mfg
Patrick "Fr33z3m4n" Jaskulski

Antoine de Saint-Exupéry: Wenn Du ein Schiff bauen willst, so trommle nicht Männer zusammen, um Holz zu beschaffen, Aufgaben zu verteilen, sondern lehre die Männer die Sehnsucht nach dem endlosen weiten Meer.

Inaktiv
|
Antworten: 3
Seite [1]


Sie müssen sich registrieren, um zu antworten.