Demo

Probiere ClanSphere aus und teste daran herum. Demo

Codepaste - Details
Weitere Infos zum Codepaste

Name Neue Downloads Ansicht
Autor de taM*
CMS-Version Clansphere 2009
Datei mods/list.php
Datum 05.07.2009 um 19:13 Uhr
Beschreibung Neue Ansicht für die Downloads-List

themes/base/files/list.tpl:
<table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
<tr>
<td class="headb"> {lang:mod_name} </td>
</tr>
<tr>
<td class="leftb"> {lang:mod_list} </td>
</tr>
</table>
<br />

<table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
{loop:categories}
<tr>
<td class="headb"><a href="{url:files_listcat:where={categories:id}}"> {categories:name}</a> ({categories:count&#125 </td>
</tr>
<tr>
<td class="leftb">{categories:text}</td>
</tr>
{if:subcats}{loop:subs}
<table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
<td class="leftc"><a href="{url:files_listcat:where={subs:id}}">< div style="border:1px solid #777777;padding:1px;">{subs:picture}</div></a>< /td>
<td class="leftc" width="100%"><a href="{url:files_listcat:where={subs:id}}">{ subs:name}</a><br />Insgesamt <strong>{subs:count}</strong> Dateien<br /> und <strong>{subs:size}</strong></td>
</tr>
</table>
{stop:subs}{stop:subcats}
{stop:categories}
</table>
Alter Code Alter 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.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
1. / 2. / ... 
<?php
// ClanSphere 2009 - www.clansphere.net
// $Id$

$cs_lang cs_translate('files');

require 
'mods/categories/functions.php';

$where "categories_mod = 'files' AND categories_access <= '" $account['access_files'] . "' AND categories_subid = '0'";
$cells 'categories_id, categories_name, categories_picture, categories_text, categories_subid';
$categories_data cs_sql_select(__FILE__,'categories',$cells,$where,'categories_subid ASC, categories_name',0,0);
$categories_data cs_catsort($categories_data);
$categories_loop count($categories_data);

$data = array();
$data['categories'] = array();

for(
$run=0$run $categories_loop$run++) {

  
$data['categories'][$run]['id'] = $categories_data[$run]['categories_id'];
  
$data['categories'][$run]['name'] = cs_secure($categories_data[$run]['categories_name']);
  
$data['categories'][$run]['count'] = cs_sql_count(__FILE__,'files',"categories_id = '" $categories_data[$run]['categories_id'] . "'");
  
$data['categories'][$run]['text'] = '';
  
$data['categories'][$run]['if']['text'] = false;
  if(!empty(
$categories_data[$run]['categories_text'])) {
    
$data['categories'][$run]['text'] = cs_secure($categories_data[$run]['categories_text'],1);
    
$data['categories'][$run]['if']['text'] = true;
  }

  
$data['categories'][$run]['picture'] = '';
  
$data['categories'][$run]['if']['picture'] = false;
  if(!empty(
$categories_data[$run]['categories_picture'])) {
    
$data['categories'][$run]['picture'] = cs_html_img('uploads/categories/' $categories_data[$run]['categories_picture']);
    
$data['categories'][$run]['if']['picture'] = true;
  }  

  
$sub_where "categories_mod = 'files' AND categories_access <= '" $account['access_files'] . "'";
  
$sub_where .= " AND categories_subid = '" $categories_data[$run]['categories_id'] . "'";
  
$sub_data cs_sql_select(__FILE__,'categories','*',$sub_where,'categories_name',0,0);
  
$sub_loop count($sub_data);
  
$data['categories'][$run]['if']['subcats'] = false;
  if(!empty(
$sub_loop)) {
    
$data['categories'][$run]['if']['subcats'] = true;
    for(
$runb=0$runb $sub_loop$runb++) {
      
$data['categories'][$run]['subs'][$runb]['name'] = cs_secure($sub_data[$runb]['categories_name']);
      
$data['categories'][$run]['subs'][$runb]['id'] = $sub_data[$runb]['categories_id'];

      
$sub_content cs_sql_count(__FILE__,'files',"categories_id = '" $sub_data[$runb]['categories_id'] . "'");
      
$data['categories'][$run]['subs'][$runb]['count'] = $sub_content;
      
$data['categories'][$run]['count'] += $sub_content;
    }
  }
}

echo 
cs_subtemplate(__FILE__,$data,'files','list');
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.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
1. / 2. / ... 
<?php
// ClanSphere 2009 - www.clansphere.net
// $Id$

$cs_lang cs_translate('files');

require 
'mods/categories/functions.php';

$where "categories_mod = 'files' AND categories_access <= '" $account['access_files'] . "' AND categories_subid = '0'";
$cells 'categories_id, categories_name, categories_picture, categories_text, categories_subid';
$categories_data cs_sql_select(__FILE__,'categories',$cells,$where,'categories_subid ASC, categories_name',0,0);
$categories_data cs_catsort($categories_data);
$categories_loop count($categories_data);

$data = array();
$data['categories'] = array();

for(
$run=0$run $categories_loop$run++) {

  
$data['categories'][$run]['id'] = $categories_data[$run]['categories_id'];
  
$data['categories'][$run]['name'] = cs_secure($categories_data[$run]['categories_name']);
  
$data['categories'][$run]['count'] = cs_sql_count(__FILE__,'files',"categories_id = '" $categories_data[$run]['categories_id'] . "'");
  
$data['categories'][$run]['text'] = '';
  
$data['categories'][$run]['if']['text'] = false;
  if(!empty(
$categories_data[$run]['categories_text'])) {
    
$data['categories'][$run]['text'] = cs_secure($categories_data[$run]['categories_text'],1);
    
$data['categories'][$run]['if']['text'] = true;
  }  

  
$sub_where "categories_mod = 'files' AND categories_access <= '" $account['access_files'] . "'";
  
$sub_where .= " AND categories_subid = '" $categories_data[$run]['categories_id'] . "'";
  
$sub_data cs_sql_select(__FILE__,'categories','*',$sub_where,'categories_name, categories_picture',0,0);
  
$sub_loop count($sub_data);
  
$data['categories'][$run]['if']['subcats'] = false;
  if(!empty(
$sub_loop)) {
    
$data['categories'][$run]['if']['subcats'] = true;
    for(
$runb=0$runb $sub_loop$runb++) {
      
$data['categories'][$run]['subs'][$runb]['name'] = cs_secure($sub_data[$runb]['categories_name']);
      
$data['categories'][$run]['subs'][$runb]['id'] = $sub_data[$runb]['categories_id'];

      
$sub_content cs_sql_count(__FILE__,'files',"categories_id = '" $sub_data[$runb]['categories_id'] . "'");
      
$data['categories'][$run]['subs'][$runb]['count'] = $sub_content;
      
$data['categories'][$run]['count'] += $sub_content;

      
$file_where "categories_id = '".$sub_data[$runb]['categories_id']."'";
      
$sub_file cs_sql_select(__FILE__,'files','*',$file_where,'files_size',0,0);
      
$file_loop count($sub_file);

    
$size '';
    
$id 0;
    for(
$runc=0$runc $file_loop$runc++) {
        
$size += $sub_file[$runc]['files_size'];
    }
    
$data['categories'][$run]['subs'][$runb]['size'] = cs_filesize($size);
    
      
$data['categories'][$run]['picture'] = '';
    
$data['subs'][$run]['if']['picture'] = false;
      if(!empty(
$sub_data[$run]['categories_picture'])) {
            
$data['categories'][$run]['subs'][$runb]['picture'] = cs_html_img('uploads/categories/' $sub_data[$runb]['categories_picture']);
        
$data['subs'][$run]['if']['picture'] = true;
      }

    }
  }
}

echo 
cs_subtemplate(__FILE__,$data,'files','list');
Zurück - Übersicht

Kommentare: 9
Seite [1]
Chelrid

06.10.2016

Ort: -
Beiträge: 1170
# 1 - 06.07.2009 um 15:59 Uhr

hat da mal wer eine Preview?
taM*

07.12.2015

Ort: -
Beiträge: 1145
# 2 - 06.07.2009 um 18:06 Uhr

http://www.lanonly.de/index/files/list


Zuletzt editiert von taM*, am 19.07.2009 um 11:39 Uhr (1x Editiert)
wÊs

05.03.2011

Ort: -
Beiträge: 96
# 3 - 07.07.2009 um 08:19 Uhr

schön und gut... aber man verlinkt generell kein div... das ist nicht xhtml valide...

die bessere Lösung ist:
 
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.
1. / 2. / ... 
 <table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
<
tr>
<
td class="headb"> {lang:mod_name} </td>
</
tr>
<
tr>
<
td class="leftb"> {lang:mod_list} </td>
</
tr>
</
table>
<
br />

<
table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
{
loop:categories}
<
tr>
<
td class="headb"><a href="{url:files_listcat:where={categories:id}}"> {categories:name}</a> ({categories:count&#125 </td>
</tr>
<
tr>
<
td class="leftb">{categories:text}</td>
</
tr>
{if:
subcats}{loop:subs}
<
table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
<
td class="leftc"><a style="border:1px solid #777777;padding:1px;" href="{url:files_listcat:where={subs:id}}">{subs:picture}</a></td>
<
td class="leftc" width="100%"><a href="{url:files_listcat:where={subs:id}}">{subs:name}</a><br />Insgesamt <strong>{subs:count}</strongDateien<br /> und <strong>{subs:size}</strong></td>
</
tr>
</
table>
{
stop:subs}{stop:subcats}
{
stop:categories}
</
table>
wasgeht

09.07.2019

Ort: -
Beiträge: 666
# 4 - 08.07.2009 um 10:06 Uhr

<table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
<tr>
<td class="headb"> Kommentare </td>
</tr>
<tr>
<td class="leftb"> {lang:mod_list} </td>
</tr>
</table>
<br />

<table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
{loop:categories}
<tr>
<td class="headb"><a href="/modules/files/listcat:where={categories:id}"> {categories:name}</a> {categories:count} </td>
</tr>
<tr>
<td class="leftb">{categories:text}</td>
</tr>
{if:subcats}{loop:subs}
<table class="forum" cellpadding="0" cellspacing="{page:cellsp acing}" style="width:{page:width}">
<td class="leftc"><a style="border:1px solid #777777; padding:1px;" href="/modules/files/listcat:where={subs:id}">{subs: picture}</a>< /td>
<td class="leftc" width="100%"><a href="/modules/files/listcat:where={subs:id}">{subs: name}</a><br />Insgesamt
<strong>{subs:count}</strong> Dateien<br /> und <strong>{subs:size}</strong></td>
</tr> </td>
</table>
{stop:subs}{stop:subcats}
{stop:categories}
</table>

klappt bei mir nicht
http://zocker-gemeinde.de/CMS/index/files/list
Bruchpilot

23.10.2011

Ort: -
Beiträge: 61
# 5 - 05.12.2009 um 15:32 Uhr

bei mir auch nicht.
wasgeht

09.07.2019

Ort: -
Beiträge: 666
# 6 - 17.12.2009 um 10:17 Uhr

so, klappt es
<table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
<tr>
<td class="headb"> {lang:mod_name} </td>
</tr>
<tr>
<td class="leftb"> {lang:mod_list} </td>
</tr>
</table>
<br />

<table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
{loop:categories}
<tr>
<td class="headb"><a href="{url:files_listcat:where={categories:id}}"> {categories:name}</a> {categories:count} </td>
</tr>
<tr>
<td class="leftb">{categories:text}</td>
</tr>
{if:subcats}{loop:subs}
<table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
<td class="leftc"><a href="{url:files_listcat:where={subs:id}}">
<div style="border:1px solid #777777;padding:1px;">{subs:picture}</div></a>< /td>
<td class="leftc" width="100%"><a href="{url:files_listcat:where={subs:id}}">{ subs:name}</a><br />Insgesamt <strong>{subs:count}</strong> Dateien<br /> und <strong>{subs:size}</strong></td>
</tr>
</table>
{stop:subs}{stop:subcats}
{stop:categories}


Zuletzt editiert von Z_G wasgeht, am 08.01.2010 um 14:06 Uhr (3x Editiert)
Nevs08

29.10.2010

Ort: -
Beiträge: 3
# 7 - 07.04.2010 um 18:23 Uhr

hmmmm bei mir geht gar keins kann mir einer helfen???

Mfg.
Nevs08
wasgeht

09.07.2019

Ort: -
Beiträge: 666
# 8 - 08.05.2010 um 12:49 Uhr

die themes/dein style/files/list.tpl musst du mit meinem code füllen
Chris97

11.08.2015

Ort: -
Beiträge: 26
# 9 - 05.09.2010 um 00:23 Uhr

bei mir siehts so aus:


Bitte Login benutzen, um Kommentare zu schreiben.