Xcel Gaming ClanCMS Snippet – Email admin on registration
I have been hanging around a relatively new project just recently called the ClanCMS Project created by Xcel Gaming. The script is released free of charge for everyone who needs/requires a website that can be used for an Online Gaming Clan.
The interesting design in my opinion is how it trys to incorporate a widget based system that administrators can choose and also select which location they would like them to appear. It reminds me of the time when WordPress entered the market and we were all taken back by this new practical solution.
I know ClanCMS is no WordPress system but to say it is dedicated for Online Gaming Clans only it has set a very good benchmark for any other Clan Based system looking at entering the market.
So now you have a short introduction to this CMS lets get to the reason for me writing this article about Xcel Gaming ClanCMS. I am currently in contact with a couple of users of this system within my social network and they they approached me and said:
I know this cms system is still in its early stages but is there any chance you could add a function that contacts the admin when a new user registers for an account? At this moment its a great system, the layout and theme could be allot better but it works and the features are great for gaming clans. I just dont know when someone has registered for an account without logging on everytime to check. Any chance you could look it up and get back to me?
Well Johnny, I have had a look and it was a rather simple job once I had figured out how the system was developed and what works with what etc. (Took a little time to check things over and see how things have been done. I was impressed by what has actually been achieved so full credit to the Xcel Gaming Team.)
I have basically used this script which will perform the required action:
// CONTACT ADMIN EMAIL ADDRESS ON NEW REGISTRATION
// Set up the email
$this->email->from($this->input->post('email'));
$this->email->to($this->ClanCMS->get_setting('site_email'), CLAN_NAME);
$this->email->subject('New Registration on ' . CLAN_NAME);
$this->email->message("Hello Admin,\n\nNew registration on " . CLAN_NAME . "!\n\n"
. $this->input->post('username') . " registered for an account on your clan
website today.\n\n");
// Email the user
$this->email->send();
// END CONTACT ADMIN EMAIL ADDRESS ON NEW REGISTRATION
The script above is very simple as it is currently based on the existing script that the Xcel Gaming Team had already coded to send a confirmation email to the new registrant. The script sets up the email to notify the default admin email address saved within the database and emails that address to notify them that ‘Joe Bloggs’ has registered for an account.
Ok, so you have seen the code above and you think great, thats a good idea so how do I add this code or better still where?
Lets take a look at the file structure to make sure you edit the correct file first of all. The file you are going to need to edit is currently located in your ‘clancms/controllers’ folder. (location correct as of version 0.6.0 release.) Within this directory you ‘should’ (haha good choice of words) have a PHP file called register.php.
Within this file you need to add the above code starting from line number ’122′. If you don’t have line numbers then this code needs to be placed directly under this section of coding:
// Email the user $this->email->send();
I have also placed an exact copy of the register.php file edited with this additional code for anyone who is not confident with editing code on the Official Xcel Gaming Forum under this post: Email default address on new registration.
I am sure there will be other additional items I will have to offer on this clan based system by Xcel Gaming so keep checking back and dont forget if you are indeed after this great CMS then you can download it for free here.






Shaun is a man with a background in joinery, music, administration, management, web development and technologies. A devoted friend and father to his wonderful daughter, he is also a family man. He likes to create and produce things which has led him into a stronger, more passionate pursuit of development.



jessl33t | August 24th, 2011 at 3:35 pm #
i saw this on the forum and i like the addon because you are right it dont let you know when sumone registars thanks man
Shaun Ellerton | August 24th, 2011 at 3:41 pm #
Hey JessL33T, thanks for coming to my blog. Yeah, its a pity it dont let you know when someone registers but its still in its early days yet so I think we can all expect more to come yet.
Best wishes