Neue Beiträge in Bekanntmachungen

Aktuelle Version: 1.0.6
Veröffentlicht: 01.09.10
Forum rules
Vor dem erstellen neuer Supportanfragen bitte zuerst in die board3 Portal FAQ schauen und die Suche benutzen!
Viele Fragen sind bereits schon gestellt und beantwortet worden.
Bitte auch unsere Forumsregeln lesen und beachten!

Neue Beiträge in Bekanntmachungen

Postby AuroraXF » 2. January 2010 18:04

Deine Portal Version: 1.0.0RC3
Typ Deines phpBB Forums: Standard phpBB3
MODs installiert: Ja
Dein Wissensstand: Einsteiger
Link zu Deinem Forum: http://jagdkommando.game-server.cc

PHP Version: 5.3.1
MySQL Version: 5.0.88

Was hast Du gemacht, bevor das Problem aufgetreten ist?


Was hast Du bereits versucht um das Problem zu lösen?


Fehlerbeschreibung und Nachricht
Guten Tag,

es ist ja so das wenn ich ein Thema als Bekanntmachung oder Globale Bekanntmachung eröffne es nicht mit unter den Aktuellen Beiträgen aufgeführt wird. Auch nicht wenn dort Antworten etc gepostet werden.
Ich weiß das das wohl so gewollt war und als Lösungsansatz hier schon gepostet wurde das man zu der Bekanntmachung noch einen Diskussionsthread erstellen solle.
Ich allerdings möchte es doch gerne so haben das auch Bekanntmachungen und Globale ... mit überprüft werden und bei den Aktuellen beiträgen angezeigt werden. Nur wie realisiere ich das? Leider habe ich dazu bisher nichts gefunden.

Mit freundlichen Grüßen

Marcel B.
AuroraXF
Active Member
Active Member
 
Posts: 20
Joined: 22. July 2009 00:49
phpBB.de User: AuroraXF

Re: Neue Beiträge in Bekanntmachungen

Postby Marc » 2. January 2010 19:02

Ich glaube das hier sollte funktionieren:
Öffne portal/includes/functions.php
Finde (ca. Zeile 94):
Code: Select all
$global_f 0


Ersetze mit:
Code: Select all
$global_f 1
User avatar
Marc
Dev
Dev
 
Posts: 1487
Joined: 17. July 2008 21:08
Location: Clausthal-Zellerfeld / München
phpBB.de User: marc1706
phpBB.com User: marc1706

Re: Neue Beiträge in Bekanntmachungen

Postby AuroraXF » 3. January 2010 03:59

nein das bringt leider nichts. ich sehe auch gerade das ich im ersten Post vergessen habe anzugeben welche Portal Version ich habe. Es war zu dem Zeitpunkt 1.0.3 jetzt allerding nutze ich 1.0.4 falls dies relevant ist.

Mit freundlichen Grüßen
AuroraXF
Active Member
Active Member
 
Posts: 20
Joined: 22. July 2009 00:49
phpBB.de User: AuroraXF

Re: Neue Beiträge in Bekanntmachungen

Postby Marc » 4. January 2010 19:30

Das oben war so überhaupt nicht korrekt, also bitte rückgängig machen.

Öffne portal/includes/functions.php
Finde:
Code: Select all
    switch( $type )
    {
        case "announcements":
            $topic_type = '(( t.topic_type = ' . POST_ANNOUNCE . ') OR ( t.topic_type = ' . POST_GLOBAL . '))';
            $str_where = ( strlen($str_where) > 0 ) ? 'AND (t.forum_id = 0 OR (' . trim(substr($str_where, 0, -4)) . '))' : '';
            $user_link = 't.topic_poster = u.user_id';
            $post_link = 't.topic_first_post_id = p.post_id';
            $topic_order = 't.topic_time DESC';
        break;
        case "news":
            $topic_type = 't.topic_type = ' . POST_NORMAL;
            $str_where = ( strlen($str_where) > 0 ) ? 'AND (' . trim(substr($str_where, 0, -4)) . ')' : '';
            $user_link = ( $portal_config['portal_news_style'] ) ? 't.topic_poster = u.user_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_poster_id = u.user_id' : 't.topic_poster = u.user_id' ) ;
            $post_link = ( $portal_config['portal_news_style'] ) ? 't.topic_first_post_id = p.post_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_id = p.post_id' : 't.topic_first_post_id = p.post_id' ) ;
            $topic_order = ( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_time DESC' : 't.topic_time DESC' ;
        break;
        case "news_all":
            $topic_type = '( t.topic_type <> ' . POST_ANNOUNCE . ' ) AND ( t.topic_type <> ' . POST_GLOBAL . ')';
            $str_where = ( strlen($str_where) > 0 ) ? 'AND (' . trim(substr($str_where, 0, -4)) . ')' : '';
            $user_link = ( $portal_config['portal_news_style'] ) ? 't.topic_poster = u.user_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_poster_id = u.user_id' : 't.topic_poster = u.user_id' ) ;
            $post_link = ( $portal_config['portal_news_style'] ) ? 't.topic_first_post_id = p.post_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_id = p.post_id' : 't.topic_first_post_id = p.post_id' ) ;
            $topic_order = ( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_time DESC' : 't.topic_time DESC' ;
        break;
    } 


Ersetze mit:
Code: Select all
    switch( $type )
    {
        case "announcements":
            $topic_type = '(( t.topic_type = ' . POST_ANNOUNCE . ') OR ( t.topic_type = ' . POST_GLOBAL . '))';
            $str_where = ( strlen($str_where) > 0 ) ? 'AND (t.forum_id = 0 OR (' . trim(substr($str_where, 0, -4)) . '))' : '';
            $user_link = 't.topic_poster = u.user_id';
            $post_link = 't.topic_first_post_id = p.post_id';
            $topic_order = 't.topic_time DESC';
        break;
        case "news":
            $topic_type = '((t.topic_type = ' . POST_NORMAL . ') OR ( t.topic_type = ' . POST_ANNOUNCE . ') OR ( t.topic_type = ' . POST_GLOBAL . '))';
            $str_where = ( strlen($str_where) > 0 ) ? 'AND (' . trim(substr($str_where, 0, -4)) . ')' : '';
            $user_link = ( $portal_config['portal_news_style'] ) ? 't.topic_poster = u.user_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_poster_id = u.user_id' : 't.topic_poster = u.user_id' ) ;
            $post_link = ( $portal_config['portal_news_style'] ) ? 't.topic_first_post_id = p.post_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_id = p.post_id' : 't.topic_first_post_id = p.post_id' ) ;
            $topic_order = ( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_time DESC' : 't.topic_time DESC' ;
        break;
        case "news_all":
            $topic_type = '';
            $str_where = ( strlen($str_where) > 0 ) ? 'AND (' . trim(substr($str_where, 0, -4)) . ')' : '';
            $user_link = ( $portal_config['portal_news_style'] ) ? 't.topic_poster = u.user_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_poster_id = u.user_id' : 't.topic_poster = u.user_id' ) ;
            $post_link = ( $portal_config['portal_news_style'] ) ? 't.topic_first_post_id = p.post_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_id = p.post_id' : 't.topic_first_post_id = p.post_id' ) ;
            $topic_order = ( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_time DESC' : 't.topic_time DESC' ;
        break;
    } 
User avatar
Marc
Dev
Dev
 
Posts: 1487
Joined: 17. July 2008 21:08
Location: Clausthal-Zellerfeld / München
phpBB.de User: marc1706
phpBB.com User: marc1706

Re: Neue Beiträge in Bekanntmachungen

Postby AuroraXF » 4. January 2010 21:54

Hm wenn ich das mache bekomme ich beim aufrufen der Seite folgenden Fehler

Code: Select all
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND t.topic_status <> 2 AND t.topic_approved = 1 AND t.topic_moved_id = ' at line 37 [1064]

SQL

SELECT t.forum_id, t.topic_id, t.topic_last_post_id, t.topic_last_post_time, t.topic_time, t.topic_title, t.topic_attachment, t.topic_views, t.poll_title, t.topic_replies, t.topic_replies_real, t.topic_poster, t.topic_type, t.topic_status, t.topic_last_poster_name, t.topic_last_poster_id, t.topic_last_poster_colour, t.icon_id, u.username, u.user_id, u.user_type, u.user_colour, p.post_id, p.poster_id, p.post_time, p.post_text, p.post_attachment, p.post_username, p.enable_smilies, p.enable_bbcode, p.enable_magic_url, p.bbcode_bitfield, p.bbcode_uid, f.forum_name, f.enable_icons, tp.topic_posted FROM (phpbb_topics t) LEFT JOIN phpbb_users u ON (t.topic_poster = u.user_id) LEFT JOIN phpbb_forums f ON (t.forum_id=f.forum_id) LEFT JOIN phpbb_posts p ON (t.topic_first_post_id = p.post_id) LEFT JOIN phpbb_topics_posted tp ON (tp.topic_id = t.topic_id AND tp.user_id = 2) WHERE AND t.topic_status <> 2 AND t.topic_approved = 1 AND t.topic_moved_id = 0 ORDER BY t.topic_last_post_time DESC LIMIT 5

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: includes/db/mysql.php
LINE: 221
CALL: dbal_mysql->sql_query()

FILE: includes/db/dbal.php
LINE: 170
CALL: dbal_mysql->_sql_query_limit()

FILE: portal/includes/functions.php
LINE: 231
CALL: dbal->sql_query_limit()

FILE: portal/block/news.php
LINE: 26
CALL: phpbb_fetch_posts()

FILE: portal.php
LINE: 119
CALL: include('portal/block/news.php')


Mit freundlichen Grüßen
AuroraXF
Active Member
Active Member
 
Posts: 20
Joined: 22. July 2009 00:49
phpBB.de User: AuroraXF

Re: Neue Beiträge in Bekanntmachungen

Postby AuroraXF » 10. January 2010 07:43

keine Lösung?
Kenne mich mit mysql nicht aus, sollte ich lieber im offiziellen phpbb Forum diesbezüglich nachfragen?
AuroraXF
Active Member
Active Member
 
Posts: 20
Joined: 22. July 2009 00:49
phpBB.de User: AuroraXF

Re: Neue Beiträge in Bekanntmachungen

Postby AuroraXF » 20. January 2010 03:59

Durch den entstandenen mysql fehler, haben sich wohl weitere fehler in der Datenbank eingeschlichen und ich musste ein Backup einspielen.
Also schien das leider auch nicht so korrekt zu sein.
Muss ich wohl doch ein seperates Diskussionsthema zu Bekanntmachungen erstellen.
Trotzdem danke für den Versuch :D

MfG AuroraXF
AuroraXF
Active Member
Active Member
 
Posts: 20
Joined: 22. July 2009 00:49
phpBB.de User: AuroraXF

Re: Neue Beiträge in Bekanntmachungen

Postby Marc » 20. January 2010 11:57

Also durch ein SELECT kann man eigentlich keine Datenbank Fehler verursachen, da man nur liest und nichts schreibt. :?
User avatar
Marc
Dev
Dev
 
Posts: 1487
Joined: 17. July 2008 21:08
Location: Clausthal-Zellerfeld / München
phpBB.de User: marc1706
phpBB.com User: marc1706

Re: Neue Beiträge in Bekanntmachungen

Postby JokerGSI » 30. March 2010 09:25

Hallo!

Gibt es hierfür keine Lösung?

Edit:

Auch hier hab ich mal selber probiert, ich weiß nicht bzw. ich glaube nicht, dass es die optimale Lösung ist, aber sie funktioniert:

Öffne portal/includes/functions.php

finde:
Code: Select all
case "news_all":
   $topic_type = '( t.topic_type <> ' . POST_ANNOUNCE . ' ) AND ( t.topic_type <> ' . POST_GLOBAL . ')';
   $str_where = ( strlen($str_where) > 0 ) ? 'AND (' . trim(substr($str_where, 0, -4)) . ')' : '';
   $user_link = ( $portal_config['portal_news_style'] ) ? 't.topic_poster = u.user_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_poster_id = u.user_id' : 't.topic_poster = u.user_id' ) ;
   $post_link = ( $portal_config['portal_news_style'] ) ? 't.topic_first_post_id = p.post_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_id = p.post_id' : 't.topic_first_post_id = p.post_id' ) ;
   $topic_order = ( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_time DESC' : 't.topic_time DESC' ;
break;


ersetze durch:
Code: Select all
case "news_all":
   $topic_type = '((t.topic_type = ' . POST_NORMAL . ') OR (t.topic_type = ' . POST_STICKY . ') OR (t.topic_type = ' . POST_ANNOUNCE . ') OR (t.topic_type = ' . POST_GLOBAL . '))';
   $str_where = (strlen($str_where) > 0) ? 'AND (' . trim(substr($str_where, 0, -4)) . ')' : '';
   $user_link = ($portal_config['portal_news_style']) ? 't.topic_poster = u.user_id' : (($portal_config['portal_news_show_last']) ? 't.topic_last_poster_id = u.user_id' : 't.topic_poster = u.user_id' ) ;
   $post_link = ($portal_config['portal_news_style']) ? 't.topic_first_post_id = p.post_id' : (($portal_config['portal_news_show_last']) ? 't.topic_last_post_id = p.post_id' : 't.topic_first_post_id = p.post_id' ) ;
   $topic_order = ($portal_config['portal_news_show_last']) ? 't.topic_last_post_time DESC' : 't.topic_time DESC' ;
break;


Geändert wird nur die $topic_type = Zeile. Hierbei wird ausgewählt welche Topic-Typen er auswählen soll. Wenn man die Zeile einfach raus löscht oder leer lässt gibts nen Fehler also habe ich einfach alle 4 Topic Typen rein geschrieben und immer mit OR verknüpft.

Edit2: Nicht vergessen im ACP unter Mods -> Aktuelle Beiträge den Punkt Zeige alle Beiträge dieses Forums: auf Ja zu setzen.
JokerGSI
Active Member
Active Member
 
Posts: 4
Joined: 26. February 2010 14:35
phpBB.de User: JokerGSI
phpBB.com User: JokerGSI

Re: Neue Beiträge in Bekanntmachungen

Postby 3nV|Tr0 » 28. July 2010 22:07

Funktionieren tut es ohne das es nen Fehler bei mir gab ... Dachte schon das ich nen fehler beim update gemacht hatte .. aber nach dem ich gelesen habe das noch mehr leute das prob haben war ich beruhigt .)
3nV|Tr0
Active Member
Active Member
 
Posts: 45
Joined: 18. May 2009 23:52
phpBB.de User: 3nV|Tr0
phpBB.com User: 3nV|Tr0


Return to board3 Portal - German Support

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests