Safari Status Bar on Link Rollover

About a year ago, I switch to Safari (from Chrome) for my default web browser. One downside was that I missed was the ability to preview the URL of a link I was hovering over in the bottom of the browser. However, it appears this feature was never lacking in Safari. Here’s how to see it:

  • Click the ‘View’ menu in Safari
  • Select “Show Status Bar”
  • That’s it!

Now when you hover over a link, you’ll find the target URL in a small popup in the bottom left corner of the browser. I should of looked for that a long time ago!

Adding a Proper HTML Signature to Outlook 365

So let’s say you’ve created a great looking HTML signature only to discover that there is no HTML view in the “Edit Signature” box in Outlook 365. No worries, here’s how to do it. Note: The following assumes your running Windows 10 and Office 365 but who knows, it might work fine with other version combos:

  1. Start by copying HTML source code of your signature to your computers clipboard
  2. Open Outlook
  3. Click “New Email”
  4. Click “Signature” in the “Untitled – Message” window
  5. Click “Signatures…” in the drop-down menu
  6. Click “New” and then name your new signature and click “OK”
  7. In the “Edit Signature” box, type “test” and then click “OK”
  8. Close Outlook
  9. Open a File Explorer window and paste in this path: %userprofile%\AppData\Roaming\Microsoft\Signatures
  10. You should now see a folder containing the name of the signature you just created (three actually.) Open the HTML version in your text editor.
  11. Now remove everything in this document and replace it with the code in your clipboard – Select All (Edit > Select All / Ctrl+A) followed by Paste (Edit > Paste / Ctrl+V)
  12. Save this file

Open Outlook 365 again and you should be able to select your new signature and start using it!

Finally, throw your Windows PC in the garbage and buy a Mac. The end.

Adobe Creative Cloud and the Never Ending Sign In Issue

As a subscriber to Adobe Creative Cloud, I’ve recently run into an issue with the Creative Cloud app where it would not remember from moment to moment that I had signed in. Credentials would not save and while it would connect long enough to get me into say, Photoshop, launching something else like Illustrator would cause the Adobe Application Manager to prompt for a sign in. When I would confirm the sign in, it would just hang. After some Googling, I came across this page:

How To Fix The Adobe Creative Cloud Login Error

For Mac OS, the article recommends closing all things Adobe (I had to “Force Quite” the Adobe Application Manager), then browse to ‘~/Library/Application Support/Adobe/OOBE/’. Delete the ‘opm.db’ file and you’re good to go. Next time you login, the file will re-generate and you should be good to go. I’m blaming corruption possibly triggered when the card on file for payment lapsed.

Anyways, all is well again. Hope this helps someone!

Goodbye Asheron’s Call

A little more than a week ago, the gaming community lost what I consider to be one of the most important games that I’ve played: Asheron’s Call. Today there are few surprises in gaming today. My list of mind blowing moments off the top of my head are Super Mario Bros., The Legend of Zelda, Super Mario 64, Wolfenstein, Doom, Quake, Golden Eye, and Asheron’s Call. While it wasn’t the first MMORPG to market, it was the first for me. I remember purchasing it based on the promises on the box. While giants didn’t roam the land, it did deliver where it mattered: grand adventures in a persistent, 3D world populated by thousands of real people. I was surprised and inspired.

Turbine, thank you for the memories!

Character Name: Tebroc
Server: Thistledown
Favorite Towns: Cragstone & Hebian-To
Favorite Weapon: Bandit Blade Hilt (Dagger)
Favorite Event: Empyrean Shadow War (Shadow Spires)

Check out this Eurogamer piece for some great stories behind the scenes, and I’ll probably update this post with other articles that I across that discuss this great game:

http://www.eurogamer.net/articles/2017-02-07-notes-from-the-end-of-a-world

Titan Fall 2

I just completed the campaign of Titan Fall 2 on my new PS4 Pro and I have to say it’s one of the best FPS experiences I’ve had since the Half-Life 2 series. There were no points where I felt like the game was long-in-the-tooth. Just when I would think that the game might get stale, new level concepts, weapons, and environments are introduced with a nice grade of learning and ending with mastery before discarding the idea to make room for new ones. The story was simple enough to follow, and the dialog tree served to put me in each moment of interaction between the pilot and Titan thus allowing me to bond with my Titan more as I thought about my responses and comments. I’m very much looking forward to jumping into the multiplayer. I can’t imagine how a third installment could better this game but I sure hope the team at Respawn are awarded the chance. While I love Battlefield 1, this game deserves the same kind of success. Don’t miss this game.

Make OS X’s Mail App Your Default Client After a Breakup with Outlook

As a subscriber to Office 365, I thought I’d give the entire Office 365 Suite a shot on my Macbook Pro. While I’m pretty happy with everything on offer, Outlook just never quite meshed with my reliance on Calendar, Reminders, and Contacts bundled with OS X and iOS. So after switching back, I’ve put up with Outlook always launching if I happened to click on an email link to start an email composition. This impediment isn’t due to me not changing the default mail app on a few occasions, no, it’s from the setting not saving.

That brings me to today. Instead of simply going to the Mail > Preferences > General and changing the dropdown (Default email reader) from Outlook to Mail only to have the setting change back immediately, this time, I chose ‘Select…’ and browsed for Mail in the Applications folder. I closed and re-opened Mail, and the preference stayed. This process should also work for anyone trying to do the opposite (that is, change the default from Mail to Outlook.) If I had to guess why this happens, it’s possible that as a result of a major Mail release, the location of some dependency or a symlink became broken. That’s just a guess. I hope that helps someone!

EMAIL CUSTOMERS AUTOMATICALLY IN PDG COMMERCE USING MYSQL TRIGGERS & BUBBLEGUM

We recently selected PDG Commerce as the solution for one of our customers. However, this client had a number of requirements that fell outside of the scope of PDG’s offering. Some of the additions we needed to make were located in the administration portion of the website where a lot of the code is compiled in a CGI making direct alterations and additions nearly impossible.

In what will surely be series of articles on the subject of PDG Commerce, I’m first going to tackle an automatic email generator for notifying customers that their membership category has been elevated by the site administrator. Since we aren’t able to simply modify the customer admin page directly, we will have to rely on a function of MySQL called a trigger. A trigger as defined by mysql.com is “… a named database object that is associated with a table, and that activates when a particular event occurs for the table.” In this case the event that we are interested in is when customer’s category is changed from “Anonymous” to “Reseller”. Before we go any further, let’s enjoy a fresh piece of bubblegum. Mmmm. We should be done with this before the flavor’s gone! Let’s go!

The first thing we’ll want to do is create a new table in our PDG database for the trigger to update.

CREATE TABLE IF NOT EXISTS `EMAIL_CUSTOMERS` (
`email_customer_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`CU_CustomerID` int(11) NOT NULL,
`emailed` int(1) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (`email_customer_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=0 ;

The new table is just going to consist of an auto incrementing id, the CU_CustomerID as taken from the CUSTOMERS table, and the column ’emailed’ that defaults to zero. We’ll be using that to ensure that the user only receives one email.

Now let’s create our trigger… If you’re using phpMyAdmin, choose the SQL tab and paste the following in the form.

Note: Be sure to change your delimiter to something that’s not a semicolon (like $$ for instance.)

Note: MySQL triggers require Superuser privileges.

CREATE TRIGGER customer_trigger AFTER UPDATE ON CUSTOMERS
FOR EACH ROW
BEGIN
DECLARE send_email INT DEFAULT 0;
IF (new.CU_CustCatID=2 AND old.CU_CustCatID=1) THEN
SET send_email = 1;
END IF;
IF
send_email = 1 THEN
INSERT INTO EMAIL_CUSTOMERS (CU_CustomerID, emailed) VALUES (new.CU_CustomerID, 0);
END IF;
END;

In a trigger you can use OLD.col_name to refer to the columns of a row before they were updated and NEW.col_name to refer to the columns of the row after they were updated. That’s what’s going on in the 5th line. We’re just looking to see if the CU_CustCatID was changed by the admin from “Anonymous”(1) to “Reseller”(2). If so, we set our variable ‘send_mail’ to ‘1’. We then insert into our EMAIL_CUSTOMERS table the CU_CustomerID from CUSTOMERS.

FYI

You can check out your new trigger by issuing the command SHOW TRIGGERS;.
If you need to drop a trigger simply issue this command DROP TRIGGER triggername;

Try changing the status of a user from “Anonymous” to “Reseller” in your Administration page of PDG to test it out. You can then check your EMAIL_CUSTOMER table. If all went well you should see a new row with the CU_CustomerID data is there for that user. You’ll also notice the emailedcolumn is set to 0 so we have something to check whether or not to email that customer.

Next we’re going create a new PHP file using the code below. Since we are going to be eventually running this PHP file in cron, take notice of line one. Without it, the cron won’t know what type of file this is.

#!/usr/bin/php -q
<?php
// functions for opening and closing the database…
function dbopen() {
	global $dblink;
	$dbhost = "localhost";
	$dbname = "pdgdatabasename";
	$dbuser = "databaseuser";
	$dbpass = "databasepass";
	$dblink = mysql_connect($dbhost, $dbuser, $dbpass) or die("Database Unavailable");
	mysql_select_db($dbname, $dblink);
}
function dbclose() {
	global $dblink;
	mysql_close($dblink);
}

dbopen();
// this query will save a few steps by selecting only the customers that are in our EMAIL_CUSTOMERS table that haven't been emailed
$result=mysql_query("SELECT * FROM CUSTOMERS INNER JOIN EMAIL_CUSTOMERS ON EMAIL_CUSTOMERS.CU_CustomerID=CUSTOMERS.CU_CustomerID WHERE emailed=0")
or die(mysql_error());

while($what = mysql_fetch_array($result))
	{
	extract($what);
		// Mail Variables
		$subject = 'Account Upgrade';
		// User Message
		$message = '<h2>Congratulations and Welcome</h2>';
		$message .= '

Your membership application has been approved and your account status has been elevated to Reseller.

';
		// Here we'll can even send the users login information.
		$message .= '

TIP: Remember to login at http://www.yourdomain.com Your User Name is: ‘ . $CU_UserName . ‘ and your password is: ‘ . $CU_Password . ‘

';
			
		// User Headers
		// To send HTML mail, the Content-type header must be set
		$headers  = 'MIME-Version: 1.0' . "\r\n";
		$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
		$headers .= 'From: Your Website Name <info@yourdomain.com>' . "\r\n";
				 
		// Send email to Customer
		$cust = mail($CU_Email, $subject, $message, $headers);
		// Display Message
			if ($cust)
				echo 'sent';
			else
				echo 'failed';
		// END OF MAIL
		// NOW LET'S MAKE SURE THIS PERSON ISN'T MAILED AGAIN
		
		mysql_query("UPDATE EMAIL_CUSTOMERS SET emailed=1 WHERE CU_CustomerID='$CU_CustomerID'")
		or die(mysql_Error());
	} 	
dbclose();
?>

The final step will be to save our php file and have a systems administrator add it to the crontab to run every 5 minutes or so depending on your preference. (It would probably good be a good practice to move this file above the web directory for security reasons.) Now when the Administrator of the site changes the category of a customer to “Reseller”, that customer will be emailed within 5 minutes of the update. I should also point out that if a customers category is changed back to “Anonymous” and then back again to “Reseller”, the email will be re-sent as our trigger will pick it up with the logic we are using.

There are probably a number of ways to achieve this same functionality. If you have any tweaks to share or if this was in any way a help to you, we’d love to hear about it in the comments below! Oh, and you can get rid of that gum now if you’d like!

All things Gaming