Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 6
Seite [1]
palle ClanSphere Team

Supporter
Supporter




Beiträge: 3073
# Thema - 10.08.2009 um 12:15 Uhr
hoi öhm ich steh gerade irgendwie aufen schlauch...
ich möchte bei der news navlist ausgabe immer zwei news nebeneinander haben und nicht alle untereinander aber irgendwie ist der wurm drinne evtl. weiss ja wer wo der fehler ist :/

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.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
1. / 2. / ... 
<?php
// ClanSphere 2009 - www.clansphere.net
// $Id$

$cs_lang cs_translate('handynews');

$cs_option cs_sql_option(__FILE__,'handynews');

$select 'ne.handynews_id AS handynews_id, ne.handynews_headline AS handynews_headline, ne.handynews_short AS handynews_short, ne.handynews_url AS handynews_url, ne.handynews_time AS handynews_time';
$public 'ne.handynews_public > \'0\' AND cat.categories_access <= \'' $account['access_handynews'] . '\'';
$order 'ne.handynews_time DESC';
$tables 'handynews ne INNER JOIN {pre}_categories cat ON ne.categories_id = cat.categories_id';

$data['handynews'] = cs_sql_select(__FILE__,$tables,$select,$public,$order,0,$cs_option['max_navlist']);

if(empty(
$data['handynews'])) {
    
$count_handynews count($data['handynews']);
  
  
  for (
$run 0$run $count_handynews$run++) {
    if(
$run == 1) { $data['handynews'][$run]['if']['td'] = 1; } else { $data['handynews'][$run]['if']['td'] = 0; }
    if(
$run == 3) { $data['handynews'][$run]['if']['td1'] = 1; } else { $data['handynews'][$run]['if']['td1'] = 0; }
    if(
$run == 5) { $data['handynews'][$run]['if']['td2'] = 1; } else { $data['handynews'][$run]['if']['td2'] = 0; }
    
$data['handynews'][$run]['handynews_time'] = cs_date('unix',$handynews['handynews_time'],1,1,0);
    
$short strlen($handynews['handynews_headline']) <= 15 $handynews['handynews_headline'] : substr($handynews['handynews_headline'],0,15) . '...';
    
$data['handynews'][$run]['handynews_url'] = cs_url('handynews','view','id=' $handynews['handynews_id']);
    
$data['handynews'][$run]['handynews_short'] = cs_secure($short);
    
$data['handynews'][$run]['handynews_headline'] = cs_secure($handynews['handynews_headline']);
}
echo 
cs_subtemplate(__FILE__,$data,'handynews','navlist');
}

else {
  
$count_handynews count($data['handynews']);
  
  
  for (
$run 0$run $count_handynews$run++) {
    if(
$run == 1) { $data['handynews'][$run]['if']['td'] = 1; } else { $data['handynews'][$run]['if']['td'] = 0; }
    if(
$run == 3) { $data['handynews'][$run]['if']['td1'] = 1; } else { $data['handynews'][$run]['if']['td1'] = 0; }
    if(
$run == 5) { $data['handynews'][$run]['if']['td2'] = 1; } else { $data['handynews'][$run]['if']['td2'] = 0; }  
    
$data['handynews'][$run]['handynews_time'] = cs_date('unix',$handynews['handynews_time'],1,1,0);
    
$short strlen($handynews['handynews_headline']) <= 15 $handynews['handynews_headline'] : substr($handynews['handynews_headline'],0,15) . '...';
    
$data['handynews'][$run]['handynews_url'] = cs_url('handynews','view','id=' $handynews['handynews_id']);
    
$data['handynews'][$run]['handynews_short'] = cs_secure($short);
    
$data['handynews'][$run]['handynews_headline'] = cs_secure($handynews['handynews_headline']);
    
$run++;
  }
  echo 
cs_subtemplate(__FILE__,$data,'handynews','navlist');
}


navlist.tpl:
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
1. / 2. / ... 
 <table width="200px" cellpadding="2"  cellspacing="2">
<
tr>
    
      {
loop:handynews}<td width="100" height="35"><span class="lastforum">{handynews:handynews_time}</span ><br />
      <
a href="{handynews:handynews_url}" title="{handynews:handynews_headline}"> {handynews:handynews_short}</a> < /td>
  {if:
td}   </tr>
    <
tr>
      {
stop:td}
      {if:
td1}   </tr>
    <
tr>
      {
stop:td1}
      {if:
td2}   </tr>
    <
tr>
      {
stop:td2}
        
      {
stop:handynews}
    
  </
tr>
</
table>


------------------
I like the part where it says 'nyan'



Zuletzt editiert von PAlle! ClanSphere Team am 10.08.2009 um 13:40 Uhr (1x Editiert)
Inaktiv
sgraewe ClanSphere Team

Supporter
Supporter




Beiträge: 6116
# Antwort: 1 - 10.08.2009 um 14:10 Uhr
Würde das per div lösen =)

dann gibste dem einen div einfach 50% weite, sobald dann das 2te erzeugt wird haste 100% erreicht und das dritte wird dann indie 2te Zeile geschoben und immer so weiter =)


Inaktiv
|
palle ClanSphere Team
Thread-Ersteller

Supporter
Supporter




Beiträge: 3073
# Antwort: 2 - 10.08.2009 um 17:43 Uhr
i weiss jedoch funktioniert das nicht mit aelteren versionen vom ie :( oder doch ?


------------------
I like the part where it says 'nyan'



Inaktiv
|
sgraewe ClanSphere Team

Supporter
Supporter




Beiträge: 6116
# Antwort: 3 - 10.08.2009 um 19:49 Uhr
hm meine doch? warum auch nicht? ^^

Hatte dies bezüglich noch keine probs mit dem ie.


Inaktiv
|
palle ClanSphere Team
Thread-Ersteller

Supporter
Supporter




Beiträge: 3073
# Antwort: 4 - 11.08.2009 um 11:01 Uhr
okay habs mit css gelöst und siehe da es funktioniert^^hatte ich persoenlich nicht angenommen das der ie das kann xD

preview: http://fones.de/index.php?mod=handynews&action=recent
kann geschlossen werden und thx



------------------
I like the part where it says 'nyan'



Zuletzt editiert von PAlle! ClanSphere Team am 11.08.2009 um 11:01 Uhr (1x Editiert)
Inaktiv
|
DopeK!cK


Going for pro



Herkunft: Syke (nähe Bremen)
Beiträge: 551
# Antwort: 5 - 11.08.2009 um 21:10 Uhr
About aber nicht vergessen!


------------------
Mit freundlichen Grüßen

DopeK!cK

Inaktiv
|
palle ClanSphere Team
Thread-Ersteller

Supporter
Supporter




Beiträge: 3073
# Antwort: 6 - 12.08.2009 um 09:40 Uhr
jo klar selbstverstaendlich kommt das noch xD


------------------
I like the part where it says 'nyan'



Inaktiv
|
Antworten: 6
Seite [1]


Sie müssen sich registrieren, um zu antworten.