Jump to content

What happened to the forums? EEK!


twhiting9275

Recommended Posts

Adding to this, it appears the 'advanced' editor (full WYSIWYG control) is just flat out broken, at least when it comes to editing posts.

As well, the php bbcode needs updated. It seems to want to throw everything together... Example:

 

<?php
/* 
Client area login notification for WHMCS
Developed by http://www.whmcsguru.com
*/

use Illuminate\Database\Capsule\Manager as Capsule;
function hook_client_login_notify($vars)
{
$userid = $vars['userid'];

send_login_notify($userid);
}

function send_login_notify($userid)
{
$ip = $_SERVER['REMOTE_ADDR'] ;
$hostname = gethostbyaddr($ip);
$userinfo = Capsule::table('tblclients')->select('firstname', 'lastname')->WHERE('id', $userid)->get();
//greet them
foreach ($userinfo as $userrow)
{
	$firstname = $userrow->firstname;
	$lastname = $userrow->lastname;
}
$command = "sendemail";
$adminuser = "YOUR ADMIN USERNAME HERE";
$values["customtype"] = "general";
$values["customsubject"] = "Account Login from $hostname";
$values["custommessage"] = "<p>Hello $firstname $lastname,<p>Your account was recently successfully accessed by a remote user. If this was not you, please do contact us immediately<p>IP Address: $ip<br/>Hostname: $hostname<br />";
$values["id"] = $userid;

$results = localAPI($command, $values, $adminuser);
}

add_hook('ClientLogin', 1, 'hook_client_login_notify');

 

turns into:

<?php
/* 
Client area login notification for WHMCS
Developed by http://www.whmcsguru.com
*/

use Illuminate\Database\Capsule\Manager as Capsule;
function hook_client_login_notify($vars)
{
$userid = $vars['userid'];

send_login_notify($userid);
}

function send_login_notify($userid)
{
$ip = $_SERVER['REMOTE_ADDR'] ;
$hostname = gethostbyaddr($ip);
$userinfo = Capsule::table('tblclients')->select('firstname', 'lastname')->WHERE('id', $userid)->get();
//greet them
foreach ($userinfo as $userrow)
{
	$firstname = $userrow->firstname;
	$lastname = $userrow->lastname;
}
$command = "sendemail";
$adminuser = "YOUR ADMIN USERNAME HERE";
$values["customtype"] = "general";
$values["customsubject"] = "Account Login from $hostname";
$values["custommessage"] = "<p>Hello $firstname $lastname,<p>Your account was recently successfully accessed by a remote user. If this was not you, please do contact us immediately<p>IP Address: $ip<br/>Hostname: $hostname<br />";
$values["id"] = $userid;

$results = localAPI($command, $values, $adminuser);
}

add_hook('ClientLogin', 1, 'hook_client_login_notify');

Oh sure, NOW it does it right... Must just be in the full wysiwyg editor

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated