Jump to content

PHP IntersectCMS (Open Source)


Lathelmar

Recommended Posts

a4727b61d3221e25d4960d124f383986.png

IntersectCMS - Open Source CMS for ORPG

 

Hi MMO-makers, 

 

I've been around for years now, and firstly, I want to clap the Intersect Team for this beautiful engine. I always loved MMORPG, and especially retro-2D ones (old eclipse user here).

Now that it's open source, i could play around with the sources, which is really satisfying :v

 

Enough random-talking, I'm here to showoff one of my projects that I started some days ago. I know a lot of you wanted a complete CMS to use with their games, so I started one.

I wanted something that everyone could change with minimum knowledge and more importantly, that use Intersect API. So yup, this CMS will work even if you use an sqlite database (and will work too if you migrate to mysql, without any change in the CMS settings). However, part of the CMS uses a MySQL database, so it is necessary to have one for the proper functioning of the site.

 

I have opened a Bitbucket repository that I will update more or less regularly. I foresee some new features (that you can also propose), as well as fixes for the bugs you'll encounter. 

I may also propose custom templates, free or paid (maybe the two options).

 

IntersectCMS uses a number of open source projects to work properly:

 

 

Actual features (C/P from bitbucket ofc) (DB = use MySQL cms DB, API = use Intersect API) :

 

- News (DB)
- Register (API)
- Login (API + DB)
- Ranking (API)
- Account Informations (API + DB)
- Shop (API + DB)
    - Quantity
    - History
    - Categories 
    - Discount
    - Item visibility
- Points system with history (DB)
- Account Points/Credit (currently working with https://dedipass.com/) (DB)
- Server status (API)
- Custom Pages (for game and wiki sections) (DB)
- Basic administration with Rich Text editor (TinyMCE)
    - News (DB)
    - Shop (API + DB)
    - Pages (DB)
    - CMS Settings (DB)
    - CMS Translation (DB)
- Basic Translation system (DB) (currently only EN and FR langs)
- Multi-templates system
    - You can create as many templates as you want without even touch PHP code
    - Basic HTML knowledge is required
    - 'public\themes\[theme name]' directory contains themes assets, 'public\general' contains base assets used by all themes (like objects images), and 'application\templates\[theme name]'' contains twig views

 

How to install (C/P from bitbucket ofc) :

 

Spoiler

 

IntersectCMS requirements :

- Web server with URL rewriting + CURL
- PHP 7.2 or newer

 

Link to a more complete step by step install guide with Xampp

 

Installation step by step :

- Download the repository
- Upload the folder on your web server directory
- Point your virtual host document root to the CMS `public/` directory. (Virtual host is the mandatory way to access to your project. If you try to access directly from the container folder you will encounter an error) (Moar simple: search google "point virtual host apache")
- Ensure `cache/` (if the directory is not created, do it manually) and `logs/` are web writable.
- Create a database for the CMS
- Execute the SQL patch `cms_database.sql` to the freshly created DB
- Edit `[CMS Dir]\application\App\Preferences.php` and replace `$db...` values by yours (Ip, User, Password, Port (should be 3306 in most cases) and Name)
- Finally, edit the `cms_settings` table in the database with your API infos and your website URL (you will be able to customize the others settings in the administration panel)

 

 

 

How to customize payement system :

 

Spoiler

 

Now you just have to edit database settings values (from DB or web administration panel) !

 

Dedipass module creation :

Create a dedipass account (https://dedipass.com/)

Login to your dedipass account, and go to the Services tab

Add a service

Choose Virtual Currency (as it's not an unique product but shop points)

Customise the informations as you like

For the installation URL, put « [CMS Link]/user/credits » (for example, for my local website, it points to « http://intersectcms.localhost/user/credits »

For the paiement tab, choose Redirection, and use the same URL as the installation one (so for me it is « http://intersectcms.localhost/user/credits » too)

Customize all the payements methods as you like (you can even choose Paypal, or share the income with a friend)

Customize the payement box design
 

Script customization :

After all your module creation, you'll get 3 codes, the first and the last are the ones that you'll need

Open the CMS file « [IntersectCMS]\application\templates\Britania\credits.twig »

Copy the « data-dedipass » value from Dedipass website and replace the one from the template (it should actually be « 20296759398029235b6178f31f75e55c »)

Open the CMS file « [IntersectCMS]\application\App\Controllers\UserController.php »

Search for the « public function buyPoints(Request $request, Response $response, array $args = []): Response » line (line 254~)

On Dedipass website, copy the « $dedipass = file_get_contents('http://api.dedipass.com/v1/pay/?public_key=xxx&private_key=xxx&code=' . $code); »

Replace the same line in the UserController.php by the one from Dedipass (line 278~)

 

 

 

Actual screenshots (cuz you want some uh? but C/P from bitbucket too ofc) :

 

Spoiler

 

398f4e6c8930c27be111eb3918d2cafc.png

 

e225666822792b4bac9c04fbe585464e.png

 

ee1cdd06bec1f1e1ad8cc776aaeb489f.png

 

76bb6c2f179aff666a0e4eef4d65d344.png

 

 

 

Your mods (always better when it's customized) :

 

Spoiler

 

 

What's coming next (in case you didn't reed my short intro) :

 

  • Some features update, like more payements gateaway
  • Bugfixes/Code cleaning
  • Optimizations
  • New templates (free, or paid)

 

 

How to download (that's the point of this topic nah?) :

You can find everything on my Bitbucket repository :
https://bitbucket.org/ramlethalss/intersectcms/src/master/

I know the installation is a little technical, but hey, we have google and damn, this help a lot.

Moreover, it may have some bugs, but I'm here to correct them !

 

Thank you for reading this topic, and again, thanks Intersect Team ;)

Have fun making MMOs !

Link to comment
Share on other sites

1 hour ago, Xiphoid said:

Good work ! Thanks for share !

My pleasure !

 

31 minutes ago, Vhaeriel said:

Thank you a lot, i'll check that and share template if i've times ! :)

Nice, it could be awesome if the community start sharing templates !

Link to comment
Share on other sites

11 minutes ago, jcsnider said:

Oh. Wow.....  This is gonna be popular for sure :D

Eheh; I hope so !

 

2 minutes ago, buu said:

It’s crazy to share something like this for free, thanks a lot

Glad to hear it ! Tbh, I wanted to contribute in my own way, maybe all my others templates will not be this free :)

Link to comment
Share on other sites

Mmh..

I don't know if it's the cms, the api, or my server but

Many times, when i actualise the page, it's said "Server offline", i just actualise again, and say online, etc etc..

:35_thinking:

It is possible the api think we try to flood the access ?

Link to comment
Share on other sites

16 minutes ago, Shenmue said:

Thanks mate :89_clap:

 

6 minutes ago, Kibbelz said:

This is really cool! Thank you for sharing!

You're welcome guys! 

9 minutes ago, Vhaeriel said:

Mmh..

I don't know if it's the cms, the api, or my server but

Many times, when i actualise the page, it's said "Server offline", i just actualise again, and say online, etc etc..

:35_thinking:

It is possible the api think we try to flood the access ?

As you said, there is some limitations on the API, surely for security purpose. I have tweaked a bit the api.config.json file, and no more problems. But the solution is not to turn off the protection (as I did for testing). Maybe try to see with the Whitelist fields to allow « flood » for specific IP ?

Link to comment
Share on other sites

Just now, Lathelmar said:

 

You're welcome guys! 

As you said, there is some limitations on the API, surely for security purpose. I have tweaked a bit the api.config.json file, and no more problems. But the solution is not to turn off the protection (as I did for testing). Maybe try to see with the Whitelist fields to allow « flood » for specific IP ?

 

Yes, i've up some limition and now run without problem.

 

I've some questions :

 

For the shop, we need to go manually on ur database for get the Item ID ?

For the image, actually the path is /assets/general/gamedata/items/

But the folder does not exist, do we have to create it, and manually upload all the items we want in store?

 

Ty !

Link to comment
Share on other sites

1 minute ago, Vhaeriel said:

 

Yes, i've up some limition and now run without problem.

 

I've some questions :

 

For the shop, we need to go manually on ur database for get the Item ID ?

For the image, actually the path is /assets/general/gamedata/items/

But the folder does not exist, do we have to create it, and manually upload all the items we want in store?

 

Ty !

If you right click an item in your item editor it will copy the ID !

And you're right, the folder hasn't been uploaded to bitbucket, maybe because it was empty... Yep, create it, and copy/paste all your items image files from your game client to the "gamedata/items" folder, the CMS will display automatically the right image thanks to Intersect API.

Link to comment
Share on other sites

Hello :)

 

Can you explain how to change de shop ?

Actually the service is connected to you (I guess) from dedipass.

 

How can i setup my service ?

What is the redirect url to check if the payment is good or not?

Link to comment
Share on other sites

Hi!

 

Actually, I totally forgot about this part hahaha ! My bad !

I'll update the bitbucket repo a bit later (probably today) for easier customisation from the administration, where you will be able to enter Dedipass data (and to not have to edit files)

 

For now, here a little tutorial (i'll add it to the topic too) :

 

Dedipass module creation :

  1. Create a dedipass account (https://dedipass.com/)
  2. Login to your dedipass account, and go to the Services tab
  3. Add a service
  4. Choose Virtual Currency (as it's not an unique product but shop points)
  5. Customise the informations as you like
    1. For the installation URL, put « [CMS Link]/user/credits » (for example, for my local website, it points to « http://intersectcms.localhost/user/credits »
    2. For the paiement tab, choose Redirection, and use the same URL as the installation one (so for me it is « http://intersectcms.localhost/user/credits » too)
  6. Customize all the payements methods as you like (you can even choose Paypal, or share the income with a friend)
  7. Customize the payement box design

Script customization :

  1. After all your module creation, you'll get 3 codes, the first and the last are the ones that you'll need
  2. Open the CMS file « [IntersectCMS]\application\templates\Britania\credits.twig »
    1. Copy the « data-dedipass » value from Dedipass website and replace the one from the template (it should actually be « 20296759398029235b6178f31f75e55c »)
  3. Open the CMS file « [IntersectCMS]\application\App\Controllers\UserController.php »
    1. Search for the « public function buyPoints(Request $request, Response $response, array $args = []): Response » line (line 254~)
    2. On Dedipass website, copy the « $dedipass = file_get_contents('http://api.dedipass.com/v1/pay/?public_key=xxx&private_key=xxx&code=' . $code); »
    3. Replace the same line in the UserController.php by the one from Dedipass (line 278~)
Link to comment
Share on other sites

1 minute ago, Lathelmar said:

Hi!

 

Actually, I totally forgot about this part hahaha ! My bad !

I'll update the bitbucket repo a bit later (probably today) for easier customisation from the administration, where you will be able to enter Dedipass data (and to not have to edit files)

 

For now, here a little tutorial (i'll add it to the topic too) :

 

Dedipass module creation :

  1. Create a dedipass account (https://dedipass.com/)
  2. Login to your dedipass account, and go to the Services tab
  3. Add a service
  4. Choose Virtual Currency (as it's not an unique product but shop points)
  5. Customise the informations as you like
    1. For the installation URL, put « [CMS Link]/user/credits » (for example, for my local website, it points to « http://intersectcms.localhost/user/credits »
    2. For the paiement tab, choose Redirection, and use the same URL as the installation one (so for me it is « http://intersectcms.localhost/user/credits » too)
  6. Customize all the payements methods as you like (you can even choose Paypal, or share the income with a friend)
  7. Customize the payement box design

Script customization :

  1. After all your module creation, you'll get 3 codes, the first and the last are the ones that you'll need
  2. Open the CMS file « [IntersectCMS]\application\templates\Britania\credits.twig »
    1. Copy the « data-dedipass » value from Dedipass website and replace the one from the template (it should actually be « 20296759398029235b6178f31f75e55c »)
  3. Open the CMS file « [IntersectCMS]\application\App\Controllers\UserController.php »
    1. Search for the « public function buyPoints(Request $request, Response $response, array $args = []): Response » line (line 254~)
    2. On Dedipass website, copy the « $dedipass = file_get_contents('http://api.dedipass.com/v1/pay/?public_key=xxx&private_key=xxx&code=' . $code); »
    3. Replace the same line in the UserController.php by the one from Dedipass (line 278~)

 

 

Yes ! I found it before you post ahah :P

 

Had you any plan for integrate other solution ? Like Starpass, Mobiyo, Paypal ?

With little search, i found dedipass look like a scam for vendor :/ !

 

I don't know if it's a bug or not, but :

When you change the game name on the administration, the game name in <title></title> don't change, you need to change the value on the cms_lang on database !

 

I'll post soon a list with idea and some feature i think can be interest ppl :)

 

Actually a screen with little modification :

Spoiler

39f5c4b0393c2e17a76781fc9c542317.png

 

 

Link to comment
Share on other sites

9 minutes ago, Vhaeriel said:

 

 

Yes ! I found it before you post ahah :P

 

Had you any plan for integrate other solution ? Like Starpass, Mobiyo, Paypal ?

With little search, i found dedipass look like a scam for vendor :/ !

 

I don't know if it's a bug or not, but :

When you change the game name on the administration, the game name in <title></title> don't change, you need to change the value on the cms_lang on database !

 

I'll post soon a list with idea and some feature i think can be interest ppl :)

 

Actually a screen with little modification :

  Hide contents

39f5c4b0393c2e17a76781fc9c542317.png

 

 

Well, I've used Dedipass some years ago for some game servers, no problem for me, fast reversements, nice rate for every services (I could provide you some screenshots as my accounts have history from 2018) !

But I know how it is, I provided Dedipass first because I've known the service for some years now, but ofc I will provide other payements gateway ! Surely Starpass first, maybe Mobiyo next, and if I have time maybe Paypal directly too.

 

Yep, there's some « bugs » like this, as I've added the translation system before the settings one (dumb, uh ?), so I'll need to clean some things like this eheh.

And yes, don't hesitate to ask features, all may not be added, but I'll see what I can do !

 

Btw, really happy to see that you have already appropriate yourself the CMS template, looks great !

Oh, I'll add a "Your mods" on the topic to show mods !

Link to comment
Share on other sites

Ok so !

It's a list of some idea i've !

 

Most of these ideas, I can do them myself, but I still prefer to post them for others who do not have knowledge in web development.

 

Administration

- Manage "tech" player (Exp, Vital, Sprite, Class, Position etc..)

- Manage "account" player (Password, Username, email.. banned or not

- Manage player variable

- Manage common variable

- Manager server (restart, makepublic/makeadmin)

- Send announcement to the server

- Manage translation (cms_lang)

- Possiblity to easily change the shop system for owner (Dedipass, starpass etc..)

 

Shop

- Promotion system (like 15% etc..)

- Activate/Desactive item (just a simple db change with 1/0 system)

 

Translation (Issue)

Missing french translation of :

- No user with name ' '.

- Invalid credentials

- Title "Error"

 

Settings

- Change "type=text" of "name="api_password"" to "type="password""

- Maintenance page (only admin can see the site and connect to server)

 

News :

- Comment for news

- Manage comment news for admin/mod

- Like system (news/comment)

- Categorie

- Planify news

- 2 Image for news (One for the header on the news, one to display on the index)

 

 

Market system :

- See picture

Spoiler

dfa949d61c85e61032c65a3962bec9db.png

 

 

Link to comment
Share on other sites

Little update live on Bitbucket for now, I've added some of your requests @Vhaeriel !

 

  • Fixed Dedipass, you will now be able to customize the module easily from the administration panel
  • Added online translation for curent language, so you should be able to edit CMS text strings from the web administration panel
  • Added discount system and visibility system for items in the shop
  • API password field is now from the type password in the administration panel

 

c82cd5a03775ad850d26aab23a30f5e3.png

 

9c27095fff67987b5953775f39fbdd20.png

 

For your other requests I think I'll add most of them with updates little by little.

But I have some doubts about the Market system. This way of proceeding is quite unbalanced since it generates a new item, so the items with randomized stats are useless. But with some API tweaking, it should be possible !

 

 

Link to comment
Share on other sites

This is super cool!  Any chance for a tutorial working with Xampp or anything like that to set this up?  I'm not too familiar with this kind of stuff and I'm having issues not really understanding what I need to do with the instructions.  But that's just on me.

Link to comment
Share on other sites

13 minutes ago, Superspyi said:

This is super cool!  Any chance for a tutorial working with Xampp or anything like that to set this up?  I'm not too familiar with this kind of stuff and I'm having issues not really understanding what I need to do with the instructions.  But that's just on me.

 

Thanks !

 

To summarize the installation :

  1. Download Xampp
  2. Start Xampp, and start Apache/Mysql
  3. Download the repository (https://bitbucket.org/ramlethalss/intersectcms/downloads/)
  4. Unzip the file content to a folder in htdocs (Xampp\htdocs\IntersectCMS for example)
  5. Open Xampp\apache\conf\extra\httpd-vhosts.conf
  6. Add this :
    1. <VirtualHost *:80>
      DocumentRoot "C:/xampp/htdocs/IntersectCMS/public"
      ServerName IntersectCMS.localhost
      <Directory "C:/xampp/htdocs/IntersectCMS/public">
      </Directory>
      </VirtualHost>
    2. Customize DocumentRoot and Directory to your xampp IntersectCMS public directory
    3. ServerName could be everything you want if your website is local (like MyGame.local or MyMMORPG.localhost...)
  7. Restart Apache
  8. Open C:\Windows\System32\drivers\etc\host file
  9. Add this at the end :
    1. 127.0.0.1      IntersectCMS.localhost
    2. Replace IntersectCMS.localhost by your ServerName
    3. If you can't save the file, close it, copy it on your desk, edit it again, save, and copy it again to your etc folder
  10. On Xampp Control panel, clic on Admin button, on the MySQL line
  11. Create a new database
  12. Execute the cms_database.sql, and then the patch_1.sql
  13. Open the table cms_settings
    1. Edit base_url, api_username, api_password, and api_server to your needs
  14. Open Xampp\htdocs\IntersectCMS\App\Controllers\Preferences.php
    1. Replace the DB settings by yours
  15. Voilà !
Link to comment
Share on other sites

  

6 hours ago, Lathelmar said:

 

Thanks !

 

To summarize the installation :

  1. Download Xampp
  2. Start Xampp, and start Apache/Mysql
  3. Download the repository (https://bitbucket.org/ramlethalss/intersectcms/downloads/)
  4. Unzip the file content to a folder in htdocs (Xampp\htdocs\IntersectCMS for example)
  5. Open Xampp\apache\conf\extra\httpd-vhosts.conf
  6. Add this :
    1. 
      <VirtualHost *:80>
      DocumentRoot "C:/xampp/htdocs/IntersectCMS/public"
      ServerName IntersectCMS.localhost
      <Directory "C:/xampp/htdocs/IntersectCMS/public">
      </Directory>
      </VirtualHost>
    2. Customize DocumentRoot and Directory to your xampp IntersectCMS public directory
    3. ServerName could be everything you want if your website is local (like MyGame.local or MyMMORPG.localhost...)
  7. Restart Apache
  8. Open C:\Windows\System32\drivers\etc\host file
  9. Add this at the end :
    1. 
      127.0.0.1      IntersectCMS.localhost
    2. Replace IntersectCMS.localhost by your ServerName
    3. If you can't save the file, close it, copy it on your desk, edit it again, save, and copy it again to your etc folder
  10. On Xampp Control panel, clic on Admin button, on the MySQL line
  11. Create a new database
  12. Execute the cms_database.sql, and then the patch_1.sql
  13. Open the table cms_settings
    1. Edit base_url, api_username, api_password, and api_server to your needs
  14. Open Xampp\htdocs\IntersectCMS\App\Controllers\Preferences.php
    1. Replace the DB settings by yours
  15. Voilà !

 

After working with it for a bit I finally got it up and running and connected to my server.  Able to login and see server status and everything!  Last thing I need to ask hopefully is the account I'm logging in with does not have Admin access to the web page so I do not have the admin panel.  Is there something I'm supposed to change to get that access?  

 

**EDIT** figured it out didn't realize I just needed to edit the admin ID in the database.  All is working very well!

Link to comment
Share on other sites

On 5/23/2020 at 4:46 PM, Lathelmar said:

 

Thanks !

 

To summarize the installation :

  1. Download Xampp
  2. Start Xampp, and start Apache/Mysql
  3. Download the repository (https://bitbucket.org/ramlethalss/intersectcms/downloads/)
  4. Unzip the file content to a folder in htdocs (Xampp\htdocs\IntersectCMS for example)
  5. Open Xampp\apache\conf\extra\httpd-vhosts.conf
  6. Add this :
    1. 
      <VirtualHost *:80>
      DocumentRoot "C:/xampp/htdocs/IntersectCMS/public"
      ServerName IntersectCMS.localhost
      <Directory "C:/xampp/htdocs/IntersectCMS/public">
      </Directory>
      </VirtualHost>
    2. Customize DocumentRoot and Directory to your xampp IntersectCMS public directory
    3. ServerName could be everything you want if your website is local (like MyGame.local or MyMMORPG.localhost...)
  7. Restart Apache
  8. Open C:\Windows\System32\drivers\etc\host file
  9. Add this at the end :
    1. 
      127.0.0.1      IntersectCMS.localhost
    2. Replace IntersectCMS.localhost by your ServerName
    3. If you can't save the file, close it, copy it on your desk, edit it again, save, and copy it again to your etc folder
  10. On Xampp Control panel, clic on Admin button, on the MySQL line
  11. Create a new database
  12. Execute the cms_database.sql, and then the patch_1.sql
  13. Open the table cms_settings
    1. Edit base_url, api_username, api_password, and api_server to your needs
  14. Open Xampp\htdocs\IntersectCMS\App\Controllers\Preferences.php
    1. Replace the DB settings by yours
  15. Voilà !

can you or someone make a video? will help a lot!

Link to comment
Share on other sites

the bad thing is that this form of payment is only accepted in EUR, and the language keeps changing to French. This makes it kind of bad for players who have been buying something. :(

Link to comment
Share on other sites

On 5/21/2020 at 1:22 PM, Lathelmar said:

If you right click an item in your item editor it will copy the ID !

And you're right, the folder hasn't been uploaded to bitbucket, maybe because it was empty... Yep, create it, and copy/paste all your items image files from your game client to the "gamedata/items" folder, the CMS will display automatically the right image thanks to Intersect API.

Hello Lathelmar!

Thanks for amazing free system!! Thanks so much!

In EN and FR the input text are empty... I needed look on database for discovery what is... 

Could be a troubles for someone...

168bbffcf3add59cef98277ed8f724fc.png

So i sharing a patch for fix it 

 

PATCH LINK:

https://www.ascensiongamedev.com/resources/filehost/f6c4bb6ec263d0828248337de5d2a837.rar

TO INSTALL:

Import the SQL file in your cms db

 

7c021bc34b58531fd6f407663c2b38ff.png

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...