laatste 5 post's op indexpagina

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
kevinderas
Berichten: 35
Lid geworden op: 09 okt 2005, 18:14
Locatie: lembeek
Contacteer:

laatste 5 post's op indexpagina

Bericht door kevinderas » 09 okt 2005, 18:19

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 ! :)

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 09 okt 2005, 18:22

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.
... Maar ik modereer (nog) niet.

kevinderas
Berichten: 35
Lid geworden op: 09 okt 2005, 18:14
Locatie: lembeek
Contacteer:

Bericht door kevinderas » 09 okt 2005, 18:42

idd Bee dat wil ik :)

kevinderas
Berichten: 35
Lid geworden op: 09 okt 2005, 18:14
Locatie: lembeek
Contacteer:

Bericht door kevinderas » 09 okt 2005, 19:53

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

Gebruikersavatar
cdrom-la
Berichten: 240
Lid geworden op: 16 jun 2005, 15:06

Bericht door cdrom-la » 09 okt 2005, 20:01

e moet JOUWFORUMMAP/
Wel veranderen naar je forum map
bijv phpBB2
http://www.branfan.tk

ik ben gebant op phpbb.nl stoer he :D
Ben vereerd dat ik hier gebant ben :D

kevinderas
Berichten: 35
Lid geworden op: 09 okt 2005, 18:14
Locatie: lembeek
Contacteer:

Bericht door kevinderas » 09 okt 2005, 20:03

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 :)

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 09 okt 2005, 21:21

Probeer Topics Anywhere dan :roll:
... Maar ik modereer (nog) niet.

Gebruikersavatar
cdrom-la
Berichten: 240
Lid geworden op: 16 jun 2005, 15:06

Bericht door cdrom-la » 09 okt 2005, 22:44

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 :)
http://www.branfan.tk

ik ben gebant op phpbb.nl stoer he :D
Ben vereerd dat ik hier gebant ben :D

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 10 okt 2005, 16:42

Dat gaat niet werken. Het forum staat op een andere server :roll:
... Maar ik modereer (nog) niet.

kevinderas
Berichten: 35
Lid geworden op: 09 okt 2005, 18:14
Locatie: lembeek
Contacteer:

Bericht door kevinderas » 10 okt 2005, 16:45

code hierboven gaat niet :(

@ Bee , wat moet ik gebruiken ??

- zo een moeilijke mod :p

doeiz

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 10 okt 2005, 16:49

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.
... Maar ik modereer (nog) niet.

Gebruikersavatar
cdrom-la
Berichten: 240
Lid geworden op: 16 jun 2005, 15:06

Bericht door cdrom-la » 10 okt 2005, 17:33

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}&nbsp;[{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
http://www.branfan.tk

ik ben gebant op phpbb.nl stoer he :D
Ben vereerd dat ik hier gebant ben :D

kevinderas
Berichten: 35
Lid geworden op: 09 okt 2005, 18:14
Locatie: lembeek
Contacteer:

Bericht door kevinderas » 10 okt 2005, 17:57

is dat voor op men site ?

kan dit het ook niet zijn ? : http://www.phpbbhacks.com/download/2057

thx :)

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20316
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 10 okt 2005, 18:16

kevinderas schreef:is dat voor op men site ?

kan dit het ook niet zijn ? : http://www.phpbbhacks.com/download/2057

thx :)
Die jij geeft moet je gebruiken ja :)

kevinderas
Berichten: 35
Lid geworden op: 09 okt 2005, 18:14
Locatie: lembeek
Contacteer:

Bericht door kevinderas » 10 okt 2005, 18:19

@ paulus

kun jij me een beetje helpen met de installatie ?

ik ben hier niet zo goed in :$


thx :)

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20316
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 10 okt 2005, 18:28


Gesloten