SmashCMS [PHP, MySQL, HTML]

Status
Not open for further replies.

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
SmashCMS (Current version: 0.1 ALPHA)

Hey guys, so I started working on a little CMS made from scratch, to learn more about PHP etc. I am not an experienced coder or something like that, and this is my first made-from-scratch web application. I hope you guys can give me some good feedback on the project.

Website: (only the website itself, a project website where you can do whatever you want will come soon)
Project website: coming soon (to enter the admin panel etc.)

Where is it for?
First of all, this CMS is made for a website for a friend of mine, so there are some special features in the CMS that could be usefull, but aren't in any basic CMS.

Some of the functions
This is a list of the current functions in the CMS.
+ = main function
- = sub function

+ Blog system
- Comments
- Report comments
- Advanced report handling [Development]
- Page system
+ Image system
- Upload image to specific page, will show on that page w/ fancybox thumbnail
- Edit images [Development]
+ User management (website admins)
- Add users
- Edit users
- Delete users
- Warn users [Development]/etc.
+ Manage settings (own)
- Edit first name, surname, email, username, etc.
- Private Notepad [Development]
- Change password w/ email confirmation [Development]

Planned functions
+ Logging system: I am already working on coding it into the CMS, however all this codes are in "//" tags, so they will not do anything untill I will go further with this.
+ Setting system: Site name, how many blogs per page, etc. Database already been made, this will be finished soon.
+ Expending report system: Add IP ban, automatic spam check
+ Expending dashboard: Add more functions, like edit images etc.
+ Version checker: Explains itself
+ Improving admin (dashboard) login: the current one works, but its ugly as hell and needs improvement.

Stuff you need to know
I will post code snippits etc, but this will be released when I think it's ready for a release. The template will NOT be included, as it has special been made for this website. Also, the dashboard template the CMS uses, is the one from RevCMS, crafted by .

Also as this is my first project I work on all by myself, and this is a LEARNING project, I am not using functions, and most of the code will be on the page itself. I will start working and learning on how to put everything in functions and make it more tight. Please note, the dashboard login is shit. I know this, however I don't know how to improve this. I will start working on this in further releases.

I hope to get some good feedback from you guys.

Thanks.

- GeenStijl
 

Ghost

Legacy, it's all anyone leaves behind.
Jun 8, 2012
1,640
503
Good Luck with this sounds really good.
 

Khalil

IDK
Dec 6, 2011
1,642
786
Hmmm, sounds pretty cool already, make sure to keep us updated, and make sure to post some screenies and snippets soon.
Good luck.
 

Beast

Posting Freak
Sep 15, 2011
625
163
I'd like to see some code and pics asap to verify this is real how ever good luck.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
If no pictures or code snippets are posted by tomorrow, you'll find this thread closed.
 

Ghost

Legacy, it's all anyone leaves behind.
Jun 8, 2012
1,640
503
If no pictures or code snippets are posted by tomorrow, you'll find this thread closed.
Off-Topic: Lol

On-Topic: is this a theme for rev or separate asking for some one.
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
Already was working on some snippets, however if you click the first link you will see the homepage, and if you go to the page Paintings (could be another one, Photoshop Arts or something) you will see a little function of the image systemen.

However, here is a little quick snippet, I'll search a better one soon. Please note the website also uses JavaScript for things like ckeditor, fancybox and facebox.

PHP:
                <?php   
               
                    $query_grab = mysql_query("SELECT * FROM `blog_reported_comments`");
                   
                    if (mysql_num_rows($query_grab)==0)
                    {
                        echo "Er zijn momenteel geen reportages!";
                    }
                   
                    while($row = mysql_fetch_array($query_grab))
                    {   
                ?>
                <p>
                <font size="3px"><strong>Informatie aangever</strong></font><br>
                <strong>Naam:</strong> <?= $row['reported_by']; ?><br>
                <strong>E-mail:</strong> <?= $row['email']; ?><br>
                <strong>IP:</strong> <?= $row['ip']; ?><br>
                <strong>Aangifte datum:</strong> <?= $row['date']; ?><br>
                <strong>Reactie ID:</strong> <a href="javascript:popUp('view_comment.php?comment_id=<?= $row['comment_id']; ?>')" target="_blank"><?= $row['comment_id']; ?> (Klik om te bekijken)</a><br>
                <br>
                <a href="../blog/admin_comment.php?comment_id=<?= $row['comment_id'] ?>" rel="facebox"><input name="edit" type="submit" class="blue" value="Reactie aanpassen"/></a> <a href="?comment_id=<?php echo $row['comment_id'] ?>&id=<?= $row['id'] ?>"><input name="edit" type="submit" class="red" value="Verwijder reactie"/></a>  <a href="?id=<?= $row['id'] ?>"><input name="delete" type="submit" class="green" onClick='return confirmDelete()' value="Verwijder reportage"/></a><br>
                <br>
                <header></header>
                </p>
                <? } ?>
 
Off-Topic: Lol

On-Topic: is this a theme for rev or separate asking for some one.

This has nothing to do with Habbo or any other game, just a general CMS.
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
This is an english forum... Will this be in english?
I already am turning most of the variables to english, I made the mistake to start everything in Dutch. When the project website will open, also the echo's etc. will be translated into English for you guys.
 

Beast

Posting Freak
Sep 15, 2011
625
163
I already am turning most of the variables to english, I made the mistake to start everything in Dutch. When the project website will open, also the echo's etc. will be translated into English for you guys.

Good, otherwise this cms would be useless for us english speakers! I wish to see some more snippets soon and pics keep us updated and best of luck.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
I already am turning most of the variables to english, I made the mistake to start everything in Dutch. When the project website will open, also the echo's etc. will be translated into English for you guys.
Cool.

Why not add a language changer ;D

Also, I noticed you use '<?= $variable; ?>', I would advise you to use the standard '<?php echo $variable; ?>' because not many web servers support the short hand echo. (<?= $variable; ?>)
 

Khalil

IDK
Dec 6, 2011
1,642
786
I already am turning most of the variables to english, I made the mistake to start everything in Dutch. When the project website will open, also the echo's etc. will be translated into English for you guys.

Why not just code a simple php translator, guest choose witch language he want to surf the website with, it will save more time and effort for you, just a suggestion.
 

Beast

Posting Freak
Sep 15, 2011
625
163
I prefer my cms with 2 languages, English and 's english when he is drunk :p
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
Cool.

Why not add a language changer ;D

Also, I noticed you use '<?= $variable; ?>', I would advise you to use the standard '<?php echo $variable; ?>' because not many web servers support the short hand echo. (<?= $variable; ?>)

Thanks for the feedback, I use <?= because its neather in the code while developing it, I will let it this way untill someone says to me it isnt working, if that will happen I will change everything and do a minor update for that.

Also, yes, in the feature I am planning on adding a language changer. This will also include the option for people to add their own languages and texts. And if there already are any pre-made languages, they can import it into the CMS. However this will not be done any time soon, as I want the main functions finished first, and if I make it English most of the people can use it. This will also require me to learn about .xml to import the languages an easy way.

Also, a little bigger snippet from blog.php so you guys know this is real. This also includes the blog page system.

PHP:
<?php
$query = sprintf(
"SELECTSQL_CALC_FOUND_ROWS 
*
FROM`blog_posts`
ORDER BY`blog_posts`.`post_date` DESC
%s",
(isset($_GET['all_posts']) == false ? "LIMIT " . ($page*10) . ",10" : "")
);
$result = mysql_query($query);
 
$query_count = mysql_query(
"SELECTFOUND_ROWS() AS count"
);
$row_count = mysql_fetch_assoc($query_count);
 
while($row = mysql_fetch_assoc($result))
{
$amount_get = mysql_query("SELECT * FROM blog_comments WHERE blog_id='".$row['id']."'");
$comments = mysql_num_rows($amount_get);
?>
 
<div class="blog_container">
<div class="blog_header"><?= $row['blog_title'] ?></div>
<div class="blog_content"><?= $row['blog_content'] ?></div>
<div class="blog_footer">
<div class="blog_comments"> <a href="blog/view_blog.php?blog_id=<?= $row['id'] ?>">Reacties (<?= $comments ?>)</a> </div>
<div class="blog_posted"> <i> Geplaatst door <strong><?= $row['posted_by'] ?></strong> op <strong><?= $row['post_date'] ?></strong> </i> </div>
</div>
</div>
<?php
}
?>
 
<?php
if(!isset($_GET['all_posts']))
{
if($page == 0)
{
echo "< vorige pagina";
}
elseif($page > 0)
{
?>
<a href="blog.php?page=<?= $page ?>">< vorige pagina</a>
<?php
}
?>
 
&nbsp;<?= $page+1 ?> van <?= ceil($row_count['count']/10) ?>&nbsp;
 
<?php
if($row_count['count'] < (($page+1)*10))
{
echo "volgende pagina >";
}
else
{
?>
<a href="blog.php?page=<?= ($page+2) ?>">volgende pagina ></a>
<?php
}
?>
 
&nbsp;&nbsp;&nbsp;
 
<a href="blog.php?all_posts=true">Toon alle posts</a>
<?php
}
else
{
?>
<a href="blog.php?page=1">Toon posts op basis van pagina's</a>
<?php
}
?>
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
If you go to blog and then click on "Reacties" you'll see a preview of most of the blog system.
However, a screen of the dashboard (design credits go to ):

s5zB9OvmoXa0.png
 
Status
Not open for further replies.

Users who are viewing this thread

Top