Latest forum posts on external front page script!?

Discussion forum for MOD Writers regarding MOD Development.
Locked
Apocalypso
Registered User
Posts: 121
Joined: Thu Jan 20, 2005 8:54 am
Location: In front of the monitor...

Latest forum posts on external front page script!?

Post by Apocalypso »

HI,

I need some help with porting the phpbb v2 code to v3. You see, I'm having a simple script on the front page that allows me to show latest forum posts but th eproblem is that it simply dosen't works after updating borad to v3. Below is the c ode os if anyone having an idea what to do to make it work I'll be really greatful ;)

Code: Select all

<?
$db_host = xxxxxxxx; 
$db_user = 'xxxxxxxxx';
$db_password = 'xxxxxxx';
$db_name = 'xxxxxxx_phpb1';

$url = "http://www.symbian-freak.com/forum/"; // url do foruma 
$ppath = "http://www.symbian-freak.com/forum/config.php"; // url do config filea 
if(empty($count)) 
$count = "15"; // Topic number 

//code start
include_once("$ppath"); 
mysql_connect($db_host,$db_user,$db_password) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());


$query="SELECT * FROM phpbb_topics ORDER BY `topic_id` DESC LIMIT 0, $count"; 
$result=mysql_query($query);

echo "
<STYLE>

A:link {
	FONT-SIZE: 9px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
A:active {
	FONT-SIZE: 9px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
A:visited {
	FONT-SIZE: 9px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
A:hover {
	FONT-SIZE: 9px; COLOR: #fd9500; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}

TABLE {
	FONT-WEIGHT: normal; FONT-SIZE: 9px; COLOR: #fa9600; FONT-FAMILY: Verdana, Helvetica, sans-serif
}

FONT {
	FONT-WEIGHT: normal; FONT-SIZE: 9px; COLOR: #000000; FONT-FAMILY: Verdana, Helvetica, sans-serif
}

.boxborder {
	BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid
}

.darkback {
	FONT-WEIGHT: normal; COLOR: #747474; BORDER-BOTTOM: #ffffff 1px solid; BACKGROUND-COLOR: #FDB60C
}

.lightback {
	FONT-WEIGHT: normal; CURSOR: hand; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; BACKGROUND-COLOR: ##FEFAAA
}

BODY {
  scrollbar-arrow-color:fa0000;
  scrollbar-track-color:FEE7AA;
  scrollbar-shadow-color:6D5003;
  scrollbar-face-color:FA9600;
  scrollbar-highlight-color:FEE7AA;
  scrollbar-darkshadow-color:fa00000;

</style>

<BODY leftMargin=0 bgColor=#fee7aa>
<table >
<tr><TD>
<DIV class=boxborder style=\"BACKGROUND-COLOR: #ffffff\">
";

while($row = mysql_fetch_array($result)) { 
$topicid = "$row[topic_id]";
$title = "$row[topic_title]"; 
$forumid = "$row[forum_id]"; 
$replies = "$row[topic_replies]"; 
//kode end



echo
"


<div class=\"darkback\" >
<b style=\"COLOR: #ff0000\">+ <a title=\"$title\" target=\"_blank\" href=\"http://www.symbian-freak.com/forum/viewtopic.php?t=$topicid&sid=$forumid\">$title</a></b>
<br>( Replies: <b style=\"COLOR: #ff0000\">$replies</b> ) <br>
</DIV>
";
}

?>
10X in advance ...

Teo
Last edited by Apocalypso on Thu Feb 10, 2011 7:37 am, edited 1 time in total.
:arrow: www.symbian-freak.com - Your Ultimate Symbian Destination
CMCDragonkai
Registered User
Posts: 483
Joined: Sat Jun 09, 2007 11:37 pm
Location: Australia.. and other parts of the world sometimes...

Re: Latest forum posts on front page script!?

Post by CMCDragonkai »

See my signature.
Show phpbb threads as html articles. V.5.03 Thanks Erik! (This will be updated constantly as I or others contribute...) This code is to be used on external HTML page, but if you want a template version see here.

For the best PHPBB total modification to posting - bbcode, embedding... everything! Visit MSSTI's ABBC3 Modification.
Apocalypso
Registered User
Posts: 121
Joined: Thu Jan 20, 2005 8:54 am
Location: In front of the monitor...

Re: Latest forum posts on external front page script!?

Post by Apocalypso »

First of all thanks for the prompt answer ;)

Is this applicable to external html page? What I basically need is a script that will be included in the site index and news articles through the IFRAME:

Code: Select all

<IFRAME src="../../../forum.php" frameBorder=0 width=126 height=600 SCROLLING=no></IFRAME>
And shows just titles of the latest forum posts like on the screenshot below:

Image

thx,
Teo
:arrow: www.symbian-freak.com - Your Ultimate Symbian Destination
CMCDragonkai
Registered User
Posts: 483
Joined: Sat Jun 09, 2007 11:37 pm
Location: Australia.. and other parts of the world sometimes...

Re: Latest forum posts on external front page script!?

Post by CMCDragonkai »

You don't need an iframe, just echo it. And also, ask support for HTML Threads hack at the HTML Threads hack topic.
Show phpbb threads as html articles. V.5.03 Thanks Erik! (This will be updated constantly as I or others contribute...) This code is to be used on external HTML page, but if you want a template version see here.

For the best PHPBB total modification to posting - bbcode, embedding... everything! Visit MSSTI's ABBC3 Modification.
Locked

Return to “[3.0.x] MOD Writers Discussion”