Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Addons/Mods Graveyard (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=41)
-   -   Integrated Forum V 2.0 -Released!- *Old Version* (http://www.mysidiaadoptables.com/forum/showthread.php?t=849)

Bloodrun 05-20-2009 07:27 AM

Integrated Forum V 2.0 -Released!- *Old Version*
 
Forum Add-On Includes:
  • Forum Index
  • Thread Index
  • Ability to create threads/forums
  • Ability to post/read them
  • Have to be logged in to view the forum/post
  • A better layout style ability.
  • A better post preview.
  • Anyone who can view the ACP can Lock/Edit/Delete Threads and Posts
  • The ability to earn points per thread/reply.
  • Increase post count per post.
  • Forum Groups such as (Super Moderator, Moderator)
  • A full admin.php control/edit file for the forum.
  • The ability to hide forums to certain members.
  • The ability to assign a mod/super mod to a forum.
  • An advanced delete/create function.
  • Forum descriptions.
  • Last Post by feature.
  • Signature feature.

The bolded ones are the newly added features. Once I finish with the touch ups, I will post the instructions on how to install it.

Now, a quick question, do you think that I should release an old Premium Member Forum Modification each time I upgrade?
Like maybe, Every 2 upgrades?

Forum Add-On Will Include:
  • Parent Forum feature.
  • Anything else I can think of..

Bloodrun 05-23-2009 01:02 PM

RE: Integrated Forum V 2.0
 
Forum Preview:
[attachment=188]

Forum Album, just in case the files don't work

Now some things that I am currently trying to get to work:

Parent Forums
Subcribed Thread/Forum Update
Editing of Forum
And a better Important Thread feature.


For some reason the Parent Forums and Important Thread feature, are hard for me to figure out =/

Bloodrun 05-28-2009 03:28 PM

RE: Integrated Forum V 2.0
 
The actual release:

This update has a lot of updates, I suggest replaced your old pages with the new ones.

The current pages you should replace, are:
  • Account.php
  • accountpost.php
  • admin.php
  • admpost.php
  • register.php
  • messages.php

This release will mix in a couple of my other modifications, such as Custom Profile, Enhanced PM, and Warning/Report.

The sql is pretty straight forward, but the hardest one will be the 'adopts_users' table because you will have to manually insert the new options.

There are alot of files for this release, so I am zipping them in a folder.

The zip file, is organized so you know which part is which.
In the 'Profile Add-On' folder, there is a text file, that contains the sets that you have to insert into your 'adopts_users' table.
the css.php file within that folder needs to go into your inc directory

Update! For those of you who have downloaded the file (which was one) the accountpost.php file has been updated, I suggest you replace it with the new one!

The functions.php file in the zip is out of date, please use the extra one provided.


[attachment=205][attachment=206]

Saphira 05-29-2009 12:14 AM

RE: Integrated Forum V 2.0 -Released!-
 
Installing this to a test site now. I'll post a review after. :D[hr]
Hmm. When I add a new forum through the ACP, it's not showing on main_forum2.php.

Bloodrun 05-29-2009 12:56 AM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by Saphira
Installing this to a test site now. I'll post a review after. :D[hr]
Hmm. When I add a new forum through the ACP, it's not showing on main_forum2.php.

Make sure you have a parent forum first, or else it wont show.

Saphira 05-29-2009 01:10 AM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by Saphira
Installing this to a test site now. I'll post a review after. :D[hr]
Hmm. When I add a new forum through the ACP, it's not showing on main_forum2.php.

Make sure you have a parent forum first, or else it wont show.

Aha, I see. All working now. Now all I need to figure out is how to get your profile add on to work with my template. http://stumbleinn.net/forum/images/s...ratch-Head.gif

Bloodrun 05-29-2009 01:18 AM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by Saphira
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by Saphira
Installing this to a test site now. I'll post a review after. :D[hr]
Hmm. When I add a new forum through the ACP, it's not showing on main_forum2.php.

Make sure you have a parent forum first, or else it wont show.

Aha, I see. All working now. Now all I need to figure out is how to get your profile add on to work with my template. http://stumbleinn.net/forum/images/s...ratch-Head.gif

I gave that modification a new template just for that very reason.

Saphira 05-29-2009 01:45 AM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by Saphira
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by Saphira
Installing this to a test site now. I'll post a review after. :D[hr]
Hmm. When I add a new forum through the ACP, it's not showing on main_forum2.php.

Make sure you have a parent forum first, or else it wont show.

Aha, I see. All working now. Now all I need to figure out is how to get your profile add on to work with my template. http://stumbleinn.net/forum/images/s...ratch-Head.gif

I gave that modification a new template just for that very reason.

I don't understand it. I have all the files in the right places. I even changed my default style.css to style1.css, so I could upload yours. But the page has no style at all. White background, black text, everything aligned left.

Bloodrun 05-29-2009 01:48 AM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by Saphira
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by Saphira
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by Saphira
Installing this to a test site now. I'll post a review after. :D[hr]
Hmm. When I add a new forum through the ACP, it's not showing on main_forum2.php.

Make sure you have a parent forum first, or else it wont show.

Aha, I see. All working now. Now all I need to figure out is how to get your profile add on to work with my template. http://stumbleinn.net/forum/images/s...ratch-Head.gif

I gave that modification a new template just for that very reason.

I don't understand it. I have all the files in the right places. I even changed my default style.css to style1.css, so I could upload yours. But the page has no style at all. White background, black text, everything aligned left.

silly you gotta put the code in your profile, becuase it's a "Custom Profile Mod" duh =P

rosepose 05-29-2009 09:47 AM

RE: Integrated Forum V 2.0 -Released!-
 
*raises hand* I have a question! The pet bits are strangely absent from profile2.php, how would I put them in?

Bloodrun 05-29-2009 01:27 PM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by rosepose
*raises hand* I have a question! The pet bits are strangely absent from profile2.php, how would I put them in?

oh, lol I forgot I took those out, thats rather simple actually, just add this:

near the stat's section:

add this right after all the Instant messaging info
PHP Code:

    $query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '".$user."'";
    
$result mysql_query($query);
    
$numpets mysql_numrows($result);

    
// Show the user's profile page... 

Then add this right at the end of the $article_content

PHP Code:

    <b>Number Of Pets Owned:</b".$numpets."<br><br>
    <
b><u>".$usersname."'s Pets:</u></b><br><br>";

    if($numpets > 0){

    $i=0;
    while ($i < $numpets) {

    $aid=@mysql_result($result,$i,"aid");
    $image = getcurrentimage($aid);

    $article_content = $article_content."<a href='
levelup.php?id=".$aid."'><img src='".$image."' border='0'></a>";


    $i++;
    }
    }
    else{
    $article_content = $article_content."This user currently does not have any pets.";
    }

    }
    else{
    
    // User doesn'
t seem to existoh noes!

    
$article_title "User Does Not Exist";
    
$article_content "Sorry, but we could not find a user in the system with the name ".$user.".  
    Please make sure you have the username right.  The user's account may also have been deleted by the system admin."
;
 
    } 


rosepose 05-29-2009 03:38 PM

RE: Integrated Forum V 2.0 -Released!-
 
Erm....


Parse error: syntax error, unexpected '<' in /home/solaeria/public_html/alearith/profile2.php on line 403

PHP 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/usertemp.html";



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

// Define our top links by calling getlinks()

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




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

// Define our ads by calling getads()

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



$ads getads("any");



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

// Grab any dynamic article content from the content table

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



$pagecontent getsitecontent("index");

$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...



$user $_GET["user"];

$user preg_replace("/[^a-zA-Z0-9\\040.]/"""$user);

$user secure($user);



$page $_GET["page"];

$page preg_replace("/[^a-zA-Z0-9\\040.]/"""$page);

$page secure($page);





if(
$user != ""){



// We have specified a specific user who we are showing a profile for...

// See if the user exists...



    
$query "SELECT * FROM ".$prefix."users WHERE username = '".$user."'";

    
$result mysql_query($query);

    
$num mysql_numrows($result);



    if(
$num 0){



    
$i=0;

    while (
$i 1) {



    
$usersname=@mysql_result($result,$i,"username");

    
$usersgroup=@mysql_result($result,$i,"usergroup");

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

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

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

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

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

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

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

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

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

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

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

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

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

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



    if(
$website == ""){

    
$website "No Website Information Given";

    }

    else{

    
$website "<a href='".$website."' target='_blank'>".$website."</a>";

    }



    if(
$msn == ""){

    
$msn "No MSN Information Given";

    }



    if(
$ame == ""){

    
$ame "This user is a nobody! (Didn't enter any info)";

    }

    

    if(
$aim == ""){

    
$aim "No AIM Information Given";

    }



    if(
$yahoo == ""){

    
$yahoo "No YIM Information Given";

    }



    if(
$age == ""){

    
$yahoo "No Information Given";

    }



    if(
$occupation == ""){

    
$yahoo "No Information Given";

    }



    if(
$interests == ""){

    
$yahoo "No Information Given";

    }



    if(
$location == ""){

    
$yahoo "No Information Given";

    }

    



    
$i++;

    }


  
$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '".$user."'";
    
$result mysql_query($query);
    
$numpets mysql_numrows($result);







    
// Show the user's profile page...





    
if($status == "yes") {

    
$userdisp "Online Status: <b>Online!</b>";

    }

    elseif(
$status == "") {

    
$userdisp "Online Status: <b>Offline!</b>";

    }

if(
$numpets 0){

    
$i=0;
    while (
$i $numpets) {

    
$aid=@mysql_result($result,$i,"aid");
    
$image getcurrentimage($aid);

    
$article_content $article_content."<a href='levelup.php?id=".$aid."'><img src='".$image."' border='0'></a>";


    
$i++;
    }
    }
    else{
    
$article_content $article_content."This user currently does not have any pets.";
    }


    
$article_title "<center><br><br><br><br><table><tr><td id=welcome width=600 valign=top style='background-color:#fff; border:1px solid #e9e9e9; padding:10px 10px 10px;'>

<div class=font><div class=header1>"
.$usersname."'s Profile:</div>";

        
$displaypic "<img src='".$profilepic."'>"

        
$display_quote "".$displayquote."<br>".$userdisp."<br>";

        
$aboutme "    <div class=header3>About Me:</div><br> ".$ame."<br>    <div class=header3>Interests:</div><br> ".$interests."<br></td></tr>";

    
$article_content "

        <tr><td id=welcome width=600 valign=top style='background-color:#fff; border:1px solid #e9e9e9; padding:10px 10px 10px;'><div class=header3><div class=font><u>"
.$lang_basic_info."".$usersname.":</u></div></a><br><br>

    <img src='templates/icons/web.gif'> "
.$website."<br>

    <img src='templates/icons/aim.gif'> "
.$aim."<br>

    <img src='templates/icons/msn.gif'> "
.$msn."<br>

    <img src='templates/icons/yahoo.gif'> "
.$yahoo."<br>

    <img src='templates/icons/title.gif'> <a href='messages.php?act=newpm&user="
.$usersname."'>Send ".$usersname." a Private Message</a><br><br></div></td></tr>";

    
$article_stats "<div class=font><td id=welcome width=600 valign=top style='background-color:#ffffff; border:1px solid #e9e9e9; padding:10px 10px 10px;'><div class=font>

    <div class=header3><u>"
.$usersname."'s Stats:</div></u></a><br><br>

    <div class=header3>Member Since:</div> "
.$membersince."<br><br>
    <b>Number Of Pets Owned:</b> "
.$numpets."<br><br>
    <b><u>"
.$usersname."'s Pets:</u></b><br><br>";

    if(
$numpets 0){

    
$i=0;
    while (
$i $numpets) {

    
$aid=@mysql_result($result,$i,"aid");
    
$image getcurrentimage($aid);

    
$article_content $article_content."<a href='levelup.php?id=".$aid."'><img src='".$image."' border='0'></a>";


    
$i++;
    }
    }
    else{
    
$article_content $article_content."This user currently does not have any pets.";
    }

    }
    else{
    
    
// User doesn't seem to exist, oh noes!

    
$article_title "User Does Not Exist";
    
$article_content "Sorry, but we could not find a user in the system with the name ".$user.".  
    Please make sure you have the username right.  The user's account may also have been deleted by the system admin."
;
 
    } </
div>";

    
$article_about = "
<div class=font>
    <
div class=header3><u>About ".$usersname.":</div></u></a><br><br>

    <
div class=header3>Location:</div".$location."<br>

    <
div class=header3>Age:</div".$age."<br>

    <
div class=header3>Occupation:</div".$occupation."<br
<
br><br>
    </
div></td>
";



}

}



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

// 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(':ARTICLEDATE:',$article_date,$template);

$template = replace(':DISPLAYPIC:',$displaypic,$template);

$template = replace(':DISPLAYQUOTE:',$display_quote,$template);

$template = replace(':ARTICLESTATS:',$article_stats,$template);

$template = replace(':ARTICLEABOUT:',$article_about,$template);

$template = replace(':ARTICLEABOUTME:',$aboutme,$template);



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

$template = replace(':USERCSS:',$usercss,$template);

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



//Define our links



//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

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







?>

That's my profile2.php.

Bloodrun 05-29-2009 05:12 PM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by rosepose
Erm....


Parse error: syntax error, unexpected '<' in /home/solaeria/public_html/alearith/profile2.php on line 403

PHP 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/usertemp.html";



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

// Define our top links by calling getlinks()

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




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

// Define our ads by calling getads()

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



$ads getads("any");



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

// Grab any dynamic article content from the content table

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



$pagecontent getsitecontent("index");

$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...



$user $_GET["user"];

$user preg_replace("/[^a-zA-Z0-9\\040.]/"""$user);

$user secure($user);



$page $_GET["page"];

$page preg_replace("/[^a-zA-Z0-9\\040.]/"""$page);

$page secure($page);





if(
$user != ""){



// We have specified a specific user who we are showing a profile for...

// See if the user exists...



    
$query "SELECT * FROM ".$prefix."users WHERE username = '".$user."'";

    
$result mysql_query($query);

    
$num mysql_numrows($result);



    if(
$num 0){



    
$i=0;

    while (
$i 1) {



    
$usersname=@mysql_result($result,$i,"username");

    
$usersgroup=@mysql_result($result,$i,"usergroup");

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

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

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

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

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

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

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

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

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

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

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

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

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

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



    if(
$website == ""){

    
$website "No Website Information Given";

    }

    else{

    
$website "<a href='".$website."' target='_blank'>".$website."</a>";

    }



    if(
$msn == ""){

    
$msn "No MSN Information Given";

    }



    if(
$ame == ""){

    
$ame "This user is a nobody! (Didn't enter any info)";

    }

    

    if(
$aim == ""){

    
$aim "No AIM Information Given";

    }



    if(
$yahoo == ""){

    
$yahoo "No YIM Information Given";

    }



    if(
$age == ""){

    
$yahoo "No Information Given";

    }



    if(
$occupation == ""){

    
$yahoo "No Information Given";

    }



    if(
$interests == ""){

    
$yahoo "No Information Given";

    }



    if(
$location == ""){

    
$yahoo "No Information Given";

    }

    



    
$i++;

    }


  
$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '".$user."'";
    
$result mysql_query($query);
    
$numpets mysql_numrows($result);







    
// Show the user's profile page...





    
if($status == "yes") {

    
$userdisp "Online Status: <b>Online!</b>";

    }

    elseif(
$status == "") {

    
$userdisp "Online Status: <b>Offline!</b>";

    }

if(
$numpets 0){

    
$i=0;
    while (
$i $numpets) {

    
$aid=@mysql_result($result,$i,"aid");
    
$image getcurrentimage($aid);

    
$article_content $article_content."<a href='levelup.php?id=".$aid."'><img src='".$image."' border='0'></a>";


    
$i++;
    }
    }
    else{
    
$article_content $article_content."This user currently does not have any pets.";
    }


    
$article_title "<center><br><br><br><br><table><tr><td id=welcome width=600 valign=top style='background-color:#fff; border:1px solid #e9e9e9; padding:10px 10px 10px;'>

<div class=font><div class=header1>"
.$usersname."'s Profile:</div>";

        
$displaypic "<img src='".$profilepic."'>"

        
$display_quote "".$displayquote."<br>".$userdisp."<br>";

        
$aboutme "    <div class=header3>About Me:</div><br> ".$ame."<br>    <div class=header3>Interests:</div><br> ".$interests."<br></td></tr>";

    
$article_content "

        <tr><td id=welcome width=600 valign=top style='background-color:#fff; border:1px solid #e9e9e9; padding:10px 10px 10px;'><div class=header3><div class=font><u>"
.$lang_basic_info."".$usersname.":</u></div></a><br><br>

    <img src='templates/icons/web.gif'> "
.$website."<br>

    <img src='templates/icons/aim.gif'> "
.$aim."<br>

    <img src='templates/icons/msn.gif'> "
.$msn."<br>

    <img src='templates/icons/yahoo.gif'> "
.$yahoo."<br>

    <img src='templates/icons/title.gif'> <a href='messages.php?act=newpm&user="
.$usersname."'>Send ".$usersname." a Private Message</a><br><br></div></td></tr>";

    
$article_stats "<div class=font><td id=welcome width=600 valign=top style='background-color:#ffffff; border:1px solid #e9e9e9; padding:10px 10px 10px;'><div class=font>

    <div class=header3><u>"
.$usersname."'s Stats:</div></u></a><br><br>

    <div class=header3>Member Since:</div> "
.$membersince."<br><br>
    <b>Number Of Pets Owned:</b> "
.$numpets."<br><br>
    <b><u>"
.$usersname."'s Pets:</u></b><br><br>";

    if(
$numpets 0){

    
$i=0;
    while (
$i $numpets) {

    
$aid=@mysql_result($result,$i,"aid");
    
$image getcurrentimage($aid);

    
$article_content $article_content."<a href='levelup.php?id=".$aid."'><img src='".$image."' border='0'></a>";


    
$i++;
    }
    }
    else{
    
$article_content $article_content."This user currently does not have any pets.";
    }

    }
    else{
    
    
// User doesn't seem to exist, oh noes!

    
$article_title "User Does Not Exist";
    
$article_content "Sorry, but we could not find a user in the system with the name ".$user.".  
    Please make sure you have the username right.  The user's account may also have been deleted by the system admin."
;
 
    } </
div>";

    
$article_about = "
<div class=font>
    <
div class=header3><u>About ".$usersname.":</div></u></a><br><br>

    <
div class=header3>Location:</div".$location."<br>

    <
div class=header3>Age:</div".$age."<br>

    <
div class=header3>Occupation:</div".$occupation."<br
<
br><br>
    </
div></td>
";



}

}



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

// 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(':ARTICLEDATE:',$article_date,$template);

$template = replace(':DISPLAYPIC:',$displaypic,$template);

$template = replace(':DISPLAYQUOTE:',$display_quote,$template);

$template = replace(':ARTICLESTATS:',$article_stats,$template);

$template = replace(':ARTICLEABOUT:',$article_about,$template);

$template = replace(':ARTICLEABOUTME:',$aboutme,$template);



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

$template = replace(':USERCSS:',$usercss,$template);

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



//Define our links



//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

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







?>

That's my profile2.php.

Um.. is there a reason why your using div's in the code? I haven't tested it with divs...

rosepose 05-29-2009 05:14 PM

RE: Integrated Forum V 2.0 -Released!-
 
So that the profile is more customizeable and so that it looks a bit like our existing layout :3

Saphira 05-30-2009 01:43 PM

RE: Integrated Forum V 2.0 -Released!-
 
Hmm, is it possible to implement this -without- the custom profile mod? It's a good mod, but most of the users of my site are around the 12-14 usergroup, and none of them will know enough HTML to edit the page. Heh.

Bloodrun 05-30-2009 01:47 PM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by Saphira
Hmm, is it possible to implement this -without- the custom profile mod? It's a good mod, but most of the users of my site are around the 12-14 usergroup, and none of them will know enough HTML to edit the page. Heh.

yeah, all you have to do, is keep your original profile.php file, and just change all the links to the profile back to 'profile.php'.

Saphira 05-30-2009 02:05 PM

RE: Integrated Forum V 2.0 -Released!-
 
Okay, awesome! I thought I'd be playing with bits of code for hours... haha

Bloodrun 05-30-2009 02:06 PM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by Saphira
Okay, awesome! I thought I'd be playing with bits of code for hours... haha

Not today =P

SubZ 06-16-2009 03:40 PM

RE: Integrated Forum V 2.0 -Released!-
 
When I try to make a new forum it doesn't show up, I do have a parent forum for it though. I think I may have missed a SQL query, I can't find it for the life of me though x__X

Bloodrun 06-18-2009 02:10 PM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by SubZ
When I try to make a new forum it doesn't show up, I do have a parent forum for it though. I think I may have missed a SQL query, I can't find it for the life of me though x__X

hmm

Did you put everything in the folder on your server?
Are you given an error at any time?
If you look in your MySql database, does it say there is a forum?

Fireballchad 09-08-2009 07:48 PM

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.

BMR777 09-09-2009 01:11 PM

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

Bloodrun 09-09-2009 03:46 PM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by BMR777
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.

Fireballchad 09-09-2009 10:25 PM

RE: Integrated Forum V 2.0 -Released!-
 
Thanks guys that worked for the most part.

Quote:

Originally Posted by bloodrun
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

Bloodrun 09-11-2009 11:24 AM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by Fireballchad
Thanks guys that worked for the most part.

Quote:

Originally Posted by bloodrun
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.

gabeki 10-20-2009 09:45 AM

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

$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

Bloodrun 10-20-2009 11:46 AM

RE: Integrated Forum V 2.0 -Released!-
 
Quote:

Originally Posted by gabeki
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 Code:

$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.

Bloodrun 11-02-2009 12:20 AM

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.

SJC 11-02-2009 07:07 PM

RE: Integrated Forum V 2.0 -Released!- *Old Version*
 
I cant seem to find the link to create a parent forum.

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

Bloodrun 11-03-2009 05:16 PM

RE: Integrated Forum V 2.0 -Released!- *Old Version*
 
Quote:

Originally Posted by SJC
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.

SJC 11-05-2009 05:08 PM

RE: Integrated Forum V 2.0 -Released!- *Old 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

Bloodrun 11-05-2009 05:42 PM

RE: Integrated Forum V 2.0 -Released!- *Old Version*
 
Quote:

Originally Posted by SJC
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.

SJC 11-05-2009 06:09 PM

RE: Integrated Forum V 2.0 -Released!- *Old Version*
 
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

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







?>


Bloodrun 11-05-2009 06:16 PM

RE: Integrated Forum V 2.0 -Released!- *Old Version*
 
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.

SJC 11-05-2009 06:22 PM

RE: Integrated Forum V 2.0 -Released!- *Old Version*
 
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 :)

Bloodrun 11-05-2009 06:45 PM

RE: Integrated Forum V 2.0 -Released!- *Old Version*
 
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?

SJC 11-05-2009 06:48 PM

RE: Integrated Forum V 2.0 -Released!- *Old Version*
 
No....

Bloodrun 11-05-2009 07:18 PM

RE: Integrated Forum V 2.0 -Released!- *Old Version*
 
Quote:

Originally Posted by SJC
No....

That's incredibly strange... It doesn't make since becuase it was being used before just fine. :?

SJC 11-06-2009 02:39 PM

RE: Integrated Forum V 2.0 -Released!- *Old Version*
 
Hmm, it uses functions.php right? Well maybe there was something wrong with that file.

Bloodrun 11-06-2009 04:33 PM

RE: Integrated Forum V 2.0 -Released!- *Old Version*
 
Quote:

Originally Posted by SJC
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.


All times are GMT -5. The time now is 02:15 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.