This tutorial shows you how to setup Subversion on Dreamweaver using Google Code. I’m using CS6, but it likely applies to earlier versions.
- Create an account on Google Code: http://code.google.com
- Create a new project: http://code.google.com/hosting/createProject
- Click “Source” and you should see something similar to:
You’ll need the following information.
Server address: lil-josh-demo.googlecode.com (replace with yours)
Repository Path: /svn/trunk
Username: JoshFromIU@gmail.com (replace with yours)
Password: You can find your password by clicking googlecode.com password.
- Open your site in Dreamweaver. From the dropdown click Site -> Manage Sites and double click your site to open it.
- Click the Version Control tab from the left.
- Enter your Google code information from step 3. For example:
- Click Test and then Save if everything worked.
- I’d recommend watching this video to get a quick overview of the Dreamweaver’s Subversion features: http://tv.adobe.com/watch/learn-dreamweaver-cs5/working-with-subversion-and-dreamweaver/ (skip to 1:40)
I spent a lot of time trying to figure out how to setup a subversion server, and found that Google Code was the easiest solution. If you have any feedback or questions feel free to leave a comment. Thank you and enjoy!
I came across a problem where I wanted to display HTML code on a page using XSLT, but I needed to replace all ‘<’ and ‘>’ characters with the HTML entity ‘<’ and ‘>’. With XSLT 2.0 this would have been super simple using the built-in replace() function. However, I was stuck with XSLT 1.0. My solution was to use jQuery to select the element I wanted to display and then replace all the mentioned characters within it. Here’s an example:
var body = $("body").html();
body = body.replace(/</g, "<");
body = body.replace(/>/g, ">");
Copy and paste the code below into a post, page, widget, or your HTML code. Be sure to replace the screen_name on line 4.
<div class="twitter" id="jstweets"></div>
ct = item.text;
// include time tweeted - thanks to will
mytime = item.created_at;
var strtime = mytime.replace(/(\+\S+) (.*)/, '$2 $1')
var mydate = new Date(Date.parse(strtime)).toLocaleDateString();
var mytime = new Date(Date.parse(strtime)).toLocaleTimeString();
ct = ct.replace(/http:\/\/\S+/g, '<a href="$&" target="_blank">$&</a>');
twitterURL = "http://twitter.com/";
ct = ct.replace(/\s(@)(\w+)/g, ' @<a href="'+twitterURL+'$2">$2</a>');
ct = ct.replace(/\s(#)(\w+)/g, ' #<a href="'+twitterURL+'search?q=%23$2" target="_blank">$2</a>');
$("#jstweets").append('<div>'+ct + ' <small><i>(' + mydate + ' @ ' + mytime + ')</i></small></div>');
NOTE: You will need jQuery for this to work. If this isn’t working, try including the following library at the beginning of this code.