Block "aktuelle Beiträge" tunen [1.1.0b]

Forum für das phpBB3 Portal von
phpbb3portal.com (Version 1.1.0b) - kein Support mehr für das phpbb3portal
User avatar

Topic author
Kevin
Site Admin
Posts: 2994
Joined: 7. January 2006 21:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg

Block "aktuelle Beiträge" tunen [1.1.0b]

Post by Kevin »

Eine Überarbeitung der aktuellen Beiträge.
Achtung: funktioniert nur im "kompakten Block Style"!
aktuelle_beitraege.gif
Änderungen:
  • Der Link geht direkt auf den letzten Beitrag des Themas (statt auf den Ersten)
  • Der Autor des letzten Posts wird angezeigt (nicht Themenersteller) + Link auf das Profil
  • Die Zeit des letzten Beitrags wird angezeigt (nicht Startzeit des Themas)
So gehts:

Öffne /portal/includes/functions.php
suche:

Code: Select all

    $sql = 'SELECT
            t.forum_id,
            t.topic_id,
            t.topic_last_post_id,
            t.topic_time,
            t.topic_title,
            t.topic_attachment,
            t.topic_views,
            t.poll_title,
            t.topic_replies,
            t.forum_id,
            t.topic_poster,
            u.username,
            u.user_id,
            u.user_type,
            u.user_colour,
            p.post_id,
            p.post_text,
            p.post_attachment,
            p.enable_smilies,
            p.enable_bbcode,
            p.enable_magic_url,
            p.bbcode_bitfield,
            p.bbcode_uid
        FROM
            ' . TOPICS_TABLE . ' AS t,
            ' . USERS_TABLE . ' AS u,
            ' . POSTS_TABLE . ' AS p
        WHERE
            ' . $topic_type . '
            ' . $from_forum . '
            ' . $post_time . '
            t.topic_poster = u.user_id AND
            t.topic_first_post_id = p.post_id AND
            t.topic_status <> 2 AND
            t.topic_approved = 1
und ersetze durch:

Code: Select all

    $sql = 'SELECT
            t.forum_id,
            t.topic_id,
            t.topic_last_post_id,
            t.topic_last_post_time,
            t.topic_title,
            t.topic_attachment,
            t.topic_views,
            t.poll_title,
            t.topic_replies,
            t.forum_id,
            t.topic_last_poster_id,
            u.username,
            u.user_id,
            u.user_type,
            u.user_colour,
            p.post_id,
            p.post_text,
            p.post_attachment,
            p.enable_smilies,
            p.enable_bbcode,
            p.enable_magic_url,
            p.bbcode_bitfield,
            p.bbcode_uid
        FROM
            ' . TOPICS_TABLE . ' AS t,
            ' . USERS_TABLE . ' AS u,
            ' . POSTS_TABLE . ' AS p
        WHERE
            ' . $topic_type . '
            ' . $from_forum . '
            ' . $post_time . '
            t.topic_last_poster_id = u.user_id AND
            t.topic_first_post_id = p.post_id AND
            t.topic_status <> 2 AND
            t.topic_approved = 1
suche:

Code: Select all

$posts[$i]['topic_time'] = $user->format_date($row['topic_time']);               
und ersetze durch:

Code: Select all

$posts[$i]['topic_time'] = $user->format_date($row['topic_last_post_time']);               
Öffne styles/prosilver/template/portal/block/news_compact.html
suche:

Code: Select all

						<img src="{T_THEME_PATH}/images/arrow_right.gif" alt="&raquo;"/> 
						<a href="{news_row.U_VIEW_COMMENTS}"><strong style="font-size:1.1em;">{news_row.TITLE}</strong></a>
						<br style="clear:both" />
						<span style="float: left;">
							<a href="{news_row.U_VIEW_COMMENTS}" title="{L_VIEW_COMMENTS}"><span style="font-size:0.9em;"><em>{L_COMMENTS}: {news_row.REPLIES}</em></span></a>
							<span style="font-size:0.9em;"><em>{L_TOPIC_VIEWS}: {news_row.TOPIC_VIEWS}</em></span>
						</span>
						<span style="float: right;">{news_row.TIME}</span>
						<br />
ersetze durch:

Code: Select all

						<span style="float: left;"><img src="{T_THEME_PATH}/images/arrow_right.gif" alt="&raquo;"/> 
						<!-- <a href="{news_row.U_VIEW_COMMENTS}"><strong style="font-size:1.1em;">{news_row.TITLE}</strong></a>  -->
						<a href="{news_row.U_LAST_COMMENTS}" title="Zum neuesten Beitrag springen"><strong style="font-size:1.1em;">{news_row.TITLE}</strong></a></span>
						<span style="float: right;">Letzter Beitrag von: <strong><a href="{news_row.U_USER_PROFILE}">{news_row.POSTER}</a></strong></span>
						<br style="clear:both" />
						<span style="float: left;">
							<a href="{news_row.U_VIEW_COMMENTS}" title="Zum ersten Beitrag springen"><span style="font-size:0.9em;"><em>{L_COMMENTS}: {news_row.REPLIES}</em></span></a>
							<span style="font-size:0.9em;"><em>{L_TOPIC_VIEWS}: {news_row.TOPIC_VIEWS}</em></span>
						</span>
						<span style="float: right;">am <strong>{news_row.TIME}</strong></span>
						<hr />
You do not have the required permissions to view the files attached to this post.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

Topic author
Kevin
Site Admin
Posts: 2994
Joined: 7. January 2006 21:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg

Re: Block "aktuelle Beiträge" tunen [1.1.0b]

Post by Kevin »

Dieser Post ist für jeden uninteressant, der die Modifikation nach dem Datum dieses Beitrags eingearbeitet hat.

Ich habe noch die Darstellung geändert:
  • Mousehover eingefügt:
    - Zeigt man mit der Maus auf den Titel des Topices erscheint "Zum neuesten Beitrag springen"
    - Zeigt man mit der Maus auf "Antworten"erscheint "Zum ersten Beitrag springen"
  • Datum des letzten Beitrags in fett


Die Änderung ist schon in der Anleitung eingepflegt.
Für alle, die die Modifikation vor diesem Beitrag eingearbeitet haben und diese Änderungen auch haben möchten:

Öffne styles/prosilver/template/portal/block/news_compact.html
suche:

Code: Select all

						<a href="{news_row.U_LAST_COMMENTS}"><strong style="font-size:1.1em;">{news_row.TITLE}</strong></a></span>
						<span style="float: right;">Letzter Beitrag von: <strong><a href="{news_row.U_USER_PROFILE}">{news_row.POSTER}</a></strong></span>
						<br style="clear:both" />
						<span style="float: left;">
							<a href="{news_row.U_VIEW_COMMENTS}"><span style="font-size:0.9em;"><em>{L_COMMENTS}: {news_row.REPLIES}</em></span></a>
							<span style="font-size:0.9em;"><em>{L_TOPIC_VIEWS}: {news_row.TOPIC_VIEWS}</em></span>
						</span>
						<span style="float: right;">am {news_row.TIME}</span>
						<hr />
					</li>
und ersetze durch:

Code: Select all

						<a href="{news_row.U_LAST_COMMENTS}" title="Zum neuesten Beitrag springen"><strong style="font-size:1.1em;">{news_row.TITLE}</strong></a></span>
						<span style="float: right;">Letzter Beitrag von: <strong><a href="{news_row.U_USER_PROFILE}">{news_row.POSTER}</a></strong></span>
						<br style="clear:both" />
						<span style="float: left;">
							<a href="{news_row.U_VIEW_COMMENTS}" title="Zum ersten Beitrag springen"><span style="font-size:0.9em;"><em>{L_COMMENTS}: {news_row.REPLIES}</em></span></a>
							<span style="font-size:0.9em;"><em>{L_TOPIC_VIEWS}: {news_row.TOPIC_VIEWS}</em></span>
						</span>
						<span style="float: right;">am <strong>{news_row.TIME}</strong></span>
						<hr />
					</li>
In Zukunft werde ich das mit neuen Sprachvariablen einarbeiten, damit das auch mit mehreren Sprachen benutzt werden kann.
Dies ist erstmal eine "Vorablösung".
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

Redbull254
Former Team Member
Posts: 693
Joined: 19. January 2006 23:50
Location: Kamen

Re: Block "aktuelle Beiträge" tunen [1.1.0b]

Post by Redbull254 »

Hallo, Kevin ;-)

eingebaut und mit dem FF und IE getestet, perfekte Arbeit.

Sollte der Autor des Portal irgendwann mal wieder auftauchen, bekommt er große :shock: Augen, was so alles möglich ist. :mrgreen:

Änderungen sind alle Valid XHTML 1.0 Strict!
LG
Walter

"Klug ist nicht, wer keine Fehler macht. Klug ist der, der es versteht, sie zu korrigieren."
User avatar

Topic author
Kevin
Site Admin
Posts: 2994
Joined: 7. January 2006 21:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg

Re: Block "aktuelle Beiträge" tunen [1.1.0b]

Post by Kevin »

Hach, sehr schön!
Danke fürs testen! :D
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

Limo198
Portal Enthusiast
Posts: 134
Joined: 23. December 2007 11:18
Location: Altmersleben

Re: Block "aktuelle Beiträge" tunen [1.1.0b]

Post by Limo198 »

Klappt super. Danke. Habs verbaut.



LG
Image
User avatar

Redbull254
Former Team Member
Posts: 693
Joined: 19. January 2006 23:50
Location: Kamen

Re: Block "aktuelle Beiträge" tunen [1.1.0b]

Post by Redbull254 »

Hallo, Limo198

schön, das alles geklappt hat. ;-)

Und herzlich Willkommen im Forum. :D
LG
Walter

"Klug ist nicht, wer keine Fehler macht. Klug ist der, der es versteht, sie zu korrigieren."

Return to “phpBB3 Portal”