[REL] Badge Uploader for BrainCMS

Higoka

Active Member
Messages
119
Likes
59
#1
Hey,

A while ago i made "Badge Uploader" addon for BrainCMS.
I originally made that for a friend of mine but might be useful for some of you guys.
Its in german but can easily be translated.

How it works
The idea is simple. Users can create their own badge with for example Photoshop, Gimp, Paint whatever and then upload it to your hotel.
They need to enter a name and description for their badge. They also need to enter a badge_code and the badge image. There are some rules, for example 40x40 pixels size and GIF format.
After that the staffs can either approve or deny the badge inside the housekeeping. If they approve it, then the badge gets placed into your album1584 and the corresponding flash texts (badge_name_XXX=XXX and badge_desc_XXX=XXX) get placed into your external_flash_override_texts.txt at the very bottom of the file. Then the user receives the badge in their inventory. (it gets inserted into users_badges in the db). If the staff deny the badge it simply gets removed and the user doesnt receive their badge.

Screens
Bildschirmfoto 2020-02-14 um 02.12.57.png
Bildschirmfoto 2020-02-14 um 02.14.01.png

IMPORTANT
Location for album1584 is: /swfs/c_images/album1584
Location for external_flash_override_texts.txt is: /swfs/gamedata/override/external_flash_override_texts.txt
They are both hardcoded in different files if you use a different location you need to change it to yours.
You need to make sure that you have READ AND WRITE ACCESS for both otherwise its not going to work!
If you have improvements or other ideas you want to see let me know. Also let me know if you want that i implement this into another cms, i dont know what cms is currently the most used one but back when i created this BrainCMS was the most used one.

Download
The entire cms can be found here: [ To view this link you must register here. ]
Its basically just a fork and i dont know if this is the latest version of BrainCMS or not but i couldnt find any working download link besides this git repo.
If you only need the files i changed download this zip and replace yours with mine: [ To view this link you must register here. ]
Dont forget to import this into your database.
SQL:
DROP TABLE IF EXISTS `badge_upload`;
CREATE TABLE `badge_upload` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `code` varchar(32) NOT NULL,
  `name` varchar(32) NOT NULL,
  `desc` varchar(128) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
I currently have some spare time to do some addons/projects whatever.
You can contact me on Discord @ higoka#7120 or here on DevBest PM.

EDIT: There is also another addon i made which lets you use emojis in the news comments section: [ To view this link you must register here. ]
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top