last news as last topic
Posted: 21. April 2010 11:04
Your Portal Version: 1.0.5RC3
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Beginner
Boardlink: http://clandecima.altervista.org/forum/portal.php
PHP Version: 3.0.6
What have you done before the problem was there?
nothing
What have you already tryed to solve the problem?
read description
Description and Message
Hi,
This is easy to understand and difficult to explain so let me be clear.
On my portal page,I'd like to have a "news block" that displays post taken from "news forum".I can do this simply using the news panel in ACP.
The problem is that I'd like to have also a "last active topic block" displayed as if it is a news compact blocks,so i can see last 5 active topics sorted by the one with the newest post.
So i created a new custom block,called last_post,and copied the code from news_compact.In this way I have 2 news blocks as i requested but since they must be showed with different options,it become a little messy. (The news block must show fully one post while the last topic block must show 5 last topics in compact mode)
I think I have to delete some <--IF things in my last_post custom block,in a way that he display only the options i want it to have,so the ACP will set only the news block
My last_post block code:
[/i]
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Beginner
Boardlink: http://clandecima.altervista.org/forum/portal.php
PHP Version: 3.0.6
What have you done before the problem was there?
nothing
What have you already tryed to solve the problem?
read description
Description and Message
Hi,
This is easy to understand and difficult to explain so let me be clear.
On my portal page,I'd like to have a "news block" that displays post taken from "news forum".I can do this simply using the news panel in ACP.
The problem is that I'd like to have also a "last active topic block" displayed as if it is a news compact blocks,so i can see last 5 active topics sorted by the one with the newest post.
So i created a new custom block,called last_post,and copied the code from news_compact.In this way I have 2 news blocks as i requested but since they must be showed with different options,it become a little messy. (The news block must show fully one post while the last topic block must show 5 last topics in compact mode)
I think I have to delete some <--IF things in my last_post custom block,in a way that he display only the options i want it to have,so the ACP will set only the news block
My last_post block code:
Code: Select all
<!--version $Id: news_compact.html 503 2009-04-20 18:34:29Z kevin74 $ //-->
<div id="pagecontent">
<!-- BEGIN news_row -->
<!-- IF news_row.S_FIRST_ROW -->
{$C_BLOCK_H_L}Ultimi Argomenti Attivi{$C_BLOCK_H_R}
<table class="tablebg" cellspacing="1" width="100%">
<!-- IF not news_row.S_NO_TOPICS -->
<tr class="nav">
<!-- IF S_TOPIC_ICONS -->
<td class="cat" align="center" colspan="3"> {L_TOPICS} </td>
<!-- ELSE -->
<td class="cat" align="center" colspan="2"> {L_TOPICS} </td>
<!-- ENDIF -->
<!-- IF S_DISPLAY_NEWS_RVS -->
<td class="cat" align="center"> {L_REPLIES} </td>
<td class="cat" align="center"> {L_VIEWS} </td>
<!-- ENDIF -->
<td class="cat" align="center"> {L_LAST_POST} </td>
</tr>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF news_row.S_NO_TOPICS -->
<tr class="row1">
<td align="center">
<span class="gensmall"><strong>{L_NO_NEWS}</strong></span>
</td>
</tr>
<!-- ELSE -->
<tr>
<td class="row1" width="25" align="center">{news_row.TOPIC_FOLDER_IMG}</td>
<!-- IF S_TOPIC_ICONS --><td class="row1" width="25" align="center"><!-- IF news_row.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{news_row.TOPIC_ICON_IMG}" width="{news_row.TOPIC_ICON_IMG_WIDTH}" height="{news_row.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td><!-- ENDIF -->
<td class="row1">
<!-- IF news_row.PAGINATION --><span style="float: right; font-size:0.9em;"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {news_row.PAGINATION} ] </span><!-- ENDIF -->
{news_row.ATTACH_ICON_IMG} <!-- IF news_row.S_POLL --> <strong style="font-size:1.1em;">{L_POLL}: </strong><!-- ENDIF --><a title="{news_row.TITLE}" href="{news_row.U_VIEW_COMMENTS}" class="topictitle">{news_row.TITLE}</a>
<p class="gensmall">{L_POSTED} {L_POST_BY_AUTHOR} {news_row.POSTER_FULL} » {news_row.TIME}
<!-- IF news_row.FORUM_NAME -->
<br />{L_FORUM}: <a href="{news_row.U_VIEWFORUM}" style="font-weight: bold;">{news_row.FORUM_NAME}</a>
<!-- ENDIF -->
<!-- IF not S_DISPLAY_NEWS_RVS --><!-- IF news_row.FORUM_NAME -->• <!-- ENDIF -->{L_REPLIES}: <strong>{news_row.REPLIES}</strong> • {L_VIEWS}: <strong>{news_row.TOPIC_VIEWS}</strong><!-- ENDIF -->
</p>
</td>
<!-- IF S_DISPLAY_NEWS_RVS -->
<td class="row1" width="50" align="center"><p class="topicdetails">{news_row.REPLIES}</p></td>
<td class="row2" width="50" align="center"><p class="topicdetails">{news_row.TOPIC_VIEWS}</p></td>
<!-- ENDIF -->
<td class="row1" width="140" align="center">
<p class="topicdetails" style="white-space: nowrap;"> {news_row.LAST_POST_TIME}</p>
<p class="topicdetails">{news_row.USERNAME_FULL_LAST}
<!-- IF not S_IS_BOT --><!-- IF news_row.S_UNREAD_INFO --><a href="{news_row.U_VIEW_UNREAD}">{NEWEST_POST_IMG}</a><!-- ELSE --><a href="{news_row.U_LAST_COMMENTS}">{READ_POST_IMG}</a><!-- ENDIF --><!-- ENDIF -->
</p>
</td>
</tr>
<!-- ENDIF -->
<!-- IF news_row.S_LAST_ROW -->
<!-- IF NP_PAGINATION or TOTAL_NEWS -->
<tr class="row<!-- IF news_row.S_ROW_COUNT is even -->2<!-- ELSE -->1<!-- ENDIF -->">
<td class="gensmall" valign="middle" align="right" nowrap="nowrap" colspan="<!-- IF S_TOPIC_ICONS and S_DISPLAY_NEWS_RVS -->6<!-- ELSEIF not S_TOPIC_ICONS and S_DISPLAY_NEWS_RVS -->5<!-- ELSEIF S_TOPIC_ICONS and not S_DISPLAY_NEWS_RVS -->4<!-- ELSE -->3<!-- ENDIF -->">{TOTAL_NEWS}
<!-- IF NP_PAGE_NUMBER --><!-- IF NP_PAGINATION --> • {NP_PAGE_NUMBER} • <span>{NP_PAGINATION}</span><!-- ELSE --> • {NP_PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF --></td>
</tr>
<!-- ENDIF -->
</table>
{$C_BLOCK_F_L}{$C_BLOCK_F_R}
<!-- ENDIF -->
<!-- END news_row -->
</div>