Posts Tagged ‘development’

Feb

18

Sharing Wordpress Posts on Google Buzz without a Plugin

Posted by: Melissa Penta

Last week, Google released Google Buzz to the social media world. With Google Buzz, you can update your status, share links, photos, videos and more. It integrates directly with gmail and connects to sites like Twitter and Flickr to make sharing even easier. With this new sharing tool comes new code that you may want to put on your blog.

As a followup to my previous post Adding Social Media Links to Wordpress Without Using a Plugin, here is new code that you can use for Google Buzz:

http://www.google.com/reader/link?url=<?php the_permalink() ?>&title=<?php the_title(); ?>&srcURL=<?php bloginfo('url'); ?>

And the addition to the code that we use on this site (which is shown in my previous post) just adds a new list item to the existing links:

<li><a href="http://www.google.com/reader/link?url=<?php the_permalink() ?>&title=<?php the_title(); ?>&srcURL=<?php bloginfo('url'); ?>" title="Share with Google Buzz">Buzz</a></li>

Note that Buzz uses Google Reader to share links. In order for this to show up on your Buzz, you have to make sure that Reader is connected with your Buzz.




Feb

12

Web Developer Add-on for Firefox

Posted by: Melissa Penta

I am constantly on the look-out for new tools that will make my job as a developer easier. Anything that I can modify code straight in the browser ranks high in my book. Chris Pederick’s Web Developer does that and more.

What does it do? The Web Developer tool adds a toolbar and/or menu item to your browser with some useful developer tools. Some key features include:

  • Enable and disable scripts, images, cookies and parts of code
  • Edit HTML and CSS on any page with instant results without messing up the original code
  • Outline specific elements on a website
  • Get information on any element such as dimensions, position, parents, id and class details.
  • Resize your browser window to any specific size
  • Code and link validation
  • Display comments and hidden elements with the click of a button
  • and much much more

Web Developer Tools

What does this screenshot show? Here I have the Web Developer toolbar opened up with four features activated: Edit HTML and Edit CSS (bottom portion of the screen), outline relatively positioned elements, and the element information box.

I have three gripes about the script so far: 1) When I have the Edit HTML feature activated, it will reload any tab that I click on. I found this out the hard way! 2) The element information is not floated on the screen above the absolutely positioned elements on the page. You can move the box around, but things still get in the way. 3) The HTML editors do not color the code like Firebug does. Still though, even with it’s kinks, I highly recommend this add-on!

For more developer tools for Firefox, check out Mike’s post from last year: Firefox Web Developer tools.




Feb

09

Subversion client for Mac users

Posted by: Michael Alfaro

Thanks to Shawn for this one.  This is a good add on to the my previous post about subversion for Dreamweaver.  Get the client at http://versionsapp.com/




Feb

04

How to move your wordpress site :)

Posted by: Michael Alfaro

If you need to move your wordpress site, like we just did, follow this link from Wordpress Codex to find out how: http://codex.wordpress.org/Moving_WordPress

We ended up making 2 moves, one to a new subdomain on an different hosting provider and 2nd one to a subfolder within the new host and officially off of the root. In both cases, the directions given here worked!




Feb

03

Clear Input Text Using OnFocus

Posted by: Melissa Penta

New code has been added to the blog that I’ll share with our readers. This is a simple javascript code that will clear the default text out of an input field when you click your mouse into it. The default text will re-appear if nothing is typed in the box and you click out of it.

Just place this code anywhere inside your <input> tag:

onFocus="if (this.value=='Search') this.value='';" onblur="if (this.value=='') this.value='Search';"

Notice I highlighted the word “Search” – this is the only part of the code that you need to edit. Change “Search” to match the default value of your text field.

What do these statements mean?

  • onFocus=”if (this.value==’Search’) this.value=”;” – If the field has the text “Search” in it, then the text will clear when you put your cursor on the field. However, If you typed text in the field, then clicked out, it will not clear when you click back in.
  • onblur=”if (this.value==”) this.value=’Search’;” – If the field is left empty and you click out of the input box, then the default text “Search” will re-appear in the box. However, If you typed text in the field, then clicked out, your text will not clear.

In the end, your input code will look something like this:

<input name="s" type="text" id="s" value="Search" onFocus="if (this.value=='Search') this.value='';" onblur="if (this.value=='') this.value='Search';" />

Want to try it out? Just check out our search field at the top of the sidebar.




Feb

03

Subversion and Dreamweaver, how to guide

Posted by: Michael Alfaro




So you have subversion (SVN for short), and the built-in dreamweaver support for SVN sucks, now what?  TortoiseSVN of course, the best open source SVN client available.  But Mike, “I don’t want to have to go to a separate program to check in and out my files!”…. That’s where Subweaver comes into play.  It brings the Tortoise SVN menu commands directly into Dreamweaver through an extension.  Here’s the installation instructions along with links originally found here:

Installation

  1. Download and install TortoiseSVN fromhttp://tortoisesvn.tigris.org/
  2. Download Subweaver from http://code.google.com/p/subweaver/downloads/list
  3. Run the .mxp extension package file that you downloaded. The Adobe extension manager will guide you through its installation.
  4. When you run Dreamweaver now, you will see a new menu in the menu bar, called SubWeaver.

That’s pretty much it.  Also, if you’re in a windows environment and you’re looking for a super simple installation of Subversion, take a look here at the VisualSVN Server.  The standard version is free, but even the added features of the enterprise one only costs $500.  It’s a very simple installation and gets you up and running with Subversion within 10 minutes.




Feb

01

Submitting SSL Certificate doesn’t work – the request contains no ce...

Posted by: Michael Alfaro

Sometimes you run into issues and within 10 minutes the internet comes thorough by giving you a solution with no reasoning as to why your having the issue, but you’re just happy to have it and will chalk that one up to the good guys!  Just ran into this one while working on our IIS server and certificate authority: 0×80094801 – the request contains no certificate template information

The solution was found here

“The solution is to import the Certificate Request in command line with CertReq tool.  Use the following command to import your Certificate Request file.

certreq -submit -attrib “CertificateTemplate:WebServer” <Cert Request.req>

If the template is different, find the correct template name in “Certificate Authority” console. If you don’t find it, you may have to add the template before you try importing the request file.”

No name, no person to give credit to, but thanks!!!




Feb

01

IIS 7 Reverse Proxy, share 1 IP with multiple webservers

Posted by: Michael Alfaro

Found a need for a reverse proxy. What is that you ask??? A regular proxy server or “forward proxy” can be used to forward HTTP traffic from a network’s clients to external web servers on the Internet. The proxy can also cache popular sites to save on bandwidth also, so all CNN.com’s images would be loaded once and everyone who visits the page afterwards can use images off the local proxy server instead of downloading off the internet.

A reverse proxy would allow you to have 1 IP address and multiple webservers behind it. According to Wikipedia :”A reverse proxy is a proxy server that is installed in a server network. Typically, reverse proxies are used in front of Web servers. All connections coming from the Internet addressed to one of the Web servers are routed through the proxy server, which may either deal with the request itself or pass the request wholly or partially to the main web servers.”

At LW, with our virtual environment, we’re able to setup multiple test boxes for all our different client environments, but right now we still have 1 IP address, thus the need for a reverse proxy.  Searching the internet for something that works properly and is inexpensive, I found that IIS has a module called Application Request Routing (ARR) and URL rewriting which when combined give you the reverse proxy functionality. To download the modules, you can find them here: ARR, URL rewriter

here’s the basic steps in IIS 7 to setup which were found here:

“For a very simple reverse proxy, all you have to do is:

1. Select the server node on inetmgr.

2. Double click on Application Request Routing icon.

3. Select/check “Enable proxy”.

4. Select/check “Use URL Rewrite to inspect incoming requests.

5. Enter the server of where you want to route the request to in “Reverse proxy” – ie. (myserver.contoso.com).

In above example, all requests that are received by ARR will be routed to myserver.contoso.com.”

There’s also a great video walkthrough by Ruslan Yakushev(his accent is pretty thick) that really shows you how to use the modules properly, it’s located here

Enjoy!




Jan

25

Simple jQuery Content Reveal Script

Posted by: Melissa Penta

After developing a few websites that have content reveal and accordion scripts, I decided to take what I learned and write my own simple, very customizable content reveal script. Since the web has helped me so much with learning about jQuery, I wanted to share my code.

This script helps creates clean layouts where there is a lot of content. To see the final result, take a look at the demo at the bottom of this post.

The Javascript

First, download the jQuery library (I recommend the minified version since it is lightweight). Link the library to your page using the following code:

<script src="path-to-directory/jquery-1.4.min.js" type="text/javascript"></script>
  • Be sure to change the path to the directory that you keep your jQuery library in.

Paste this code between the <head></head> tags; if you paste it into a seperate javascript file, remove the <script> opening and closing tags:

<script type="text/javascript">
$(document).ready(function() {
	//expand all or hide all options
	$('#tools a.expand').click(function() { $('#reveal .content').slideDown('slow'); $('#reveal .header a').addClass('active'); });
	$('#tools a.hide').click(function() { $('#reveal .content').slideUp('slow'); $('#reveal .header a').removeClass('active'); });
	//individual header click toggle
	$('#reveal .header a').click(function(){
		//collapse and remove active class, if the div is opened it will close
		var activeHeader = $(this).hasClass('active');
		$(this).removeClass('active').parent('div').next('.content').slideUp('slow');
		//open the div if it is closed and add the active class
		if(activeHeader==0)
		{ $(this).addClass('active').parent('div').next('.content').slideDown('slow'); }
	});
});
</script>

I color coded some of the classes that the script calls. If you want to change the class names be sure to also change the classes in both the HTML and CSS. I have the tags colored to match in the CSS and HTML code snippets. The code is also commented to explain what each part does.

The CSS

Paste this code between the <head></head> tags; if you paste it into a seperate css file, remove the <style> opening and closing tags:

<style type="text/css">
#reveal { color:#444; font-family:Arial, Helvetica, sans-serif; font-size:12px; width:300px; }
#reveal #tools { color:#39f; cursor:pointer; font-size:10px; margin-bottom:3px; text-align:right; }
#reveal .header { border:1px solid #999; cursor:pointer; margin-bottom:3px; -moz-border-radius:5px; -webkit-border-radius:5px; padding:3px 0; }
#reveal .header a { background:url(path-to-directory/arrow-inactive.png) no-repeat right; color:#00aef0; display:block; margin:0 10px; }
#reveal .header a.active { background:url(path-to-directory/arrow-active.png) no-repeat right; }
#reveal .content { display:none; padding:10px; }
</style>

Most of this code is styling. Important parts of the CSS are in red font:

  • cursor:pointer – Since there is no href tag, the links for Expand All, Hide All and the headers need the hand cursor
  • display:none – The content is initially hidden from view to keep the layout clean.
    Note: If you want the content to be revealed when the page loads, you can remove this property; however you will also want to add the active class to each header in the HTML otherwise the script will not work properly on the initial hit.
  • background:url() – You may want to have an indicator on your header that lets the user know that there is more content. A basic graphic for that is an arrow that points to the right while inactive and down while active. Be sure to change the path to the directory that holds your background image. If you would like to use the arrows from the example, you can download them here and here.

The HTML

Paste this code inbtween the <html></html> tags where you want the content reveal to show up:

<div id="reveal">

    <div id="tools">
        <a class="expand">Expand All +</a>
	<a class="hide">Hide All -</a>
    </div> 

    <div class="header"><a>
	Header One Toggle
    </a></div>
    <div class="content">
	Content under the first header
    </div>

    <div class="header"><a>
	Header Two Toggle
    </a></div>
    <div class="content">
	Content under the second header
    </div>

    <div class="header"><a>
	Header Three Toggle
    </a></div>
    <div class="content">
	Content under the third header
    </div>

</div>

To quickly explain what each part of the code is used for:

  • reveal id – a container div for the code
  • tools id – holds the Expand All and Hide All links
  • header class – the header link for each content div
  • content class – the content container (initially hidden on load of the page)

Demo

As long as all of the code is pasted in the correct areas of your page and you changed the directory paths to where the jQuery library and arrow images reside, then you should come up with the following result:

Donec accumsan laoreet tincidunt. Vestibulum semper dui et est pellentesque venenatis. Aliquam vel libero diam. Quisque elementum, mi sed rutrum dictum, tellus erat ullamcorper purus, eget gravida tortor metus ut nunc.

Donec accumsan laoreet tincidunt. Vestibulum semper dui et est pellentesque venenatis. Aliquam vel libero diam. Quisque elementum, mi sed rutrum dictum, tellus erat ullamcorper purus, eget gravida tortor metus ut nunc.
Donec accumsan laoreet tincidunt. Vestibulum semper dui et est pellentesque venenatis. Aliquam vel libero diam. Quisque elementum, mi sed rutrum dictum, tellus erat ullamcorper purus, eget gravida tortor metus ut nunc.



Jan

24

Sikuli – a funny name and a new way to program

Posted by: Pinaki Kathiari

Project Sikuli is a new automation program that can be programed using screenshots. Yes, screenshots! You can automate anything on your PC or MAC using screenshots. Don’t believe me, check out the vid. Then check out the Project Sikuli site.