A content management system for SA:MP - Development discussion
#1

Introduction

I've decided to start working on a content management system for SA:MP as a way to further expand my knowledge with PHP. I've thought about this for quite a while now and have a pretty good idea how I want it to turn out.

What I've been thinking of mostly lately is how to integrate user accounts into it. I've decided that it will be integrated within the system, but as a plugin, so that the website can also be used as news page or info site for SA:MP servers. There will also be a user system within the core, for administration.


Features
Some of the features I want to implement is
  • Plugin Support - I've already implemented basic plugin support, but this has to be further advanced to allow support for all kinds of third-party plugins. The user accounts will be implemented as a plugin as said above. This is to make the CMS as customisable as possible, to reach the need of any kind of SA:MP server. It will allow external auth, where you can specify the host, database, user and password to your user database. This means that you can allow users to login with their in-game data.

    A forum will also be implemented into the CMS as a plugin. This means that the forum will be in your actual website instead of in a completely different directory/website.

  • Template support - A default template will be provided, but you can also create your own and implement your own variables and data into it.

  • Multilingual support - I will implement language support where all language strings are stored in a file or database. This will give you the chance to translate the CMS to any language you want. I will need help to translate it into different languages.

  • Dynamic pages - My idea is that all pages will be dynamic. That means you can create pages straight from the administrator section.

  • Dynamic articles - All the news from the front page will be stored dynamically in a database. You will have the ability to add, edit and delete news articles straight from the front page if you are logged in as an administrator.
I've been thinking about how to best go forward with this, and have therefore decided to make it completely open sourced on GitHub undet the GNU General Public License v2. You can read more about the license here http://choosealicense.com/licenses/gpl-2.0/.

The project will be released on GitHub when I have a working basic release available. I'm currently in preliminary development stages.

If anyone is interested in helping out, please hit me up with a PM.


Please post your views and suggestions about this idea.
Reply
#2

Dynamic pages is great, but you should keep in mind generating static copies of them for heavy load handling.

EDIT: Also, I personally hate the GNU license, why not zlib?
Reply
#3

If you wish to create static pages, there will also be support for that. I haven't read up that much on the zlib license, but I will definitely check it out.
Reply
#4

I'm still just in preliminary stages of developing, but have managed to get the most basic elements into the CMS.
As mentioned earlier, static pages has been integrated, as well as dynamic pages. At this point I haven't created any section to moderate the content, but that will come when I've got a more functional version of the CMS.
Reply
#5

Are you using any framework? Like Laravel, Symfony (Silex as well) or ZF?
Reply
#6

I haven't integrated any framework yet, but I was looking over ZF for a while.

I'm still not sure whether to do it or not, as this project is a huge part of a learning process for me. It might sound stupid creating something that already has been made, but it makes it more "my own".

However, I will look further into the code of ZF and take a decision from there.
Reply
#7

In work we use symfony 2, you can use components only as well and I highly recommend it.

If you're still learning php, check out php the right way - making the web a better place
Reply
#8

I know PHP from before, just expanding my knowledge, I guess. Looking into symfony!
Reply
#9

I've thought using a template engine like Smarty or similar options. Any thoughts on whether to create my own or use one of those already created instead?

My thoughts are that if I create one myself I can modify it more to the needs of the CMS.
Reply
#10

Well i should read the topic
Reply
#11

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
There are huge library like YSI...

But sure, you can make one with your own syntax...but you should be very good in Pawn to do this.
I give you an advice, youse Makros and emit.

PHP код:
//example
#define player->SetPos(%0,%1,%2,%3) SetPlayerPos(playerid,%0,%1,%2),SetPlayerFacingAngle(playerid,%3)
//usage
public OnPlayerSpawn(playerid)
{
    
player->SetPos(x,y,z,a);
    return 
1;

Uhm, what are you talking about?
Reply
#12

Quote:
Originally Posted by Knappen
Посмотреть сообщение
Uhm, what are you talking about?
Just delete it...i didn't read the topic
Reply
#13

In the end I decided to implement Smarty for template processing. I hope to have a fully functional basic version released soon. It won't have that many features to start with I guess.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)