2006-08-12, 10:26 AM
2006-08-12, 08:07 PM
my friends :
it is Necessary for me ! plz Help me !
it is Necessary for me ! plz Help me !
2006-08-12, 09:03 PM
Try this:
<?php
$forumpath = ".//"; // Path to your forums root directory (with trailing slash)
$limit = "10"; // The amount of annoucements to show
require $forumpath."inc/config.php";
mysql_select_db($config['database'], mysql_connect($config['hostname'], $config['username'], $config['password']));
$query = mysql_query("SELECT t.tid,t.subject,t.uid,t.username,t.dateline,t.replies,p.message,u.avatar FROM ".$config['table_prefix']."threads t LEFT JOIN ".$config['table_prefix']."posts p ON (t.tid = p.tid) LEFT JOIN ".$config['table_prefix']."users u ON (t.uid = u.uid) WHERE t.visible='1' AND t.closed NOT LIKE 'moved|%' AND p.replyto='0' ORDER BY dateline DESC LIMIT 0, ".$limit."") or die(mysql_error());
while($news = mysql_fetch_array($query))
{
if(strlen($news['message']) > 50) {
$news['message'] = substr($news['subject'], 0, 20);
$news['message'] .= "...";
}
$date = gmdate("d-m-Y", $news['dateline']);
$time = date("h:i A", $news['dateline']);
if($news['replies'] == "1")
{
$replytext = "reply";
}
else
{
$replytext = "replies";
}
echo "<table cellpadding=\"0\" align=\"center\" style=\"border: solid 0px #000000;\" width=\"100%\" dir=\"rtl\">\n";
echo "<tr><td dir=\"rtl\" style=\"border: solid 0px #000000;\"\"><a title=\"".$news['message']."\" href=\"showthread.php?tid=".$news['tid']."\">".$news['subject']."</a> | - <a href=\"member.php?action=profile&uid=".$news['uid']."\">".$news['username']."</a> - ".$date." - ".$time." | - : ".$news['replies']." |</td></tr>\n";
echo "</table><br />\n\n";
}
?>
[/quote]2006-08-12, 11:20 PM
tnx Tikitiki
but above code have 2 problem :
1- not show " new Replys to old thread " on the page and not move new replay topic to the first line of page.
2- not change poster username to new poster(Reply) username .
thank.
but above code have 2 problem :
1- not show " new Replys to old thread " on the page and not move new replay topic to the first line of page.
2- not change poster username to new poster(Reply) username .
thank.
2006-08-13, 11:15 AM
I've seen many codes in this thread.. I was wondering, which one is the best?
2006-08-14, 09:55 PM
can you help me about Post: 104 !
2006-08-22, 04:49 AM
Just for all of you that wanted to know, I've created a plugin that will allow you to show your news on the home page, with options like, what forum(s) to fetch it from, and how many to show. It will be release when MyBB 1.2 comes out
2006-08-22, 04:53 AM
Thanks so much , can't wait for it, Hope it works better than the code I took from portal.php
2006-08-22, 05:03 AM
It parses MyCode, and it'll be much simplier if thats what your asking
2006-08-28, 02:52 PM
Does anyone know where that tutorial went where it showed you how to intergrate mybboard into your main website? / subdirectorys?
0_o i remember seeing it a while back and i dont know where it is..
0_o i remember seeing it a while back and i dont know where it is..