Words about stuff, and things related to stuff

Adobe Edge Inspect mobile device preview

As part of a google groups thread about putting a Bootstrap skin on this blog, and a question about testing mobile devices, I found this useful little link on Charlie Arehart's list of Page Appearance Testing Tools:

 Adobe Edge Inspect, free, allows devs "to preview their content across multiple mobile devices. Wirelessly pair multiple iOS and Android devices to your computer, grab screenshots from any connected device, and see real-time results from changes to HTML, CSS, and JavaScript." 

Continued...

PayPal does not want you to change your encoding

Apparently there's a conspiracy among PayPal's website developers to keep the average human from changing character set encoding preferences. If you have product names with special characters, chances are you'll want to use UTF-8 encoding. And though you can set your page's charset, and pass a special setting into your transaction to specify encoding...

While the PayPal help files, numerous blog posts and other Google results show a series of selections something like this

Login to your PayPal account
Go to the "My Account Overview -> Profile -> More options" section.
In column "Selling Preferences" click the "Language Encoding" link.
Ensure that setting for "Your website's language" is correct.
Click the "More Options" button, select the "UTF-8" option for "Encoding" and leave the "Yes" option selected for "Do you want to use the same encoding for data sent from PayPal to you (e.g., IPN, downloadable logs, emails)?".
Click "Save" to save your changes.

but... no. The entire PayPal UI has changed, and the option you're trying to change is nowhere in the complex menu.

Instead, you'll want to go to Profile (that part is the same) and then go to the very bottom of the page. Forget all the options on the left, it would be far too easy to put a link there for Character Encoding. No... you have to find the link at the foot of the page that says "PayPal button language encoding". But, you don't have PayPal buttons... you are using IPN with your own eCommerce integration. Don't worry about it making sense, click the "PayPal button language encoding" link.

And there you are presented with a wealth of options.

Western European Languages (including English) Chinese (Traditional) Chinese (Simplified) Japanese Korean Russian

First of all, what does that have to do with ... nevermind. It isn't supposed to make sense. And then, those aren't web standard encoding options... nevermind. Just... nevermind. you're almost there.

Find the "more options" button (in between "save" and "cancel" as of this writing). And there... you will find the secret buried setting.

Use the following drop-down menu to select the encoding used on your website.
(here you can select encoding)
Do you want to use the same encoding for data sent from PayPal to you (e.g., IPN, downloadable logs, emails)?
(and here you can select different encoding if needed, for IPN)

By the time you read this they may bury it behind a few more levels of spaghetti-nav, but for today, that's where you can find the setting for IPN language encoding. If you set your page to UTF-8, and change this setting to UTF-8, you should be able to pass weird characters into your transactions.

File Locator Lite

As part of his presentation " CF911: Solving Frequent CF Server Problems in New/Better Ways ", Charlie Arehart showed a series of examples, searching CF log files with impressive speeds. He mentioned the tool that was being used, File Locator Lite and gave it a great review. Anything that is two thumbs up with @carehart is generally worth checking out.

Today I got tired of Notepad++ text search, which is great but seems to just quit working at random times, and just didn't feel like using Eclipse. So I downloaded and fired up File Locator and bam! it is just what I needed. The link above has examples and screenshots so I won't bother here, but all the options I could think of are visible at first glance, and it does what it says... locates files, fast and light.

Tell Github to ignore folders with .gitignore

Use simple rules in your Github project's .gitignore file to keep out the clutter!

view plain print about
1##############
2## DIRECTORIES
3##############
4
5## ignore directory where name matches string
6*template*/
7
8## ignore specific folder by name
9ClientSamples/
10
11## ignore folder capitalized or not
12[Ii]mages/
13
14## ignore backup directories (root.bak, etc)
15*.bak/

More at https://help.github.com/articles/ignoring-files

Bootstrap 3 Examples and Demos

With the first Release Candidate of Bootstrap 3 available, I've been looking for templates, examples, sample code, or any other source from which I can absorb information and visual ideas for creating website projects based on this new version of the Bootstrap framework. 

It makes sense that there aren't any full-blown commercial templates out there yet, but I'm surprised by how few sites have grabbed onto the chance to at least show off what they know about the new version.

So far, here are a few I've found to be useful:

Continued...

Bootstrap 3.0

This is an exciting time to be a Bootstrap developer. Finally, a css layout framework that makes sense! With the new release of Bootstrap 3 there are a number of important and timely changes in the works. 

First and foremost is the new "Mobile First!" approach, which means the core principle of the Bootstrap grid has been adjusted. There are no longer separate files for bootstrap and bootstrap-responsive styles, instead the responsive grid is baked into the core. 

A few other notes from my first foray into BS3: 

_ variable names have moved from camelCase to hyphenated-lower-case syntax. This means some good ol' find and replace exercises if you're planning to upgrade a previous bootstrap project

_ the grid system no longer uses 'span' classes, bringing in 'col' instead. This means more f&r within your markup, and perhaps an overall change to the way your pages are set up, as there are also new patterns for definining columns based on device size. Good examples here: http://getbootstrap.com/css/ 

_ there are not very many Bootstrap 3 templates available yet (as of this writing, BS3 is still in Release Candidate stage). While there are still bugs being worked out and some adjustments being made by the dev team, we can expect the file structure to stay the same. This would be a great opportunity to create new Bootstrap 3 templates.

_ the documentation has been moved outside the project, which makes sense and keeps things cleaner for developers.

_ the basic download includes minified css and jss files, while the full source code includes directories "assets", "less" and "js", dropping the former "images" folder with the glyphicons .png files.

See the comments in this pull request at https://github.com/twbs/bootstrap/pull/6342 for a walk-through of all that has been added or changed in Bootstrap 3. 

I have a few new projects in the works using Mura CMS , which has a very nice starter template based on Boostrap 2. I'm currently exploring my options for updating the default Mura bundle, or diving right into Bootstrap 3 using basic BS example pages.

This article http://bootply.com/bootstrap-3-migration-guide has a good explanation and comprehensive lists of find and replace commands for bringing a BS2 site into BS3. Considering all of the changes involved, upgrading Bootstrap 2 sites may become a source for new projects!

Enforce 'www' prefix with .htaccess

On our Windows/ColdFusion servers at www.gowesthosting.com we run Helicon APE (and on our older servers, ISAPI Rewrite, also by Helicon) which lets you use standard Apache .htaccess files to create rewrite rules for any website. 

Here are a few quick useful snippets for rewriting any URL to include the 'www' prefix. This is good practice, preventing the 'duplicate content' penalty from Google which can occur when a site is available under two addresses, as well as forcing consistency to visitor sessions. This is especially critical in eCommerce sites where a user's session may not be persisted when jumping from a 'www' to 'non-www' page. 

 

RewriteEngine on
rewritecond %{http_host} ^domain.com [NC]
rewriterule ^(.*)$ http://www.domain.com/$1 [R=301,nc]

just replace "domain.com" with your actual domain, and you should see http://yoursite.com/ gets redirected to add the 'www' prefix automatically.

TIP: be sure to use the 'www' anywhere you link to your site, or when connecting any third-party services like PayPal, since a form 'post' from any external source will not be persisted if the page gets redirected. 

 

CKeditor options for Mura CMS (and other CK things)

Now that Mura has been using the new CKeditor (formerly FCKeditor) , I have been looking at the various configuration options available: 

http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html

These configuration options can be added to your styles.js.cfm , stored in the Mura file structure at
[siteid]/includes/themes/[theme]/js/editor/


Start and stop ColdFusion localhost with .bat files (Windows)

Here's a simple trick that saves a few clicks. If you are running a ColdFusion local server on a windows PC, you can start and stop the CF service with a simple bat file.

Make a new text file on your hard drive somewhere (i keep mine right on the desktop), and name it "cfstart.bat" - in your text editor of choice, enter this one line and save the file:

    NET START "coldfusion 9 application server"

(with the quotes, just like that)

You can make another called "cfstop.bat" and, you guessed it, 

    NET STOP "coldfusion 9 application server"

To use the files, on my Windows 7 PC, I just right click and select "Run as administrator", and the service stops or starts up right away. Now instead of running all the time, consuming memory, CF only runs on my local machine when i need it. 

Note: you may also want to remove the ColdFusion service from the list of items that run on startup - use start > run > mscofig to see the list.

 

 

Mura CMS / CKeditor paste as plain text by default

Any developer who uses a CMS with a wysiwyg text editor knows the frustrations of clients pasting content from MS Word and other word processing programs directly into the editor, complete with unwanted styles, and even markup elements, causing all sorts of problems on our otherwise perfectly-formatted pages.

Mura CMS uses the ubiquitous CKeditor (formerly FCK) with a number of features enabled by default, including a "Paste as Plain Text" button. If clients remembered to use this, we would be all set. But, they don't.

Fortunately, there's an easy one-line fix.
Just open up [siteid]\includes\themes\[theme]\js\editor\styles.js

and paste in this line

CKEDITOR.config.forcePasteAsPlainText = true;

That's it. All pasting of content should now be clean, with extra styles and markup removed, just as if you had clicked "paste as plain text" in the editor toolbar. 

Adding Navigation Items to MuraCMS Admin

Here's a quick and easy enhancement you can make to the MuraCMS admin, adding links in the top-level navigation for quick and easy shortcuts to commonly-used sections of Site Manager.

Like so many things in Mura, the hooks already exist for this functionality, you just need to know what to put where. In this case, it is quite simple.

Continued...

Read More...

Recent Comments

Log in a Mura user programmatically with loginByUserID()
Michael Evangelista said: @Sebastiaan, assuming you have a user bean loaded at some point of your process, you can add them t... [More]

Log in a Mura user programmatically with loginByUserID()
Sebastiaan said: Hi Michael, Question: what if I have a site set behind a login and content is for member groups onl... [More]

Filezilla - open site manager or a specific site connection on startup
ggibby said: Took me some tinkering to discover that there should be NO quotes around "0/myftpsite" May... [More]

Feed Unavailable