Jetzt kostenlos Anmelden!

mccracker Männlich

kennen Einige hier

Beiträge: 380

Geschlecht: Männlich

PHPKIT Version: 1.6.1

1

Sonntag, 27. März 2011, 22:10

Overview.php umbauen

Hi leute.

Wie muss ich meine overview.php umschreiben, damit zusammen mit dem Kategorieaddon unterhalb dessen der Artikel-Inhalt so wie bei News angezeigt wird und nicht als Liste?

Aktuell meine Reviewansicht (Artikel)


Meine News-Ansicht:


Meine aktuelle overview.php

PHP-Quelltext

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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<?php
//////////////////////// Informationen ////////////////////////
// Verzeichnisstruktur-Hack 1.2.1 (C) 2003 by Matthias Mohr
// Homepage: www.mamo-net.de | Email: webmaster@mamo-net.de

//////////////////////// Konfiguration ////////////////////////
// Was soll hinter dem Kategorienamen angezeigt werden?
// 0 = nichts | 1 = Nur Anzahl Artikel | 2 = Nur Anzahl Unterkategorien | 3 = alles
$showsubs "1";


if (isset($_REQUEST['entries'])) $entries=$_REQUEST['entries'];
else $entries=0;
if (isset($_REQUEST['type'])) $type=$_REQUEST['type'];
if (isset($_REQUEST['contentid'])) $contentid=$_REQUEST['contentid'];
if (isset($_REQUEST['catid'])) $catid=$_REQUEST['catid'];
if (isset($_REQUEST['themeid'])) $themeid=$_REQUEST['themeid'];
if (isset($_REQUEST['letter'])) $letter=$_REQUEST['letter'];
if (isset($_REQUEST['order'])) $order=$_REQUEST['order'];

// Verzeichnisstruktur-Hack
if ($_REQUEST['catid'] == "" || $catid == "" || $_REQUEST['catid'] == "-1") {
    include('content/showcat.php'); 
}
else {
    if ($_REQUEST['themeid'] == "" || $themeid == "") {
    include('content/theme.php'); 
    }
}

if ($type==2) {$content_type=$lang['news']; $epp=$config['content_epp2']; $type=2$content_page="news";}
elseif ($type==3) {$content_type=$lang['links']; $epp=$config['content_epp3']; $type=3$content_page="overview";}
elseif ($type==4) {$content_type=$lang['downloads']; $epp=$config['content_epp4']; $type=4$content_page="download";} 
else {$type=1$content_type=$lang['articles']; $epp=$config['content_epp1']; $type=1$content_page="articles";}
if ($epp<1) {$epp=12;}

$contentcat_cache=contentcats();
$contentcat_cache=$contentcat_cache[0];

$sqlcommand="WHERE ".$db_tab['content'].".content_status=1 AND ".$db_tab['content'].".content_option='".$type."' AND ".$db_tab['content'].".content_time<'".time()."' AND (".$db_tab['content'].".content_expire>'".time()."' OR ".$db_tab['content'].".content_expire=0)";

if (intval($catid)>0$sqlcommand.=" AND ".$db_tab['content'].".content_cat='".$catid."'";
if (intval($themeid)>0)    $sqlcommand.=" AND ".$db_tab['content'].".content_themeid='".$themeid."'";
if (intval($contentid)>0$sqlcommand.=" AND ".$db_tab['content'].".content_id='".$contentid."'";
if ($letter=='alle') unset($letter);
elseif ($letter=='0-9') {
 $sqlcommand.=" AND (".$db_tab['content'].".content_title LIKE '0%'";
 $i=range(1,9);
 foreach($i as $h) {
  $sqlcommand.=" OR ".$db_tab['content'].".content_title LIKE '".$h."%'";
  }
 $sqlcommand.=")";
 }
else $sqlcommand.=" AND ".$db_tab['content'].".content_title LIKE '".$letter."%'";

$sqlcommand="FROM ".$db_tab['content']." LEFT JOIN ".$db_tab['contentcat']." ON ".$db_tab['contentcat'].".contentcat_id=".$db_tab['content'].".content_cat ".$sqlcommand." AND ".sqlrights($db_tab['contentcat'].".contentcat_rights");

if ($order=="rate"$sqlorder="ORDER by ".$db_tab['content'].".content_rating DESC";
elseif ($order=="rated"$sqlorder="ORDER by ".$db_tab['content'].".content_rating ASC";
elseif ($order=="title"$sqlorder="ORDER by ".$db_tab['content'].".content_title ASC";
elseif ($order=="titled"$sqlorder="ORDER by ".$db_tab['content'].".content_title DESC";
elseif ($order=="dated"$sqlorder="ORDER by ".$db_tab['content'].".content_time ASC";
else $sqlorder="ORDER by ".$db_tab['content'].".content_time DESC";

$counter=$DB->num_rows($DB->query("SELECT ".$db_tab['content'].".* ".$sqlcommand));

if ($counter<$entries$entries=0;
if ($counter==0) eval ("\$content_articles= \"".getTemplate("content/overview_notfound".$type."")."\";");
else {
 $content_side=sidelinkfull($counter,$epp,$entries,'include.php?path=content/overview.php&letter='.$letter.'&catid='.$catid.'&themeid='.$themeid.'&type='.$type.'&order='.$order,"headssmall");
 eval ("\$content_side= \"".getTemplate("content/overview_sidelink")."\";");

 $getcontentinfo=$DB->query("SELECT ".$db_tab['content'].".* ".$sqlcommand." ".$sqlorder." LIMIT ".$entries.",".$epp);
 while ($contentinfo=$DB->fetch_array($getcontentinfo)) {
  if ($type==or $type==2$row=rowcolor2($row);
  else $row=rowcolor($row);
   
  if (intval($contentinfo['content_autorid'])>0) {
   if (!$userinfo_hash[$contentinfo['content_autorid']]) {
    $userinfo=$DB->fetch_array($DB->query("SELECT user_id, user_nick FROM ".$db_tab['user']." WHERE user_id='".$contentinfo['content_autorid']."' LIMIT 1"));
    $userinfo_hash[$userinfo['user_id']]=$userinfo;
    }
   else $userinfo=$userinfo_hash[$contentinfo['content_autorid']];
   eval ("\$autor_info= \"".getTemplate("member_showprofil_textlink","small")."\";");
   }
  else $autorinfo=$contentinfo['content_autor'];

  $contentcatinfo=$contentcat_cache[$contentinfo['content_cat']];
  $content_title=stripslashes($contentinfo['content_title']);
  
  if (intval($contentinfo['content_themeid'])>0) {
   $contentthemeinfo=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['contenttheme']." WHERE contenttheme_id='".$contentinfo['content_themeid']."'"));
   eval ("\$contenttheme_info= \"".getTemplate("content/article_theme_textlink")."\";");
   }
   
  $content_time=formattime($contentinfo['content_time'],'','date');
  $content_time_full=formattime($contentinfo['content_time']);

  eval ("\$content_link= \"".getTemplate("content/overview_article_title")."\";");
    
  
if ($contentinfo['content_teaser']!='') {
   $catimage_dimension=@getimagesize($contentinfo['content_teaser']);
   eval ("\$content_catimage= \"".getTemplate("content/overview_teaser")."\";");
   }
  elseif ($contentcatinfo['contentcat_symbol']!='blank.gif' && $contentcatinfo['contentcat_symbol']!='' && filecheck("images/catimages/".$contentcatinfo['contentcat_symbol'])) {
   $catimage_dimension=@getimagesize('images/catimages/'.$contentcatinfo['contentcat_symbol']);
   eval ("\$content_catimage= \"".getTemplate("content/cat_image_left")."\";");
   }

   
  if ($type==1$cut=$config['content_length1'];
  elseif ($type==2$cut=$config['content_length2'];
  elseif ($type==3$cut=$config['content_length3'];
  elseif ($type==4$cut=$config['content_length4'];
  
  $content_headline=substr(strip_tags($PARSE->parse($contentinfo['content_header'].' '.$contentinfo['content_text'],1,1,1,1)),0,$cut);
  
  if ($type==1) {
   if ($row=='odd' || $row=='even2') eval ("\$content_articles.= \"".getTemplate("content/overview_article_linkbox_left")."\";");
   else eval ("\$content_articles.= \"".getTemplate("content/overview_article_linkbox_right")."\";");
   }
  elseif ($type==2) {
   if ($row=='odd' || $row=='even2') eval ("\$content_articles.= \"".getTemplate("content/overview_news_linkbox_left")."\";");
   else eval ("\$content_articles.= \"".getTemplate("content/overview_news_linkbox_right")."\";");
   }
  elseif ($type==3) {
   if ($contentinfo['content_comment_status']==1) {
    $ccounter=$DB->fetch_array($DB->query("SELECT COUNT(*) FROM ".$db_tab['comment']." WHERE comment_cat='cont' AND comment_subid='".$contentinfo['content_id']."'"));
    eval ("\$content_comment= \"".getTemplate("content/link_comment_link")."\";");
    }
   if ($contentinfo['content_rating_status']==1) {
    if (intval($contentinfo['content_rating_total'])>0) {
     $content_rating_d=number_format($contentinfo['content_rating'],2,",",".");
     $content_rating_votes=$contentinfo['content_rating_total'];
     eval ("\$content_rating_info= \"".getTemplate("content/link_rating_info")."\";");
     }
    eval ("\$content_rate= \"".getTemplate("content/link_rating_link")."\";");
    }

   $content_description=$PARSE->parse($contentinfo['content_header'].' '.$contentinfo['content_text'],$contentinfo['content_html'],$contentinfo['content_ubb'],$contentinfo['content_smilies'],1);
   eval ("\$content_articles.= \"".getTemplate("content/overview_links_linkbox")."\";");
   }
  elseif ($type==4) {
   if ($contentinfo['content_rating_status']==&& intval($contentinfo['content_rating_total'])>0) {
    $content_rating=number_format($contentinfo['content_rating'],2,",",".");
    eval ("\$content_rating= \"".getTemplate("content/overview_downloads_linkbox_rating")."\";");
    }
   $dl=explode("\n",$contentinfo['content_altdat']);
   foreach($dl as $d) {
    $d=trim($d);
    $file_size=FileSizeExt($config['content_downloadpath'].'/'.$d,'B');
    if ($file_size!='') break;
    }
   if ($file_size==''$file_size=FileSizeExt('','B',$contentinfo['content_filesize']*1024);
   if ($file_size=="" || $file_size==0$file_size='&nbsp; - &nbsp;';
   eval ("\$content_articles.= \"".getTemplate("content/overview_downloads_linkbox")."\";");
   }
  unset($content_rating);
  unset($file_size);
  unset($content_rating_info);
  unset($contenttheme_info);
  unset($content_catimage);
  unset($content_rate);
  unset($content_rating_info);
  unset($content_comment);
  unset($ccounter);
  unset($content_comment_count);
  }
 }

if (($type==|| $type==2) && ($row=='odd' || $row=='even2')) {
 if ($row=='odd'$row="even"; 
 else $row="odd2";
 eval ("\$content_articles.= \"".getTemplate("content/overview_article_spacer_right")."\";");
 unset($row);
 }

$getcontentcatinfo=$DB->query("SELECT * FROM ".$db_tab['contentcat']." WHERE ".sqlrights("contentcat_rights")." AND contentcat_type".$type."=1 ORDER by contentcat_order, contentcat_name ASC");
while ($contentcatinfo=$DB->fetch_array($getcontentcatinfo)) {
 unset($selected);
 if ($contentcatinfo['contentcat_id']==$catid) {
  eval ("\$content_cat= \"".getTemplate("content/overview_cat_link")."\";");
  $selected=" selected";
  }
 elseif ($content_cat==''$content_cat='&Uuml;bersicht';
 eval ("\$overview_cats.= \"".getTemplate("content/overview_cat_option")."\";");
 }
 
if (intval($catid)>0) {
 $getcontentthemeinfo=$DB->query("SELECT * FROM ".$db_tab['contenttheme']." WHERE contenttheme_catid='".$catid."' ORDER by contenttheme_name ASC");
 while ($contentthemeinfo=$DB->fetch_array($getcontentthemeinfo)) {
  unset($selected);
  if ($contentthemeinfo['contenttheme_id']==$themeid) {
   eval ("\$content_theme= \"".getTemplate("content/overview_theme_link")."\";");
   $selected="selected";
   }
  eval ("\$overview_themes.= \"".getTemplate("content/overview_control_theme_option")."\";");
  }
 if ($overview_themes!='') eval ("\$control_themes= \"".getTemplate("content/overview_control_theme")."\";");
 }

// $i=array("alle","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0-9");
// foreach($i as $h) {
//  unset($a);
//  if ($content_letter_links!='') eval ("\$content_letter_links.= \"".getTemplate("content/overview_letter_textlink_spacer")."\";");
//  if ($letter==$h || ($letter=='' && $h=='alle')) {$a[]='<b>('; $a[]=')</b>';}
//  eval ("\$content_letter_links.= \"".getTemplate("content/overview_letter_textlink")."\";");
//   }
eval ("\$content_control_letter= \"".getTemplate("content/overview_control_letter")."\";");

if ($type==&& getrights($config['content_submit1'])=="true") eval ("\$submit_link= \"".getTemplate("content/overview_submitlink")."\";");
elseif ($type==&& getrights($config['content_submit2'])=="true") eval ("\$submit_link= \"".getTemplate("content/overview_submitlink")."\";");
elseif ($type==&& getrights($config['content_submit3'])=="true") {
 $content_type=$lang['links'];
 eval ("\$submit_link= \"".getTemplate("content/overview_submitlink")."\";");
 }
elseif ($type==&& getrights($config['content_submit4'])=="true") {
 $content_type=$lang['download'];
 eval ("\$submit_link= \"".getTemplate("content/overview_submitdownload")."\";");
 }

eval ("\$site_body.= \"".getTemplate("content/overview_control")."\";");
eval ("\$site_body.= \"".getTemplate("content/overview_page".$type)."\";");
?>


Wäre klasse für die Hilfe!

gruß,
Mario

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »mccracker« (27. März 2011, 22:16)

  • Zum Seitenanfang
  • Zum Seitenende

Dirk Kántor Männlich

aká Dooki

Beiträge: 2 073

Geschlecht: Männlich

PHPKIT Version: keine

2

Montag, 28. März 2011, 22:18

Soll es so aussehen, wie bei den News?

Denn das gezeigte ist nicht phpkit standard, das war ebenfalls ein addon, welches kann ich nicht sagen.
aber wenn du als test die originale overview.php mal nimmst, siehst du die änderungen

wenn es jetzt nicht nur an einem template liegen sollte.. muss nicht zwingend an der overview.php liegen, kann auch an allen anderen die damit zutun ham (templates oder gar weitere php dateien)
:thumbsup:    :thumbsup:       *tc*       :thumbsup:    :thumbsup:
8o           Achtung: Dirk Kántor ist unterwegs!           8o
Er verteilt gerne Verwarnungen ohne vorher darüber diskutiert zu haben.
  • Zum Seitenanfang
  • Zum Seitenende

mccracker Männlich

kennen Einige hier

Beiträge: 380

Geschlecht: Männlich

PHPKIT Version: 1.6.1

3

Montag, 28. März 2011, 23:19

Es ist das Verzeichnisstruktur-Hack 1.2.1 von www.mamo-net.de.

Und es ist ja so, dass bei uns die News, auch wie gewollt mit dem Themen-Hack angezeigt werden. Ich möchte nun nur, dass auch die Artikel diese Anzeigeart nutzen. Eigentlich müsste man doch in der Overview dann nur dieselben Einstellungen oder Vorgaben vergeben wie die News. Eigentlich nur Nummern tauschen. Hat das noch nicht wirklich geklappt.

gruß
  • Zum Seitenanfang
  • Zum Seitenende

mccracker Männlich

kennen Einige hier

Beiträge: 380

Geschlecht: Männlich

PHPKIT Version: 1.6.1

4

Donnerstag, 31. März 2011, 20:54

Keine Idee mehr?
  • Zum Seitenanfang
  • Zum Seitenende

Dirk Kántor Männlich

aká Dooki

Beiträge: 2 073

Geschlecht: Männlich

PHPKIT Version: keine

5

Sonntag, 3. April 2011, 13:23

mc, der verzeichnis strucktur hack, wie du ihn nennst, ist nur für das obere, also die auflistung aller kategorien, ohne das mühseelig durch das dropdown gesucht werden muss..

das untere, also alles untereinander 1-2 zeilig, ist ein anderes addon.. das ist nicht standard. du hast es wohl mit verbaut weil du es mal wolltest, nun musst herausfinden wie du es wieder ausbaust ^^

bin mir nicht sicher, aber glaube das dies von code area (codea.de) kam.. welche ja nicht mehr existiert..
:thumbsup:    :thumbsup:       *tc*       :thumbsup:    :thumbsup:
8o           Achtung: Dirk Kántor ist unterwegs!           8o
Er verteilt gerne Verwarnungen ohne vorher darüber diskutiert zu haben.
  • Zum Seitenanfang
  • Zum Seitenende

mccracker Männlich

kennen Einige hier

Beiträge: 380

Geschlecht: Männlich

PHPKIT Version: 1.6.1

6

Sonntag, 3. April 2011, 16:15

Also meinst Du, dass es reichen würde, wenn ich im Addon schaue welcher Teil für die oberen Sachen notwendig ist, dann eine org. overview zu nutzen und diese dann nur mit dem Zusatz zu bestücken?

Da ich eigentlich die Änderungen immer gemacht hatte, bin ich gerade bisschen ratlos, warum es dort eine Liste geworden ist. Aber mal schauen *gg*

Danke dir für den Tipp!
  • Zum Seitenanfang
  • Zum Seitenende