-
[PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
PLEASE READ
http://forum.ragezone.com/f86/php-si...8/#post5226082
BTW, I'm not silv3rbullet.
Demo: MOVED TO SERVER! http://sbb.simplephp.co.cc
simpleBB Pre-Alpha Test Release Package Launch Date:
Scheduled For: 9.1.09 CANCELED/POSTPONED
New Date: 9.30.09
Features Tweaked Since PoseidonBB:
Features Being Worked On
Features Planned For Future
Constructive and supportive comments are welcome.
-
Re: [PHP]SimpleBB - The New Bulletin Board!
Page isn't available.
A screenshot would be a preferable substitute, but a live one would be a good one.
-
Re: [PHP]SimpleBB - The New Bulletin Board!
Quote:
Originally Posted by
shiningriver
Page isn't available.
A screenshot would be a preferable substitute, but a live one would be a good one.
I think he host it in his computer I saw it but I don't like the theme :blink:
-
Re: [PHP]SimpleBB - The New Bulletin Board!
-
Re: [PHP]SimpleBB - The New Bulletin Board!
Buy hosting and come back ;)
-
Re: [PHP]SimpleBB - The New Bulletin Board!
Quote:
Originally Posted by
s-p-n
Buy hosting and come back ;)
That ^^
I'm anxious to see what you have.
-
Re: [PHP]SimpleBB - The New Bulletin Board!
Back online.
I don't host this on a server, cuz I always do my coding on my own server, then move it to my server.
Some of you may like the theme, some of you might not, but just give me comments. :D
-
Re: [PHP]SimpleBB - The New Bulletin Board!
I keep getting
[code]Error 500
Internal Server Error
Powered by Abyss Web Server X2
-
Re: [PHP]SimpleBB - The New Bulletin Board!
Abyss is gay, anyone else agree?
Abyss doesn't work until like half an hour after my computer restarts, so that might be your problem.
Try again.
-
Re: [PHP]SimpleBB - The New Bulletin Board!
-
Re: [PHP]SimpleBB - The New Bulletin Board!
Code:
WARNING: This site does not render properly in Firefox. Please download Internet Explorer 8 or Google Chrome.
Wow, first time I've ever heard of that.
-
Re: [PHP]SimpleBB - The New Bulletin Board!
Quote:
Originally Posted by
Nuklear
My fucking eyes!!!
I know, I'm tring to make the style smoother.
Quote:
Originally Posted by
Parker
Code:
WARNING: This site does not render properly in Firefox. Please download Internet Explorer 8 or Google Chrome.
Wow, first time I've ever heard of that.
Well, it's true.
Just view a thread and you'll see that FF messes up the borders.
-
Re: [PHP]SimpleBB - The New Bulletin Board!
I can't even view a thread at the moment, it says
Code:
http://71.141.99.165/simpleBBindex.php?act=viewforum&id=1
[code]Error 404
Not Found
Powered by Abyss Web Server X2
-
Re: [PHP]SimpleBB - The New Bulletin Board!
LOL WHOOPS.
I made rootdir <ip>/simpleBB and didn't add the trailing slash.
Fixed now.
-
Re: [PHP]SimpleBB - The New Bulletin Board!
if your ip changes every time or what ever, look into this: http://www.no-ip.com/downloads.php
-
Re: [PHP]SimpleBB - The New Bulletin Board!
Updated:
Added more info.
BTW, this is actually the old poseidonBB!
silv3rbullet told me to post a new "forum system" under a new name, and to see what other people would think.
The plan was a success.
No one thought that any forum tutorials were used, and we were able to continue developing!
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
People, instead of saying "This style stinks!" or "MY FUCKING EYES!"
Please say WHY it hurts your eyes, and what adjustment in color you want.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
upload at least a pic because to me it seems down all the time.
with a pic we can have a "full" understanding of what your forum looks like.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
The forum is usually down from 11:00 PST to 7:00 PST.
I'll try to get an SS today, after I get home from school. O_O
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Personally I don't like following message:
Quote:
WARNING: This site does not render properly in Firefox. Please download Internet Explorer 8 or Google Chrome.
I think it is fail #1 because web-script/web-page/web-other-thing should be optimized for all/different browsers.
But the rest is ok.
P.S. About fail #1 its just my opinion
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Quote:
Originally Posted by
ProKiller002
Personally I don't like following message:
I think it is fail #1 because web-script/web-page/web-other-thing should be optimized for all/different browsers.
But the rest is ok.
P.S. About fail #1 its just my opinion
I am working on it, it's just a temporary notice that some stuff may not render.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
First of all, we aren't retarded. It's blatantly obvious that you're silv3rbullet. Second of all, this is leeched, ripped, and poorly coded.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Does registering work for anyone? or is it not available yet?
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Just to tell you guys, I am not silv3rbullet jeez.
However, I am LuckySevenz, and that means I am Wayne.
I'm silv3r's bro. :D
---------- Post added at 11:06 PM ---------- Previous post was at 11:05 PM ----------
And WTF makes you guys think that I'm ripping tuts?
And how would you know it's poorly coded?
I never gave you the source code.
This whole project was all my work.
It wasn't any tutorial code or any other people's work.
It was all MY work.
ME, AS IN WAYNE, and not silv3rbullet.
---------- Post added at 11:07 PM ---------- Previous post was at 11:06 PM ----------
oh yes, and can I have proof that I ripped from those tuts?
kthxbai.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Quote:
Originally Posted by
SimpleBB
Just to tell you guys, I am not silv3rbullet jeez.
However, I am LuckySevenz, and that means I am Wayne.
I'm silv3r's bro. :D
---------- Post added at 11:06 PM ---------- Previous post was at 11:05 PM ----------
And WTF makes you guys think that I'm ripping tuts?
And how would you know it's poorly coded?
I never gave you the source code.
This whole project was all my work.
It wasn't any tutorial code or any other people's work.
It was all MY work.
ME, AS IN WAYNE, and not silv3rbullet.
---------- Post added at 11:07 PM ---------- Previous post was at 11:06 PM ----------
oh yes, and can I have proof that I ripped from those tuts?
kthxbai.
You stated in another thread and MSN that silv3rbullet is LuckySevenz. So, if you're LuckySevenz, you are silv3rbullet.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Quote:
Originally Posted by
Murawd
You stated in another thread and MSN that silv3rbullet is LuckySevenz. So, if you're LuckySevenz, you are silv3rbullet.
You do realize that I have access to his accounts, right?
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Sorry, the style is wank.
Try using something from www.styleshout.com
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Quote:
Originally Posted by
Monsta.
Thank you for your supportive comment.
I'll be sure to take a look at those styles.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Quote:
Originally Posted by
lceCold
You do realize that I have access to his accounts, right?
I'm not even going to bother.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
If you want people to see your project host it on something reliable, or don't post it at all, as it defeats the purpose of having a thread in the first place.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Just to tell you guys, I left this project. O_O
Wayne is in charge (and the only one left) now.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Demo link updated; moved demo to the server.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
It still has an ugly style ( tutorial much ), divs aren't aligned.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Wayne says that the style is good enough lol.
BUt I agree.
Try making it cooler, like SMF's. :D
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Can you please post the contents of your index file?
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
PHP Code:
<?php
#####\\\\\\\Load all session data./////#######
session_start();
#######\\\\\Enable error reporting./////#######
error_reporting(E_ALL & ~E_NOTICE);
#######\\\\\Define the forum, as to prevent unwanted access to files./////#######
define("forum", "PRE-ALPHA TEST RELEASE PACKAGE");
######\\\\\Require the database information./////#######
require_once('data/config.php');
######\\\\\\\Require the settings and functions that will be needed./////#######
require_once('data/settings.php');
require_once('data/functions.php');
#####\\\\\\\Get the style./////#######
include('style/poseidonBB/index.php');
?>
There you go, happy?
I'm not posting any other files until it's ready.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Ah, you coded this procedurally. This won't go far because of that.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
More files?
data/config.php
PHP Code:
<?php
#Configuration file#
#Rename this to config.php#
define('security', 'protection');
/*MySQL Configuration File*/
/*Database Username. Usually root*/
$dbuser = "***";
/*Database Password. Usually root or nothing.*/
$dbpass = "***";
/*Where is the database hosted?
*If you aren't sure, leave it as blank.*/
$dbhost = "localhost";
/*Database name
*Either change it or create a database*/
$dbname = "***";
/*OTHER*/
/*This is email is only used to send you error logs of your forum. To disable error emails, leave it blank.*/
$email = "";
/*Don't touch this.*/
$conn = @mysql_connect($dbhost,$dbuser,$dbpass) or die(include('fatal.php'));
$db = @mysql_select_db($dbname, $conn) or die(include('fatal.php'));
?>
data/settings.php
PHP Code:
<?php
if(!defined("forum"))
###Trying to reset your stats eh? Won't work.
die("Hacking attempt detected.");
$settings = mysql_query("SELECT * FROM boarddesc");
$data = mysql_fetch_array($settings);
#####\\\\\\\If they aren't logged in, they must be guests///////#####
if(!isset($_SESSION['uid']))
{
$_SESSION['groupid'] = 1;//1 is the Guest group, so don't change the table info manually!
}
#####\\\\\\\You should have a group id, so you must be a hacker!///////#####
if(!isset($_SESSION['uid']) && !isset($_SESSION['groupid']))
{
###Assign them the group id of 4. (Banned)###
echo "An error has occurred while logging in. Please re-login.";//Not tested, but I'm pretty sure it'll show. O_O
$_SESSION['groupid'] = 4;//That's what you get for tampering with the system. :O
}
if($_SESSION['groupid'])
{
$action = mysql_query("SELECT * FROM `member_groups` WHERE id='".$_SESSION['groupid']."'") or die(mysql_error());
$can = mysql_fetch_array($action);
}
#####\\\\\\\SimpleBB Version Number///////#####
$version = $data['version'];
#####\\\\\\\Site name///////#####
$sitename = $data['boardname'];
#####\\\\\\\Site Description///////#####
$sitedesc = $data['description'];
#####\\\\\\\Board email///////#####
$bemail = $data['boardemail'];
#####\\\\\\\Copyright///////#####
$copyright = $data['copyright'];
#####\\\\\\\Terms of Service///////#####
$tos = $data['tos'];
#####\\\\\\\Website root directory///////#####
$rootdir = $data['rootdir'];
#####\\\\\\\Define the membergroup attributes///////#####
if(isset($_SESSION['groupid']))
{
$GLOBALS['id'] = $can['id'];
$GLOBALS['name'] = $can['name'];
$GLOBALS['desc'] = $can['description'];
$GLOBALS['minposts'] = $can['min_posts'];
$GLOBALS['max_pms'] = $can['max_pms'];
$GLOBALS['stag'] = $can['start_tag'];
$GLOBALS['etag'] = $can['end_tag'];
$GLOBALS['utitle'] = $can['user_title'];
$GLOBALS['public'] = $can['public'];
$GLOBALS['isban'] = $can['is_banned'];
$GLOBALS['canavatar'] = $can['can_have_avatar'];
$GLOBALS['cansig'] = $can['can_have_sig'];
$GLOBALS['avatarw'] = $can['avatar_width'];
$GLOBALS['avatarh'] = $can['avatar_height'];
$GLOBALS['avatarsz'] = $can['avatar_size'];
$GLOBALS['sigmchars'] = $can['sig_max_chars'];
$GLOBALS['acp_access'] = $can['can_acp'];
$GLOBALS['mcp_access'] = $can['can_mcp'];
$GLOBALS['can_reply_locked'] = $can['can_reply_locked'];
$GLOBALS['view_maint'] = $can['can_view_maintenance'];
$GLOBALS['can_infract'] = $can['can_infract'];
}
?>
data/functions.php
PHP Code:
<?php
###Check for 'dead' sessions every ten minutes.###
$limit = strtotime('-10 minutes');//If your server experiences large amounts of visitors, make the limite longer.
###Set sessions that have not been active for more than ten meinutes to be inactive.###
mysql_query("UPDATE `users` SET `active` ='0' WHERE `last_action` <= '".$limit."'") or die(mysql_error());
###If the current user is browsing, reset their last action to the current time.###
###Now, check for guest sessions that are no longer active.###
$glimit = strtotime('-5 minutes');//If your server experiences large amounts of visitors, make the limit longer.
###Do the same thing.###
mysql_query("DELETE FROM `guest` WHERE time <= '".$glimit."'") or die(mysql_error());
###IP Log the user; include the part of the site s/he's using. Any file that includes functions.php (Every file should) will use this.###
mysql_query("INSERT INTO `logs_ip` (`ip`, `site`, `date`) VALUES ('".$_SERVER['REMOTE_ADDR']."', '".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']."', '".date("F d, Y")."')");
if(isset($_SESSION['uid']))
{
mysql_query("UPDATE `users` SET `active` = '1', `last_action` = '".time()."' WHERE `id` = '".$_SESSION['uid']."'") or die(mysql_error());
}
if(isset($_SESSION['groupid']))
{
if($_SESSION['groupid'] == 1)
{
$query = mysql_query("SELECT * FROM `guest` WHERE ip='".$_SERVER['REMOTE_ADDR']."'") or die(mysql_error());
if(mysql_num_rows($query) == 0)
{
mysql_query("INSERT INTO `guest` (`ip`, `time`) VALUES ('".$_SERVER['REMOTE_ADDR']."', '".time()."')") or die(mysql_error());
}
else
{
mysql_query("UPDATE `guest` SET time='".time()."' WHERE ip='".$_SERVER['REMOTE_ADDR']."'") or die(mysql_error());
}
}
}
###Get the number of rows there are in the guest table.###
function getOnlineGuests()
{
$query = mysql_query("SELECT * FROM `guest`") or die(mysql_error());
return mysql_num_rows($query);
}
###Fetch the number of people who are active.###
function getOnline()
{
$a = mysql_query("SELECT * FROM `users` WHERE `active`=1 ORDER BY username ASC") or die(mysql_error());
$b = mysql_num_rows($a);
return $b;
}
###Fetch an array of the users who are online.###
function getOnlineArray()
{
$script = mysql_query("SELECT * FROM `users` WHERE `active`=0 ORDER BY username ASC") or die(mysql_error());
$execute = mysql_fetch_array($script);
return $execute;
}
###Get a user with the id of $uid's custom text.###
function getCustomText($uid)
{
$sql = "SELECT * FROM `users` WHERE `id`='".$uid."'";
$execute = mysql_query($sql) or die (mysql_error());
$fetch = mysql_fetch_array($execute);
return $fetch['customtext'];
}
###Fetch the post count.###
function getPostcount($uid)
{
$sql = "SELECT * FROM `posts` WHERE `posterid`='".$uid."'";
$query = mysql_query($sql) or die (mysql_error());
return mysql_num_rows($query);
}
###Fetch the location.###
function getLocation($uid)
{
$sql = "SELECT * FROM `users` WHERE `id`='".$uid."'";
$execute = mysql_query($sql) or die (mysql_error());
$fetch = mysql_fetch_array($execute);
$location = ($fetch['location'] == "") ? "" : $fetch['location'];
return $location;
}
###Fetch the dat of registration.###
function getRegDate($uid)
{
$sql = "SELECT * FROM `users` WHERE `id`='".$uid."'";
$execute = mysql_query($sql) or die (mysql_error());
$fetch = mysql_fetch_array($execute);
return $fetch['regdate'];
}
###Fetch the signature.###
function getSignature($uid)
{
$sql = "SELECT * FROM `users` WHERE `id`='".$uid."'";
$execute = mysql_query($sql) or die (mysql_error());
$fetch = mysql_fetch_array($execute);
return $fetch['signature'];
}
###Parse any BBCode in $message.###
function parseBBCode($message)
{
$getcustom = "SELECT * FROM `custom_bbcode`";
$getquery = mysql_query($getcustom) or die(mysql_error());
$message = wordwrap($message, 160, "<br />", true);
#####Let's use Perl instead of str_replace. Using str_replace will cause errors. However, feel free to switch to str_replace.#####
$message = preg_replace('|\[b\](.+?)\[\/b\]|i', '<b>$1</b>', $message);
$message = preg_replace('|\[i\](.+?)\[\/i\]|i', '<i>$1</i>', $message);
$message = preg_replace('|\[u\](.+?)\[\/u\]|i', '<u>$1</u>', $message);
$message = preg_replace('|\[img\](.+?)\[\/img\]|i', '<img src="$1" border="0" alt="">', $message);
$message = preg_replace('|\[url="(.+?)"\](.+?)\[\/url\]|i', '<a href="$1" target="_blank">$2</a>', $message);
$message = preg_replace('|\[color=(.+?[^;])\](.+?)\[\/color\]|i', '<font color="$1">$2</font>', $message);
$message = preg_replace('|\[size=(.+?[^;])\](.+?)\[\/size\]|i', '<font size="$1">$2</font>', $message);
$message = preg_replace('|\[center\](.+?)\[\/center\]|i', '<center>$1</center>', $message);
$message = preg_replace('|\<<<@!1!@>>>"), array("<div style=\"border:1px solid #FFF; overflow:auto; width:500px; font-style:italic;\"><font size=\"5\" color=\"#FFF\" style=\"border-bottom:1px solid #FFF; font-style:normal;\">Quote: ", "</font>", "</div>"), $message);
$message = str_ireplace(array("[code]", "[/code]"), array("<div style=\"border:1px solid #FFF; overflow:auto; width:500px; color:green;\"><font size=\"5\" color=\"#FFF\" style=\"border-bottom:1px solid #FFF;\">Code:</font>", "</div>"), $message);
$message = str_ireplace(array("<<<@!2!@>>>"), array("<div style=\"border:1px solid #FFF; overflow:auto; width:500px; font-style:italic;\"><font size=\"5\" color=\"#FFF\" style=\"border-bottom:1px solid #FFF; font-style:normal;\">Quote:</font>", "</div>"), $message);
*/
while($custom = mysql_fetch_array($getquery))
{
$message = preg_replace('|\['.$custom['tag'].'\](.+?)\[\/'.$custom['tag'].'\]|i', $custom['replacement'], $message);
}
return $message;
}
###Parse a message; break lines, strip tags, etc.###
function parseMessage($message)
{
return parseBBCode(nl2br(strip_tags(stripslashes($message))));
}
###Check if the user is online.###
function isOnline($uid)
{
$a = mysql_query("SELECT * FROM `users` WHERE `id`='".$uid."'") or die(mysql_error());
$b = mysql_fetch_array($a);
if($b['active'] == '1'){
$check = "<font color=\"green\">Online</font>";
}else{
$check = "<font color=\"red\">Offline</font>";
}
return $check;
}
###Get the MemberGroup of the user.###
function getMemGroup($uid)
{
$sql = "SELECT * FROM `users` WHERE id='".$uid."'";
$query = mysql_query($sql) or die("Could not retrieve the member group.");
$fetch = mysql_fetch_array($query);
$fetchscript = "SELECT * FROM `member_groups` WHERE id='".$fetch['memgroupid']."'";
$fetchquery = mysql_query($fetchscript) or die(mysql_error());
$fetchgroup = mysql_fetch_array($fetchquery);
$starttag = $fetchgroup['start_tag'];
$endtag = $fetchgroup['end_tag'];
return "".$starttag."".$fetchgroup['name']."".$endtag."";
}
###Get the MemberGroup of the user, but don't add the HTML tags. We could have merged this function, but we were too lazy. :P###
function getMemGroupNoC($uid)
{
$sql = "SELECT * FROM `users` WHERE id='".$uid."'";
$query = mysql_query($sql) or die("Could not retrieve the member group.");
$fetch = mysql_fetch_array($query);
$fetchscript = "SELECT * FROM `member_groups` WHERE id='".$fetch['memgroupid']."'";
$fetchquery = mysql_query($fetchscript) or die(mysql_error());
$fetchgroup = mysql_fetch_array($fetchquery);
$starttag = $fetchgroup['start_tag'];
$endtag = $fetchgroup['end_tag'];
return $fetchgroup['name'];
}
###Get the membergroup id of the user.###
function getMemGroupId($uid)
{
$sql = "SELECT * FROM `users` WHERE id='".$uid."'";
$query = mysql_query($sql) or die("Could not retrieve the member group.");
$fetch = mysql_fetch_array($query);
return $fetch['memgroupid'];
}
###Get the HTML start tag(s) of the user.###
function getMemGroupStartTag($uid)
{
$sql = "SELECT * FROM `users` WHERE id='".$uid."'";
$query = mysql_query($sql) or die("Could not retrieve the member group.");
$fetch = mysql_fetch_array($query);
$fetchscript = "SELECT * FROM `member_groups` WHERE id='".$fetch['memgroupid']."'";
$fetchquery = mysql_query($fetchscript) or die(mysql_error());
$fetchgroup = mysql_fetch_array($fetchquery);
$starttag = $fetchgroup['start_tag'];
return $starttag;
}
###Same, but we get the HTML end tags.###
function getMemGroupEndTag($uid)
{
$sql = "SELECT * FROM `users` WHERE id='".$uid."'";
$query = mysql_query($sql) or die("Could not retrieve the member group.");
$fetch = mysql_fetch_array($query);
$fetchscript = "SELECT * FROM `member_groups` WHERE id='".$fetch['memgroupid']."'";
$fetchquery = mysql_query($fetchscript) or die(mysql_error());
$fetchgroup = mysql_fetch_array($fetchquery);
$endtag = $fetchgroup['end_tag'];
return $endtag;
}
###Here, we fetch the color, not to be confused with the HTML tags.###
function getMemGroupColor($mid)
{
$sql = "SELECT * FROM `member_groups` WHERE id='".$mid."'";
$query = mysql_query($sql) or die(mysql_error());
$fetch = mysql_fetch_array($query);
$color = $fetch['color'];
return $color;
}
###Get the username with $uid; are we linking the name to the profile?###
function getName($uid, $linked = FALSE)
{
$sql = "SELECT username from `users` WHERE `id`='".$uid."'";
$query = mysql_query($sql) or die (mysql_error());
if(mysql_num_rows($query) == 0)
{
return "Invalid User";
}
else
{
$get = mysql_fetch_array($query);
if(!$linked)
{
return $get['username'];
}
else
{
return "<a href=\"profile.php?id=".$uid."\" style=\"color: ".getMemGroupColor(getMemGroupId($uid)).";\">" . $get['username'] . "</a>";
}
}
}
###Same as above, but we dont add the color of the membergroup to the link.###
function getLinkNameNoCol($uid, $col="black")
{
$sql = "SELECT username from `users` WHERE `id`='".$uid."'";
$query = mysql_query($sql) or die (mysql_error());
if(mysql_num_rows($query) == 0)
{
return "Invalid User";
}
else
{
$get = mysql_fetch_array($query);
return "<a href=\"profile.php?id=".$uid."\" style=\"color:".$col.";\">" . $get['username'] . "</a>";
}
}
###Is the thread with an ID of $thread read?###
function isReadThread($thread)
{
#Get Thread Info.#
$query = mysql_query("SELECT * FROM `threads` WHERE id='".$thread."'") or die(mysql_error());
$info = mysql_fetch_array($query);
$time = $info['exacttime'];
if(!isset($_SESSION['topic'.$thread]))
{
$read = false;
}
else
{
if($_SESSION['topic'.$thread] < $time)
{
$read = false;
}
else
{
$read = true;
}
}
return $read;
}
?>
data/mysqlfunc.php
PHP Code:
<?php
/**
* MySQL Functions
*/
#These functions are not implemented yet, they are here just because I want something to do. :P#
class MySQLFunc
{
public function protect($var, $stripslashes=true)
{
if($stripslashes == true)
return mysql_real_escape_string(stripslashes($var));
else
return mysql_real_escape_string($var);
}
public function testConnection($conn)
{
if(!$conn)
return false;
else
return true;
}
public function fetchRows($tablename, $args="")
{
if($args != "")
$script = "SELECT * FROM `".$tablename."` ".$args."";
else
$script = "SELECT * FROM `".$tablename."`";
$query = @mysql_query($script);
if(!$query)
return "Error fetching table rows";
else
{
$array = mysql_fetch_array($query);
return $array;
}
}
}
?>
data/fatal.php
PHP Code:
<?php
if(isset($email))
{
if($email != "")
mail($email, "A Database Error Has Occurred!", "Hello!<br />Today, your forum has experienced database errors. This may be caused by an incorrectly installed modification, or a change to you MySQL settings. Please check to make sure that all files are working properly, and that your database does not have missing or corrupt tables.");
}
else
{
die("Hacking attempt has been detected!");
}?>
<title>Database Error</title>
<!--Database Error Script-->
<style type="text/css">
body {
background:#FFF;
font-size:8pt;
font-family:Tahoma;
}
</style>
A database error has occured, and the staff of this forum have been notified.<br />
This error may be temporary! Refresh the page, and see if the page loads.<br />
If not, try going to the homepage of the forum.<br />
If the page still does not load, your requested forum may be offline, or may be experiencing database troubles!<br />
Check back later!
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Not good. I had a feeling you coded it this way.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Well, for one, you used way too many queries. The structure makes no sense, and there isn't much room for additions.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Wayne...you messed it up.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Quote:
Originally Posted by
Murawd
Well, for one, you used way too many queries. The structure makes no sense, and there isn't much room for additions.
This is just a Pre-Alpha Release. It's not supposed to be too much
Quote:
Originally Posted by
xSilv3rbullet
Wayne...you messed it up.
Just shut up.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Quote:
Originally Posted by
SimpleBB
This is just a Pre-Alpha Release. It's not supposed to be too much
Just shut up.
It doesn't matter. This isn't very extensible.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Quote:
Originally Posted by
Murawd
It doesn't matter. This isn't very extensible.
Let's take this to VM.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Can has cookie?
style/poseidonBB/usercp.php (apparently he didn't finish it, cuz it's crap. T_T)
PHP Code:
<?php
/**
* User Control Panel
*/
if(isset($_SESSION['uid']))
{
$sql = "SELECT * FROM `users` WHERE `id`='".$_SESSION['uid']."'";
$res = mysql_query($sql) or die (mysql_error());
$row = mysql_fetch_array($res);
$profile_ops = array('Edit Your Details' => 'edit_detail', 'Change Your Account Details' => 'acc_detail');
$comm_ops = array('Friends and Contacts' => 'friends_contacts', 'Ignored Users' => 'ignore_users');
$pm_ops = array('Send New' => 'pm_send', 'Inbox' => 'pm_inbox', 'Sent' => 'pm_sent');
$proc = 1;
$count = count($profile_ops);
$comm_count = count($comm_ops);
$pm_count = count($pm_ops);
if(isset($_GET['do'])) {
$do = $_GET['do'];
} else {
$do = "";
}
echo "<center>";
echo "<div id=\"container\">";
echo "<div id=\"userinfo\">";
echo "<table border=\"0\" width=\"100%\">";
echo "<tr align=\"right\"><td>Welcome, <a href=\"".$rootdir."profile.php?id=".$row['id']."\">".$row['username']."</a>! <a href=\"".$rootdir."logout.php\">Logout</a></td></tr>";
echo "</table>";
echo "</div>";
echo "<table border=\"0\" width=\"100%\" cellspacing=\"3\" cellpadding=\"3\">";
echo "<tr><td align=\"left\" width=\"22%\">";
echo "<div id=\"notice\" style=\"width:95%; border:1px solid #000;\">UCP Options</div>";
echo "<div id=\"content\" style=\"width:95%; border:1px solid #000; margin-top:0px;\">";
echo "<a href=\"".$rootdir."ucp.php\">«UCP Home»</a><br><br>";
echo "<b>Profile Options</b><br>";
foreach($profile_ops AS $name => $link)
{
$break = ($proc == $count) ? "" : " <br> ";
echo "<a href=\"".$rootdir."ucp.php?do=".$link."\">".$name."</a>" . $break . "\n";
$proc++;
}
echo "<br><b>Community</b><br>";
foreach($comm_ops AS $name => $link)
{
$break = ($proc == $comm_count) ? "" : " <br> ";
echo "<a href=\"".$rootdir."ucp.php?do=".$link."\">".$name."</a>" . $break . "\n";
$proc++;
}
echo "<b>Private Messaging</b><br>";
foreach($pm_ops AS $name => $link)
{
$break = ($proc == $pm_count) ? "" : " <br> ";
echo "<a href=\"".$rootdir."ucp.php?do=".$link."\">".$name."</a>" . $break . "\n";
$proc++;
}
echo "</div>";
echo "</div>";
echo "</td><td colspan=\"2\" valign=\"top\" align=\"left\">";
echo "<div id=\"content\">";
switch($do)
{
case NULL:
echo "<title>User Control Panel</title>";
echo "Welcome to the User Control Panel, ".$_SESSION['name']."!<br>
Here, you will find many useful tools to tweak and edit your profile to create the ultimate look!<br><br>
<i>Profile Options - Change your email, include your website, your location, anything! Keep in mind that all of this is displayed publicly.</i><br><br>
<i>Community - Access friends, contacts, or anything related to the community here!</i><br><br>
<i>Private Messaging - You can use private messaging to send someone a message without it being publicly displayed on the user's profile.</i>";
break;
case "edit_detail":
$image = (file_exists("avatars/".$get['posterid'].".gif")) ? "<img src=\"avatars/".$_SESSION['uid'].".gif\" title=\"Your Avatar\" border=\"1\">" : "No Avatar";
echo "<title>User Control Panel - Edit Details</title>";
echo "<fieldset>
<legend>Avatar</legend>
<center>
".$image."<br />
</center>
<form method=\"post\" action=\"\">
<table border=\"0\" cellspacing=\"1\" width=\"100%\">
<tr>
<td>
<input type=\"file\" name=\"avatar\">
</td>
</tr>
</table>
</form>
</fieldset>";
break;
case "acc_detail":
echo "<title>User Control Panel - Edit Account Details</title>";
if(!isset($_POST['updatepass']))
{
echo "<fieldset>
<legend>Change Password</legend>
<form method=\"post\" action=\"\">
<table border=\"0\" cellspacing=\"1\" width=\"100%\">
<tr>
<td>
<fieldset>
<legend>Please enter your current password to continue</legend>
<input type=\"password\" name=\"password\">
</fieldset>
</td>
</tr>
<tr>
<td>
New Password
<input type=\"password\" name=\"newp\">
</td>
</tr>
<tr>
<td>
Confirm New Password
<input type=\"password\" name=\"cnewp\">
</td>
</tr>
<tr>
<td>
New Email Address
<input type=\"text\" name=\"newemail\">
</td>
</tr>
<tr>
<td>
<input type=\"submit\" name=\"updatepass\" value=\"Update Details\">
</td>
</tr>
</table>
</form>
</fieldset>";
}
else
{
$old = mysql_real_escape_string(stripslashes($_POST['password']));
$new = mysql_real_escape_string(stripslashes($_POST['newp']));
$confirm = mysql_real_escape_string(stripslashes($_POST['$cnewp']));
$email = mysql_real_escape_string(stripslashes($_POST['newemail']));
$sql = "SELECT * FROM `users` WHERE id='".$_SESSION['uid']."'";
$query = mysql_query($sql) or die(mysql_error());
$fetch = mysql_fetch_array($query);
$md5pass = md5($old);
$md5newpass = md5($new);
if($md5pass == $fetch['password'])
{
if($new == $confirm)
{
mysql_query("UPDATE `users` SET password='".$md5newpass."' WHERE id='".$_SESSION['uid']."'") or die(mysql_error());
}
else
{
echo "Passwords do not match!";
}
if($email != "")
{
mysql_query("UPDATE `users` SET email='".$email."' WHERE id='".$_SESSION['uid']."'") or die(mysql_error());
}
else
{
echo "Please provide an email!";
}
}
else
{
echo "Incorrect password provided!";
}
}
break;
case "pm_send":
$userid = mysql_real_escape_string(stripslashes($_GET['uid']));
#$script = "INSERT INTO";
break;
}
echo "</div>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</center><br>";
}
else
{
include('notice.php');
}
?>
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
You should learn to separate the html from the PHP. This is where procedural becomes a pain.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Well then, thank you for your opinion, I'll try to change it around.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
lol, can I has the latest build?
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
I am sorry, but that is THEE ugliest theme I have ever seen. Do you honestly need someone to explain to you why it's horrible? Good job on making a forum software, but the theme is just.. just sucks. Sorry dude.
Instead of using just HTML, try looking into making actual forum themes. Look at RaGEZONE, you see how the whole thing flows? Well, your's is just blue, grey, and text.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
It looks alright but the skin there just put me off straight away.
-
Re: [PHP]SimpleBB - The New Bulletin Board! (And the new poseidonBB :D)
Are you kidding me? You don't code it to suit Internet Explorer. That's the most retarded thing you can do. It's not Firefox's fault the borders are not aligned, it's your fault for very poor coding.
You should code your layouts to work in Firefox, that pretty much guarantees it to work with other standards compliant browsers like Chrome, Opera, Safari etc etc. Once that's done, hack it for [s]shit[/s], I mean Internet Explorer.
Also your PHP code has absolutely no structure whatsoever, you've caused it to be almost impossible to improve on it/make it extensible. Also you are running too much innefficient crap. Learn to optimise code, don't just use OOP for MySQL, use it everywhere where neccessary. Keep everything organised, optimal and nice looking. I would hate to be writing plugins for this forum I'll tell you that.
If there's one thing I hate it's flaming other people, however this is just stupid. You should learn good programming techniques and best practices. Have a look at how other forums are structured. Once you have a good understanding, then start to write your own forum. It also wouldn't kill you to learn some decent xHTML/CSS skills too.