Seite 2 von 5

Re: Forenkategorien - Anordnung nebeneinander

Verfasst: 25.12.2011 19:43
von FRvN
Miriam hat geschrieben:Kannst du mal deine functions_display.php posten? :roll:
wenn du mich damit meinst, bitteschön https://www.phpbb.de/support/pastebin.p ... view&s=909
es ist eine frisch installierte 3.0.9 ohne irgendeinen MOD oder sonst was, befindet sich im Aufbau :wink:
Debug kommt nur wenn man auf eine Kategorie klickt, Index und Foren werden korrekt angezeigt,
siehe hier http://aussie-jack.de
kidrob hat geschrieben:war gestern offensichtlich nur durcheinander und habe die Files meines XAMPP-Testboards und des "Live-Boards" vertauscht... :roll:
hatte mich auch schon sehr gewundert das es ohne die Änderung in der functions_display funktionieren sollte :wink:
kidrob hat geschrieben:Danke für Eure Mühe, ich hoffe FRvN kommt mittlerweile auch klar?
Debug aus ist Ruhe, aber dies kann ja nicht im Sinne des Erfinders sein, also Fehler finden und versuchen diesen zu entfernen :)

Re: Forenkategorien - Anordnung nebeneinander

Verfasst: 25.12.2011 20:44
von mote
Hallo,

wollte mir das auch einbauen.. funktioniert aber leider mit meinem style nicht so besonders :(

Könnt ihr euch das einmal ansehen? vielleicht kennt jemand den fehler.

lg

Re: Forenkategorien - Anordnung nebeneinander

Verfasst: 25.12.2011 22:53
von Miriam
@FRvN,

finde

Code: Alles auswählen

//Loop through the categories
foreach($cat_array as $cat)
{ 
danach füge ein:

Code: Alles auswählen

echo "<br /><br />Output&nbsp;:";
var_dump($cat); 
Baue das mal bitte ein und poste den Output und die php Warnungen.

Welche Php Version hast du?

Re: Forenkategorien - Anordnung nebeneinander

Verfasst: 26.12.2011 00:03
von Talk19zehn
Hello, in der Regel belasse ich Testmodifikationen nicht auf meinem System.
Ich habe nun die Modifikation nochmals auf den Server geladen und im nun aktivierten Debug-Modus online nachgeschaut und stelle fest, dass tatsächlich in der Version 3.09 Fehler auftreten. In meinem Falle sodann (Prosilver) Zeile 540.
Recherchen ergaben, dass ursächlich ein array erwartet wird, welches offenbar fehlerhaft deklariert ist. Warning: Invalid argument supplied for foreach() on line 540
als auch der, die von FRVN benannte(n) oberhalb des Forums ( Debug ). Bedienungsfehler, sprich bei Linkbetätigungen hatte ich hingegen keine.
Auf dieser Testumgebung läuft bspw. PHP Version 5.3.8.

Gleiches habe ich nun ebenso noch für die Versionen 3.08 online durchgespielt. Entgegen 3.09 treten hierbei in meinem Falle online keine Fehler auf. Kann das jemand bitte bestätigen oder auch nicht bestätigen. Denn, wo liegt faktisch der grobe Unterschied in den Versionen, um den Fehler ggf. eingrenzen zu können? Hat Miriam evtl. bereits eine oder weitere Ideen oder einen Rat wo wir suchen sollten? :)

Beste Grüße


Edit: Ja sie hat.... Ich teste mal gleichlautend :wink: und LG


Edit: Test erfolgt 26.12.2011 00:35 Vielleicht hilft´s weiter:
=== "Buchfüllende Angaben" zu den Foren je beginnend mit Output :array(47) ............
und
[phpBB Debug] PHP Warning: in file /includes/functions_display.php on line 539: Invalid argument supplied for foreach()
[phpBB Debug] PHP Warning: in file /includes/functions_display.php on line 539: Invalid argument supplied for foreach()
[phpBB Debug] PHP Warning: in file /includes/functions_display.php on line 539: Invalid argument supplied for foreach()

und
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:541)

und
phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:541)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:541)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:541)


Foren nebeneinander und soweit ich es in der Kürze der Zeit übersehen kann, keine Bedienungsfehler.

LG und Dank für dein Engagement!

Re: Forenkategorien - Anordnung nebeneinander

Verfasst: 26.12.2011 08:46
von FRvN
@Miriam

phpVersion: 5.3.8

Index:

Code: Alles auswählen

Output :array(46) { ["forum_id"]=> string(1) "1" ["parent_id"]=> string(1) "0" ["left_id"]=> string(1) "1" ["right_id"]=> string(1) "4" ["forum_parents"]=> string(0) "" ["forum_name"]=> string(14) "Rund ums Forum" ["forum_desc"]=> string(0) "" ["forum_desc_bitfield"]=> string(0) "" ["forum_desc_options"]=> string(1) "7" ["forum_desc_uid"]=> string(0) "" ["forum_link"]=> string(0) "" ["forum_password"]=> string(0) "" ["forum_style"]=> string(1) "0" ["forum_image"]=> string(0) "" ["forum_rules"]=> string(0) "" ["forum_rules_link"]=> string(0) "" ["forum_rules_bitfield"]=> string(0) "" ["forum_rules_options"]=> string(1) "7" ["forum_rules_uid"]=> string(0) "" ["forum_topics_per_page"]=> string(1) "0" ["forum_type"]=> string(1) "0" ["forum_status"]=> string(1) "0" ["forum_posts"]=> string(1) "1" ["forum_topics"]=> string(1) "1" ["forum_topics_real"]=> string(1) "1" ["forum_last_post_id"]=> string(1) "1" ["forum_last_poster_id"]=> string(1) "2" ["forum_last_post_subject"]=> string(0) "" ["forum_last_post_time"]=> string(10) "1323364070" ["forum_last_poster_name"]=> string(4) "Jack" ["forum_last_poster_colour"]=> string(6) "AA0000" ["forum_flags"]=> string(2) "32" ["forum_options"]=> string(1) "0" ["display_subforum_list"]=> string(1) "1" ["display_on_index"]=> string(1) "1" ["enable_indexing"]=> string(1) "1" ["enable_icons"]=> string(1) "1" ["enable_prune"]=> string(1) "0" ["prune_next"]=> string(1) "0" ["prune_days"]=> string(1) "0" ["prune_viewed"]=> string(1) "0" ["prune_freq"]=> string(1) "0" ["forum_id_unapproved_topics"]=> int(0) ["forum_id_last_post"]=> string(1) "1" ["orig_forum_last_post_time"]=> string(10) "1323364070" ["children"]=> array(1) { [0]=> array(45) { ["forum_id"]=> string(1) "2" ["parent_id"]=> string(1) "1" ["left_id"]=> string(1) "2" ["right_id"]=> string(1) "3" ["forum_parents"]=> string(50) "a:1:{i:1;a:2:{i:0;s:14:"Rund ums Forum";i:1;i:0;}}" ["forum_name"]=> string(26) "Ankündigungen/Neuigkeiten" ["forum_desc"]=> string(0) "" ["forum_desc_bitfield"]=> string(0) "" ["forum_desc_options"]=> string(1) "7" ["forum_desc_uid"]=> string(0) "" ["forum_link"]=> string(0) "" ["forum_password"]=> string(0) "" ["forum_style"]=> string(1) "0" ["forum_image"]=> string(0) "" ["forum_rules"]=> string(0) "" ["forum_rules_link"]=> string(0) "" ["forum_rules_bitfield"]=> string(0) "" ["forum_rules_options"]=> string(1) "7" ["forum_rules_uid"]=> string(0) "" ["forum_topics_per_page"]=> string(1) "0" ["forum_type"]=> string(1) "1" ["forum_status"]=> string(1) "0" ["forum_posts"]=> string(1) "5" ["forum_topics"]=> string(1) "1" ["forum_topics_real"]=> string(1) "1" ["forum_last_post_id"]=> string(1) "6" ["forum_last_poster_id"]=> string(1) "2" ["forum_last_post_subject"]=> string(26) "Re: Willkommen bei phpBB3!" ["forum_last_post_time"]=> string(10) "1324584804" ["forum_last_poster_name"]=> string(4) "Jack" ["forum_last_poster_colour"]=> string(6) "AA0000" ["forum_flags"]=> string(2) "48" ["forum_options"]=> string(1) "0" ["display_subforum_list"]=> string(1) "1" ["display_on_index"]=> string(1) "0" ["enable_indexing"]=> string(1) "1" ["enable_icons"]=> string(1) "1" ["enable_prune"]=> string(1) "0" ["prune_next"]=> string(1) "0" ["prune_days"]=> string(1) "0" ["prune_viewed"]=> string(1) "0" ["prune_freq"]=> string(1) "0" ["forum_id_unapproved_topics"]=> int(0) ["forum_id_last_post"]=> string(1) "2" ["orig_forum_last_post_time"]=> string(10) "1324584804" } } }

Output :array(46) { ["forum_id"]=> string(1) "3" ["parent_id"]=> string(1) "0" ["left_id"]=> string(1) "5" ["right_id"]=> string(2) "10" ["forum_parents"]=> string(0) "" ["forum_name"]=> string(12) "Unsere Hunde" ["forum_desc"]=> string(0) "" ["forum_desc_bitfield"]=> string(0) "" ["forum_desc_options"]=> string(1) "7" ["forum_desc_uid"]=> string(0) "" ["forum_link"]=> string(0) "" ["forum_password"]=> string(0) "" ["forum_style"]=> string(1) "0" ["forum_image"]=> string(0) "" ["forum_rules"]=> string(0) "" ["forum_rules_link"]=> string(0) "" ["forum_rules_bitfield"]=> string(0) "" ["forum_rules_options"]=> string(1) "7" ["forum_rules_uid"]=> string(0) "" ["forum_topics_per_page"]=> string(1) "0" ["forum_type"]=> string(1) "0" ["forum_status"]=> string(1) "0" ["forum_posts"]=> string(1) "0" ["forum_topics"]=> string(1) "0" ["forum_topics_real"]=> string(1) "0" ["forum_last_post_id"]=> string(1) "0" ["forum_last_poster_id"]=> string(1) "0" ["forum_last_post_subject"]=> string(0) "" ["forum_last_post_time"]=> string(1) "0" ["forum_last_poster_name"]=> string(0) "" ["forum_last_poster_colour"]=> string(0) "" ["forum_flags"]=> string(2) "32" ["forum_options"]=> string(1) "0" ["display_subforum_list"]=> string(1) "1" ["display_on_index"]=> string(1) "0" ["enable_indexing"]=> string(1) "1" ["enable_icons"]=> string(1) "0" ["enable_prune"]=> string(1) "0" ["prune_next"]=> string(1) "0" ["prune_days"]=> string(1) "7" ["prune_viewed"]=> string(1) "7" ["prune_freq"]=> string(1) "1" ["forum_id_unapproved_topics"]=> int(0) ["forum_id_last_post"]=> string(1) "3" ["orig_forum_last_post_time"]=> string(1) "0" ["children"]=> array(2) { [0]=> array(45) { ["forum_id"]=> string(1) "4" ["parent_id"]=> string(1) "3" ["left_id"]=> string(1) "6" ["right_id"]=> string(1) "7" ["forum_parents"]=> string(48) "a:1:{i:3;a:2:{i:0;s:12:"Unsere Hunde";i:1;i:0;}}" ["forum_name"]=> string(10) "Ernährung" ["forum_desc"]=> string(0) "" ["forum_desc_bitfield"]=> string(0) "" ["forum_desc_options"]=> string(1) "7" ["forum_desc_uid"]=> string(0) "" ["forum_link"]=> string(0) "" ["forum_password"]=> string(0) "" ["forum_style"]=> string(1) "0" ["forum_image"]=> string(0) "" ["forum_rules"]=> string(0) "" ["forum_rules_link"]=> string(0) "" ["forum_rules_bitfield"]=> string(0) "" ["forum_rules_options"]=> string(1) "7" ["forum_rules_uid"]=> string(0) "" ["forum_topics_per_page"]=> string(1) "0" ["forum_type"]=> string(1) "1" ["forum_status"]=> string(1) "0" ["forum_posts"]=> string(1) "0" ["forum_topics"]=> string(1) "0" ["forum_topics_real"]=> string(1) "0" ["forum_last_post_id"]=> string(1) "0" ["forum_last_poster_id"]=> string(1) "0" ["forum_last_post_subject"]=> string(0) "" ["forum_last_post_time"]=> string(1) "0" ["forum_last_poster_name"]=> string(0) "" ["forum_last_poster_colour"]=> string(0) "" ["forum_flags"]=> string(3) "112" ["forum_options"]=> string(1) "0" ["display_subforum_list"]=> string(1) "1" ["display_on_index"]=> string(1) "0" ["enable_indexing"]=> string(1) "1" ["enable_icons"]=> string(1) "1" ["enable_prune"]=> string(1) "0" ["prune_next"]=> string(1) "0" ["prune_days"]=> string(1) "7" ["prune_viewed"]=> string(1) "7" ["prune_freq"]=> string(1) "1" ["forum_id_unapproved_topics"]=> int(0) ["forum_id_last_post"]=> string(1) "4" ["orig_forum_last_post_time"]=> string(1) "0" } [1]=> array(45) { ["forum_id"]=> string(1) "5" ["parent_id"]=> string(1) "3" ["left_id"]=> string(1) "8" ["right_id"]=> string(1) "9" ["forum_parents"]=> string(48) "a:1:{i:3;a:2:{i:0;s:12:"Unsere Hunde";i:1;i:0;}}" ["forum_name"]=> string(10) "Gesundheit" ["forum_desc"]=> string(0) "" ["forum_desc_bitfield"]=> string(0) "" ["forum_desc_options"]=> string(1) "7" ["forum_desc_uid"]=> string(0) "" ["forum_link"]=> string(0) "" ["forum_password"]=> string(0) "" ["forum_style"]=> string(1) "0" ["forum_image"]=> string(0) "" ["forum_rules"]=> string(0) "" ["forum_rules_link"]=> string(0) "" ["forum_rules_bitfield"]=> string(0) "" ["forum_rules_options"]=> string(1) "7" ["forum_rules_uid"]=> string(0) "" ["forum_topics_per_page"]=> string(1) "0" ["forum_type"]=> string(1) "1" ["forum_status"]=> string(1) "0" ["forum_posts"]=> string(1) "0" ["forum_topics"]=> string(1) "0" ["forum_topics_real"]=> string(1) "0" ["forum_last_post_id"]=> string(1) "0" ["forum_last_poster_id"]=> string(1) "0" ["forum_last_post_subject"]=> string(0) "" ["forum_last_post_time"]=> string(1) "0" ["forum_last_poster_name"]=> string(0) "" ["forum_last_poster_colour"]=> string(0) "" ["forum_flags"]=> string(3) "112" ["forum_options"]=> string(1) "0" ["display_subforum_list"]=> string(1) "1" ["display_on_index"]=> string(1) "0" ["enable_indexing"]=> string(1) "1" ["enable_icons"]=> string(1) "1" ["enable_prune"]=> string(1) "0" ["prune_next"]=> string(1) "0" ["prune_days"]=> string(1) "7" ["prune_viewed"]=> string(1) "7" ["prune_freq"]=> string(1) "1" ["forum_id_unapproved_topics"]=> int(0) ["forum_id_last_post"]=> string(1) "5" ["orig_forum_last_post_time"]=> string(1) "0" } } } [phpBB Debug] PHP Warning: in file /includes/functions.php on line 4730: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:525)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4732: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:525)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4733: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:525)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4734: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:525)
Kategorie:

Code: Alles auswählen

Output :array(1) { ["children"]=> array(1) { [0]=> array(45) { ["forum_id"]=> string(1) "2" ["parent_id"]=> string(1) "1" ["left_id"]=> string(1) "2" ["right_id"]=> string(1) "3" ["forum_parents"]=> string(50) "a:1:{i:1;a:2:{i:0;s:14:"Rund ums Forum";i:1;i:0;}}" ["forum_name"]=> string(26) "Ankündigungen/Neuigkeiten" ["forum_desc"]=> string(0) "" ["forum_desc_bitfield"]=> string(0) "" ["forum_desc_options"]=> string(1) "7" ["forum_desc_uid"]=> string(0) "" ["forum_link"]=> string(0) "" ["forum_password"]=> string(0) "" ["forum_style"]=> string(1) "0" ["forum_image"]=> string(0) "" ["forum_rules"]=> string(0) "" ["forum_rules_link"]=> string(0) "" ["forum_rules_bitfield"]=> string(0) "" ["forum_rules_options"]=> string(1) "7" ["forum_rules_uid"]=> string(0) "" ["forum_topics_per_page"]=> string(1) "0" ["forum_type"]=> string(1) "1" ["forum_status"]=> string(1) "0" ["forum_posts"]=> string(1) "5" ["forum_topics"]=> string(1) "1" ["forum_topics_real"]=> string(1) "1" ["forum_last_post_id"]=> string(1) "6" ["forum_last_poster_id"]=> string(1) "2" ["forum_last_post_subject"]=> string(26) "Re: Willkommen bei phpBB3!" ["forum_last_post_time"]=> string(10) "1324584804" ["forum_last_poster_name"]=> string(4) "Jack" ["forum_last_poster_colour"]=> string(6) "AA0000" ["forum_flags"]=> string(2) "48" ["forum_options"]=> string(1) "0" ["display_subforum_list"]=> string(1) "1" ["display_on_index"]=> string(1) "0" ["enable_indexing"]=> string(1) "1" ["enable_icons"]=> string(1) "1" ["enable_prune"]=> string(1) "0" ["prune_next"]=> string(1) "0" ["prune_days"]=> string(1) "0" ["prune_viewed"]=> string(1) "0" ["prune_freq"]=> string(1) "0" ["forum_id_unapproved_topics"]=> int(0) ["forum_id_last_post"]=> string(1) "2" ["orig_forum_last_post_time"]=> string(10) "1324584804" } } } [phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 530: Undefined index: forum_id
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 531: Undefined index: forum_name
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 532: Undefined index: forum_desc
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 532: Undefined index: forum_desc_uid
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 532: Undefined index: forum_desc_bitfield
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 532: Undefined index: forum_desc_options
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 535: Undefined index: forum_image
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 536: Undefined index: forum_image
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 538: Undefined index: forum_id
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4730: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:525)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4732: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:525)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4733: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:525)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4734: Cannot modify header information - headers already sent by (output started at /includes/functions_display.php:525)
Edit 10:55
habe mal eben auf dem Server eine 3.0.8 zum testen installiert, da tritt der Fehler wirklich nicht auf :o
http://test.aussie-jack.de

Re: Forenkategorien - Anordnung nebeneinander

Verfasst: 26.12.2011 12:05
von Miriam
Hallo,

der Fehler liegt hier:
Kategorie hat geschrieben:Output :array(1) { ["children"]=> array(1) { [0]=> array(45) { ["forum_id"]=> string(1) "2" ......
Eine Kategorie hat Kinder... die Foren. Und somit gibt es keine Indizes, wie "forum_id" etc.pp...
Es gibt nur einen Index "children" und das ist ein Array.




finde:

Code: Alles auswählen

//Category
$template->assign_block_vars('catrow', array(
   'FORUM_ID'         => $cat['forum_id'],
   'FORUM_NAME'         => $cat['forum_name'],
   'FORUM_DESC'         => generate_text_for_display($cat['forum_desc'], $cat['forum_desc_uid'], $cat['forum_desc_bitfield'], $cat['forum_desc_options']),
   'FORUM_FOLDER_IMG'            => '',
   'FORUM_FOLDER_IMG_SRC'   => '',
   'FORUM_IMAGE'         => ($cat['forum_image']) ? '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $cat['forum_id']) . '"><img src="' . $phpbb_root_path . $cat['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" /></a>' : '',
   'FORUM_IMAGE_SRC'      => ($cat['forum_image']) ? $phpbb_root_path . $cat['forum_image'] : '',
   'CHILDREN_COUNT'      => count($cat['children']),
   'U_VIEWFORUM'         => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $cat['forum_id'])) 
tausche aus gegen:

Code: Alles auswählen

//Category
$template->assign_block_vars('catrow', array(
   'FORUM_ID'         => $cat['children'][0]['forum_id'],
   'FORUM_NAME'         => $cat['children'][0]['forum_name'],
   'FORUM_DESC'         => generate_text_for_display($cat['children'][0]['forum_desc'], $cat['children'][0]['forum_desc_uid'], $cat['children'][0]['forum_desc_bitfield'], $cat['children'][0]['forum_desc_options']),
   'FORUM_FOLDER_IMG'            => '',
   'FORUM_FOLDER_IMG_SRC'   => '',
   'FORUM_IMAGE'         => ($cat['children'][0]['forum_image']) ? '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $cat['children'][0]['forum_id']) . '"><img src="' . $phpbb_root_path . $cat['children'][0]['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" /></a>' : '',
   'FORUM_IMAGE_SRC'      => ($cat['children'][0]['forum_image']) ? $phpbb_root_path . $cat['children'][0]['forum_image'] : '',
   'CHILDREN_COUNT'      => count($cat['children'][0]),
   'U_VIEWFORUM'         => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $cat['children'][0]['forum_id']))
); 
Ich habe es noch nicht komplett getestet ... also nicht mit einer Kategorie in einem Forum z.B.

Re: Forenkategorien - Anordnung nebeneinander

Verfasst: 26.12.2011 18:19
von FRvN
Hallo Miriam,

Debugmeldung ist nun weg. Aber anstatt den Titel der Kategorie wird hier jeweils der Titel des ersten Subforums angezeigt
und wenn nur ein Forum in der Kategorie enthalten ist wird es so gekürzt als wenn zwei vorhanden wären, http://aussie-jack.de

LG
FRvN

Re: Forenkategorien - Anordnung nebeneinander

Verfasst: 26.12.2011 22:39
von Talk19zehn
Hello Miriam, mein Feedback; Debugmeldung verbleibt in meinem Falle leider:

[ externes Bild ]

Interne Foren ( Kategorie ):
Es wird der Forum-Typ ( siehe bitte ACP ), so dass der Bereich nicht zu betreten ist

[ externes Bild ]

anstelle des Links ( vgl. bitte "Originalversion" ) ausgegeben.
[ externes Bild ]


Anmerkung: Vorhin hatte ich hier ( ca. Zeile 540 ( vgl. bitte "Originalversion" )) mit If experimentiert......

Code: Alles auswählen

   //Forums under category 
   foreach($cat['children'] as $row) 
   { 
      $visible_forums++; 
      $forum_id = $row['forum_id']; 
      
      $forum_unread = (isset($forum_tracking_info[$forum_id]) && $row['orig_forum_last_post_time'] > $forum_tracking_info[$forum_id]) ? true : false; 

      $folder_image = $folder_alt = $l_subforums = ''; 
      $subforums_list = array(); 
Debugmeldung verschwand, jedoch wurden nur die in der Kategorie befindlichen Zweitforen ausgegeben. Langsam gehen mir die Ideen aus.

Beste Grüße :)

Re: Forenkategorien - Anordnung nebeneinander

Verfasst: 27.12.2011 12:41
von Miriam
Na mal sehen....
... alles wieder auf 0.

Und dann:
  • finde

    Code: Alles auswählen

    foreach($cat_array as $cat)
    {
    
    //Category
    $template->assign_block_vars('catrow', array(
       'FORUM_ID'         => $cat['forum_id'],
       'FORUM_NAME'         => $cat['forum_name'],
       'FORUM_DESC'         => generate_text_for_display($cat['forum_desc'], $cat['forum_desc_uid'], $cat['forum_desc_bitfield'], $cat['forum_desc_options']),
       'FORUM_FOLDER_IMG'            => '',
       'FORUM_FOLDER_IMG_SRC'   => '',
       'FORUM_IMAGE'         => ($cat['forum_image']) ? '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $cat['forum_id']) . '"><img src="' . $phpbb_root_path . $cat['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" /></a>' : '',
       'FORUM_IMAGE_SRC'      => ($cat['forum_image']) ? $phpbb_root_path . $cat['forum_image'] : '',
       'CHILDREN_COUNT'      => count($cat['children']),
       'U_VIEWFORUM'         => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $cat['forum_id']))
    );
     
    tausche aus gegen

    Code: Alles auswählen

    foreach($cat_array as $cat)
    {
        if (isset($cat['forum_id']))
        {
            $template->assign_block_vars('catrow', array(
               'FORUM_ID'         => $cat['forum_id'],
               'FORUM_NAME'         => $cat['forum_name'],
               'FORUM_DESC'         => generate_text_for_display($cat['forum_desc'], $cat['forum_desc_uid'], $cat['forum_desc_bitfield'], $cat['forum_desc_options']),
               'FORUM_FOLDER_IMG'            => '',
               'FORUM_FOLDER_IMG_SRC'   => '',
               'FORUM_IMAGE'         => ($cat['forum_image']) ? '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $cat['forum_id']) . '"><img src="' . $phpbb_root_path . $cat['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" /></a>' : '',
               'FORUM_IMAGE_SRC'      => ($cat['forum_image']) ? $phpbb_root_path . $cat['forum_image'] : '',
               'CHILDREN_COUNT'      => count($cat['children']),
               'U_VIEWFORUM'         => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $cat['forum_id']))
            );
        }
        else
        {
            $template->assign_block_vars('catrow', array(
               'CHILDREN_COUNT'      => count($cat['children']))
            );
        }
     

Re: Forenkategorien - Anordnung nebeneinander

Verfasst: 27.12.2011 17:56
von FRvN
es funktioniert, klasse Miriam 8)

bin jetzt noch einen Schritt weiter gegangen und habe eine neue Kategorie (Kat1) angelegt,
darin befinden sich ein Forum (F1) und noch eine Kategorie (UKat1) mit einem Forum (UF1).
In der Foren-Übersicht erscheint die Unterkategorie (UKat1) extra d.h. nur der Name http://aussie-jack.de
und die Meldung...

Code: Alles auswählen

[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 536: Undefined index: children
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 548: Undefined index: children
[phpBB Debug] PHP Warning: in file /includes/functions_display.php on line 548: Invalid argument supplied for foreach()
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4730: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3909)
Klicke ich auf die Kategorie (Kat1) wird darin aber alles richtig angezeigt, also UKat1 und F1

LG
FRvN