Recent scrolling topic

Installatie lukt niet? Plotseling een foutmelding. Of weet je niet hoe iets werkt. Problemen met phpBB2 kun je in dit archief opzoeken.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
Deef

Recent scrolling topic

Bericht door Deef » 20 okt 2003, 10:41

Als jullie gaan kijken op http://www.glansbeton.be/forum/portal.php

Zien jullie dat deze mod (links) goed werkt bij mij...

of ga naar http://www.glansbeton.be/forum/scroll.php

Wat is dan het probleem????

Wel er staat altijd by davy... dat wil ik niet omdat ik op alle berichten antwoord... Het beste zou zijn dat hij ofwel mij eruit filtert..

Of misschien nog beter dat er echt komt te staan wie het bericht heeft opgesteld.

Hieronder staat de code... iemand een idee hoe ik het verander dat er de naam van diegene die het berircht heeft opgesteld komt te staan?

Code: Selecteer alles

<?php
// ######################################################## 
// ## Title: Recent Topics for v2.0.4 
// ## Author: CFSILENT <cfsilent@yahoo.com> - http://www.seekideas.com/
// ## Description:  Display Recent Topics on any page.
// ## 
// ## Demo: http://www.seekideas.com/ 
// ## Installation Level:  Easy 
// ## Installation Time:   2 minutes
// ######################################################## 

	/* Basic config */
	$topicnumber = 10;			/*+++ Number of topics you want to display +++*/
	$scroll = "up";			/*+++ Scroll "down" or "up" */
	
	/* Database config */
	include 'config.php';		/*+++ Replace "XXX" with relative or URL path of your forum directory. +++*/
					/*+++ Example (Relative Path): phpBB2, forum, board, etc. +++*/
	$urlPath = "http://www.glansbeton.be/forum/";
					/*+++ Example (URL Path): http://www.phpbb.com/phpBB2 +++*/
		
 	// Connecting & Selecting Databases
$table_topics = $table_prefix. "topics";
$table_forums = $table_prefix. "forums";
$table_posts = $table_prefix. "posts";
$table_users = $table_prefix. "users";
$link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("Could not connect");
mysql_select_db("$dbname") or die("Could not select database");

// Perform Sql Query
$query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM $table_topics t, $table_forums f, $table_posts p, $table_users u
WHERE t.topic_id = p.topic_id AND 
f.forum_id = t.forum_id AND 
t.topic_status <> 2 AND 
p.post_id = t.topic_last_post_id AND 
p.poster_id = u.user_id
ORDER BY p.post_id DESC LIMIT $topicnumber";
$result = mysql_query($query) or die("Query failed");

// Outcome of the HTML
// Be carefull when you edit these!
print "<marquee id=\"recent_topics\" behavior=\"scroll\" direction=\"$scroll\" height=\"170\" scrolldelay=\"100\" scrollamount=\"2\" onMouseOver=\"document.all.recent_topics.stop()\" onMouseOut=\"document.all.recent_topics.start()\">
<table cellpadding='3' cellSpacing='2' width='350'>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo  "<tr valign='top'><td><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><font color=\"#FFCC00\"><b><a href=\"$urlPath/viewtopic.php?topic=$row[topic_id]&forum=$row[forum_id]\">" .
$row["topic_title"] .
"</a></td></font></b><td><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><font color=\"#C0C0C0\"> by: <a href=\"$urlPath/profile.php?mode=viewprofile&u=$row[user_id]\">" .
$row["username"] .
"</td><td><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><font color=\"#C0C0C0\">" .
date('F j, Y, g:i a', $row["post_time"]) .
"</td></tr></font>";
}
print "</table></marquee>";

// Free Result
mysql_free_result($result);

// Close the Connection
mysql_close($link);
?>

Gebruikersavatar
Podium4
Berichten: 3009
Lid geworden op: 07 aug 2003, 15:32
Locatie: Groningen / Zwolle

Bericht door Podium4 » 20 okt 2003, 10:47

Je moet deze regel veranderen:

Code: Selecteer alles

p.post_id = t.topic_last_post_id AND

dus last_post_id veranderen ik weet alleen niet waarin misschien in first_post_id??? probeer maar 'ns...
Alleen support via het forum, dus geen support via email, msn of pb.

Gebruikersavatar
michaa113
Berichten: 1376
Lid geworden op: 29 mar 2003, 23:27
Locatie: Game Ville
Contacteer:

Bericht door michaa113 » 20 okt 2003, 15:08

p.post_id = t.topic_last_post_id AND
last post id = het nummer van de laatste post.
Maar hij wil dat niet veranderen maar de gebruiker die het plaatste in de topic starter
Tijd weg geweest!
Maar ik BEN terug!

Deef

Bericht door Deef » 21 okt 2003, 10:26

michaa113 schreef:p.post_id = t.topic_last_post_id AND
last post id = het nummer van de laatste post.
Maar hij wil dat niet veranderen maar de gebruiker die het plaatste in de topic starter
Sorry, begrijp het niet goed, heb dat geprobeerd om te veranderen, maar het lukt niet :?:

Gebruikersavatar
michaa113
Berichten: 1376
Lid geworden op: 29 mar 2003, 23:27
Locatie: Game Ville
Contacteer:

Bericht door michaa113 » 21 okt 2003, 17:50

Probeer dit is:

Code: Selecteer alles

<?php 
// ######################################################## 
// ## Title: Recent Topics for v2.0.4 
// ## Author: CFSILENT <cfsilent@yahoo.com> - http://www.seekideas.com/ 
// ## Description:  Display Recent Topics on any page. 
// ## 
// ## Demo: http://www.seekideas.com/ 
// ## Installation Level:  Easy 
// ## Installation Time:   2 minutes 
// ######################################################## 

   /* Basic config */ 
   $topicnumber = 10;         /*+++ Number of topics you want to display +++*/ 
   $scroll = "up";         /*+++ Scroll "down" or "up" */ 
    
   /* Database config */ 
   include 'config.php';      /*+++ Replace "XXX" with relative or URL path of your forum directory. +++*/ 
               /*+++ Example (Relative Path): phpBB2, forum, board, etc. +++*/ 
   $urlPath = "http://www.glansbeton.be/forum/"; 
               /*+++ Example (URL Path): http://www.phpbb.com/phpBB2 +++*/ 
       
   // Connecting & Selecting Databases 
$table_topics = $table_prefix. "topics"; 
$table_forums = $table_prefix. "forums"; 
$table_posts = $table_prefix. "posts"; 
$table_users = $table_prefix. "users"; 
$link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("Could not connect"); 
mysql_select_db("$dbname") or die("Could not select database"); 

// Perform Sql Query 
$query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username 
FROM $table_topics t, $table_forums f, $table_posts p, $table_users u 
WHERE t.topic_id = p.topic_id AND 
f.forum_id = t.forum_id AND 
t.topic_status <> 2 AND 
p.post_id = t.topic_id AND 
p.poster_id = u.user_id 
ORDER BY p.post_id DESC LIMIT $topicnumber"; 
$result = mysql_query($query) or die("Query failed"); 

// Outcome of the HTML 
// Be carefull when you edit these! 
print "<marquee id=\"recent_topics\" behavior=\"scroll\" direction=\"$scroll\" height=\"170\" scrolldelay=\"100\" scrollamount=\"2\" onMouseOver=\"document.all.recent_topics.stop()\" onMouseOut=\"document.all.recent_topics.start()\"> 
<table cellpadding='3' cellSpacing='2' width='350'>"; 
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { 
echo  "<tr valign='top'><td><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><font color=\"#FFCC00\"><b><a href=\"$urlPath/viewtopic.php?topic=$row[topic_id]&forum=$row[forum_id]\">" . 
$row["topic_title"] . 
"</a></td></font></b><td><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><font color=\"#C0C0C0\"> by: <a href=\"$urlPath/profile.php?mode=viewprofile&u=$row[user_id]\">" . 
$row["username"] . 
"</td><td><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><font color=\"#C0C0C0\">" . 
date('F j, Y, g:i a', $row["post_time"]) . 
"</td></tr></font>"; 
} 
print "</table></marquee>"; 

// Free Result 
mysql_free_result($result); 

// Close the Connection 
mysql_close($link); 
?>
Tijd weg geweest!
Maar ik BEN terug!

Deef

Bericht door Deef » 22 okt 2003, 09:09

michaa113 schreef:Probeer dit is:
Jongens... jongens... jongens toch :oops:

Ik ben toch een kluns hé :oops:

Het werkt wat jij aangeeft, je vindt het terug op...

http://www.glansbeton.be/forum/tempscroll.php

maar het staat niet geïmplementeert in mijn forum
Ik heb blijkbaar in mijn portal_body.tpl

het volgende staan:

Code: Selecteer alles

<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
		   <tr>
			<td class="catHead" height="25"><span class="genmed"><b>{L_RECENT_TOPICS}</b></span></td>
		   </tr>
		   <tr>
			<td class="row1" align="left"><span class="gensmall">
			<marquee id="recent_topics" behavior="scroll" direction="up" height="200" scrolldelay="100" scrollamount="2">
			<!-- BEGIN recent_topic_row -->
			» <a href="{recent_topic_row.U_TITLE}" onmouseover="document.all.recent_topics.stop()" onmouseout="document.all.recent_topics.start()">{recent_topic_row.L_TITLE}</a><br />
			by <a href="{recent_topic_row.U_POSTER}" onmouseover="document.all.recent_topics.stop()" onmouseout="document.all.recent_topics.start()">{recent_topic_row.S_POSTER}</a> on {recent_topic_row.S_POSTTIME}<br /><br />
			<!-- END recent_topic_row -->
			</marquee>
			</span></td>
		   </tr>
		  </table>
		  
		  <br />
Nu herrinner ik het me, dat kwam omdat ik niet vond hoe ik die scroll.php moest implementeren in mijn portal,

of ben ik mis ? :? Ik weet het niet meer....

Gebruikersavatar
michaa113
Berichten: 1376
Lid geworden op: 29 mar 2003, 23:27
Locatie: Game Ville
Contacteer:

Bericht door michaa113 » 22 okt 2003, 16:32

Geef die mod is, kan ik kijken wat er niet klopt.
Tijd weg geweest!
Maar ik BEN terug!

Gesloten