- Adres van je forum: http://forums.dutchforce.eu
Mods?:Niet echt wat phpbb codes
Wanneer ontstond het probleem?nvt
phpBB versie:nieuwste? vorige week gedownload
Heb je onlangs iets veranderd aan je forum?nvt
Wat is het probleem?
Nou ben ik opzoek geweest naar manieren om content van het forum rechtstreeks in de site te plaatsen met behulp van de Wiki en de forums.
Stap 1 ging heel makkeljk, ik wou een 'recent topic' sectie op de site, waar de 'laatst geplaatste topics' in staan en vond deze code:
Code: Selecteer alles
<?
define('IN_PHPBB', true);
$phpbb_root_path = './forums/'; // Path to phpbb folder
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
// Grab user preferences
$user->setup();
?>
<?
/*** phpBB3 - Last Active Topics System ***/
//Show last x topics
define('TOPICS_LIMIT',10);
// Create arrays
$topics = array();
// Get forums that current user has read rights to.
$forums = array_unique(array_keys($auth->acl_getf('f_read', true)));
// Get active topics.
$sql="SELECT *
FROM " . TOPICS_TABLE . "
WHERE topic_approved = '1' AND " . $db->sql_in_set('forum_id', $forums) . "
ORDER BY topic_last_post_time DESC";
$result = $db->sql_query_limit($sql,TOPICS_LIMIT);
while ($r = $db->sql_fetchrow($result))
{
$topics[] = $r;
}
$db->sql_freeresult($result);
?>
<div>
<?
foreach($topics as $t)
{
// Get folder img, topic status/type related information
$topic_tracking_info = get_complete_topic_tracking($t['forum_id'], $t['topic_id']);
$unread_topic = (isset($topic_tracking_info[$t['topic_id']]) && $t['topic_last_post_time'] > $topic_tracking_info[$t['topic_id']]) ? true : false;
$folder_img = $folder_alt = $topic_type = '';
topic_status($t, $t['topic_replies'], $unread_topic, $folder_img, $folder_alt, $topic_type);
// output the link
?>
<img style="vertical-align: text-bottom" src="<?=$user->img($folder_img, $folder_alt, false, '', 'src');?>" title="<?=$user->lang[$folder_alt];?>" alt="<?=$user->lang[$folder_alt];?>" />
<a href="<?=$phpbb_root_path . 'viewtopic.php?f=' . $t['forum_id'] . '&t=' . $t['topic_id'] . '&p=' . $t['topic_last_post_id'] . '#p' . $t['topic_last_post_id'];?>"><?=html_entity_decode($t['topic_title']);?></a><br />
<?
}
?>
http://www.dutchforce.eu/test3.php
Dit functioneerd prima, al zou ik de achtergrond images nog willen toevoegen, maar dat is voor latere zorg.
Daarna ben ik begonnen om de laatste 3, 1st posts uit het nieuws forum te plaatsen op de site en vond dit:
http://blog.phpbb.com/2009/11/09/how-to ... nal-pages/
Example 3 is volgens mij precies wat ik nodig heb maar krijg het niet voor elkaar, krijg of vage errors of helemaal witte pagina die niets doet en vroeg me af wat ik verkeerd doe.
even duidelijk op een rij wat de bedoeling is:
de 3 laatste 1st posts uit dit forum:
http://forums.dutchforce.eu/viewforum.php?f=13
in z'n geheel op een externe pagina.
Wat moet ik precies veranderen en hoe kom ik achter het forum id?
Alvast bedankt