Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
23 changes: 20 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ user_guide_src/cilexer/dist/*
user_guide_src/cilexer/pycilexer.egg-info/*

#CI 3
.DS_Store
application/cache/*
!application/cache/index.html
!application/cache/.htaccess

application/logs/*
!application/logs/index.html
!application/logs/.htaccess
#Disabled for easy installation
#/vendor/

#YesilCMS
application/modules/armory/assets/js/viewer.min.js

#Composer
composer.lock

Expand All @@ -28,8 +36,8 @@ composer.lock

#IDE
.idea/*
!.idea/codeStyles
!.idea/runConfigurations
phpstorm.php
/nbproject/

# PHPUnit
/app/phpunit.xml
Expand All @@ -49,4 +57,13 @@ composer.lock
.fuse_hidden*
.directory
.Trash-*
.nfs*
.nfs*

## Sublime Text cache files
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project
/tests/tests/
/tests/results/
109 changes: 98 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,55 @@
![YesilCMS Logo](https://i.imgur.com/Vj0GNLV.png)
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/hKpfev4.png">
<source media="(prefers-color-scheme: light)" srcset="https://i.imgur.com/Vj0GNLV.png">
<img alt="YesilCMS Logo" src="https://i.imgur.com/Vj0GNLV.png">
</picture>

# YesilCMS &middot; [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/yesilmen-vm/YesilCMS/pulls) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/yesilmen-vm/YesilCMS/blob/master/LICENSE)

**YesilCMS** is based on [BlizzCMS](https://github.com/WoW-CMS/BlizzCMS) and specifically adapted for [VMaNGOS Core](https://github.com/vmangos/core) and includes new features and many bug fixes.

You can check out the demo on through here; [YesilCMS Demo](https://yesilcms.page).

## Features

In addition to the existing features of BlizzCMS, some of the added features are as follows;

- Complete VMaNGOS compability.
- **Complete VMaNGOS compability.**
- New installation script that directs the user based on OS/Environment.
- Tweaks to work on multiple Web Servers including Apache/Nginx/IIS.
- Redis caching for *nix operating systems.
- **Redis caching** for *nix operating systems.
- Advanced static caching. (optional, have some side-effects for logged in users)
- Functioning [reCAPTCHA](https://www.google.com/recaptcha/admin/create).
- New lightweight dark theme.
- Brand new customizable armory.
- Brand new **built-in database viewer** *(WIP(\*))*.
- Progressive database search (1.2 to 1.12)
- Item search with all related data.
- Spell search with all related data and dev-required data.
- Object, Creature and Quest page is in WIP state. (*)
- Brand new **customizable armory.**
- Base character info
- 3D Model Viewer (Fast: Uses plain `displayID`, Detailed: Converts old `displayID` to Classic `displayID` using Classic's DBC. You can also create a separate table instead of remote call.)
- Dynamic Base Stats
- Progressive Armory (1.2 to 1.12 can be selected by user as well)
- Primary & Secondary Professions
- PvP Stats
- Ability to show enchants on items (by using WoWHead's tooltip instead of ClassicDB)
- Ability to show all character stats instead of just base-ones
- Brand new **PvP Page**
- All pvp data that player may want to see.
- Wide filtering option.
- Ability to filter by All Time and Last Week
- Ability to filter by Faction
- Ability to filter by specific name
- Unique **Timeline Module** with responsive design and full flexibility.
- Ability to add any patch on choice (including custom ones)
- Ability to order automatically or custom regardless of date
- Separated Description, General, PvE and PvP sections better for maintainability.
- Ability to add unique image for each patch.
- Rest API implementation for future developments.
- Built-in account activation.
- Built-in account recovery.
- Built-in **account activation.**
- Built-in **account recovery.**
- Built-in **tooltip, item and spell viewer.**
- Built-in dynamic CSRF protection on each page.
- Tweaked Admin Panel. (SMTP tester, handlers and logs etc.)
- On-the-fly downloadable Realmlist.
Expand All @@ -33,7 +59,7 @@ In addition to the existing features of BlizzCMS, some of the added features are

- Functioning vMaNGOS server (on same/another host)
- OS (**Including Windows**)
- PHP 7.2+
- PHP 7.2+ (including 8.1.x - beta)
- Composer
- Web-server (Tested on Nginx, Apache and IIS)
- Database (MySQL/MariaDB)
Expand Down Expand Up @@ -88,7 +114,7 @@ Create required Database & User for CMS:
Then go to the site and proceed with the installation instructions.

## API Reference
There is only 1 method available yet, all CRUD operations are planned to be done from here in order to ensure infrastructure change afterwards.
There are 5 only method available yet, all CRUD operations are planned to be done from here in order to ensure infrastructure change afterwards.

#### Get new display ID
Takes `item_id` and returns new `ItemDisplayInfoID` from Classic build (1.14.3.44403) on [WoW Tools](https://github.com/Marlamin/wow.tools). DBC can be downloaded and used locally as well.
Expand All @@ -97,9 +123,70 @@ Takes `item_id` and returns new `ItemDisplayInfoID` from Classic build (1.14.3.
GET /api/v1/item/newdisplayid/item_id
```

| Parameter | Type | Description |
|:----------|:----------|:----------------------|
| `item_id` | `integer` | **Required**. Item ID |
| Parameter | Type | Description |
|:----------|:----------|:-------------------------|
| `item_id` | `integer` | **Required**. Item entry |

#### Get Item Info
Takes `item_id` and `patch` and returns information of given item if exists in database within given patch.

```http
GET /api/v1/item/item_id/patch
```

| Parameter | Type | Description |
|:----------|:----------|:------------------------------------|
| `item_id` | `integer` | **Required**. Item entry |
| `patch` | `integer` | **Optional**. Patch version of item |

#### Get Item Tooltip Info
Takes `item_id` and `patch` and returns `id`, `type`, `name`, `icon`, `quality` and `tooltip`. Tooltip parameter will be
html formatted.

```http
GET /api/v1/tooltip/item/item_id/patch
```

| Parameter | Type | Description |
|:----------|:----------|:------------------------------------|
| `item_id` | `integer` | **Required**. Item entry |
| `patch` | `integer` | **Optional**. Patch version of item |

#### Get Spell Tooltip Info
Takes `spell_id` and `patch` and returns `id`, `type`, `name`, `icon`, and `tooltip`. Tooltip parameter will be
html formatted.

```http
GET /api/v1/tooltip/spell/spell_id/patch
```

| Parameter | Type | Description |
|:-----------|:----------|:-------------------------------------------------------------------------------|
| `spell_id` | `integer` | **Required**. Spell entry |
| `patch` | `integer` | **Optional**. Patch version of spell (build converted to patch automatically.) |

#### Search Database
Takes `query` and `patch` and returns matching Item and Spells in database.

```http
POST /api/v1/search_db
```

| Parameter | Type | Description |
|:----------|:----------|:-------------------------------------------------------------------|
| `query` | `string` | **Required**. Search query |
| `patch` | `integer` | **Optional**. Patch version (by default its 10) |
| `token` | `string` | **Required when** CSRF is enabled. Do not confuse it with API key. |

*Note: `token` parameter should be renamed to configured `csrf_token_name`.*


## Roadmap

- Minimize the code to remain compatible only with vMaNGOS and other vanilla emulators.
- Add Object, Quest and NPC structure for database.
- Customize static-based cache structure. (Create a different cache structure for the visitor and the logged in user.)
- Migrate existing framework from Codeigniter 3 to Laravel 9.

## License

Expand Down
12 changes: 4 additions & 8 deletions application/cache/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<head><title>403 Forbidden</title></head>
<body>

<p>Directory access is forbidden.</p>

<center><h1>403 Forbidden</h1></center>
<hr><center>yesilcms</center>
</body>
</html>
</html>
5 changes: 3 additions & 2 deletions application/config/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@
'form',
'html',
'language',
'modules'
'modules',
'api'
];

/*
Expand All @@ -120,7 +121,7 @@
|
*/
$autoload['config'] = [
'blizzcms',
'yesilcms',
'seo'
];

Expand Down
4 changes: 3 additions & 1 deletion application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
| of query parameters.
|
*/
$config['cache_query_string'] = false;
$config['cache_query_string'] = true;

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -456,6 +456,8 @@
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = true;
$config['csrf_exclude_uris'] = array();
// ### to Exclude API requests use this line instead of above.
// $config['csrf_exclude_uris'] = array('^[a-z]{2}\/api\/v1/.*+$');

/*
|--------------------------------------------------------------------------
Expand Down
12 changes: 4 additions & 8 deletions application/config/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<head><title>403 Forbidden</title></head>
<body>

<p>Directory access is forbidden.</p>

<center><h1>403 Forbidden</h1></center>
<hr><center>yesilcms</center>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion application/config/migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 41;
$config['migration_version'] = 44;

/*
|--------------------------------------------------------------------------
Expand Down
51 changes: 42 additions & 9 deletions application/config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@
* PVP statistics of the server and its realms.
* It also includes arena statistics.
*/
$route[$lang . '/pvp'] = 'pvp/index';
$route[$lang . '/pvp'] = 'pvp/index';
$route[$lang . '/pvp/stats']['POST'] = 'pvp/pvpstats';

/*
* Online
Expand All @@ -187,20 +188,40 @@

/*
* Armory
* Information about player, items or guild.
* Information about player or guild.
*/
$route[$lang . '/armory'] = 'armory';
$route[$lang . '/armory/search'] = 'armory/search';
$route[$lang . '/armory/result'] = 'armory/result';
$route[$lang . '/armory/character/(:num)/(:num)'] = 'armory/character/$2/$3';
$route[$lang . '/armory/guild/(:num)/(:num)'] = 'armory/guild/$2/$3';
$route[$lang . '/armory'] = 'armory';
$route[$lang . '/armory/search'] = 'armory/search';
$route[$lang . '/armory/result'] = 'armory/result';
$route[$lang . '/armory/character/(:num)/(:num)'] = 'armory/character/$2/$3';
$route[$lang . '/armory/character/(:num)/(:num)/(:num)?'] = 'armory/character/$2/$3/$4';
$route[$lang . '/armory/guild/(:num)/(:num)'] = 'armory/guild/$2/$3';

/*
* Armory
* Information about items and spells. (others are still in WIP)
*/
$route[$lang . '/database'] = 'database';
$route[$lang . '/database/result'] = 'database/result';
$route[$lang . '/item/(:num)'] = 'database/item/$2';
$route[$lang . '/item/(:num)/(:num)?'] = 'database/item/$2/$3';
$route[$lang . '/spell/(:num)'] = 'database/spell/$2';
$route[$lang . '/spell/(:num)/(:num)?'] = 'database/spell/$2/$3';

/*
* Api
* Initial API structure to develop CMS further
*/
$route[$lang . '/api/v1'] = 'api_v1';
$route[$lang . '/api/v1/item/newdisplayid/(:num)'] = 'api_v1/classic_displayid/$2';
$route[$lang . '/api/v1'] = 'api_v1';
$route[$lang . '/api/v1/item/newdisplayid/(:num)'] = 'api_v1/classic_displayid/$2';
$route[$lang . '/api/v1/tooltip/item/(:num)'] = 'api_v1/tooltip_item/$2';
$route[$lang . '/api/v1/tooltip/item/(:num)/(:num)?'] = 'api_v1/tooltip_item/$2/$3';
$route[$lang . '/api/v1/tooltip/spell/(:num)'] = 'api_v1/tooltip_spell/$2';
$route[$lang . '/api/v1/tooltip/spell/(:num)/(:num)?'] = 'api_v1/tooltip_spell/$2/$3';
$route[$lang . '/api/v1/item/(:num)'] = 'api_v1/item/$2';
$route[$lang . '/api/v1/item/(:num)/(:num)?'] = 'api_v1/item/$2/$3';

$route[$lang . '/api/v1/search/db']['POST'] = 'api_v1/search_db';


/*
Expand Down Expand Up @@ -393,3 +414,15 @@
* To check the soap connection
*/
$route[$lang . '/admin/checksoap'] = 'admin/checkSoap';

/*
* Timeline
*/
$route[$lang . '/admin/timeline'] = 'admin/manage_timeline';
$route[$lang . '/admin/timeline/create'] = 'admin/create_timeline';
$route[$lang . '/admin/timeline/edit/(:num)'] = 'admin/edit_timeline/$2';
$route[$lang . '/admin/timeline/add'] = 'admin/add_timeline';
$route[$lang . '/admin/timeline/update'] = 'admin/update_timeline';
$route[$lang . '/admin/timeline/delete'] = 'admin/delete_timeline';

$route[$lang . '/timeline'] = 'timeline/index';
Loading