Archive for September, 2009
How to add a Webslice
Sep 15th
It is very nice and user-friendly to have Webslices on your website. It improves the user experience by allowing visitors to be up to date with the latest content that you provide, assuming that it is fitted to this presentation style. Since my BNR exchange rates page was this kind, I pursued in adding a Webslice especially for it.
Adding a webslice to your website is simple. After you read the main specifications or my previous article, you’ll understand the concept behind: first you signal to the browser that you have a special part of your website by setting to a container element the class “hslice”:
<div id="BNRExchange" class="hslice">
<div style="display: none" class="entry-title">
<img id="image" alt="Radu Poenaru's weblog gives you BNR Exchange rates" src="http://www.radupoenaru.com/bnr/images/radupoenaru.jpg" width="128" height="128" />
<p>
Cursul oficial BNR
</p>
</div>
<p>
<a style="display: none" href="http://www.radupoenaru.com/bnr/bnr.php" rel="entry-content">
<a style="display: none" href="http://www.radupoenaru.com/bnr/bnr.php" rel="Bookmark" target="_blank">
<span style="display: none" class="ttl">5</span>
</p>
<div id="updateTrigger" class="entry-content" runat="server" />
........ your content that you want surrounded by the green webslice part ..............
</div>
WordPress – Database backup and restore
Sep 13th
From time to time, you’ll need to get a backup of your MySQL database and install it on a different machine – as I needed when reinstalling my Windows 7. I wanted to do something simple, as the last time. But now the database sql file is 11 Mb as opposed to merely 2 MB last time.
But I thought that this would be a breeze for the MySQL interface that I use and enjoy – HeidiSQL. It’s free, easy to use and user friendly. I personally don’t like too much the phpMyAdmin interface from the Vertrigo webserver installation that I use for local development.
Add Webslice to your website
Sep 11th
You might ask: what is a Webslice? It is a chunk of information, allowing you to stay up-to-date with the latest news without actually needing open a website. They are added to special toolbars (special because they usually require a specific version of a browser, like IE 8). But otherwise, the content inside itâ??s just plain old HTML. When a WebSlice is added to the toolbar, it will be represented as a clickable drop-down area, allowing you to click on it and then see a specially designed small-scale version of the website. For example, my website provides a webslice for BNR exchange rates , allowing you to keep up with latest information available.
Usually, while hovering to an area webslice-enabled, the browser will show a specific icon â?? developed by Microsoft and symbolizing this technology. There are few design guidelines that you need to follow, quoted from Microsoft website :
WordPress – How to Delete Existing Post Revisions
Sep 9th
This is the second part of managing WordPress feature of post revisions, for the users who had disabled or turned off post revisions tracking or versions history feature. As you already know, this feature exists in WordPress (starting with WordPress 2.6). After disable it (of course, if you really need to do that), it also make sense to also delete and remove all existing stored post revisions. By doing so, you’ll remove changes made on pages stored in the database such that you’ll slim down the wp_posts table size´. This is especially recommended when there is already lots of revisions or changes inside.
WordPress – managing Post Revisions Tracking
Sep 7th
A very interesting feature added in WordPress blog publishing system since version 2.6 is the post revisions tracking, like in version control systems. It simply adds a Wiki-like style tracking of edits that had been made to the posts or pages. This allows bloggers and authors to view, control and moderate – knowing who and when made what changes to any post or page. It also includes the ability to compare for differences between each saved versions, or revert back to older version.
Handle XML with namespaces
Sep 5th
I faced an issue while working with an xml file in Flash. I was unable to parse the xml data using the normal E4X syntax such as xml.node1.node2. It would give an error. The only thing different about this particular xml is that it has a lot of namespaces declared in it. After going through the documentation I found out a way to handle this issue. Let’s consider the following code:
var xml:XML = <Workbook xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:office:excel">
<ss:Worksheet ss:Name="Sheet1">
<Table ss:StyleID="ta1">
<Row ss:AutoFitHeight="0" ss:Height="13.4064">
<Cell>
<Data ss:Type="String">Preview</Data>
</Cell>
<Cell>
<Data ss:Type="String">unicode</Data>
</Cell>
<Cell>
<Data ss:Type="String">htmlcode</Data>
</Cell>
<Cell>
<Data ss:Type="String">htmlalt</Data>
</Cell>
<Cell>
<Data ss:Type="String">utfcode</Data>
</Cell>
<Cell>
<Data ss:Type="String">utfalt</Data>
</Cell>
</Row>
</Table>
</ss:Worksheet>
</Workbook>
SyntaxHighlighter – how to use it and brushes available
Sep 4th
![]()
The brushes used by SyntaxHighlighter are in separate syntax files named brushes. The following can be used to format the <pre class=”brush: brushname”> that you want to use.
Brushes () in alphabetical order:
| Brush name | Brush aliases | File name |
|---|---|---|
| ActionScript3 | as3, actionscript3 | shBrushAS3.js |
| Bash/shell | bash, shell | shBrushBash.js |
| C# | c-sharp, csharp | shBrushCSharp.js |
| C++ | cpp, c | shBrushCpp.js |
| CSS | css | shBrushCss.js |
WordPress- how to implement Syntax Highlighting
Sep 3rd
How to create an favicon.ico and improve your website
Sep 1st
As a business card represents your business or your position in it, the same applies to a website. By using a Favicon to you will improve your website personalization and when users will bookmark you, the picture will always remember them about you. Thus, the favicon is critical to it’s identity.
We might consider the favicon placed in a website is like your photo in your ID Card. As the photo enhances the chances that people identifies you, they can identify also your site by a favicon. But you have a unique one in order to not be confused with someone else. In this article I’ll help you on how you can add a favicon to your website in general or on WordPress blog in particular. More >