Categories
Adobe CSS Dreamweaver Fix HTML HTML5 PHP Website Design Wordpress Web Design

Dreamweaver FIX Removing Extra Line Breaks in CSS HTML PHP

Isn’t it insanely annoying some times when you open a CSS File or a HTML File only to find Dreamweaver has added loads of blank lines, if your CSS is more white space than code then running this script will be very helpful.

I’ve used a tonne of CSS Compressors to fix Dreamweavers fail of blank lines in the past, but most of them do not support CSS 3, and the ones that do – seemingly do not support the transition effect.  This however, works fine with PHP, HTML and CSS (self tested).  So no more tears for those added line breaks in your PHP or CSS, just run this fix!

Open the file in Adobe Dreamweaver, press CTRL+F to load the Find & Replace dialog box (or Edit > Find and Replace).

Do the search on the source code view.

Check the box “Use regular expression” and un-check any other boxes.
Find: [\r\n]{2,}
Replace: \n
The hit “replace all”

It may take a while so fit back and wait whilst your CSS / HTML or PHP Document is flushed of all those annoying line breaks!

NOTE:  PLEASE ENSURE YOU BACK UP OR MAKE  A DUPLICATE OF ALL FILES BEFORE “CLEANING”.

> I will not be help responsible for any lost work caused by this quick fix!

Categories
Bugs Dreamweaver Errors HTML PHP Website Design Wordpress Wordpress Plugins Wordpress Themes

WordPress: The plugin generated x characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin. *Fix*

I keep getting a problem when using Dreamweaver Find and Replace – whilst modifying certain PHP files, but mainly with wordpress.

It has become apparent, that the crappy software decides to some how add spaces all over the shop like some random crack head, So if  you go to your PHP / WordPress Plugin / WordPress Theme and get this error:

The plugin generated 2 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

The not to worry! Chances are you’ve got some white space / spaces after the closing php tag!

For those who have been tinkering and are not certain what a closing PHP tag is then this is it:

?php>

Anyway, I hope that fixed your problem 🙂

Categories
Cool Stuff CSS Fonts HTML Typography

Google Web Fonts v2

Today I stumbled upon the v2 of Google Web Fonts

WOW, Blown away. Typekit had better watch their toes with this beast!

http://www.google.com/webfonts/v2

Try it now! It’s everything and more! Still “only” 180 fonts but that seems to be growing insanely quick!

Categories
Cool Stuff Dreamweaver eCommerce Guides HTML opencart opencart 1.5 OpenCart Themes

Custom Category Templates and CSS in OpenCart 1.5 +

Custom Category Templates and Custom Category CSS for OpenCart relates to the following tested versions:

OpenCart version(s):  1.5.0, 1.5.0.1, 1.5.0.2, 1.5.0.3, 1.5.0.4, 1.5.0.5

> Newly tested on OpenCart 1.5.1.1 and works

This was tested today on OpenCart v 1.5.0.5 today and was working flawlessly.

Ever wanted to have a custom category template (hard coded elements) On certain categories – or to totally change the layout completely?  Or maybe you’d just like different CSS?

These instructions relate to the default theme of OpenCart but should work for any theme provided you change the default bit with the themes name!

Open: catalog/controller/product/category.php

Find (Line 329):

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
$this->template = 'default/template/product/category.tpl';
}

Replace With:

//start custom category design by ItsAdam.co.uk
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
if ($category_id == 1) { //Category 1
$this->template = $this->config->get('config_template') . '/template/product/category1.tpl';
} elseif ($category_id == 2) { //Category 2
$this->template = $this->config->get('config_template') . '/template/product/category2.tpl';
} elseif ($category_id == 3) { //Category 3
$this->template = $this->config->get('config_template') . '/template/product/category3.tpl';
} elseif ($category_id == 4) { //Category 4
$this->template = $this->config->get('config_template') . '/template/product/category4.tpl';
} else { //default
$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
}
} else {
$this->template = 'default/template/product/category.tpl';
}
//end custom category design

For our new custom categories we will need to create the templates so that they’re viewable and custom.

Find: catalog/view/theme/product/category.tpl

And duplicate it and name it inline with the naming in the above code, ie category1.tpl etc etc

This OpenCart Mod is published for free to the Community, if you require more extensive modifications or OpenCart Themes, contact by email:

opencart at itsadam.co.uk

Sorry for the anti-spam measure, I get lots of traffic and even more spam 🙁

New! Download these instructions in plain text format (handy if you copy and paste and it’s not working or wordpress ignores the code tag).

Download the Instructions in Plain Text Format

Categories
CSS HTML HTML5

HTML 5 & CSS 3 + General Web Stuff Books I Want!

A few books I want! 🙂

If anyone has any reviews about them (if they’re good, bad or terribad!) then let me know 🙂

Categories
HTML Website Design

The Need for a Secure Input Field

It’s rather terrible that the web seemingly has no SECURE input field, by this I mean where the fields contents are not remembered by any browser.

An idea:

And please, no retard browser specific calls.

PayPal for example, I only have to put my card details in again whenever I clear my internet history, what happens then if I was on a public PC and didn’t clear my history? Joe Bloggs could come along and buy something via my PayPal account.

Less than ideal isn’t it?

Categories
Cool Stuff HTML iPhone Mobile Web

Define a Viewport for Mobile Web Devices on your Website

<meta name="viewport" content="width=320" />

<meta name="viewport" content="initial-scale=1.0" />

<meta name="viewport" content="user-scalable=false" />

<meta name="viewport" content="width=480, initial-scale=1.0" />

viewport is a formatting model for media in the css2.1 spec, where it’s a window or other form of viewing area on screen, through users view a document or website.

The iPhone’s resolution is 320x480px or 480x320px in landscape (which is how most people browse really).

This can be very handy for reading terms and conditions and so on.

Craig Hockenberry has figured out the “perfect” viewport and is avaliable here: http://furbo.org/2007/07/24/one-line-of-code/

Thought this would help anyone designing a website for purely mobile purposes.

Don’t forget that the iPad and iPod will pick up on this, aswell as Blackberry’s etc

Categories
Cool Stuff faviboob HTML

The faviboob experiment!

Ok so we’ve Tweeted the Idea of a faviboob – It’s Basically a Favicon that’s a boob – Olly sort of got abit excited about a Russian SEO Site that had a FaviBoob !

So, we googled it to see if it was a phrase well known, unfortuantly 0 results found for FaviBoob!

Now its time to test the Twitter vs Blogging power when it comes to getting your new word out there!

Shortly before writing this article both me and olly had tweeted with faviboob in it, we didnt hastag it but still, no results on google yet.

Let’s see how long it takes now with a blog post!

You heard it first here folks, FaviBoob! We should use it for breast cancer aweness or something? Who’s with me?

Categories
Adobe Dreamweaver Errors Fix HTML

Dreamweave CS4 Error: The following translators were not loaded due to errors: Server Model SSI.htm: has configuration information that is invalid.

Having this annoying little issue with Dreamweaver?

The following translators were not loaded due to errors: Server Model SSI.htm: has configuration information that is invalid.

The fix is really simple, theres a WinFileCache in the App Data Folder that you simply need to rename or delete.

The patch for windows vista to this file is generally:
C:\Users\YOURUSR\AppData\Roaming\Adobe\Dreamweaver CS4\en_US\Configuration

Enjoy!

Categories
Cool Stuff HTML SEO Website Design Wordpress Wordpress Web Design

WordPress Web Design, SEO Friendly WordPress Themes

We’re getting close to launching our WordPress Web Design Website.  It’ll be featuring exciting new WordPress Themes built solely around being SearchEngine Friendly.

These wordpress themes will mainly be built as a Framework to allow other designers and developers the ability to creative nice, affordable websites for clients with a large amount of customisation via the Theme Options page, and of course all themes are HTML and CSS 2/3 Valid!

Stay Tuned for the Lauch of the WordPress Web Design Site, I’ll be giving away discount codes!