Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

Reply
 
Thread Tools Display Modes
  #11  
Old 05-29-2009, 02:27 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,762
Bloodrun
Send a message via Yahoo to Bloodrun
Default 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."
;
 
    } 
Reply With Quote
  #12  
Old 05-29-2009, 04:38 PM
rosepose rosepose is offline
Member
 
Join Date: Jan 2009
Posts: 127
Credits: 12,326
rosepose
Default 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.
Reply With Quote
  #13  
Old 05-29-2009, 06:12 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,762
Bloodrun
Send a message via Yahoo to Bloodrun
Default 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...
Reply With Quote
  #14  
Old 05-29-2009, 06:14 PM
rosepose rosepose is offline
Member
 
Join Date: Jan 2009
Posts: 127
Credits: 12,326
rosepose
Default 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
Reply With Quote
  #15  
Old 05-30-2009, 02:43 PM
Saphira Saphira is offline
Member
 
Join Date: Jan 2009
Posts: 89
Credits: 6,963
Saphira
Default 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.
Reply With Quote
  #16  
Old 05-30-2009, 02:47 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,762
Bloodrun
Send a message via Yahoo to Bloodrun
Default 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'.
Reply With Quote
  #17  
Old 05-30-2009, 03:05 PM
Saphira Saphira is offline
Member
 
Join Date: Jan 2009
Posts: 89
Credits: 6,963
Saphira
Default RE: Integrated Forum V 2.0 -Released!-

Okay, awesome! I thought I'd be playing with bits of code for hours... haha
Reply With Quote
  #18  
Old 05-30-2009, 03:06 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,762
Bloodrun
Send a message via Yahoo to Bloodrun
Default 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
Reply With Quote
  #19  
Old 06-16-2009, 04:40 PM
SubZ SubZ is offline
Member
 
Join Date: Feb 2009
Posts: 11
Credits: 820
SubZ
Default 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
Reply With Quote
  #20  
Old 06-18-2009, 03:10 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,762
Bloodrun
Send a message via Yahoo to Bloodrun
Default 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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Integrated Forum & Premium Question Niku Questions and Supports 2 08-11-2011 02:01 AM
MyBB 1.4.11 released! God of Webmasters Area 0 12-30-2009 02:50 AM
A basic Integrated Forum Bloodrun Addons/Mods Graveyard 30 05-17-2009 10:51 PM


All times are GMT -5. The time now is 12:58 PM.

Currently Active Users: 790 (0 members and 790 guests)
Threads: 4,081, Posts: 32,029, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636