Seite 1 von 1
Display the latest articles from my Knowledge Base
Verfasst: 04.06.2005 21:55
von Muiter
Thirst of all I'm sorry that I post in English instead of German.
I have been looking for some time for a script/mod to display the latest articles from my Knowledge Base (fantastic mod!) and I found a tool that might do the trick
here
I downloaded the rdf parser but I don't have a clue how to set this up to display my latest articles from my Knowledge Base like this website has [url=feed://
www.phpbb.de/doku/kb/rdf.php?orderby=created&count=5]here[/url].
I hope some body can help me with this.
Verfasst: 08.06.2005 18:20
von Helmut71
Hi
I don't know if this is a solution for you cause you haven't made it celar, WHERE you want to display the latest topics.
There is s simple snippet to display the in ezportal:
http://www.amigalink.de/phpbb2/viewtopic.php?t=153
Verfasst: 08.06.2005 22:22
von Muiter
I found that one too (and that's what I needed) and it works fine:
http://www.modelautoforum.nl/forum/
I have found the text file with the code but I can't find the two files anywhere
kb_lastest.php kb_lastest.tpl
Can anyone share these with me?
Code: Alles auswählen
######################################
## MOD Title : Block 'Knowledge Base [0.7.6]' for ezportal
## MOD Author : Canver Networks <phpbb@canver.net> (Alexis Canver) www.canver.net
## MOD Description : This will allow you to have lastest article for "Knowledge Base 0.7.6" for ezportal
##
## MOD Version : 1.0.0
##
## Installation Level : Easy
## Installation Time : 2 Minutes
##
## Files To Edit (3) : portal.php
## templates/portal_body.tpl
## language/lang_english/lang_kb.php
##
## Included Files (2) : kb_lastest.php
## templates/subSilver/kb_lastest.tpl
##
######################################
#
#----------[ OPEN ]-------------------------------------
#
portal.php
#
#----------[ FIND ]-------------------------------------
#
// Generate the page
$template->pparse('body');
#
#----------[ BEFORE, ADD ]------------------------------
#
// Latest Kb Article
$sql = "SELECT * FROM " . $table_prefix . "kb_articles ORDER BY article_date DESC LIMIT 0,5";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query database for the most downloads');
}
$template->assign_vars(array(
'TITLE_LATEST_KB' => $lang['Latest_kb'])
);
$i = 1;
while ($file_latest = $db->sql_fetchrow($result))
{
$template->assign_block_vars('kbrow', array(
'FILELINK_LATEST_KB' => append_sid("kb.php?mode=article&k=" . $file_latest['article_id']),
'FILENAME_LATEST_KB' => (strlen($file_latest['article_title']) >= 40 ) ? substr($file_latest['article_title'], 0, 37).'...' : $file_latest['article_title'],
'DATE_LATEST_KB' => create_date($board_config['default_dateformat'], $file_latest['article_date'], $board_config['board_timezone']))
);
$i++;
}
// Latest Kb Article
#
#----------[ OPEN ]-------------------------------------
#
templates/subSilver/portal_body.tpl
#
#----------[ FIND ]-------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>{L_STATISTICS}</b></span></td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS}<br />{NEWEST_USER}<br /><br/>{TOTAL_POSTS} {TOTAL_TOPICS}<br /> </span></td>
</tr>
</table>
<br />
#
#----------[ AFTER, ADD ]-------------------------------
#
<!-- Latest Article -->
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>{TITLE_LATEST_KB}</b></span></td>
</tr>
<!-- BEGIN kbrow -->
<tr>
<td class="row1"><span class="gensmall"> » <a href="{kbrow.FILELINK_LATEST_KB}">{kbrow.FILENAME_LATEST_KB}</a> - {kbrow.DATE_LATEST_KB} </span></td>
</tr>
<!-- END kbrow -->
<tr>
<td class="row2"> </td>
</tr>
</table>
<br />
<!-- / Latest Article -->
#
#----------[ OPEN ]-------------------------------------
#
language/lang_english/lang_main.php
#
#----------[ FIND ]-------------------------------------
#
?>
#
#----------[ BEFORE, ADD ]------------------------------
#
$lang['Latest_kb'] = 'Last article in Knowledge Base';
#
#----------[ SAVE AND CLOSE ALL FILES ]-----------------
#
# EoM
Verfasst: 09.06.2005 07:11
von Helmut71
but the snippet I posted to you does exactly the same..displays the latest 5 Articles in an ezportal block.
Look here:
http://www.hohenau.net/forum/portal.php
Verfasst: 09.06.2005 18:22
von Muiter
Strange because that is the same one I posted above but in yours aren't included any files.
What is the mod you are using for your newsletter?
Verfasst: 10.06.2005 10:10
von Helmut71
I found it on this board, but it is old and without some modifications it only works with phpbb 2.010!