Pagina 1 van 1
laatste 5 post's op indexpagina
Geplaatst: 09 okt 2005, 18:19
door kevinderas
heey,
ik ben opzoek naar een code (php, html,...) ik vermoed dat het php is dat de laatste posts toont ik wil dit op men indexpagina maar men website staat op een andere webhost dus denk ik dat de url van men phpbbforum in die phpbbcode moet.
kent / heeft iemand die code ? als je hem vindt wil je er dan meteen de geschikte url inzetten ?
forum :
http://www.wyger.nl/usr/hoepla/phpBB2/
ik dank jullie !

Geplaatst: 09 okt 2005, 18:22
door Bee
Kan je altijd proberen zo duidelijk mogelijk te zijn. Je wil dus een lijstje met recente topics op je website, die op een andere host staat.
Zoek op
http://www.phpbbhacks.com naar Topics Anywhere.
Geplaatst: 09 okt 2005, 18:42
door kevinderas
idd Bee dat wil ik

Geplaatst: 09 okt 2005, 19:53
door kevinderas
deze vondt ik ook maar kdenk niet dat ie werkt :
Code: Selecteer alles
<? include_once ("JOUWFORUMMAP/config.php");
$mysql_connection = mysql_connect ($dbhost, $dbuser, $dbpasswd) or die ("Connection failed");
mysql_select_db ($dbname) or die ("Selecting database failed");
$query = "SELECT topic_id,topic_title FROM phpbb_topics order by topic_id desc limit 5
";
$res = mysql_query($query);
while($data = @mysql_fetch_array($res))
{
echo " <a href="JOUWFORUMMAP/viewtopic.php?t=".$data["topic_id"]."">".$data['topic_title']."</a><br>";
}
?>
Kan iemand me helpen ?
url zie vorig bericht
Geplaatst: 09 okt 2005, 20:01
door cdrom-la
e moet JOUWFORUMMAP/
Wel veranderen naar je forum map
bijv phpBB2
Geplaatst: 09 okt 2005, 20:03
door kevinderas
cdrom-la
heb ik gedaan maar het lukt me niet wil jij het eens proberen het moet wel met de url zijn (zie eerste bericht) omdat men forum op andere webhost staat.... en wil je de code hier dan posten ? thx

Geplaatst: 09 okt 2005, 21:21
door Bee
Probeer Topics Anywhere dan

Geplaatst: 09 okt 2005, 22:44
door cdrom-la
Code: Selecteer alles
<? include_once ("usr/hoepla/phpBB2/config.php");
$mysql_connection = mysql_connect ($dbhost, $dbuser, $dbpasswd) or die ("Connection failed");
mysql_select_db ($dbname) or die ("Selecting database failed");
$query = "SELECT topic_id,topic_title FROM phpbb_topics order by topic_id desc limit 5
";
$res = mysql_query($query);
while($data = @mysql_fetch_array($res))
{
echo " <a href="usr/hoepla/phpBB2/viewtopic.php?t=".$data["topic_id"]."">".$data['topic_title']."</a><br>";
}
?>
Alsjeblieft

Geplaatst: 10 okt 2005, 16:42
door Bee
Dat gaat niet werken. Het forum staat op een andere server

Geplaatst: 10 okt 2005, 16:45
door kevinderas
code hierboven gaat niet
@ Bee , wat moet ik gebruiken ??
- zo een moeilijke mod :p
doeiz
Geplaatst: 10 okt 2005, 16:49
door Bee
Bee schreef:Kan je altijd proberen zo duidelijk mogelijk te zijn. Je wil dus een lijstje met recente topics op je website, die op een andere host staat.
Zoek op
http://www.phpbbhacks.com naar Topics Anywhere.
Dat zei ik dus al. Die mod is enorm simpel. Geen aanpassingen.
Geplaatst: 10 okt 2005, 17:33
door cdrom-la
Code: Selecteer alles
##############################################################
## MOD Title: Top 5 ezPortal blocks
## MOD Author: Antony, antony_bailey@lycos.co.uk, Antony Bailey, http://rapiddr3am.slackslash.net
## MOD Description: Top 5 Topics, Top 5 Viewed, Last 5 topics
## MOD Version: 1.0.0
##
## Installation Level: Easy.
## Installation Time: 5 Minutes
## Files To Edit: portal.php, portal_body.tpl
## Included Files: N/A
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Author Notes: Just a few more pointless portal blocks.
## Just adds more to your pages. ;)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
portal.php
#
#-----[ FIND ]------------------------------------------
#
// Generate the page
#
#-----[ BEFORE ADD ]------------------------------------------
#
// Let's add some more code, this will be fun. ;)
$active_topics_sql="SELECT a.topic_id,a.topic_title, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_last_post_id DESC
LIMIT 5";
$active_topics = $db->sql_query($active_topics_sql);
$active_topics_sql2="SELECT a.topic_id,a.topic_title, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_replies DESC
LIMIT 5";
$active_topics2 = $db->sql_query($active_topics_sql2);
$active_topics_sql3="SELECT a.topic_id,a.topic_title, a.topic_views, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_views DESC
LIMIT 5";
$active_topics3 = $db->sql_query($active_topics_sql3);
while (($line = mysql_fetch_array($active_topics)) and ($line2 = mysql_fetch_array($active_topics2)) and ($line3 = mysql_fetch_array($active_topics3)))
{
if (strlen($line['topic_title']) > 40)
{
$line_topic_title = substr($line['topic_title'], 0, 40)." ...";
}
else
{
$line_topic_title = $line['topic_title'];
}
if (strlen($line2['topic_title']) > 40)
{
$line_topic_title2 = substr($line2['topic_title'], 0, 40)." ...";
}
else
{
$line_topic_title2 = $line2['topic_title'];
}
if (strlen($line3['topic_title']) > 40)
{
$line_topic_title3 = substr($line3['topic_title'], 0, 40)." ...";
}
else
{
$line_topic_title3 = $line3['topic_title'];
}
$lastpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line['topic_id'] . "\" title=\"" . $line['topic_title'] ."\">" . $line_topic_title . "</a>";
$poppost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line2['topic_id'] . "\" title=\"" . $line2['topic_title'] ."\">" . $line_topic_title2 . "</a>";
$poppostc = $line2['topic_replies'];
$popviewpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line3['topic_id'] . "\" title=\"" . $line3['topic_title'] ."\">" . $line_topic_title3 . "</a>";
$popviewpostc = $line3['topic_views'];
$template->assign_block_vars('topicrecentpopular', array(
'TOPICSPOPULAR' => $poppost,
'TOPICSPOPULARC' => $poppostc,
'TOPICSPOPULARVIEW' => $popviewpost,
'TOPICSPOPULARVIEWC' => $popviewpostc,
'TOPICSRECENT' => $lastpost)
);
}
// You added more pointless code, go you!
#
#-----[ OPEN ]------------------------------------------
#
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_POLL}</b></span></td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">
<form method="post" action="{S_POLL_ACTION}">
<center><b>{S_POLL_QUESTION}</b></center><br />
<!-- BEGIN poll_option_row -->
<input type="radio" name="vote_id" value="{poll_option_row.OPTION_ID}">{poll_option_row.OPTION_TEXT} [{poll_option_row.VOTE_RESULT}]<br />
<!-- END poll_option_row -->
<br />
<!-- BEGIN switch_user_logged_out -->
<center>{L_LOGIN_TO_VOTE}</center>
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
<center><input type="submit" class="mainoption" name="submit" value="{L_VOTE_BUTTON}" {DISABLED}></center>
<input type="hidden" name="topic_id" value="{S_TOPIC_ID}">
<input type="hidden" name="mode" value="vote">
<!-- END switch_user_logged_in -->
{S_HIDDEN_FIELDS} </form><br />
</span></td>
</tr>
</table>
<br />
#
#-----[ BEFORE ADD ]------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="cathead" colspan="4" align="left" height="25"><span class="genmed"><b>Top 5 Recent Topics</b></span></td>
</tr>
<!-- BEGIN topicrecentpopular -->
<td width="29%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSRECENT}</span></td>
</tr>
<!-- END topicrecentpopular -->
</table>
<br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="cathead" colspan="4" align="left" height="25"><span class="genmed"><b>Top 5 Topics</b></span></td>
</tr>
<!-- BEGIN topicrecentpopular -->
<tr>
<td width="31%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULAR}</span></td>
<td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARC}</span></td>
</tr>
<!-- END topicrecentpopular -->
</table>
<br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="cathead" colspan="4" align="left" height="25"><span class="genmed"><b>Top 5 Viewed</b></span></td>
</tr>
<!-- BEGIN topicrecentpopular -->
<tr>
<td width="29%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEW}</span></td>
<td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEWC}</span></td>
</tr>
<!-- END topicrecentpopular -->
</table>
<br />
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
portal en portal_body moeten index.php zijn
als ik tijd heb zal ik de mod toepassen
Top 5 Topics, Top 5 Viewed, Last 5 topics
Geplaatst: 10 okt 2005, 17:57
door kevinderas
is dat voor op men site ?
kan dit het ook niet zijn ? :
http://www.phpbbhacks.com/download/2057
thx

Geplaatst: 10 okt 2005, 18:16
door Paul
Die jij geeft moet je gebruiken ja

Geplaatst: 10 okt 2005, 18:19
door kevinderas
@ paulus
kun jij me een beetje helpen met de installatie ?
ik ben hier niet zo goed in :$
thx

Geplaatst: 10 okt 2005, 18:28
door Paul