Example #1
0
 public function index($id = false)
 {
     clientLang("inbox", "messages");
     // Make sure ID is set and is a number
     if (!$id || !is_numeric($id)) {
         redirect('messages');
     }
     // Get the messages
     $messages = $this->read_model->getMessages($id);
     $title = "";
     if ($messages) {
         $userId = $messages[0]['sender_id'] == $this->user->getId() ? $messages[0]['user_id'] : $messages[0]['sender_id'];
         $userName = $this->user->getNickname($userId);
         $title = lang("conversation_between", "messages") . " & " . $userName;
         $this->read_model->markRead($this->user->getId(), $userId);
         $this->cache->delete('messages/' . $this->user->getId() . "_*");
         $myAvatar = $this->user->getAvatar();
         $hisAvatar = $this->user->getAvatar($userId);
         foreach ($messages as $key => $value) {
             $messages[$key]['avatar'] = $value['sender_id'] == $this->user->getId() ? $myAvatar : $hisAvatar;
             $messages[$key]['name'] = $value['sender_id'] == $this->user->getId() ? lang("you", "messages") : $userName;
             $messages[$key]['message'] = $this->fusioneditor->parse($value['message'], $this->removeTools);
         }
         $this->plugins->onRead($messages);
     }
     $data = array('messages' => $messages, 'url' => $this->template->page_url, 'me' => $this->user->getId(), 'editor' => $this->fusioneditor->create("pm_editor", $this->removeTools, 150), "him" => !$messages ? $this->user->getId() : $userId, 'myAvatar' => $this->user->getAvatar());
     $pm_page = $this->template->loadPage("read.tpl", $data);
     $page_data = array("module" => "default", "headline" => "<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "messages\"'>" . lang("messages", "messages") . "</span> &rarr; " . (!$messages ? lang("not_found", "messages") : $title), "content" => $pm_page);
     $page = $this->template->loadPage("page.tpl", $page_data);
     $this->template->view($page, "modules/messages/css/read.css", "modules/messages/js/read.js");
 }
Example #2
0
 public function index()
 {
     // Pass a language strings to client side
     clientLang("account_name", "gm");
     clientLang("ban_reason", "gm");
     clientLang("account", "gm");
     clientLang("has_been_banned", "gm");
     clientLang("character_name", "gm");
     clientLang("character_has_been_kicked", "gm");
     clientLang("close_ticket", "gm");
     clientLang("close_short", "gm");
     clientLang("ban_short", "gm");
     clientLang("kick_short", "gm");
     clientLang("send", "gm");
     clientLang("mail_sent", "gm");
     clientLang("teleported", "gm");
     clientLang("must_be_offline", "gm");
     clientLang("item_sent", "gm");
     $output = "";
     foreach ($this->realms->getRealms() as $realm) {
         $tickets = $this->gm_model->getTickets($realm);
         if ($tickets) {
             foreach ($tickets as $key => $value) {
                 $tickets[$key]['name'] = $realm->getCharacters()->getNameByGuid($value['guid']);
                 $tickets[$key]['ago'] = $this->template->formatTime(time() - $value['createTime']) . " ago";
                 $tickets[$key]['message_short'] = character_limiter($value['message'], 20);
             }
         }
         $data = array('url' => pageURL, 'tickets' => $tickets, 'hasConsole' => $realm->getEmulator()->hasConsole(), 'realmId' => $realm->getId(), 'disable_items' => $this->config->item('gm_disable_send_item'));
         $content = $this->template->loadPage('panel.tpl', $data);
         $output .= $this->template->box($realm->getName(), $content);
     }
     $this->template->view($output, "modules/gm/css/gm.css", "modules/gm/js/gm.js");
 }
Example #3
0
 /**
  * Load the page
  */
 public function index()
 {
     requirePermission("view");
     clientLang("cant_afford", "teleport");
     clientLang("select", "teleport");
     clientLang("selected", "teleport");
     clientLang("dp", "teleport");
     clientLang("free", "teleport");
     //Set the title
     //	$this->template->setTitle("Convert Times DP");
     //Load the content
     $content_data = array("characters" => $this->characters, "url" => $this->template->page_url, "total" => $this->total, "dp" => $this->user->getDp(), "config" => $this->config);
     $page_content = $this->template->loadPage("playtime.tpl", $content_data);
     $PriceCurrency = $this->config->item('cta_price_currency');
     if ($PriceCurrency == 'dp') {
         $headline = "تبدیل زمان بازیکن به امتیاز ویژه";
     } elseif ($PriceCurrency == 'vp') {
         $headline = "تبدیل زمان بازیکن به امتیاز رایگان";
     } elseif ($PriceCurrency == 'op') {
         $headline = "تبدیل زمان بازیکن به امتیاز آنلاین";
     }
     $this->template->setTitle($headline);
     //Load the page
     $page_data = array("module" => "default", "headline" => $headline, "content" => $page_content);
     $page = $this->template->loadPage("page.tpl", $page_data);
     $this->template->view($page, "modules/playtime/css/playtime.css", "modules/playtime/js/playtime.js");
 }
Example #4
0
 public function Index($realm = false, $id = false)
 {
     clientLang("loading", "item");
     // Make sure item and realm are set
     if (!$id || !$realm) {
         die(lang("no_item", "item"));
     }
     $this->realm = $realm;
     $cache = $this->cache->get("items/tooltip_" . $realm . "_" . $id . "_" . getLang());
     $cache2 = $this->cache->get("items/item_" . $realm . "_" . $id);
     if ($cache2 !== false) {
         $itemName = $cache2['name'];
     } else {
         $itemName = lang("view_item", "item");
     }
     $this->template->setTitle($itemName);
     $icon = $this->getIcon($id);
     if ($cache !== false) {
         $item = $cache;
     } else {
         $item = $this->template->loadPage("ajax.tpl", array('module' => 'item', 'id' => $id, 'realm' => $realm, 'icon' => $icon));
     }
     $content = $this->template->loadPage("item.tpl", array('module' => 'item', 'item' => $item, 'icon' => $icon));
     $data3 = array("module" => "default", "headline" => "<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "armory\"'>" . lang("armory", "item") . "</span> &rarr; " . $itemName, "content" => $content);
     $page = $this->template->loadPage("page.tpl", $data3);
     $this->template->view($page, "modules/item/css/item.css");
 }
Example #5
0
 public function index()
 {
     // Pass "cant_be_empty" string to the client side language system
     clientLang("cant_be_empty", "armory");
     $this->template->setTitle(lang("search_title", "armory"));
     $page = $this->template->loadPage("search.tpl");
     $data = array("module" => "default", "headline" => lang("search_headline", "armory"), "content" => $page);
     $page = $this->template->loadPage("page.tpl", $data);
     $this->template->view($page, "modules/armory/css/search.css", "modules/armory/js/search.js");
 }
Example #6
0
 public function index()
 {
     requirePermission("view");
     clientLang("hours_remaining", "vote");
     $this->template->setTitle(lang("vote_panel", "vote"));
     $voteData = array('path' => $this->template->page_url, 'vote_sites' => $this->vote_model->getVoteSites(), 'formAttributes' => array('target' => '_blank'));
     $output = $this->template->loadPage("vote.tpl", $voteData);
     // Load the topsite page and format the page contents
     $data = array("module" => "default", "headline" => breadcumb(array("ucp" => lang("ucp"), "ucp/avatar" => lang("vote_panel", "vote"))), "content" => $output);
     $page = $this->template->loadPage("page.tpl", $data);
     //Load the template form
     $this->template->view($page, $this->css, $this->js);
 }
Example #7
0
 public function index()
 {
     clientLang("changes_made_on", "changelog");
     $this->template->setTitle(lang("changelog_title", "changelog"));
     $changelog_items = $this->changelog_model->getChangelog($this->config->item('changelog_limit'));
     if ($changelog_items) {
         // Sort by time, this will move every single item to an array with as key the time.
         $changelog_items = $this->sortByTime($changelog_items);
     }
     $data = array("changes" => $changelog_items, "url" => $this->template->page_url, "categories" => $this->changelog_model->getCategories(), 'attributes' => array("id" => "category_form", "style" => "display:none;"));
     $content = $this->template->loadPage("changelog.tpl", $data);
     $this->template->box(lang("changelog_title", "changelog"), $content, true, "modules/changelog/css/changelog.css", "modules/changelog/js/changelog.js");
 }
Example #8
0
 /**
  * Display the inbox and sent page
  * @param Int $startIndex Start row for inbox pagination
  * @param Int $sentIndex Start row for sent pagination
  */
 public function index($startIndex = 0, $sentIndex = false)
 {
     clientLang("deleting", "messages");
     clientLang("no_messages", "messages");
     // Auto-delete messages that are marked as deleted by both sender and receiver
     $this->inbox_model->clearDeleted($this->user->getId());
     $this->template->setTitle(lang("messages", "messages"));
     // Used to automatically show the sent page on load
     if ($sentIndex !== false) {
         $is_sent = true;
     } else {
         $sentIndex = 0;
         $is_sent = false;
     }
     // Is there cache available?
     $cache = $this->cache->get("messages/" . $this->user->getId() . "_" . $startIndex . "_" . $sentIndex . "_" . getLang());
     // Can we use it?
     if ($cache !== false) {
         $page = $cache;
     } else {
         // Get inbox messages
         $messages = $this->inbox_model->getMessages($this->user->getId(), $startIndex, $startIndex + $this->config->item('pm_per_page'));
         // There are no messages
         if ($messages === false) {
             $messages = array();
         }
         // Get all nicknames
         foreach ($messages as $key => $value) {
             $messages[$key]['sender_name'] = $this->user->getNickname($value['sender_id']);
         }
         // Get sent messages
         $sent = $this->inbox_model->getSent($this->user->getId(), $sentIndex, $sentIndex + $this->config->item('pm_per_page'));
         if ($sent === false) {
             $sent = array();
         }
         // Get all nicknames
         foreach ($sent as $key => $value) {
             $sent[$key]['receiver_name'] = $this->user->getNickname($value['user_id']);
         }
         // Gather all data
         $data = array('messages' => $messages, 'sent' => $sent, 'pagination' => $this->getPagination('inbox', $startIndex, $sentIndex), 'sent_pagination' => $this->getPagination('sent', $startIndex, $sentIndex), 'url' => $this->template->page_url, 'sent_count' => $this->inbox_model->countSent($this->user->getId()), 'inbox_count' => $this->inbox_model->countMessages($this->user->getId()), 'is_sent' => $is_sent);
         $content = $this->template->loadPage("inbox.tpl", $data);
         $page_data = array("module" => "default", "headline" => lang("pm", "messages"), "content" => $content);
         $page = $this->template->loadPage("page.tpl", $page_data);
         // Cache it forever
         $this->cache->save("messages/" . $this->user->getId() . "_" . $startIndex . "_" . $sentIndex . "_" . getLang(), $page);
     }
     // Build template
     $this->template->view($page, "modules/messages/css/pm.css", "modules/messages/js/pm.js");
 }
Example #9
0
 /**
  * Load the page
  */
 public function index()
 {
     requirePermission("view");
     clientLang("cant_afford", "teleport");
     clientLang("select", "teleport");
     clientLang("selected", "teleport");
     clientLang("dp", "teleport");
     clientLang("free", "teleport");
     //Set the title
     $this->template->setTitle("ابزار کاربردی هیرو");
     //Load the content
     $content_data = array("characters" => $this->characters, "url" => $this->template->page_url, "total" => $this->total, "dp" => $this->user->getDp(), "config" => $this->config);
     $page_content = $this->template->loadPage("character_tools.tpl", $content_data);
     //Load the page
     $page_data = array("module" => "default", "headline" => "ابزار کاربردی هیرو", "content" => $page_content);
     $page = $this->template->loadPage("page.tpl", $page_data);
     $this->template->view($page, "modules/character_tools/css/character_tools.css", "modules/character_tools/js/character_tools.js");
 }
 public function index()
 {
     requirePermission("canUpdateAccountSettings");
     clientLang("nickname_error", "ucp");
     clientLang("location_error", "ucp");
     clientLang("pw_doesnt_match", "ucp");
     clientLang("changes_saved", "ucp");
     clientLang("invalid_pw", "ucp");
     clientLang("nickname_taken", "ucp");
     clientLang("invalid_language", "ucp");
     $this->template->setTitle(lang("settings", "ucp"));
     $settings_data = array('nickname' => $this->user->getNickname(), 'location' => $this->internal_user_model->getLocation(), 'show_language_chooser' => $this->config->item('show_language_chooser'), 'userLanguage' => $this->language->getLanguage());
     if ($this->config->item('show_language_chooser')) {
         $settings_data['languages'] = $this->language->getAllLanguages();
     }
     $data = array("module" => "default", "headline" => breadcumb(array("ucp" => lang("ucp"), "ucp/settings" => lang("settings", "ucp"))), "content" => $this->template->loadPage("settings.tpl", $settings_data));
     $page = $this->template->loadPage("page.tpl", $data);
     //Load the template form
     $this->template->view($page, false, "modules/ucp/js/settings.js");
 }
Example #11
0
 /**
  * Load the page
  */
 public function index()
 {
     requirePermission("view");
     clientLang("cant_afford", "teleport");
     clientLang("select", "teleport");
     clientLang("selected", "teleport");
     clientLang("teleported", "teleport");
     clientLang("vp", "teleport");
     clientLang("dp", "teleport");
     clientLang("gold", "teleport");
     clientLang("free", "teleport");
     //Set the title to teleport locations
     $this->template->setTitle(lang("teleport_hub", "teleport"));
     //Load the content
     $content_data = array("locations" => $this->teleportLocations, "characters" => $this->characters, "url" => $this->template->page_url, "total" => $this->total, "vp" => $this->user->getVp(), "dp" => $this->user->getDp());
     $page_content = $this->template->loadPage("teleport.tpl", $content_data);
     //Load the page
     $page_data = array("module" => "default", "headline" => "<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "ucp\"'>" . lang("ucp") . "</span> &larr; " . lang("teleport_hub", "teleport"), "content" => $page_content);
     $page = $this->template->loadPage("page.tpl", $page_data);
     $this->template->view($page, "modules/teleport/css/teleport.css", "modules/teleport/js/teleport.js");
 }
Example #12
0
 public function index()
 {
     requirePermission("view");
     clientLang("cant_afford", "store");
     clientLang("hide", "store");
     clientLang("show", "store");
     clientLang("loading", "store");
     clientLang("want_to_buy", "store");
     clientLang("yes", "store");
     clientLang("checkout", "store");
     clientLang("vp", "store");
     clientLang("dp", "store");
     // Gather the template data
     $data = array('url' => $this->template->page_url, 'image_path' => $this->template->image_path, 'vp' => $this->user->getVp(), 'dp' => $this->user->getDp(), 'data' => $this->getData(), 'minimize' => $this->config->item('minimize_groups_by_default'));
     // Load the content
     $content = $this->template->loadPage("store.tpl", $data);
     // Put the content in a box
     $page = $this->template->box("<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "ucp\"'>" . lang("ucp") . "</span> &larr; " . lang("item_store", "store"), $content);
     // Output the content
     $this->template->view($page, "modules/store/css/store.css", "modules/store/js/store.js");
 }
Example #13
0
 /**
  * Display the compose page
  * @param String $username
  */
 public function index($username = false)
 {
     // Pass some language strings to the client
     clientLang("message_limit", "messages");
     clientLang("title_limit", "messages");
     clientLang("recipient_empty", "messages");
     clientLang("invalid_recipient", "messages");
     clientLang("sent", "messages");
     clientLang("the_inbox", "messages");
     clientLang("error", "messages");
     clientLang("title_cant_be_empty", "messages");
     $this->template->setTitle(lang("compose", "messages"));
     // Load the create view
     $data = array("username" => $username ? $this->user->getNickname($username) : '', "editor" => $this->fusioneditor->create("pm_editor", $this->removeTools), "url" => $this->template->page_url);
     $content = $this->template->loadPage("create.tpl", $data);
     // Define our box values
     $page_data = array("module" => "default", "headline" => "<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "messages\"'>" . lang("messages", "messages") . "</span> &rarr; " . lang("compose", "messages"), "content" => $content);
     // Load the box
     $page = $this->template->loadPage("page.tpl", $page_data);
     // View our content
     $this->template->view($page, "modules/messages/css/create.css", "modules/messages/js/create.js");
 }
Example #14
0
 /**
  * Load the page
  */
 public function index()
 {
     requirePermission("view");
     clientLang("cant_afford", "teleport");
     clientLang("select", "teleport");
     clientLang("selected", "teleport");
     clientLang("dp", "teleport");
     clientLang("free", "teleport");
     //Set the title
     $this->template->setTitle("آزاد سازی هیرو");
     $realms = $this->realms->getRealms();
     //Get characters, guilds, items for each realm
     foreach ($realms as $realm) {
         // Assign the realm ID
         $i = $realm->getId();
     }
     //Load the content
     $content_data = array("characters" => $this->characters, "url" => $this->template->page_url, "total" => $this->total, "dp" => $this->user->getDp(), "config" => $this->config, "char_unban" => $this->character_banned($i));
     $page_content = $this->template->loadPage("character_tools.tpl", $content_data);
     //Load the page
     $page_data = array("module" => "default", "headline" => " آزاد سازی هیرو", "content" => $page_content);
     $page = $this->template->loadPage("page.tpl", $page_data);
     $this->template->view($page, "modules/unban_char/css/character_tools.css", "modules/unban_char/js/character_tools.js");
 }
Example #15
0
 public function index($realm = false, $sort = self::STORE_SORT_DEFAULT, $quality = self::STORE_MIN_QUALITY, $search = false, $page = 0)
 {
     requirePermission("view");
     $this->setRealm($realm);
     $this->setSort($sort);
     $this->setQuality($quality);
     $this->setSearch($search);
     $this->setPage($page);
     clientLang("cant_afford", "store");
     clientLang("hide", "store");
     clientLang("show", "store");
     clientLang("loading", "store");
     clientLang("want_to_buy", "store");
     clientLang("yes", "store");
     clientLang("checkout", "store");
     clientLang("vp", "store");
     clientLang("dp", "store");
     // Prepare the compitable realms
     $CompitableRealms = array();
     foreach ($this->realms->getRealms() as $realmData) {
         $CompitableRealms[] = array('id' => $realmData->getId(), 'name' => $realmData->getName());
     }
     unset($realmData);
     // Setup some of the translation strings in array
     $Translation = array('realm' => $this->config->item('lang_realm'), 'no_items' => $this->config->item('lang_no_items'), 'quality' => $this->config->item('lang_quality'));
     // Get the cart save
     if (isset($_SESSION['store_cart']) && is_array($_SESSION['store_cart']) && count($_SESSION['store_cart']) > 0) {
         $cart = $_SESSION['store_cart'];
         $index = 0;
         foreach ($cart as $key => $citem) {
             $itemInfo = $this->store_model->getItem($citem['id']);
             // save some stuff
             $cart[$key]['index'] = $index;
             $cart[$key]['info'] = $itemInfo;
             $cart[$key]['realm'] = $itemInfo['realm'] == '-1' ? 'All Realms' : $this->realms->getRealm($itemInfo['realm'])->getName();
             $index++;
         }
         unset($itemInfo, $citem, $key);
     } else {
         $cart = false;
     }
     // Gather the template data
     $data = array('url' => $this->template->page_url, 'image_path' => $this->template->image_path, 'vp' => $this->user->getVp(), 'dp' => $this->user->getDp(), 'data' => $this->getData(), "selected_realm" => $this->realmId, "realms" => $CompitableRealms, "translation" => $Translation, "filters" => array('sort' => $this->sort, 'quality' => $this->quality, 'search' => $this->search, 'search_encoded' => $this->search ? rawurlencode($this->search) : false, 'page' => $this->page), "cart" => $cart);
     unset($CompitableRealms);
     // Load the content
     $content = $this->template->loadPage("store.tpl", $data);
     // Put the content in a box
     $page = $this->template->box("<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "ucp\"'>" . lang("ucp") . "</span> &rarr; " . lang("item_store", "store"), $content);
     // Output the content
     $this->template->view($page, "modules/store/css/store.css", "modules/store/js/store.js");
 }
Example #16
0
 public function index()
 {
     clientLang("username_limit_length", "register");
     clientLang("username_limit", "register");
     clientLang("username_not_available", "register");
     clientLang("email_not_available", "register");
     clientLang("email_invalid", "register");
     clientLang("password_short", "register");
     clientLang("password_match", "register");
     $this->template->setTitle(lang("register", "register"));
     //Load the form validations for if they tried to sneaky bypass our js system
     $this->form_validation->set_rules('register_username', 'username', 'trim|required|min_length[4]|max_length[14]|xss_clean|alpha_numeric');
     $this->form_validation->set_rules('register_email', 'email', 'trim|required|valid_email|xss_clean');
     $this->form_validation->set_rules('register_password', 'password', 'trim|required|min_length[6]|xss_clean');
     $this->form_validation->set_rules('register_password_confirm', 'password confirmation', 'trim|required|matches[register_password]|xss_clean');
     $this->form_validation->set_error_delimiters('<img src="' . $this->template->page_url . 'application/images/icons/exclamation.png" data-tip="', '" />');
     require_once 'application/libraries/captcha.php';
     $captchaObj = new Captcha($this->config->item('use_captcha'));
     if (count($_POST)) {
         $emailAvailable = $this->email_check($this->input->post('register_email'));
         $usernameAvailable = $this->username_check($this->input->post('register_username'));
     } else {
         $emailAvailable = false;
         $usernameAvailable = false;
     }
     //Check if everything went correct
     if ($this->form_validation->run() == FALSE || strtoupper($this->input->post('register_captcha')) != strtoupper($captchaObj->getValue()) || !count($_POST) || !$usernameAvailable || !$emailAvailable) {
         $fields = array('username', 'email', 'password', 'password_confirm');
         $data = array("username_error" => $this->usernameError, "email_error" => $this->emailError, "password_error" => "", "password_confirm_error" => "", "expansions" => $this->realms->getExpansions(), "use_captcha" => $this->config->item('use_captcha'), "captcha_error" => "", "url" => $this->template->page_url);
         if (count($_POST) > 0) {
             // Loop through fields and assign error or success image
             foreach ($fields as $field) {
                 if (strlen(form_error('register_' . $field)) == 0 && empty($data[$field . "_error"])) {
                     $data[$field . "_error"] = '<img src="' . $this->template->page_url . 'application/images/icons/accept.png" />';
                 } elseif (empty($data[$field . "_error"])) {
                     $data[$field . "_error"] = form_error('register_' . $field);
                 }
             }
             if ($this->input->post('register_captcha') != $captchaObj->getValue()) {
                 $data['captcha_error'] = '<img src="' . $this->template->page_url . 'application/images/icons/exclamation.png" />';
             }
         }
         // If not then display our page again
         $this->template->view($this->template->loadPage("page.tpl", array("module" => "default", "headline" => "Account creation", "content" => $this->template->loadPage("register.tpl", $data))), false, "modules/register/js/validate.js", "Account Creation");
     } else {
         if ($this->input->post("register_expansion") != false) {
             if (!array_key_exists($this->input->post("register_expansion"), $this->realms->getExpansions())) {
                 die("Hey, don't modify the expansion value...");
             }
         }
         if (!$this->username_check($this->input->post("register_username"))) {
             die;
         }
         // Show success message
         $data = array("url" => $this->template->page_url, "account" => $this->input->post('register_username'), "bridgeName" => $this->config->item('forum_bridge'), "username" => $this->input->post('register_username'), "email" => $this->input->post('register_email'), "password" => $this->input->post('register_password'), "email_activation" => $this->config->item('enable_email_activation'));
         if ($this->config->item('use_forum_bridge')) {
             if (file_exists('application/modules/register/plugins/' . $this->config->item('forum_bridge') . ".php")) {
                 $this->plugins->{$this->config->item('forum_bridge')}->register($data['username'], $data['password'], $data['email']);
             } else {
                 show_error("The forum bridge <b>" . $this->config->item('forum_bridge') . "</b> does not exist in <b>application/modules/register/plugins/</b>");
                 die;
             }
         }
         if ($this->config->item('enable_email_activation')) {
             $key = $this->activation_model->add($this->input->post('register_username'), $this->input->post('register_password'), $this->input->post('register_email'), $this->input->post('register_expansion'));
             $link = base_url() . 'register/activate/' . $key;
             sendMail($this->input->post('register_email'), $this->config->item('activation_sender_mail'), $this->config->item('server_name') . ': activate account', 'You have created the account ' . $this->input->post('register_username') . ', please go here to activate it: <a href="' . $link . '">' . $link . '</a>');
         } else {
             //Register our user.
             $this->external_account_model->createAccount($this->input->post('register_username'), $this->input->post('register_password'), $this->input->post('register_email'), $this->input->post('register_expansion'));
             // Log in
             $sha_pass_hash = $this->user->createHash($this->input->post('register_username'), $this->input->post('register_password'));
             $check = $this->user->setUserDetails($this->input->post('register_username'), $sha_pass_hash);
         }
         $title = $data['email_activation'] ? lang("confirm_account", "register") : lang("created", "register");
         $this->template->view($this->template->box($title, $this->template->loadPage("register_success.tpl", $data)));
     }
 }