Saturday, January 3, 2009

Upper Back Strengthening Exercises

How to add Related Posts to your blog? (1) -83 -

Related Entries .- It shows a series of posts related to the present to provide users of other topics in the blog that might interest you.
Providing a list of related entries results in which users stay longer on your blog instead of having to use a search engine to find information on a topic that may have already spoken.

1. Go to design the template, then Edit HTML and click Expand Widget Templates. Then add the following code between \u0026lt;b:skin> \u0026lt;! [CDATA [and ]]>\u0026lt;/ b: skin>. Preferable that hit at the end (before ]]>\u0026lt;/ b: skin> ), it may be that at some point, do not want this and you will make it easier to locate it to delete it.

.
related-posts {float: center;
width: 450px;
height: 100%;
min-height: 100%;
padding-top: 5px;
padding-left: 5px;}

# related-posts.
widget {padding-left: 6px;
margin-bottom: 10px;
background-color: # fff}

# related-posts. widget h4. h4 {related-posts
font-size: 1.2em;
font-weight: bold;
color: #666666;
font-family: Georgia, "Times New Roman", Times, serif;
margin-bottom: 0.75em;
margin-top: 0em;
padding-top: 0em;
}
.related-posts a{
color:#A10000;
}
.related-posts a:hover{
color:#369;
}
.related-posts ul{
list-style-type:none;
margin:0 0 0px 0;
padding:0px;
text-decoration:bold;
font-size:13px;
text-color:#000000;
}
.related-posts ul li{
background:transparent url(http://www.blogblog.com/tictac/tictac_orange.gif) no-repeat 0 6px;
display: block;
list-style-type: none;
margin-bottom: 8px;
padding-left: 15px;
padding-top: 0px;}

** This code refers style Related Post the or related posts, which can make changes using your criteria.

2. Add the following code between ]]>\u0026lt;/ b: skin> and \u0026lt;/ head>. Preferable that hit after ]]>\u0026lt;/ b: skin> , ie before any other script you have defined after ]]>\u0026lt;/ b: skin>.

\u0026lt;script type='text/javascript'>
//\u0026lt;![ CDATA [
was relatedTitles = new Array ();
was relatedTitlesNum = 0;
was relatedUrls = new Array ();

function related_results_labels (json) {
for (var i = 0; in < json.feed.entry.length; i++) {
each entry = json.feed.entry [i];
relatedTitles [relatedTitlesNum] = entry.title. $ t;
for (var k = 0; k < entry.link.length; k++) {
f (entry.link [k]. rel == 'alternate') {
relatedUrls [relatedTitlesNum] = entry.link [k]. href;
relatedTitlesNum + +;
break;}


}}}


function removeRelatedDuplicates ( ) {
was tmp = new Array (0);
was TMP2 = new Array (0);
for (var i = 0; in < relatedUrls.length; i++) {
if (! contains (tmp, relatedUrls [i])) {
tmp.length + = 1 ;
tmp [tmp.length - 1] = relatedUrls [i];
tmp2.length + = 1;
TMP2 [tmp2.length - 1] = relatedTitles [i];}

}
relatedTitles = TMP2;
relatedUrls = tmp;}

function contains (a, e) {
for (var j = 0; j < a.length; j++) if (a[j]==e) return true;
return false;}


printRelatedLabels function () {
was cuantosPosts = 0;
was r = Math.floor ( (relatedTitles.length - 1) * Math.random ());
was i = 0;
was dirURL = document.URL;
document.write('&lt;ul&gt;');
while (i < relatedTitles.length && i < 20) {
if (relatedUrls[r] != dirURL) {
document.write('&lt;li&gt;&lt;a href="' + relatedUrls[r] + '" title="Post relacionado: '
+ relatedTitles[r] + '">' + relatedTitles[r] + '&lt;/a&gt;&lt;/li&gt;');
}
if (r < relatedTitles.length - 1) {
r++;
} else {
r = 0;
}
i++;
cuantosPosts++;
if (cuantosPosts == 3) {
break;
}
}
document.write('&lt;/ul&gt;');
}

//]]> \u0026lt;/ script>

- if (cuantosPosts == 3) .- This refers to the maximum number displayed, you will say that only three innings.
You can change the number of tickets you want to see

3. Find the following section of code and add the following (which is blue):

\u0026lt;p class='post-footer-line post-footer-line-2'> \u0026lt;span class = 'post-labels'>
\u0026lt;b:if cond='data:post.labels'>
\u0026lt;data:postLabelsLabel/>
\u0026lt;b:loop values='data:post.labels' var='label'>
\u0026lt;a expr:href='data:label.url' rel='tag'> \u0026lt;data: label.name / > \u0026lt;/ a>
\u0026lt;b:if cond='data:label.isLast != "true"'>, \u0026lt;/ b: if>
\u0026lt;b: if cond = 'data: blog.pageType == "item" '>
\u0026lt;script expr: src =' "/ feeds/posts/default/- /" + data: + label.name
"alt = json-in-script & callback = related_results_labels & max-results = 10 '"
type =' text / javascript '/>
\u0026lt;/ b: if>

\u0026lt;/ b: loop>
\u0026lt;/ b: if>
\u0026lt;/ span> \u0026lt;/ p>

4. Finally, once you have pasted the code above, now paste the following (which is in blue) after:

\u0026lt;p class = 'post-footer-line post-footer-line-3' /> \u0026lt;div class='related-posts'>

\u0026lt;b:if cond='data:blog.pageType == "item"'>
\u0026lt;h4> Related Entries \u0026lt;/ h4> \u0026lt;script Type='text/javascript'>

removeRelatedDuplicates ();
printRelatedLabels ();
\u0026lt;/ script>
\u0026lt;/ b: if>
\u0026lt;/ div>

5. Save.

0 comments:

Post a Comment