Barefoot Scribbles

Finally I dance with confidence to songs

Archive for the 'code' Category


Associate Content Tip of the Day 2 Sept 2007: HTML Special Characters

Posted by thebarefoot on September 2, 2007

Basic HTML makes creating special and non-Latin alphabetic characters easy. These characters are created by using the “&” symbol followed by the HTML code for the character and terminated with a semi-colon. For example the Spanish enyay (n with a tilde above) in HTML is ñ (without the spaces).

Knowing just a little HTML can get you through some tough spots. Many web sites, like Associated Content and WordPress, support basic HTML. At AC, simply turn off the built-in editor and you can use some of the basic HTML tags and character codes.

Here is a brief, but not exhaustive list of some of the more common special characters.
" = "
& = &
< = &lt;
> = &gt;
¿ = &iquest;
À = &Agrave;
à = &agrave;
Á = &Aacute;
á = &aacute;
 = &Acirc;
â = &acirc;
à = &Atilde;
ã = &atilde;
Ä = &Auml;
ä = &auml;
Å = &Aring;
å = &aring;
Æ = &AElig;
æ = &aelig;
Ç = &Ccedil;
ç = &ccedil;
È = &Egrave;
è = &egrave;
É = &Eacute;
é = &eacute;
Ø = &Oslash;
ø = &oslash;
Ñ = &Ntilde;
ñ = &ntilde;
¼ = &frac14;
½ = &frac12;
¾ = &frac34;
¢ = &cent;

For a more complex tag you can combine the the letters “TM” with the code to superscript and make the font smaller:

<FONT SIZE=”-1″><SUP>TM</SUP></FONT> which renders TM

You can find the complete list of codes for special characters at WebMonkey

Posted in AC, Associated Content, HTML, basic HTML, code, special characters, webmonkey | 6 Comments »

Making the PV converter better

Posted by thebarefoot on June 7, 2007

Your suggestions really do count. Version 1.4 of the converter is now available. Two features were added:

Delimiter selection and a Key Field.

You can now choose delimiters other than comma. I’m not sure why you would, but you can.

The output now includes a new column at the front of the row, labeled “Key”. You can make the key anything you want, just don’t include your delimiter in the key or you’ll throw the whole thing off.  This should help you line things up especially if you have to convert multiple AC pages.  The default for the key is pre-filled with the current date.

As always you can download it or run it live.

Posted in Associated Content, code, hyperlink, javascript, page view, software | 2 Comments »

AC PV conveter v1.3 Now with IE stain-fighting power

Posted by thebarefoot on May 28, 2007

I got the IE bug in the converter figured out. If you’re really interested, IE was putting in carriage returns which are not the same as end-of-line characters. In the end, it was a simple 2 line fix to just tell the code to replace “\r”. Thanks for the heartburn Bill..

The new duel-browser-compatible version should be up soon on Michy’s site.   Check the “bug” list at the bottom of the file to make sure you have the version with “RESOLVED: IE reads line breaks where there are none.”

You can either run it from there or download it for off-line use. I also added a little meta tag to the file. If you are wanting to host the page as part of your site, please make note of it and email me. If you don’t, there will be no way to send you updates.

Thanks to all the testers. Pam even reports that this works well in Camino on her Mac. Thanks to Michy for giving me a distribution point.

http://www.accentuateservices.com/theBarefoot/

Posted in Associated Content, HTML, code, javascript, page view | 1 Comment »

AC PV conveter v1.1 - Firefox only

Posted by thebarefoot on May 25, 2007

The WordPress editor put in a lot of junk that broke the code that I previously had here. I guess I’ll find some place to distribute this intact.

Run it live at:

http://www.accentuateservices.com/theBarefoot/

Posted in Associated Content, HTML, code, javascript, page view, software | 7 Comments »

Converting AC’s PV page to CSV

Posted by thebarefoot on May 21, 2007

I spent the weekend writing a program that will convert Associated Content’s page view report into a comma-separated format that most spreadsheet applications will read as nice columns.  I got it free enough of bugs to call it release 0.1.

It’s still has a problem figuring out the “submitted for payment or nonpayment” and the “submitted as Exclusive or Non-exclusive”, but it doesn’t throw off the overall format.  It also puts an extra, leading column in, but that is easily deleted once you have it in the spreadsheet.

If you want to be a beta-tester, please log into AC and send your email address via my content producer page with the message “PV converter beta”.  The whole thing is one simple HTML file.  The instructions are built into the file.

Since this is a very specific program, I’ll only send copies to registered AC producers.  Log in before you message me.  Thanks.

Posted in Associated Content, HTML, code, page view | 3 Comments »

Associated Content Tip of the Day: 25 April 2007 Hyperlinks

Posted by thebarefoot on April 24, 2007

Hyperlinks
Associated Content discourages the use of active hyperlinks in an article body. It is recommended that you limit active URL to the “resources” section of the article. According to the AC submission guidelines it is preferred that any URL in the body be simple text (e.g. www.google.com). To create an active link in the resource area use a standard HTML anchor tag like:

<a href=”http://www.accentuateservices.com”>A Writer’s Forum</a>
Only the words “A Writer’s Forum” would display, but clicking them would direct your browser to the site, like this: A Writer’s Forum.

This is the basic anchor and link tag for HTML. There are other attributes that can be applied to the code, but the resources area of the Associated Content template is limited to 120 characters. You’ll want to keep it simple.

It is possible to use anchor tags in the article body. There are two ways to do this.

1. With the editor ON: Type the text; select the text; click the “create hyperlink” icon on the editor’s toolbar; type or paste the target URL.

2. With the editor OFF: use the above example to create the correct HTML code.

It is not guaranteed to produce the desired results. If any part of the tag matches one of AC’s keywords the publisher will hack your URL and put its own hyperlink in its place. What are the keywords? No one knows the entire list. Most U.S. state names are AC keywords. This makes embedding an anchor/href to a state government agency almost impossible in the article body.

You may create a link to The Official Website of the State of Alabama by typing the HTML tag <a href=”http://www.alabama.gov/portal/index.jsp”>The Official Website of the State of Alabama</a> . When you hit the publish button, AC’s “interlinking” software will scan your article and replace “Alabama” with their own link to search results from the AC web site.

The resulting link code would look like: <a href=”http://www.alabama.gov/portal/index.jsp”>The Official Website of the State of</a><a href=”http://www.associatedcontent.com/theme/123/Alabama.html”>Alabama</a> .

Notice that the anchor tag closes after “State of”. The result is two links, pointing to two destinations, but appearing as one continuous highlighted phrase in the article.

Some common words like “running” are AC keywords. Even celebrity names are keywords. You never know what will happen with a link embedded in the body of your article. Use them sparingly.

Posted in Advice, Associated Content, HTML, code, how to, hyperlink, tips | 6 Comments »