Integrated Forum V 2.0 -Released!- *Old Version*

Forum
Last Post
Threads / Messages
RE: Integrated Forum V 2.0 -Released!-

Ok, well this thread is really old but I am stuck. How do I get the signature to allow html? So people can post there "adopt" in this forum. I wouldn't assume its harder then getting BBCode working, is it just filtering out html somewhere? There is a lot of files so I might of missed it somewhere but i've been trying to do this for a bit now.
 
RE: Integrated Forum V 2.0 -Released!-

Well, I haven't looked thoroughly at the forum mod code, however to secure the data before entering it into the database the secure() function is used, at least I am assuming that is the case. That also strips out HTML though. In the forum mod you can safely replace instances of secure() with instances of mysql_real_escape_string() to enable HTML while still filtering malicious SQL statements. :)
 
RE: Integrated Forum V 2.0 -Released!-

BMR777 said:
Well, I haven't looked thoroughly at the forum mod code, however to secure the data before entering it into the database the secure() function is used, at least I am assuming that is the case. That also strips out HTML though. In the forum mod you can safely replace instances of secure() with instances of mysql_real_escape_string() to enable HTML while still filtering malicious SQL statements. :)

The mysql_real_escape_string() should work, if not it's because this version has the same kink the first has.

The next version, number 3 I believe, The one I was suppose to make and release last month, has that fixed. I just currently have no computer and one 32 gig Flash Drive with everything on it. You can see where my delima lies.

I apologize for not being to help and release anything else.
 
RE: Integrated Forum V 2.0 -Released!-

Thanks guys that worked for the most part.

bloodrun said:
The next version, number 3 I believe, The one I was suppose to make and release last month, has that fixed. I just currently have no computer and one 32 gig Flash Drive with everything on it. You can see where my delima lies.

I apologize for not being to help and release anything else.
No worries ive been there before, you have done tons of stuff for this site. :D

I ended up adding the bbcode.php in between
$signature = $_POST["signature"];
$signature = mysql_real_escape_string($signature);
Located in accountpost.php
to make it change bbcode to html so the forum could read it :D
 
RE: Integrated Forum V 2.0 -Released!-

Fireballchad said:
Thanks guys that worked for the most part.

bloodrun said:
The next version, number 3 I believe, The one I was suppose to make and release last month, has that fixed. I just currently have no computer and one 32 gig Flash Drive with everything on it. You can see where my delima lies.

I apologize for not being to help and release anything else.
No worries ive been there before, you have done tons of stuff for this site. :D

I ended up adding the bbcode.php in between
$signature = $_POST["signature"];
$signature = mysql_real_escape_string($signature);
Located in accountpost.php
to make it change bbcode to html so the forum could read it :D

Good to hear, now if only I remember to look back on this post the next I go to update the code, it should be just fine for the next release.
 
RE: Integrated Forum V 2.0 -Released!-

hi, can you help me? :p

I installed this script in my site, and it works pretty well but it will only have 1 parent forum...

when I create another nothing changes, even if I create foruns inside it...

and the parents and foruns are being inserted in the database, so I guess it's a problem of showing and not of inserting...

here's the code where it's supposed to show all parents

PHP:
$table = $table."

<table width='95%' border='1' align='center' cellpadding='3' cellspacing='1' class='forum'>";

$query = "SELECT * FROM parent_forum ORDER BY pid ASC";
$result = mysql_query($query);
$num3 = mysql_numrows($result);

	//Loop out code
	$i=0;
	while ($i < $num3) {
	$pid=@mysql_result($result,$i,"pid");
	$ptopic=@mysql_result($result,$i,"topic");
	$ptopic = stripslashes($ptopic);

$table = $table."
<tr>
<td width='100%' class='forum'><img src='images/iconforum.png'> <b>".$ptopic."</b></td>
</tr>
</table>
<table width='95%' border='1' align='center' cellpadding='3' cellspacing='1' class='forum'>
<tr>
<td width='55%' class='forum2' align='center'><strong>Fórum</strong></td>
<td width='10%' class='forum2' align='center'><strong>Tópicos</strong></td>
<td width='10%' class='forum2' align='center'><strong>Posts</strong></td>
<td width='20%' class='forum2' align='center'><strong>Último Post</strong></td>
</tr>";

$query = "SELECT * FROM forum Where pid='".$pid."'";
$result = mysql_query($query);
$num2 = mysql_numrows($result);

	$i=0;
	while ($i < $num2) {
	$fid=@mysql_result($result,$i,"fid");
	$topic=@mysql_result($result,$i,"topic");
	$desc=@mysql_result($result,$i,"desc");
	$posts=@mysql_result($result,$i,"posts");
	$threads=@mysql_result($result,$i,"threads");
	$lby=@mysql_result($result,$i,"lby");
	$ldatetime=@mysql_result($result,$i,"ldatetime");
	$ltopic=@mysql_result($result,$i,"ltopic");
	$lid=@mysql_result($result,$i,"lid");
	$topic = stripslashes($topic);
	$ltopic = stripslashes($ltopic);
	$desc = stripslashes($desc);

if($ltopic == ""){
$lpost = "<i>Nunca</i>";
}
else{
$lpost = "<a href='view_topic.php?id=".$lid."'>".$ltopic."</a> por: <a href='perfil.php?user=".$lby."'>".$lby."</a><br>".$ldatetime;
}

$table = $table."
<tr>
<td class='trow'><a href='main_forum.php?fid=".$fid."'>".$topic."</a><BR><i>".$desc."</i></td>
<td align='center' class='trow'>".$threads."</td>
<td align='center' class='trow'>".$posts."</td>
<td align='center' class='trow'>".$lpost."</td>
</tr>";

	$i++;
	}
	$i++;
	}

$table = $table."
</table><br>";

and here's the link http://www.maplepet.co.cc/main_forum2.php

ty from now. :D
 
RE: Integrated Forum V 2.0 -Released!-

gabeki said:
hi, can you help me? :p

I installed this script in my site, and it works pretty well but it will only have 1 parent forum...

when I create another nothing changes, even if I create foruns inside it...

and the parents and foruns are being inserted in the database, so I guess it's a problem of showing and not of inserting...

here's the code where it's supposed to show all parents

PHP:
$table = $table."

<table width='95%' border='1' align='center' cellpadding='3' cellspacing='1' class='forum'>";

$query = "SELECT * FROM parent_forum ORDER BY pid ASC";
$result = mysql_query($query);
$num3 = mysql_numrows($result);

	//Loop out code
	$i=0;
	while ($i < $num3) {
	$pid=@mysql_result($result,$i,"pid");
	$ptopic=@mysql_result($result,$i,"topic");
	$ptopic = stripslashes($ptopic);

$table = $table."
<tr>
<td width='100%' class='forum'><img src='images/iconforum.png'> <b>".$ptopic."</b></td>
</tr>
</table>
<table width='95%' border='1' align='center' cellpadding='3' cellspacing='1' class='forum'>
<tr>
<td width='55%' class='forum2' align='center'><strong>Fórum</strong></td>
<td width='10%' class='forum2' align='center'><strong>Tópicos</strong></td>
<td width='10%' class='forum2' align='center'><strong>Posts</strong></td>
<td width='20%' class='forum2' align='center'><strong>Último Post</strong></td>
</tr>";

$query = "SELECT * FROM forum Where pid='".$pid."'";
$result = mysql_query($query);
$num2 = mysql_numrows($result);

	$i=0;
	while ($i < $num2) {
	$fid=@mysql_result($result,$i,"fid");
	$topic=@mysql_result($result,$i,"topic");
	$desc=@mysql_result($result,$i,"desc");
	$posts=@mysql_result($result,$i,"posts");
	$threads=@mysql_result($result,$i,"threads");
	$lby=@mysql_result($result,$i,"lby");
	$ldatetime=@mysql_result($result,$i,"ldatetime");
	$ltopic=@mysql_result($result,$i,"ltopic");
	$lid=@mysql_result($result,$i,"lid");
	$topic = stripslashes($topic);
	$ltopic = stripslashes($ltopic);
	$desc = stripslashes($desc);

if($ltopic == ""){
$lpost = "<i>Nunca</i>";
}
else{
$lpost = "<a href='view_topic.php?id=".$lid."'>".$ltopic."</a> por: <a href='perfil.php?user=".$lby."'>".$lby."</a><br>".$ldatetime;
}

$table = $table."
<tr>
<td class='trow'><a href='main_forum.php?fid=".$fid."'>".$topic."</a><BR><i>".$desc."</i></td>
<td align='center' class='trow'>".$threads."</td>
<td align='center' class='trow'>".$posts."</td>
<td align='center' class='trow'>".$lpost."</td>
</tr>";

	$i++;
	}
	$i++;
	}

$table = $table."
</table><br>";

and here's the link http://www.maplepet.co.cc/main_forum2.php

ty from now. :D

That was something, a feat, that took me up until now to solve. It is solved for the next release, I can't help you fix it now, because it wont work with the current version you have.
 
RE: Integrated Forum V 2.0 -Released!-

I have decided to release this old version to the Free Public. All the problems have been dealt with and answered already. If you have a problem that hasn't been answered you may post it here.

Please don't make me regret releasing this old version.
 
I cant seem to find the link to create a parent forum.

EDIT: Fix it, for got to upload functions.php.
 
SJC said:
I cant seem to find the link to create a parent forum.

EDIT: Fix it, for got to upload functions.php.

Lol. Just a note, the parent forum feature does not work with this Version.
 
I've got it up and working, but when you click on a forum nothing appears...

My site: http://www.pokefarm.2x.nu/poke/main_forum2.php
 
SJC said:
I've got it up and working, but when you click on a forum nothing appears...

My site: http://www.pokefarm.2x.nu/poke/main_forum2.php

Well you didn't install it right. Post your main_forum.php file here so I can take a look at it.
 
Code:
<?php



// **********************************************************************

// Rusnak PHP Adoptables Script

// Copyright 2009 Brandon Rusnak

// For help and support: http://www.rusnakweb.com/forum/

//

// Redistribution prohibited without written permission

// File ID: profile.php

// Shows a user profile, or a member list.

// **********************************************************************



// Wake the sleeping giant



// **********************************************************************

// Basic Configuration Info

// **********************************************************************



include("inc/functions.php");

include("inc/config.php");

include("lang/lang.php");





$themeurl = "templates/default/forumtemp.html";



// **********************************************************************

// Define our top links by calling getlinks()

// **********************************************************************



$links = getlinks();



// **********************************************************************

// Define our ads by calling getads()

// **********************************************************************



$ads = getads("any");



// **********************************************************************

// Grab any dynamic article content from the content table

// **********************************************************************





$article_title = $pagecontent[title];

$article_content = $pagecontent[content];

$article_content = nl2br($article_content);





// **********************************************************************

// Grab any settings that we will need for the current page from the DB

// **********************************************************************



$browsertitle = grabanysetting("browsertitle");

$sitename = grabanysetting("sitename");

$slogan = grabanysetting("slogan");



// **********************************************************************

// Check and see if the user is logged in to the site

// **********************************************************************



$loginstatus = logincheck();

$isloggedin = $loginstatus[loginstatus];

$loggedinname = $loginstatus[username];



// **********************************************************************

// End Prepwork - Output the page to the user

// **********************************************************************



// This page handles user profiles and shows the site members...



$query = "SELECT * FROM ".$prefix."messages WHERE touser='".$loggedinname."' and status='unread'";

$result = mysql_query($query);

$num = mysql_numrows($result);



if($num > 0){

$msg = "



<table width='888px' border='1' cellpadding='3' cellspacing='1' bordercolor='1' bgcolor='#F9AE00' class='ftable'>

<td>

<table width='888px' border='1' cellpadding='3' cellspacing='1' bordercolor='1' bgcolor='#FECF61'>

<tr>

<td><center>You have a new message(s): <a href='messages.php'>Visit Message Center</a>(<b>".$num."</b>)<br></center></td>

</tr>

</table>

</table><br>";

}



$table = "".$msg."<br>".$article_content."";







$status2 = "".grabanysetting("status")."";

$reason2 = "".grabanysetting("reason")."";



if($status2 == "1") {





$article_content = "

<table>

<table width='100%' border='1'>

  <tr>

    <td width='100' align='center'><strong>Your Administrator has turned the board offline. If your administrator has listed a reason, it is given below:</strong></td>

  </tr>

  <tr>

    <td width='100' align='center'><strong>".$reason2."</strong></td>



  </tr></table></table><br>";





}

else {



$fid=$_GET['fid'];



$query = "SELECT * FROM forum_question WHERE fid='".$fid."' ORDER BY id DESC";

$result = mysql_query($query);

$num = mysql_numrows($result);





	$id=@mysql_result($result,$i,"id");

	$impid=@mysql_result($result,$i,"impid");



if($id == ""){

$not = "<tr><td class='trow' colspan='7'>There are currently no threads in this forum. If you would like to make a thread click the 'Create New Topic' button.</td></tr>";

}



if($impid == "1"){

$imp = "<td width='10%' align='center' class='tr'><strong>Important Thread</strong></td>";

}

else{

$imp = "<td width='10%' align='center' class='tr'><strong>Important Thread</strong></td>";

}







$query = "SELECT * FROM forum WHERE fid='".$fid."'";

$result = mysql_query($query);



	$topic=@mysql_result($result,$i,"topic");



$group = getgroup();

$cancp = cancp($group);



if($cancp != "yes"){



}

else if($cancp == "yes"){

$tab = "<td width='10%' align='center' class='tr'><strong>Status</strong></td>";

}









$article_title = "<a href='main_forum2.php'>4U Forum</a> / ".$topic."";



$table = $table."

<table width='90%' border='0' align='center' cellpadding='3' cellspacing='1' class='ftable'>

<tr>

<td width='100%' class='thead'>".$topic."</td>

</tr>

</table>

<table width='90%' border='0' align='center' cellpadding='3' cellspacing='1' class='ftable'>

<tr>

<td width='43%' align='center' class='tr'><strong>Topic</strong></td>

".$imp."

<td width='15%' align='center' class='tr'><strong>Views</strong></td>

<td width='13%' align='center' class='tr'><strong>Replies</strong></td>

<td width='13%' align='center' class='tr'><strong>Date/Time</strong></td>

<td width='40%' class='tr' align='center'><strong>Last Post</strong></td>

".$tab."

</tr>

".$not."";





$fid=$_GET['fid'];



$query = "SELECT * FROM forum_question WHERE fid='".$fid."' ORDER BY id DESC";

$result = mysql_query($query);

$num = mysql_numrows($result);





	while ($i < $num) {



	$id=@mysql_result($result,$i,"id");

	$impid=@mysql_result($result,$i,"impid");

	$name=@mysql_result($result,$i,"name");

	$topic=@mysql_result($result,$i,"topic");

	$view=@mysql_result($result,$i,"view");

	$reply=@mysql_result($result,$i,"reply");

	$datetime=@mysql_result($result,$i,"datetime");

	$status=@mysql_result($result,$i,"status");

	$lby=@mysql_result($result,$i,"lby");

	$ltopic=@mysql_result($result,$i,"ltopic");

	$lname=@mysql_result($result,$i,"lname");

	$ldatetime=@mysql_result($result,$i,"ldatetime");



$topic = stripslashes($topic);

$ltopic = stripslashes($ltopic);



$group = getgroup();

$cancp = cancp($group);



if($cancp != "yes"){



}

else if($cancp == "yes"){

$tab2 = "<td align='center' class='trow'>".$status."</td>";

}



if($status == "Open"){

$tname = "".$topic."";

}

else if($status == "Locked"){

$tname = "<s>".$topic."</s>";

}





if($impid == "1"){

$imp2 = "<td align='center' bgcolor='#FECF61'>Important Thread</td>";

}

else{

$imp2 = "<td align='center' class='trow'>Normal Thread</td>";

}



if($ltopic == ""){

$lpost = "<i>Never</i>";

}

else{

$lpost = "".$ldatetime."<br>by: <a href='profile2.php?user=".$lby."'>".$lby."</a>";

}





$table = $table."

<tr>

<td class='trow'><a href='view_topic.php?id=".$id."'>".$tname."</a><BR><strong>Created by:</strong><a href='profile2.php?user=".$name."'>".$name."</a></td>

".$imp2."

<td align='center' class='trow'>".$view."</td>

<td align='center' class='trow'>".$reply."</td>

<td align='center' class='trow'>".$datetime."</td>

<td align='center' class='trow'>".$lpost."</td>

".$tab2."

</tr>







";



	$i++;

	

	}



if($isloggedin == "yes"){

$create = "<a href='create_topic.php?fid=".$fid."'><strong>Create New Topic</strong> </a>";

}

else{

$create = "<br>";

}



$table = $table."

<tr>

<td colspan='7' align='right'  class='tr'><a href='accountpost.php?act=changesettings&more=".$fid."'>Subscribe to this Forum</a> | ".$create."</td>

</tr></table>

";



}









// **********************************************************************

// Begin Template Definition

// **********************************************************************



//Define our current theme

$file = $themeurl;



// Do the template changes and echo the ready template

$template = file_get_contents($file);



$template = replace(':ARTICLETITLE:',$article_title,$template);

$template = replace(':ARTICLECONTENT:',$article_content,$template);

$template = replace(':TABLE:',$table,$template);

$template = replace(':ARTICLEDATE:',$article_date,$template);



$template = replace(':BROWSERTITLE:',$browsertitle,$template);

$template = replace(':SITENAME:',$sitename,$template);



//Define our links

$template = replace(':LINKSBAR:',$links,$template);



//Get the content for the side bar...



$sidebar = getsidebar();

$template = replace(':SIDEFEED:',$sidebar,$template);



//Get the ad content...

$template = replace(':ADS:',$ads,$template);



//Get the slogan info

$template = replace(':SLOGAN:',$slogan,$template);





echo $template;



// **********************************************************************

// End Template Definition

// **********************************************************************







?>
 
Okay that's not the problem. Because now you can view the forums. But when I click to see a thread I get an internal service error. Paste your view_topic.php thread here.
 
Code:
<?php



// **********************************************************************

// Rusnak PHP Adoptables Script

// Copyright 2009 Brandon Rusnak

// For help and support: http://www.rusnakweb.com/forum/

//

// Redistribution prohibited without written permission

// File ID: profile.php

// Shows a user profile, or a member list.

// **********************************************************************



// Wake the sleeping giant



// **********************************************************************

// Basic Configuration Info

// **********************************************************************



include("inc/functions.php");

include("inc/config.php");

include("lang/lang.php");



$themeurl = "templates/forumtemp.html";



// **********************************************************************

// Define our top links by calling getlinks()

// **********************************************************************



$links = getlinks();



// **********************************************************************

// Define our ads by calling getads()

// **********************************************************************



$ads = getads("any");



// **********************************************************************

// Grab any dynamic article content from the content table

// **********************************************************************





$article_title = $pagecontent[title];

$article_content = $pagecontent[content];

$article_content = nl2br($article_content);



// **********************************************************************

// Grab any settings that we will need for the current page from the DB

// **********************************************************************



$browsertitle = grabanysetting("browsertitle");

$sitename = grabanysetting("sitename");

$slogan = grabanysetting("slogan");



// **********************************************************************

// Check and see if the user is logged in to the site

// **********************************************************************



$loginstatus = logincheck();

$isloggedin = $loginstatus[loginstatus];

$loggedinname = $loginstatus[username];



// **********************************************************************

// End Prepwork - Output the page to the user

// **********************************************************************



// This page handles user profiles and shows the site members...



$query = "SELECT * FROM ".$prefix."messages WHERE touser='".$loggedinname."' and status='unread'";

$result = mysql_query($query);

$num = mysql_numrows($result);



if($num > 0){

$msg = "



<table width='888px' border='1' cellpadding='3' cellspacing='1' bordercolor='1' bgcolor='#F9AE00' class='ftable'>

<td>

<table width='888px' border='1' cellpadding='3' cellspacing='1' bordercolor='1' bgcolor='#FECF61'>

<tr>

<td><center>You have a new message(s): <a href='messages.php'>Visit Message Center</a>(<b>".$num."</b>)<br></center></td>

</tr>

</table>

</table><br>";

}



$table = "".$msg."<br>".$article_content."";







$status2 = "".grabanysetting("status")."";

$reason2 = "".grabanysetting("reason")."";



if($status2 == "1") {





$article_content = "

<table>

<table width='100%' border='1'>

  <tr>

    <td width='100' align='center'><strong>Your Administrator has turned the board offline. If your administrator has listed a reason, it is given below:</strong></td>

  </tr>

  <tr>

    <td width='100' align='center'><strong>".$reason2."</strong></td>



  </tr></table></table><br>";





}

else {



$id=$_GET['id'];



$query = "SELECT * FROM forum_question WHERE id='".$id."'";

$result = mysql_query($query);

$num = mysql_numrows($result);





	$fid=@mysql_result($result,$i,"fid");

	$tname=@mysql_result($result,$i,"name");



$tname = stripslashes($name);







$query = "SELECT * FROM forum WHERE fid='".$fid."'";

$result = mysql_query($query);



	$topic=@mysql_result($result,$i,"topic");





$ftopic = "".$topic."";















// get value of id that sent from address bar

$fid=$_GET['fid'];

$id=$_GET['id'];



$query = "SELECT * FROM forum_question WHERE id='".$id."'";

$result = mysql_query($query);

$num = mysql_numrows($result);



	while ($i < $num) {



	$topic=@mysql_result($result,$i,"topic");

	$fid=@mysql_result($result,$i,"fid");

	$id=@mysql_result($result,$i,"id");

	$detail=@mysql_result($result,$i,"detail");

	$name=@mysql_result($result,$i,"name");

	$datetime=@mysql_result($result,$i,"datetime");

	$status=@mysql_result($result,$i,"status");



$topic = stripslashes($topic);

$detail = stripslashes($detail);

$name = stripslashes($name);



$name = "".$name."";

$fid = "".$fid."";





$signature = getsignature($name);

$postbar = getpostbar($name);



if($loggedinname != "$name"){



}

else if($loggedinname == "$name"){

$edit = "<a href='editpost.php?do=edit&id=".$id."&fid=".$fid."'>Edit Post</a>";

}



if($isloggedin == "yes"){

$treport = " | <a href='editpost.php?do=reportthread&id=".$id."'>Report Post</a>";

$pm = " | <a href='messages.php?act=newpm&user=".$name."'>Send ".$name." a Private Message</a>";

}

else{

$treport = "";

$pm = "";

}



$group = getgroup();

$cancp = cancp($group);



if($cancp != "yes"){



}

else if($cancp == "yes"){

$edit2 = " | <a href='editpost.php?do=delete&id=".$id."&fid=".$fid."'>Delete Post</a>";

$status2 = "

<table width='100%' border='0' cellpadding='3' cellspacing='0' bordercolor='1' class='ftable2a'>

<tr>

<td class='tr' width='100%'>

<form name='form1' method='post' action='update_thread.php'>

    <select name='status' id='status'>

      <option value='none' selected>No Selection</option>

      <option value='Locked'>Lock Thread</option>

      <option value='Open'>Open Thread</option>

      <option value='1'>Stick Thread</option>

      <option value='2'>Un-Stick Thread</option>

    </select>

    <input name='fid' type='hidden' id='fid' value='".$fid."'> 

    <input name='id' type='hidden' id='id' value='".$id."'> 

<input type='submit' name='Submit' value='Submit'>

</form>

</td>

</tr>

</table><br>";

}







$article_title = "<a href='main_forum2.php'>4U Forum</a> / <a href='main_forum.php?fid=".$fid."'>".$ftopic."</a> / ".$topic."";



$table = $table."



<table width='100%' border='0' cellpadding='3' cellspacing='0' bordercolor='1' class='ftable2a'>

<tr>

<td class='thead' width='100%'><strong>Date/time : </strong>".$datetime."<center><strong>".$topic."</strong></center></td>

</tr>

</table>

<td class='tr'><table width='100%' border='0' cellpadding='3' cellspacing='0' bordercolor='1' class='ftable2a'>

<tr>

<td class='trow'><center><a href='profile2.php?user=".$name."'><strong>".$name."</strong></a></center><br><center>".$postbar."</center></td>

<td class='trow' valign='top' width='100%'>

".$detail."".$signature."</td>

</tr>

</table></td>

<table width='100%' border='0' cellpadding='3' cellspacing='0' bordercolor='1' class='ftable2a'>

<tr>

<td class='tr' width='100%'>".$edit."".$edit2."".$treport."".$pm."</td>

</tr>

</table><br>



";



$id=$_GET['id'];







$query = "SELECT * FROM forum_answer WHERE question_id='".$id."' ORDER BY a_id ASC";

$result = mysql_query($query);

$num = mysql_numrows($result);



	while ($i < $num) {



	$a_name=@mysql_result($result,$i,"a_name");

	$a_answer=@mysql_result($result,$i,"a_answer");

	$a_id=@mysql_result($result,$i,"a_id");

	$a_datetime=@mysql_result($result,$i,"a_datetime");



$a_answer = stripslashes($a_answer);





$name = "".$a_name."";



$signature = getsignature($name);

$postbar = getpostbar($name);



if($isloggedin == "yes"){

$preport = " | <a href='editpost.php?do=reportpost&id=".$id."&a_id=".$a_id."'>Report Post</a>";

$apm = " | <a href='messages.php?act=newpm&user=".$a_name."'>Send ".$a_name." a Private Message</a>";

}

else{

$preport = "";

$apm = "";

}



$group = getgroup();

$cancp = cancp($group);



if($cancp != "yes"){



}

else if($cancp == "yes"){

$edit = "<a href='editpost.php?do=editreply&fid=".$fid."&question_id=".$id."&a_id=".$a_id."'>Edit Post</a>";

$edit2 = " | <a href='editpost.php?do=deletereply&fid=".$fid."&question_id=".$id."&a_id=".$a_id."'>Delete Post</a>";

}



$table = $table."

<table border='0' cellpadding='3' cellspacing='0' bordercolor='1' class='ftable2a'>

<tr>

<td class='tr' width='100%'><strong>Date/time : </strong>".$a_datetime."</td>

<td class='tr' width='20%'><center><strong>ID</strong>:".$a_id."</center></td>

</tr>

</table>

<td class='tr'><table border='0' cellpadding='3' cellspacing='1' bordercolor='1' class='ftable2a'>

<tr>

<td class='trow'><center><a href='profile2.php?user=".$a_name."'><strong>".$a_name."</strong></a>".$postbar."</td>

<td class='trow' valign='top' width='100%'>

".$a_answer."".$signature."</td>

</tr>

</table></td>

<table border='0' cellpadding='3' cellspacing='0' bordercolor='1' class='ftable2a'>

<tr>

<td class='tr' width='100%'>".$edit."".$edit2."".$preport."".$apm."</td>

</tr>

</table><br>





";



	$i++;

	

	}



	$i++;

	

	}





$query = "SELECT view FROM forum_question WHERE id='".$id."'";

$result = mysql_query($query);

$num = mysql_numrows($result);



	$view=@mysql_result($result,"view");





// if have no counter value set counter = 1

if(empty($view)){

$view=1;

$query = "INSERT INTO forum_question(view) VALUES('".$view."') WHERE id='".$id."'";

$result = mysql_query($query);

}



// count more value

$addview=$view+1;

$query = "UPDATE forum_question SET view='".$addview."' WHERE id='".$id."'";

$result = mysql_query($query);



if($status == "Locked" or $isloggedin != "yes"){

$post = "";

}

else if($status == "Open" or $isloggedin == "yes"){

$post = "

<BR>



<form name='form1' method='post' action='add_answer.php'>

<td>

<table width='100%' border='0' cellpadding='0' cellspacing='0' class='ftable2a'>

<tr>

<td class='trow'><input name='a_name' type='hidden' id='a_name' value='".$loggedinname."' />

<center><strong>Reply:</strong></center>

<center><textarea name='a_answer' cols='45' rows='3' id='a_answer'></textarea></center>

<input name='name' type='hidden' value='".$name."'>

<input name='pam' type='hidden' value='5'>

<input name='a_topic' type='hidden' value='".$topic."'>

<input name='dip' type='hidden' value='1'>

<input name='id' type='hidden' value='".$id."'>

<input name='fid' type='hidden' value='".$fid."'>

<center><input type='submit' name='Submit' value='Submit'> <input type='reset' name='Submit2' value='Reset'></center></td>

</tr>

</table>

</td>

</form>

";

}





$table = $table."

".$status2."

".$post."



";

}













// **********************************************************************

// Begin Template Definition

// **********************************************************************



//Define our current theme

$file = $themeurl;



// Do the template changes and echo the ready template

$template = file_get_contents($file);



$template = replace(':ARTICLETITLE:',$article_title,$template);

$template = replace(':ARTICLECONTENT:',$article_content,$template);

$template = replace(':TABLE:',$table,$template);

$template = replace(':ARTICLEDATE:',$article_date,$template);



$template = replace(':BROWSERTITLE:',$browsertitle,$template);

$template = replace(':SITENAME:',$sitename,$template);



//Define our links

$template = replace(':LINKSBAR:',$links,$template);



//Get the content for the side bar...



$sidebar = getsidebar();

$template = replace(':SIDEFEED:',$sidebar,$template);



//Get the ad content...

$template = replace(':ADS:',$ads,$template);



//Get the slogan info

$template = replace(':SLOGAN:',$slogan,$template);





echo $template;



// **********************************************************************

// End Template Definition

// **********************************************************************







?>

And thanks for your help by the way :)
 
This doesn't make sense. I can view the view_topic.php page, but as soon as I specify a thread it gives me he internal error..

Did you edit anythig in the view_topic.php file?
 
Hmm, it uses functions.php right? Well maybe there was something wrong with that file.
 
SJC said:
Hmm, it uses functions.php right? Well maybe there was something wrong with that file.

functions.pgp doesn't control that file..

Wait, paste your functions.php here so I can look at it.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,274
Messages
33,115
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top