Mostrando entradas con la etiqueta HTML y Javascript. Mostrar todas las entradas
Mostrando entradas con la etiqueta HTML y Javascript. Mostrar todas las entradas

Cómo obtener la primera imagen del post en Blogger sin Javascript – Virginia – cancer

En Blogger hay una infinidad de etiquetas propias de la plataforma, entre las cuales existen las denominadasdata. Estas tags nos permiten mostrar determinados elementos dentro de nuestro blog, y para nuestra ventaja podemos reubicarlas a nuestro antojo.

blogger thumbnail


Por ejemplo, si deseamos mostrar el contenido de la entrada, símplemente recurrirmos adata:post.body/, o bien si necesitamos mostrar el título de ésta, añadimosdata:post.title/ a nuestro código. Para no desviarnos del objetivo principal de esta entrada, no nos adentraremos con detalles sobre el uso de estas etiquetas.

En Blogger también podemos obtener la imagen en miniatura de la entrada, pero sólamente la obtendremos a un tamaño de 72 píxeles. La etiqueta que se encarga de ello es data:post.thumbnailUrl/, y devuelve una URL en el siguiente formato:

http://X.bp.blogspot.com/-XXXXXXXXXXXXXXXXXX/s72-C/nombre-imagen.png

El valors72 en la URL indica que la imagen tendrá un tamaño de 72 píxeles, mientras que el valor-C indica que la imagen se mostrará cortada en forma de cuadrado.

Aquí viene el problema, si intentamos aumentar el tamaño de la imagen mediante CSS, debido a su baja resolución se verá pixelada.

La solución:
Si estás utilizando la combinacióndata:post.snippet/ y data:post.thumbnailUrl/ (Para obtener el resúmen y la imagen en miniatura correspondientes), puedes optar entonces por utilizardata:post.firstImageUrl/, la cual devolverá la primera imagen de la entrada en su tamaño real.

Para utilizarla bastaría con incluir el siguiente código en tu plantilla:

img alt='alguna keyword' expr:src='data:post.firstImageUrl'/

Por ejemplo, si quieres que las entradas del índice se vean como una tarjeta:

b:if cond='data:blog.pageType == "index"'
div class="entrada-indice"
a class="titulo-indice-post" expr:href="data:post.url"
data:post.title/
/a
p class="resumen-post"
data:post.snippet/
div style="clear:both" /
/p
img alt='thumb' class="miniatura" expr:src='data:post.firstImageUrl'/
/div

b:else/
!-- Código original de la entrada, el cual se mostrará normalmente dentro de ellas y páginas estáticas --
/b:if

Lo que devolvería lo siguiente:

div class="entrada-indice"
a class="titulo-indice-post" href="http://www.tublog.blogspot.com/2013/04/entrada.html"
Soy el título de alguna entrada.
/a
p class="resumen-post"
Soy un breve resúmen de la entrada que se muestra debajo de la imagen en miniatura.
div style="clear:both" /
/p
img alt='thumb' class="miniatura" src='URL-PRIMERA-IMAGEN'/
/div

En el caso del ejemplo, los selectores CSS serían los siguientes:
.entrada-indice {
/*Atributos para cada entrada dentro del índice*/
}

.titulo-indice-post {
/*Atributos para el título de cada título*/
display:block; /*Para pasar el enlace de inline a block*/
}

.resumen-post {
/*Atributos para el contenedor del resumen*/
}

.miniatura {
/*Atributos para la imagen*/
}

Dentro de cada selector deberás añadir las propiedades que creas convenientes para tu plantilla.

Nota: No es necesario reconstruir la sección completa, bastaría con buscar algo parecido a esto si ya utilizas el sistema que se encuentra enOloblogger:

img expr:src='data:post.thumbnailUrl'/

Por esto:

img alt='alguna keyword' expr:src='data:post.firstImageUrl'/

MESOTHELIOMA LAW FIRMDONATE CAR TO CHARITY CALIFORNIAHARDDRIVE DATA RECOVERY SERVICESDONATE A CAR IN MARYLAND DONATING A CAR IN MARYLAND,DONATE CARS ILLINOIS,CRIMINAL DEFENSE ATTORNEYS FLORIDA ,BEST CRIMINAL LAWYER IN ARIZONASTRUCTURED ANNUITY SETTLEMENT,ASBESTOS LAWYERS,NUNAVUT CULTURE,DAYTON FREIGHT LINES ,Bextra Bankruptcy Dental Plan Private JetMundial FootballFIFA World Cup Vestidos de Perros y gatosHosting Dominio web movilSelling annuity payments for cashSelling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlementStructured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

Donate Car To Charity CALIFORNIA DONATE CAR FOR TAX CREDITDONATE CARS IN MADONATE YOUR CAR SACRAMENTOHOW TO DONATE A CAR IN CALIFORNIA DONATE YOUR CAR FOR KIDS,CAR INSURANCE QUOTES COLORADO ,NUNAVUT CULTURE,DAYTON FREIGHT LINESHARDDRIVE DATA RECOVERY SERVICES,DONATE A CAR IN MARYLAND,MOTOR REPLACEMENTS,CHEAP DOMAIN REGISTRATION HOSTING,DONATING A CAR IN MARYLANDMundial Football Los Abogado de lesiones personales en Chicago,FIFA World Cup son muy buenos en chicago y nos ofrecen una Cotizacion de seguro y Cotizacion de Seguro de Vida y Cotizacion de seguro de coches,mesotelioma. Y visitar mesothelioma lawyers o tambien podriamos visitar mesothelioma symptoms y lexington law tambien many people lexington law firm and merlin olsen mesothelioma many people mesothelioma trial lawyers and atlanta mesothelioma lawyers Mesothelioma law firm, massachusetts mesothelioma attorney EEUU,Selling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

anti spam appliance Psd to WordPress motorcycle lawyer los angeles CHEAP DOMAIN REGISTRATION HOSTING holland michigan college business administration masters Best social media platforms for business car insurance quotes Learning adobe illustrator Online casino donating used cars to charity paperport promotional code Italian cooking school mesothelioma attorney assistance Computer science classes online accident attorneys orange county ONLINE MOTOR INSURANCE QUOTES Html email Webex Costs Custom WordPress theme designer Home Phone Internet Bundle structered settlement Hire php programmers life insurance quotes massage school dallas texas Hire php developers seattle mesothelioma lawyer PHD on Counseling Education Casino ONLINECLASSES Casino reviews PhD in counseling education hughes net business Car Insurance Quotes MN mesothelioma AUTOMOBILE ACCIDENT ATTORNEY Online College Course Online Classes structured settlement quote Criminal lawyer world trade center footage mesothelioma attorney illinois mesothelioma attorneys california Business finance group Mobile casino Dallas mesothelioma attorneys Life Insurance Co Lincoln Register Free Domains Met auto Criminal defense lawyer EMAIL BULK SERVICE student loan consolidation program Nunavut Culture personal injury solicitor mesothelioma lawyer virginia google adsense Make money online Australia Sell Annuity Payment car accident lawyers Service business software FUTURISTIC ARCHITECTURE car insurance quotes colorado att call conference CAR INSURANCE QUOTES MN most profitable internet business Live casino World Trade Center Footage DUI lawyer Social media examiner washington mesothelioma attorney Donate Cars in MA Psychic for Free Auto Accident Attorney Mesothelioma Law Firm personal injury lawyer sarasota fl Donate a car in Maryland New social media platforms ASBESTOS LAWYERS Cheap car insurance in Virginia futuristic architecture new york mesothelioma law firm Bankruptcy lawyer Dwi lawyer How to Donate A Car in California mesothelioma settlements Business VOIP Solutions verizon sip mesothelioma law suits PSYCHIC FOR FREE Car Insurance in South Dakota car insurance in south dakota Php programmers for hire Hire php developer Online Christmas cards los angeles auto accident attorneys Best Seo company Online Motor Insurance Quotes Donate Car for Tax Credit Php programmers Criminal lawyer Miami Asbestos Lawyers Seo companies Donate a Car in Maryland Royalty Free Images Stock DONATE CAR FOR TAX CREDIT mesothelioma trial attorney BEST CRIMINAL LAWYER IN ARIZONA Social media management mesothelioma survival rates los angeles motorcycle accident lawyer mesothelioma care Social media platforms for business Seo services st louis mesothelioma attorney buyer of structured settlement annuity

Share:

Ocultar entradas con determinada etiqueta en el inicio de Blogger – Automovil

A petición de+Danilo Cisneros, he creado un tutorial con el cual conseguiremos ocultar entradas con cierta etiqueta en el inicio de nuestro blog, de manera que éstas aparezcan únicamente al ingresar a la categoría correspondiente.

Esto puede ser útil para filtrar algunas entradas y/u organizar nuestra página de inicio, o bien para lo que desees. También puedes hacer algo "a la inversa", es decir, mostrar las entradas con la etiqueta X y ocultar el resto.

blogger, etiquetas, pagina inicio, homepage

El tutorial:

Para comprobar la funcionalidad del tutorial, he creado undemo en el cual se ocultan todas las entradas etiquetadas comoBlogger, las demás se muestran en el índice y en las categorías normalmente.

Opción 1: Ocultar entradas con determinada etiqueta:
Con los artilugios expandidos, en nuestro editor HTML buscaremos el siguiente código (Búscalo por su inicio y su cierre):

b:includable id='post' var='post'

!-- Acá va una gran cantidad de código el cual no tocaremos --

/b:includable

Cuando hayas encontrado este código, incluye el código siguiente de esta manera:
b:includable id='post' var='post'

!-- Inicio del código--
b:loop values='data:post.labels' var='label'
b:if cond='data:blog.url == data:blog.homepageUrl'
b:if cond='data:label.name == "Nombre de la etiqueta"'
b:else/

!-- Acá va el código que iba dentro del b:includable --

/b:if
b:else/

!-- Acá va el código que iba dentro del b:includable, otra vez --
/b:if
/b:loop
!-- Fin del código --

/b:includable

En donde aparece "Nombre de la etiqueta" escribe exactamente el nombre de cual quieras excluir en el inicio del blog, una vez hecho esto previsualiza los cambios, y si consigues observar el resultado puedes guardar tu plantilla.

Importante: Para que todo siga funcionando correctamente dentro de tu blog, es necesario que el código que estaba dentro del b:includable lo agregues también en el espacio que he marcado.

Opción 2: Mostrar únicamente entradas con determinada etiqueta:

Para invertir la operación, bastaría con buscar la segunda condicional dentro del código (La que se encuentra dentro del b:loop:
b:if cond='data:label.name == "Nombre de la etiqueta"'

Y en donde aparece == deberás dejarlo como !=, quedando de la siguiente manera:
b:if cond='data:label.name != "Nombre de la etiqueta"'

Guardas los cambios y listo.

Opción 3: Ocultar y hacer coincidir la última etiqueta:

A petición de+Emilio Luna he actualizado esta entrada con el código para hacer coincidir la última etiqueta de los posts y así ocultarlos:
b:includable id='post' var='post'
!-- Inicio del código--
b:loop values='data:post.labels' var='label'
b:if cond='data:blog.url == data:blog.homepageUrl'
b:if cond='data:label.isLast == "true"'
b:if cond='data:label.name == "Nombre de la etiqueta"'
b:else/
!-- Acá va el código que iba dentro del b:includable --
/b:if
/b:if
b:else/
!-- Acá va el código que iba dentro del b:includable, otra vez --
/b:if
/b:loop
!-- Fin del código --
/b:includable

El procedimiento para invertir la función es el mismo que el del método 2.

MESOTHELIOMA LAW FIRMDONATE CAR TO CHARITY CALIFORNIAHARDDRIVE DATA RECOVERY SERVICESDONATE A CAR IN MARYLAND DONATING A CAR IN MARYLAND,DONATE CARS ILLINOIS,CRIMINAL DEFENSE ATTORNEYS FLORIDA ,BEST CRIMINAL LAWYER IN ARIZONASTRUCTURED ANNUITY SETTLEMENT,ASBESTOS LAWYERS,NUNAVUT CULTURE,DAYTON FREIGHT LINES ,Bextra Bankruptcy Dental Plan Private JetMundial Football Perros,FIFA World Cup Peinados caninos,Veterinarios caninos,MESOTHELIOMA LAW FIRM,MESOTHELIOMA LAW FIRM,DONATE CAR TO CHARITY CALIFORNIA ,DONATE CAR FOR TAX CREDIT,DONATE CARS IN MA,DONATE YOUR CAR SACRAMENTO,HOW TO DONATE A CAR IN CALIFORNIA,SELL ANNUITY PAYMENT,DONATE YOUR CAR FOR KIDS,ASBESTOS LAWYERS,DONATE YOUR CAR FOR KIDS ,Selling annuity payments for cashSelling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

MESOTHELIOMA LAW FIRMDONATE CAR TO CHARITY CALIFORNIAHARDDRIVE DATA RECOVERY SERVICESDONATE A CAR IN MARYLAND DONATING A CAR IN MARYLAND,DONATE CARS ILLINOIS,CRIMINAL DEFENSE ATTORNEYS FLORIDA ,BEST CRIMINAL LAWYER IN ARIZONASTRUCTURED ANNUITY SETTLEMENT,ASBESTOS LAWYERS,NUNAVUT CULTURE,DAYTON FREIGHT LINES ,Bextra Bankruptcy Dental Plan Private JetAsi que mejor me fue a un hotel y motel FIFA World Cup Mundial Football New Orleans mesothelioma lawyer y mas que todo que la pase bien en ese hostal y me me fui de viaje a tennessee mesothelioma attorney donde EEUU me pidio la visa pero mejor aun many people in mesothelioma trial lawyers pero me fui a travel Alaska nebraska mesothelioma attorney pero mas aun con mesothelioma attorney nebraska mas siempre fue asi des hace mucho time merlin olsen lawsuit,Selling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

Casino Mobile casino Dayton freight lines los angeles motorcycle accident lawyer anti spam appliance better conferencing calls Futuristic architecture Bankruptcy lawyer california law lemon Personal Injury Law Firm domain yahoo mesothelioma compensation car insurance quotes mn DONATING USED CARS TO CHARITY MOTOR REPLACEMENTS webex costs Online casino low credit line credit cards Gas/Electricity benchmark lending Psd to html Home Phone Internet Bundle DALLAS MESOTHELIOMA ATTORNEYS Auto Mobile Insurance Quote car accident lawyers west palm beach Make money online Australia car accident lawyer san bernardino mesothelioma care phd in counseling education Car insurance quotes pa WEBEX COSTS Seo company Personal Injury Lawyer Health Records Personal Health Record Register Free Domains Hire php programmers Casino reviews Donate Your Car Sacramento Live casino Social media strategies Psd to WordPress donating used cars to charity Best Criminal Lawyers in Arizona virtual data rooms Business management software Mesothelioma Law Firm DONATE CARS IN MA Tech school primary pulmonary hypertension DUI lawyer Car Insurance Quotes Colorado mesotheloma hughes net business mesothelioma lawyers san diego Donate a Car in Maryland Dwi lawyer online colledges selling annuity Sell Annuity Payment DONATE OLD CARS TO CHARITY canada personals yahoo Auto Accident Attorney CHEAP CAR INSURANCE FOR LADIES online criminal justice degree Italian cooking school broward county dui lawyer cell cycle regulation ppt Donating Used Cars to Charity injury lawyers onlineclasses refinance with poor credit Dallas mesothelioma attorneys buyer of structured settlement annuity Holland Michigan College Hire php developers Online classes Annuity Settlements HOLLAND MICHIGAN COLLEGE peritoneal mesothelioma Criminal lawyer cash out annuity Service business software Social media management Christmas cards structured settlement sell motor insurance quotes Donate car for tax credit Criminal defense lawyer HOME PHONE INTERNET BUNDLE injury lawyers west palm beach HOW TO DONATE A CAR IN CALIFORNIA WordPress theme designers mesotheioma ONLINE MOTOR INSURANCE QUOTES Cheap Domain Registration Hosting Car Insurance Quotes PA workers compensation lawyer los angeles Php programmers for hire Hire php developer Register free domains How to donate a car in California mesothelioma settlement amounts Computer science classes online lawsuit mesothelioma buy structured settlements Business VOIP Solutions Php programmers Online motor insurance quotes Forensics Online Course mortgage adviser mesothelioma charities Social media platforms for business Seo companies structured settlement annuity companies Best social media platforms for business

Share:

Reestructura fácilmente las entradas en Blogger – Car – Criminal – php

Habíamos visto con anterioridad la manera depersonalizar las entradas de tu blog de varias maneras, pero creo que a muchos usuarios les interesará poder organizar la forma en la que se muestran los elementos dentro de sus artículos. Para ello, he conseguido organizar los elementos mediante etiquetas b:includable, para que con unas simples líneas puedas adaptar todo según tus necesidades.



Para que puedas comprender mejor el sistema, bastaría con observar el siguiente código de ejemplo y su modificación:

!--ESCRUCTURA EJEMPLO 1-- 
div class="post"
código titulo entrada /
código titulo resúmen post /
código etiquetas /
/div
!--ESCRUCTURA EJEMPLO 2--
div class="post"
código etiquetas /
código titulo resúmen post /
código titulo entrada /
/div

Las etiquetas de los ejemplos son únicamente para ejemplificar.

Ahora que entendiste el propósito del tutorial, empezaremos con la primera modificación, pero antes te invito a que hagas un respaldo de tu plantilla por si algo no sale bien o por si no te gusta el resultado.

Paso 1: Reemplaza el b:widget type='Blog' de tu plantilla:

Lo primero que necesitas hacer, es buscar un código muy similar a este desde la edición HTML de tu plantilla (Sin expandir artilugios):

b:widget id='Blog1' locked='true' title='Entradas del blog' type='Blog'/

Deberás seleccionarlo, y en su lugar añadir todo este código:

b:widget id='Blog88' locked='false' title='Entradas del blog' type='Blog'
b:includable id='post' var='post'


div class='post'

b:if cond='data:blog.pageType == "index"'
// Acá deberás pegar los códigos de los items que desees mostrar en las entradas del índice.
b:else/
// Esto se verá en entradas y páginas estáticas.
/b:if


/div
/b:includable


b:includable id="descripcion"
!-- LOS SIGUIENTES INCLUDABLES PERMITEN EL CORRECTO FUNCIONAMIENTO DE LAS ENTRADAS DEL BLOG, NO LOS ALTERES A MENOS QUE SEPAS LO QUE ESTÁS HACIENDO

LÍNEAS ORGANIZADAS POR VÍCTOR CALDERÓN PARA AYUDA BLOGGERS.
--

/b:includable


b:includable id='navegacion'div class='blog-pager' id='blog-pager'b:if cond='data:newerPageUrl'span id='blog-pager-newer-link'a class='blog-pager-newer-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + "_blog-pager-newer-link"' expr:title='data:newerPageTitle'data:newerPageTitle//a/span/b:ifb:if cond='data:olderPageUrl'span id='blog-pager-older-link'a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + "_blog-pager-older-link"' expr:title='data:olderPageTitle'data:olderPageTitle//a/span/b:ifa class='home-link' expr:href='data:blog.homepageUrl'data:homeMsg//a/divdiv class='clear'//b:includable
b:includable id="imagen-miniatura"b:if cond='data:post.thumbnailUrl'img class="postthumb" expr:src ="data:post.thumbnailUrl" expr:alt="data:post.title"//b:if/b:includable
b:includable id="primera-imagen"img alt='first-image' expr:src='data:post.firstImageUrl'//b:includable
b:includable id='mensaje-estado'b:if cond='data:navMessage'div class='status-msg-wrap'div class='status-msg-body'data:navMessage//divdiv class='status-msg-border'div class='status-msg-bg'div class='status-msg-hidden'data:navMessage//div/div/div/divdiv style='clear: both;'//b:if/b:includable

b:includable id="titulos-entradas"b:if cond='data:post.title'h1 class='post-title entry-title'b:if cond='data:post.link'a expr:href='data:post.link'data:post.title//ab:else/b:if cond='data:post.url'b:if cond='data:blog.url != data:post.url'a expr:href='data:post.url'data:post.title//ab:else/data:post.title//b:ifb:else/data:post.title//b:if/b:if/h1/b:if/b:includable


b:includable id="fecha-entrada"div class='post-timestamp'b:if cond='data:top.showTimestamp'data:top.timestampLabel/a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'data:post.timestamp//a/b:if/div/b:includable

b:includable id="etiquetas-post"div class='post-labels'b:if cond='data:post.labels'data:postLabelsLabel/b:loop values='data:post.labels' var='label'a expr:href='data:label.url' rel='tag'data:label.name//ab:if cond='data:label.isLast != "true"',/b:if/b:loop/b:if/div/b:includable

b:includable id='editar-entrada' var='post'b:if cond='data:post.editUrl'span expr:class='"item-control " + data:post.adminClass'a expr:href='data:post.editUrl' expr:title='data:top.editPostMsg' img alt='' class='icon-action' height='18' src='http://img2.blogblog.com/img/icon18_edit_allbkg.gif' width='18'//a/span/b:if/b:includable

b:includable id="enlace-comentarios"div class='jump-link'b:if cond='data:blog.pageType != "item"'b:if cond='data:blog.pageType != "static_page"'b:if cond='data:post.allowComments' b:if cond='data:post.forceIframeComments'span class='cmt_count_iframe_holder' expr:data-count='data:post.numComments' expr:data-onclick='data:post.addCommentOnclick' expr:data-url='data:post.canonicalUrl'/spanb:else/
b:if cond='data:post.commentSource == 1'span class='cmt_count_iframe_holder' expr:data-count='data:post.numComments' expr:data-onclick='data:post.addCommentOnclick' expr:data-url='data:post.canonicalUrl'/spanb:else/a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'data:post.commentLabelFull//a/b:if/b:if/b:if/b:if/b:if/div/b:includable

b:includable id="cuerpo-entrada"div class='post-body'data:post.body/div style='clear: both;'//div/b:includable

b:includable id="resumen-entrada"div class='post-body'data:post.snippet//div/b:includable


b:includable id="autor-entrada"div class="post-author"Escrito por: a expr:href='data:post.authorProfileUrl' rel='author' title='author profile'data:post.author//a/div/b:includable

b:includable id="leer-mas"b:if cond='data:post.hasJumpLink'div class='jump-link'a expr:href='data:post.url + "#more"' expr:title='data:post.title'data:post.jumpText//a/div/b:if/b:includable

b:includable id='main' var='top'div class='all-posts'b:loop values='data:posts' var='post'b:include data='post' name='post'/b:if cond='data:blog.pageType == "static_page"'b:include data='post' name='comment_picker'//b:ifb:if cond='data:blog.pageType == "item"'b:include data='post' name='comment_picker'//b:if/b:loop/div/b:includable

b:includable id='mobile-main' var='top'!--Vacío--/b:includable
b:includable id='mobile-nextprev'!-- Vacío--/b:includable
b:includable id='mobile-index-post' var='post'!-- Vacío--/b:includable
b:includable id='mobile-post' var='post'!-- Vacío--/b:includable
b:includable id='shareButtons' var='post'!--Vacío--/b:includable



b:includable id='threaded_comment_js' var='post'
script async='async' expr:src='data:post.commentSrc' type='text/javascript'/

script type='text/javascript'
(function() {
var items = data:post.commentJso/;
var msgs = data:post.commentMsgs/;
var config = data:post.commentConfig/;

// ![CDATA[
var cursor = null;
if (items && items.length 0) {
cursor = parseInt(items[items.length - 1].timestamp) + 1;
}

var bodyFromEntry = function(entry) {
if (entry.gd$extendedProperty) {
for (var k in entry.gd$extendedProperty) {
if (entry.gd$extendedProperty[k].name == 'blogger.contentRemoved') {
return 'span class="deleted-comment"' + entry.content.$t + '/span';
}
}
}
return entry.content.$t;
}

var parse = function(data) {
cursor = null;
var comments = [];
if (data && data.feed && data.feed.entry) {
for (var i = 0, entry; entry = data.feed.entry[i]; i++) {
var comment = {};
// comment ID, parsed out of the original id format
var id = /blog-(\d+).post-(\d+)/.exec(entry.id.$t);
comment.id = id ? id[2] : null;
comment.body = bodyFromEntry(entry);
comment.timestamp = Date.parse(entry.published.$t) + '';
if (entry.author && entry.author.constructor === Array) {
var auth = entry.author[0];
if (auth) {
comment.author = {
name: (auth.name ? auth.name.$t : undefined),
profileUrl: (auth.uri ? auth.uri.$t : undefined),
avatarUrl: (auth.gd$image ? auth.gd$image.src : undefined)
};
}
}
if (entry.link) {
if (entry.link[2]) {
comment.link = comment.permalink = entry.link[2].href;
}
if (entry.link[3]) {
var pid = /.*comments\/default\/(\d+)\?.*/.exec(entry.link[3].href);
if (pid && pid[1]) {
comment.parentId = pid[1];
}
}
}
comment.deleteclass = 'item-control blog-admin';
if (entry.gd$extendedProperty) {
for (var k in entry.gd$extendedProperty) {
if (entry.gd$extendedProperty[k].name == 'blogger.itemClass') {
comment.deleteclass += ' ' + entry.gd$extendedProperty[k].value;
} else if (entry.gd$extendedProperty[k].name == 'blogger.displayTime') {
comment.displayTime = entry.gd$extendedProperty[k].value;
}
}
}
comments.push(comment);
}
}
return comments;
};

var paginator = function(callback) {
if (hasMore()) {
var url = config.feed + '?alt=json&v=2&orderby=published&reverse=false&max-results=50';
if (cursor) {
url += '&published-min=' + new Date(cursor).toISOString();
}
window.bloggercomments = function(data) {
var parsed = parse(data);
cursor = parsed.length 50 ? null
: parseInt(parsed[parsed.length - 1].timestamp) + 1
callback(parsed);
window.bloggercomments = null;
}
url += '&callback=bloggercomments';
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
document.getElementsByTagName('head')[0].appendChild(script);
}
};
var hasMore = function() {
return !!cursor;
};
var getMeta = function(key, comment) {
if ('iswriter' == key) {
var matches = !!comment.author
&& comment.author.name == config.authorName
&& comment.author.profileUrl == config.authorUrl;
return matches ? 'true' : '';
} else if ('deletelink' == key) {
return config.baseUri + '/delete-comment.g?blogID='
+ config.blogId + '&postID=' + comment.id;
} else if ('deleteclass' == key) {
return comment.deleteclass;
}
return '';
};

var replybox = null;
var replyUrlParts = null;
var replyParent = undefined;

var onReply = function(commentId, domId) {
if (replybox == null) {
// lazily cache replybox, and adjust to suit this style:
replybox = document.getElementById('comment-editor');
if (replybox != null) {
replybox.height = '250px';
replybox.style.display = 'block';
replyUrlParts = replybox.src.split('#');
}
}
if (replybox && (commentId !== replyParent)) {
document.getElementById(domId).insertBefore(replybox, null);
replybox.src = replyUrlParts[0]
+ (commentId ? '&parentID=' + commentId : '')
+ '#' + replyUrlParts[1];
replyParent = commentId;
}
};

var hash = (window.location.hash || '#').substring(1);
var startThread, targetComment;
if (/^comment-form_/.test(hash)) {
startThread = hash.substring('comment-form_'.length);
} else if (/^c[0-9]+$/.test(hash)) {
targetComment = hash.substring(1);
}

// Configure commenting API:
var configJso = {
'maxDepth': config.maxThreadDepth
};
var provider = {
'id': config.postId,
'data': items,
'loadNext': paginator,
'hasMore': hasMore,
'getMeta': getMeta,
'onReply': onReply,
'rendered': true,
'initComment': targetComment,
'initReplyThread': startThread,
'config': configJso,
'messages': msgs
};

var render = function() {
if (window.goog && window.goog.comments) {
var holder = document.getElementById('comment-holder');
window.goog.comments.render(holder, provider);
}
};

// render now, or queue to render when library loads:
if (window.goog && window.goog.comments) {
render();
} else {
window.goog = window.goog || {};
window.goog.comments = window.goog.comments || {};
window.goog.comments.loadQueue = window.goog.comments.loadQueue || [];
window.goog.comments.loadQueue.push(render);
}
})();
//
/script
/b:includable



b:includable id='commentDeleteIcon' var='comment'
span expr:class='"item-control " + data:comment.adminClass'
b:if cond='data:showCmtPopup'
div class='goog-toggle-button'
div class='goog-inline-block comment-action-icon'/
/div
b:else/
a class='comment-delete' expr:href='data:comment.deleteUrl' expr:title='data:top.deleteCommentMsg'
img src='//www.blogger.com/img/icon_delete13.gif'/
/a
/b:if
/span
/b:includable
b:includable id='backlinkDeleteIcon' var='backlink'
span expr:class='"item-control " + data:backlink.adminClass'
a expr:href='data:backlink.deleteUrl' expr:title='data:top.deleteBacklinkMsg'
img src='//www.blogger.com/img/icon_delete13.gif'/
/a
/span
/b:includable
b:includable id='comment_picker' var='post'
b:if cond='data:post.forceIframeComments'
b:include data='post' name='iframe_comments'/
b:if cond='data:post.showThreadedComments'
b:include data='post' name='threaded_comments'/
b:else/
b:include data='post' name='comments'/
/b:if
b:else/
b:if cond='data:post.commentSource == 1'
b:include data='post' name='iframe_comments'/
b:else/
b:if cond='data:post.showThreadedComments'
b:include data='post' name='threaded_comments'/
b:else/
b:include data='post' name='comments'/
/b:if
/b:if
/b:if
/b:includable



b:includable id='comment_count_picker' var='post'/b:includable
b:includable id='comments' var='post'
div class='comments' id='comments'
a name='comments'/
b:if cond='data:post.allowComments'
h4data:post.commentLabelFull/:/h4

b:if cond='data:post.commentPagingRequired'
span class='paging-control-container'
b:if cond='data:post.hasOlderLinks'
a expr:class='data:post.oldLinkClass' expr:href='data:post.oldestLinkUrl'data:post.oldestLinkText//a
 
a expr:class='data:post.oldLinkClass' expr:href='data:post.olderLinkUrl'data:post.olderLinkText//a
 
/b:if

data:post.commentRangeText/

b:if cond='data:post.hasNewerLinks'
 
a expr:class='data:post.newLinkClass' expr:href='data:post.newerLinkUrl'data:post.newerLinkText//a
 
a expr:class='data:post.newLinkClass' expr:href='data:post.newestLinkUrl'data:post.newestLinkText//a
/b:if
/span
/b:if

div expr:id='data:widget.instanceId + "_comments-block-wrapper"'
dl expr:class='data:post.avatarIndentClass' id='comments-block'
b:loop values='data:post.comments' var='comment'
dt expr:class='"comment-author " + data:comment.authorClass' expr:id='data:comment.anchorName'
b:if cond='data:comment.favicon'
img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/
/b:if
a expr:name='data:comment.anchorName'/
b:if cond='data:blog.enabledCommentProfileImages'
data:comment.authorAvatarImage/
/b:if
b:if cond='data:comment.authorUrl'
a expr:href='data:comment.authorUrl' rel='nofollow'data:comment.author//a
b:else/
data:comment.author/
/b:if
data:commentPostedByMsg/
/dt
dd class='comment-body' expr:id='data:widget.instanceId + data:comment.cmtBodyIdPostfix'
b:if cond='data:comment.isDeleted'
span class='deleted-comment'data:comment.body//span
b:else/
p
data:comment.body/
/p
/b:if
/dd
dd class='comment-footer'
span class='comment-timestamp'
a expr:href='data:comment.url' title='comment permalink'
data:comment.timestamp/
/a
b:include data='comment' name='commentDeleteIcon'/
/span
/dd
/b:loop
/dl
/div

b:if cond='data:post.commentPagingRequired'
span class='paging-control-container'
a expr:class='data:post.oldLinkClass' expr:href='data:post.oldestLinkUrl'
data:post.oldestLinkText/
/a
a expr:class='data:post.oldLinkClass' expr:href='data:post.olderLinkUrl'
data:post.olderLinkText/
/a
 
data:post.commentRangeText/
 
a expr:class='data:post.newLinkClass' expr:href='data:post.newerLinkUrl'
data:post.newerLinkText/
/a
a expr:class='data:post.newLinkClass' expr:href='data:post.newestLinkUrl'
data:post.newestLinkText/
/a
/span
/b:if

p class='comment-footer'
b:if cond='data:post.embedCommentForm'
b:if cond='data:post.allowNewComments'
b:include data='post' name='comment-form'/
b:else/
data:post.noNewCommentsText/
/b:if
b:else/
b:if cond='data:post.allowComments'
a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'data:postCommentMsg//a
/b:if
/b:if

/p
/b:if
b:if cond='data:showCmtPopup'
div id='comment-popup'
iframe allowtransparency='true' frameborder='0' id='comment-actions' name='comment-actions' scrolling='no'
/iframe
/div
/b:if

div id='backlinks-container'
div expr:id='data:widget.instanceId + "_backlinks-container"'
b:if cond='data:post.showBacklinks'
b:include data='post' name='backlinks'/
/b:if
/div
/div
/div
/b:includable
b:includable id='comment-form' var='post'
div class='comment-form'
a name='comment-form'/
b:if cond='data:mobile'
h4 id='comment-post-message'
a expr:id='data:widget.instanceId + "_comment-editor-toggle-link"' href='javascript:void(0)'data:postCommentMsg//a/h4
pdata:blogCommentMessage//p
data:blogTeamBlogMessage/
a expr:href='data:post.commentFormIframeSrc' id='comment-editor-src'/
iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' style='display: none' width='100%'/
b:else/
h4 id='comment-post-message'data:postCommentMsg//h4
pdata:blogCommentMessage//p
data:blogTeamBlogMessage/
a expr:href='data:post.commentFormIframeSrc' id='comment-editor-src'/
iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' width='100%'/
/b:if
data:post.friendConnectJs/
data:post.cmtfpIframe/
script type='text/javascript'
BLOG_CMT_createIframe('data:post.appRpcRelayPath/', 'data:post.communityId/');
/script
/div
/b:includable
b:includable id='backlinks' var='post'
a name='links'/h4data:post.backlinksLabel//h4
b:if cond='data:post.numBacklinks != 0'
dl class='comments-block' id='comments-block'
b:loop values='data:post.backlinks' var='backlink'
div class='collapsed-backlink backlink-control'
dt class='comment-title'
span class='backlink-toggle-zippy' /span
a expr:href='data:backlink.url' rel='nofollow'data:backlink.title//a
b:include data='backlink' name='backlinkDeleteIcon'/
/dt
dd class='comment-body collapseable'
data:backlink.snippet/
/dd
dd class='comment-footer collapseable'
span class='comment-author'data:post.authorLabel/ data:backlink.author//span
span class='comment-timestamp'data:post.timestampLabel/ data:backlink.timestamp//span
/dd
/div
/b:loop
/dl
/b:if
p class='comment-footer'
a class='comment-link' expr:href='data:post.createLinkUrl' expr:id='data:widget.instanceId + "_backlinks-create-link"' target='_blank'data:post.createLinkLabel//a
/p
/b:includable

b:includable id='threaded_comments' var='post'
div class='comments' id='comments'
a name='comments'/
h4data:post.commentLabelFull/:/h4

div class='comments-content'
b:if cond='data:post.embedCommentForm'
b:include data='post' name='threaded_comment_js'/
/b:if
div id='comment-holder'
data:post.commentHtml/
/div
/div

p class='comment-footer'
b:if cond='data:post.allowNewComments'
b:include data='post' name='threaded-comment-form'/
b:else/
data:post.noNewCommentsText/
/b:if
/p

b:if cond='data:showCmtPopup'
div id='comment-popup'
iframe allowtransparency='true' frameborder='0' id='comment-actions' name='comment-actions' scrolling='no'
/iframe
/div
/b:if

div id='backlinks-container'
div expr:id='data:widget.instanceId + "_backlinks-container"'
b:if cond='data:post.showBacklinks'
b:include data='post' name='backlinks'/
/b:if
/div
/div
/div
/b:includable
b:includable id='threaded-comment-form' var='post'
div class='comment-form'
a name='comment-form'/
pdata:blogCommentMessage//p
data:blogTeamBlogMessage/
a expr:href='data:post.commentFormIframeSrc' id='comment-editor-src'/
iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' width='100%'/
data:post.friendConnectJs/
data:post.cmtfpIframe/
script type='text/javascript'
BLOG_CMT_createIframe('data:post.appRpcRelayPath/', 'data:post.communityId/');
/script
/div
/b:includable


b:includable id='iframe_comments' var='post'b:if cond='data:post.allowIframeComments'script expr:src='data:post.iframeCommentSrc' type='text/javascript'/div class='cmt_iframe_holder' expr:data-href='data:post.canonicalUrl' expr:data-viewtype='data:post.viewType'/b:if cond='data:post.embedCommentForm == "false"'a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'data:postCommentMsg//a/b:if/b:if/b:includable
/b:widget

Previsualizas los cambios y verás que hay sólo unas palabras en donde debería ir cada entrada, si efectivamente consigues este resultado puedes guardar tu plantilla.

Paso 2: Reestructura las entradas de tu blog como gustes:

Lo primero que necesitas es ubicar el siguiente código:

div class='post'

b:if cond='data:blog.pageType == "index"'
// Acá deberás pegar los códigos de los items que desees mostrar en las entradas del índice.
b:else/
// Esto se verá en entradas y páginas estáticas.
/b:if


/div

Si te fijas, hay una condicional que nos permite modificar las entradas de manera distintas tanto para el índice como para las entradas. Lo que haremos ahora será añadir todos los elementos que lleva una entrada, como título, cuerpo del artículo, etiquetas, etc. Observa un ejemplo:
div class='post'

b:if cond='data:blog.pageType == "index"' !-- EN EL ÍNDICE --
b:include name="titulos-entradas" /
b:include name="resumen-entrada" /
b:include name="leer-mas" /
b:include name="enlace-comentarios" /
b:include name="imagen-miniatura" /
b:else/ !-- DENTRO DE ENTRADAS Y PÁGINAS --
b:include name="titulos-entradas" /
b:include name="cuerpo-entrada" /
b:include name="etiquetas-post" /
b:include name="autor-entrada" /
b:include name="fecha-entrada" /
/b:if

/div

Cada elemento b:include posee un atributo name el cual lo define como tal. Puedes probar con todos estos:
  • b:include data='top' name='mensaje-estado'/ (Es el mensaje Mostrando entradas con X etiqueta)
  • b:include name="autor-entrada" / (Nombre del autor de la entrada)
  • b:include name="leer-mas" / (Inserta el Leer Más)
  • b:include name="resumen-entrada" / (Añade un breve sumario de la entrada)
  • b:include name="cuerpo-entrada" / (Inserta todo el contenido de la entrada)
  • b:include name="enlace-comentarios" / (Muestra el número de comentarios con su enlace)
  • b:include name="editar-entrada" / (El quickedit para modificar los posts rápidamente - Puede no funcionar)
  • b:include name="etiquetas-post" / (Inserta las etiquetas de la entrada)
  • b:include name="fecha-entrada" / (Muestra la fecha de publicación)
  • b:include name="titulos-entradas" / (Inserta el título de la entrada)
  • b:include name="navegacion" / (Entradas anteriores, Inicio, Entradas Recientes)
  • b:include name="imagen-miniatura" / (Imagen en miniatura en 72px)
  • b:include name="primera-imagen" / (Primera imagen del post, en tamaño original)

Mensaje del autor: Lamento la ausencia y la falta de atención, dentro de unos cuantos días todo volverá a la normalidad.

Atte. Víctor Calderón

Donate Car To Charity CALIFORNIA DONATE CAR FOR TAX CREDITDONATE CARS IN MADONATE YOUR CAR SACRAMENTOHOW TO DONATE A CAR IN CALIFORNIA DONATE YOUR CAR FOR KIDS,CAR INSURANCE QUOTES COLORADO ,NUNAVUT CULTURE,DAYTON FREIGHT LINESHARDDRIVE DATA RECOVERY SERVICES,DONATE A CAR IN MARYLAND,MOTOR REPLACEMENTS,CHEAP DOMAIN REGISTRATION HOSTING,DONATING A CAR IN MARYLANDUn dia en Mundial Football MESOTHELIOMA LAW FIRM FIFA World Cup,DONATE CAR TO CHARITY CALIFORNIA , and STRUCTURED ANNUITY SETTLEMENT ,ANNUITY SETTLEMENTS, habia mucha monja pero fui a NUNAVUT CULTURE, DAYTON FREIGHT LINES and BUSINESS VOIP SOLUTIONS,CAR INSURANCE COMPANIES pero for you ONLINE CRIMINAL JUSTICE DEGREE ,PERSONAL INJURY LAW FIRM, Virtual data rooms and future now Automobile accident attorney and pero mas aya del visita and Mesothelioma law firm CHEAP CAR INSURANCE IN VIRGINIA,Selling annuity payments for cashSelling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

MESOTHELIOMA LAW FIRMDONATE CAR TO CHARITY CALIFORNIAHARDDRIVE DATA RECOVERY SERVICESDONATE A CAR IN MARYLAND DONATING A CAR IN MARYLAND,DONATE CARS ILLINOIS,CRIMINAL DEFENSE ATTORNEYS FLORIDA ,BEST CRIMINAL LAWYER IN ARIZONASTRUCTURED ANNUITY SETTLEMENT,ASBESTOS LAWYERS,NUNAVUT CULTURE,DAYTON FREIGHT LINES ,Bextra Bankruptcy Dental Plan Private Jet

sell annuity payment Car Accident Lawyers Psychic for Free Auto Mobile Insurance Quote Online casino structured settlement blog Hire php developers Car Donate personal injury lawyer sarasota fl orlando criminal attorney cheap domain registration hosting canada personals yahoo motorcycle accident lawyer california Social media platforms for business Donate car to charity California FORENSICS ONLINE COURSE WordPress themes for designers MET AUTO Donate Car to Charity California mesothelioma lawyer dallas DUI lawyer adverse credit remortgage Mortgage adviser mesothelioma symptoms auto accident lawyer san francisco Social media management Social media tools car insurance quotes Live casino Best Criminal Lawyers in Arizona Health Records Personal Health Record See more at http//wwwginfostopnet/ motorcycle accident lawyer san francisco Computer science classes online Online Classes michigan motorcycle accident lawyer Criminal defense lawyer Criminal lawyer mesothelioma PAPERPORT PROMOTIONAL CODE mesotheloma donate your car for money mesothelioma litigation LIFE INSURANCE CO LINCOLN Automobile Accident Attorney miami personal injury attorney ANNUITY SETTLEMENT Mobile casino MOTOR REPLACEMENTS PHD on Counseling Education Casino compare life assurance Email bulk service Bankruptcy lawyer Donate Your Car Sacramento Hire php programmers Online colledges verizon sip Seo services cheap car insurance in virginia Make money online Australia HOME PHONE INTERNET BUNDLE Casino reviews How to Donate A Car in California MASSAGE SCHOOL DALLAS TEXAS Psd to WordPress structured settlement buyer World trade center footage royalty free images stock DONATE YOUR CAR FOR MONEY buying an annuity calculator Cheap Car Insurance for Ladies Html email compare small business phone systems fast cash for house Neuson Donating a Car in Maryland forensics online course Adobe illustrator classes virtual data rooms ONLINE MOTOR INSURANCE QUOTES Donate Cars Illinois mesothelioma claim PHD IN COUNSELING EDUCATION asbestos lawyers Dwi lawyer Car insurance quotes Utah HOLLAND MICHIGAN COLLEGE maritime lawyer houston Email Bulk Service MORTGAGE ADVISER Donate Your Car for Kids mesothelioma attorneys WEBEX COSTS Service business software Criminal lawyer Miami REGISTER FREE DOMAINS Life insurance co Lincoln Donate Car To Charity CALIFORNIA Better Conference Calls online motor insurance quotes Php programmers for hire Hire php developer Online Christmas cards federal criminal defense attorney CAR INSURANCE QUOTES MN yahoo web hosting structured settlement annuity companies Royalty Free Images Stock Mesothelioma Law Firm Php programmers Dallas Mesothelioma Attorneys att call conference Seo companies Best social media platforms for business

Share:

Construir spoilers con el botón de Google+ y Javascript – Donate – Law Firm

EnCodeCanyon encontré un artículo muy interesante que consta en construir spoilers con CSS3 y jQuery mediante el Callback del botón de Google+.Este artículo es un tutorial de pago, así que decidí hacer una alternativa algo similar, pero sin jQuery y con Javascript nativo.

Nota: Para comprobar en el demo si la cookie existe, primero debes actualizar la página, la cookie se almacenará en la entrada y no en todo el blog para prevenir que se desbloqueen todos los posts al mismo tiempo.
El tutorial:

Paso 1: Crear la función para el Callback y definir todas las variables:

Lo primero que debemos hacer es una función, que ésta lleve como parámetro el mismo que el del callback, además debemos empezar con todas las variables que se emplearán y también con las instrucciones que se ejecutarán al hacer +1.


script type="text/javascript"
// Empezamos con las variables
var url = document.URL; // Establecemos la URL actual
var ruta = "http://tu-blog.blogspot.com".length; // Obtenemos la longitud de nuestro dominio
var mensaje_spoiler = document.getElementById("contenido-oculto"); // Creamos una variable a partir del spoiler
var boton_spoiler = document.getElementById("boton-plusone"); // Creamos una variable a partir del botón de Google+
var cookieplus = document.cookie.substring(document.cookie.indexOf("plusoneguardado" + '=') + "plusoneguardado".length + 1,document.cookie.length); // Esta variable nos permite crear un índice por si existen otras cookies almacenadas en la página, con esta la seleccionamos de manera individual
if(cookieplus.indexOf(';') != -1)cookieplus = cookieplus.substring(0,cookieplus.indexOf(';'))


function spoiler(plusone) { // Empezamos la función con el Callback
if(plusone.state == "on") { // Si el estado del callback es on...
mensaje_spoiler.className = "g-activo"; // Asignamos una clase .g-activo al contenido oculto
boton_spoiler.className ="g-oculto"; // Asignamos una clase .g-oculto al botón +1
document.cookie ='plusoneguardado=confirmado; path=' + url.substring(ruta,999); // Escribimos la cookie denominada plusoneguardado=confirmado y se le asigna un path, se calcula mediante substring y la longitud de la variable ruta
}

};
/script

Paso 2: Detectar la cookie cuando la página se cargue:

Dentro de la misma etiqueta script iniciaremos otra nueva función, ésta se denominaráleercookie y designará una serie de instrucciones si la condición se cumple:
script type="text/javascript"
// Empezamos con las variables
var url = document.URL; // Establecemos la URL actual
var ruta = "http://tu-blog.blogspot.com".length; // Obtenemos la longitud de nuestro dominio
var mensaje_spoiler = document.getElementById("contenido-oculto"); // Creamos una variable a partir del spoiler
var boton_spoiler = document.getElementById("boton-plusone"); // Creamos una variable a partir del botón de Google+
var cookieplus = document.cookie.substring(document.cookie.indexOf("plusoneguardado" + '=') + "plusoneguardado".length + 1,document.cookie.length); // Esta variable nos permite crear un índice por si existen otras cookies almacenadas en la página, con esta la seleccionamos de manera individual
if(cookieplus.indexOf(';') != -1)cookieplus = cookieplus.substring(0,cookieplus.indexOf(';'))


function spoiler(plusone) { // Empezamos la función con el Callback
if(plusone.state == "on") { // Si el estado del callback es on...
mensaje_spoiler.className = "g-activo"; // Asignamos una clase .g-activo al contenido oculto
boton_spoiler.className ="g-oculto"; // Asignamos una clase .g-oculto al botón +1
document.cookie ='plusoneguardado=confirmado; path=' + url.substring(ruta,999); // Escribimos la cookie denominada plusoneguardado=confirmado y se le asigna un path, se calcula mediante substring y la longitud de la variable ruta
}

};
/script


// Función creada para comprobar si la cookie existe
window.onload = function leercookie() { // Cargamos la función al cargar la página
if (cookieplus == "confirmado") { // Si la cookie contiene el valor "confirmado"...
mensaje_spoiler.className = "g-activo"; // Asignamos una clase .g-activo al contenido oculto
boton_spoiler.className ="g-oculto"; // Asignamos una clase .g-oculto al botón +1
}

};

No olvides reemplazar "http://tu-blog.blogspot.com" por la URL de tu blog (Sin / al final).

Nota: Este código debe ir antes de:

/body

Paso 3: Añadir CSS a los elementos:

Para que todos estos elementos interactúen correctamente, lo que debemos hacer es crear las reglas CSS con las que condicionaremos los comportamientos. Lograremos entonces que la clase.g-activo sea del tipo visible, y.g-oculto una clase invisible, y junto con ello aplicaremos estilos a todos los elementos:

#plus-one { /*Atributos del contenedor del spoiler*/
font-family: 'Open Sans', sans-serif; /**/
background:#F9F9F9; /*Color de fondo en formato hexadecimal*/
border:5px solid white; /*Tamaño, tipo y color del borde*/
box-shadow:0 0 5px rgba(0,0,0,0.1), inset 0 0 5px rgba(0,0,0,0.3); /*Sombras con CSS3*/
color:#888; /*Color de la fuente*/
padding:12px 20px; /*Espaciado del contenedor*/
border-radius:10px; /*Bordes redondeados*/
width:85%; /*Ancho del spoiler*/
font-weight:300; /*Ancho de la tipografía, necesita que ésta la soporte*/
margin:10px auto; /*10px de márgen superior e inferior, y automático para centrar*/
}

#plus-one a { /*Atributos de los enlaces dentro del contenedor*/
text-decoration:none; /*Sin subrayado o algún otro tipo de decoración*/
color:#444;/*Color del enlace*/
}

#boton-plusone { /*Atributos del botón y del mensaje*/
font-style:italic; /*Cursiva*/
}

.g-oculto {
display:none; /* g-oculto es una clase invisible*/
}

.g-activo {
display:block; /*g-activo es una clase visible*/
}

Nota: Este código debe ir antes de:

/b:skin

Y para la fuente, pega el siguiente código antes de /head
link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300italic,300,400italic,600,600italic' rel='stylesheet' type='text/css' /


Paso 4: Insertar el spoiler en alguna entrada:

Una vez que ya tengas todo instalado y configurado correctamente en tu plantilla, deberás pegar el siguiente código en la edición HTML de la entrada en la cual insertarás el spoiler:
div id="plus-one"
div id="boton-plusone"Contenido Bloqueado. Para desbloquear el contenido oculto presiona en el siguiente botón.
br /
g:plusone callback="spoiler"/g:plusone
/div

div id="contenido-oculto" class="g-oculto"
Inserta acá el código que se mostrará cuando el botón haya sido presionado.
/div
/div

Importante: Para que el spoiler almacene la ruta correctamente, el spoiler debe ir oculto mediante el salto de línea en la página principal, o de lo contrario almacenará la cookie en dicha URL.

Donate Car To Charity CALIFORNIA DONATE CAR FOR TAX CREDITDONATE CARS IN MADONATE YOUR CAR SACRAMENTOHOW TO DONATE A CAR IN CALIFORNIA DONATE YOUR CAR FOR KIDS,CAR INSURANCE QUOTES COLORADO ,NUNAVUT CULTURE,DAYTON FREIGHT LINESHARDDRIVE DATA RECOVERY SERVICES,DONATE A CAR IN MARYLAND,MOTOR REPLACEMENTS,CHEAP DOMAIN REGISTRATION HOSTING,DONATING A CAR IN MARYLANDMundial Football history FIFA World Cup,smart,huge/big,scienciemedia,blog spot and amazes,unites pero for you gives ,, inspires and future now help and pero mas aya del visita and Mesothelioma law firm CHEAP CAR INSURANCE IN VIRGINIA,Selling annuity payments for cashSelling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

MESOTHELIOMA LAW FIRMDONATE CAR TO CHARITY CALIFORNIAHARDDRIVE DATA RECOVERY SERVICESDONATE A CAR IN MARYLAND DONATING A CAR IN MARYLAND,DONATE CARS ILLINOIS,CRIMINAL DEFENSE ATTORNEYS FLORIDA ,BEST CRIMINAL LAWYER IN ARIZONASTRUCTURED ANNUITY SETTLEMENT,ASBESTOS LAWYERS,NUNAVUT CULTURE,DAYTON FREIGHT LINES ,Bextra Bankruptcy Dental Plan Private JetAsi que mejor me fue a un hotel y motel FIFA World Cup Mundial Football New Orleans mesothelioma lawyer y mas que todo que la pase bien en ese hostal y me me fui de viaje a tennessee mesothelioma attorney donde EEUU me pidio la visa pero mejor aun many people in mesothelioma trial lawyers pero me fui a travel Alaska nebraska mesothelioma attorney pero mas aun con mesothelioma attorney nebraska mas siempre fue asi des hace mucho time merlin olsen lawsuit,Selling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

structured settlement company Online Christmas cards Business finance group Criminal defense attorneys Florida mesothelioma lawyer chicago Email Bulk Service Personal Injury Lawyer Criminal lawyer Car Insurance Quotes Colorado Casino reviews Injury Lawyers Online casino Nunavut culture Adobe illustrator classes DONATE CAR FOR TAX CREDIT CAR INSURANCE QUOTES PA FUTURISTIC ARCHITECTURE Psd to WordPress arizona auto accident attorney forensics online course Mortgage Adviser DONATE YOUR CAR FOR KIDS new mexico mesothelioma lawyer mesothelioma drug Proud Italian cook car insurance quotes pa business voice mail service Hire php developers Annuity Settlements alcohol rehab center in florida CHEAP CAR INSURANCE FOR LADIES Social media examiner Car Insurance Companies email bulk service Casino Nunavut Culture buy gift card Social media platforms emergency response plan ppt Motor Insurance Quotes life insurance quotes Mobile casino Service business software mesothelioma attorney directory boca raton personal injury attorney structured settlement buyers DONATE A CAR IN MARYLAND Dallas Mesothelioma Attorneys sell your structured settlement payments Car Insurance in South Dakota ONLINE MOTOR INSURANCE QUOTES harddrive data recovery services Donate old cars to charity Make money online Australia att call conference Social media tools Php programmers Learning adobe illustrator refinance with poor credit Php programmers for hire mesotheliama Live casino Donating Used Cars to Charity personal injury solicitor Futuristic Architecture anti spam appliance Donate Your Car for Kids DUI lawyer event management security DALLAS MESOTHELIOMA ATTORNEYS Hire php programmers new york mesothelioma law firm Dwi lawyer CAR INSURANCE QUOTES COLORADO broward county dui lawyer baltimore mesothelioma attorneys Psychic for Free online criminal justice degree motor insurance quotes philadelphia mesothelioma lawyer Criminal defense lawyer truck accident attorney los angeles mesothelioma lawsuit Seo companies best consolidation loan student Social media campaigns Hire php developer Social media platforms for business structured settlemen Html email personal injury law firm Home phone internet bundle Bankruptcy lawyer Photo Christmas cards Computer science classes online Cheap Domain Registration Hosting Best social media platforms motorcycle lawyer los angeles PhD in counseling education Best social media platforms for business Online Criminal Justice Degree Donate Car for Tax Credit dallas mesothelioma attorneys New social media platforms cheap car insurance in virginia miami personal injury attorney Cheap Auto Insurance in VA car accident lawyer in san diego asbestos lung cancer michigan motorcycle accident lawyer Donate Your Car Sacramento yahoo web hosting Custom WordPress theme designer mesothelioma lawyer dallas Seo services

Share:

Personaliza la fecha de tus entradas con Javascript y CSS – Accident

En este artículo veremos 2 métodos para personalizar las fechas con CSS3 y Javascript, ya que hace algún tiempo atrás vimos una forma para hacerlo y algunos usuarios han tenido problemas para incrustar el script correctamente en sus plantillas ya que quedaba un contenedor vacío, no se ejecutaba correctamente la función o había un problema con la etiqueta que se utilizaba.

Para evitar este problema, he creado 2 scripts, si el primero fallara en sus plantillas, pueden recurrir al segundo.

Blogger date css, custom blogger date, fecha blogger


Primer método: Mediante data:post.dateHeader:

La etiqueta data:post.dateHeader / es la que se encarga de mostrar la fecha en las entradas de tu blog, genéricamente debería funcionar en cualquier plantilla pero como toda regla tiene una excepción, hay algunas que se niegan a funcionar con esta etiqueta.


Para hacer funcionar este método, primero busca la siguiente línea en tu plantilla (Con los artilugios expandidos):

data.post.body/

Arriba de ésta pega el siguiente código:

script type="text/javascript"
// Script creado por Víctor Calderón Para Ayuda Bloggers - Opción para data:post.dateHeader
function dividir_fecha()
{
var fecha_completa="data:post.dateHeader/"; // Formato original de la fecha
var nueva_fecha=fecha_completa.split(" "); // Dividir la var con .split
dia = nueva_fecha[0];
mes = nueva_fecha[1];
año = nueva_fecha[2];
document.write("span class=\"dia\"" + dia + "/span" // Devuelve esto, con mes hasta 3 carácteres únicamente
+ "span class=\"mes\"" + mes.slice(0,3) + "/span" + "span class=\"año\"" + año + "/span"
);

}
/script

div class="fecha-ayudabloggers"
scriptdividir_fecha()/script
/div

Posteriormente vas a "Configuración | Idioma y Formato", y en "Formato de cabecera de fecha" estableces el siguiente:

13 Noviembre 2012

Si este método no funciona, suprime el código anterior y prueba con el método siguiente.

Segundo método: Mediante data:post.timestamp:

La etiqueta data:post.timestamp/ es aquella que muestra la hora en alguna determinada sección de la entrada. Con saber la hora no podemos hacer nada, pero podemos aprovechar una de las opciones que se encuentran en el apartadoFormato de hora:



Deberás elegir la que tiene este formato:

martes, noviembre 13, 2012

Una vez que ya seleccionamos esta opción, pegaremos el siguiente script en la misma sección que el anterior:


script type="text/javascript"
// Script creado por Víctor Calderón Para Ayuda Bloggers - Opción para data:post.timestamp
function dividir_fecha()
{
var fecha_completa="data:post.timestamp/"; // Formato original de la fecha
var nueva_fecha=fecha_completa.split(","); // Dividir la var con .split
var mes = nueva_fecha[1];
var año = nueva_fecha[2];
var dia_nuevo = mes.split(" "); // El día y mes se encuentran juntos, para poder obtener sólamente el día se requiere este fix
var dia = dia_nuevo[2];

document.write("span class=\"dia\"" + dia + "/span" // Devuelve esto
+ "span class=\"mes\"" + mes.slice(1,4) + "/span" + "span class=\"año\"" + año.slice(1,5) + "/span" // Los .slice son para eliminar el espacio y en el caso del mes para limitarlo a 3 carácteres
);
}


/script

div class="fecha-ayudabloggers"
scriptdividir_fecha()/script
/div

Previsualizamos si la fecha nos aparece correctamente en cada post, y si es correcto podemos guardar la plantilla.

Nota:

Si aparece un error de síntaxis al intentar previsualizar o guardar la plantilla deberásparsear el código que se encuentra al final del script (Toda la sección de document.write).

Personalizando las fechas:

El resultado de ambos scripts es el siguiente:

div class="fecha-ayudabloggers" 
span class="dia"13/span
span class="mes"Nov/span
span class="año"2012/span
/div

Si nosotros lo previsualizamos, veremos el siguiente resultado:

13Nov2012

Para poder aplicar atributos usaremos los selectores ya establecidos en las clases, tanto del div, como de los subelementos:

.fecha-ayudabloggers {
/*Atributos del contenedor de la fecha*/
}

.dia {
/*Atributos del día*/
}

.mes {
/*Atributos del mes*/
}

.año {
/*Atributos del año*/
}

Puedes jugar con los márgenes, tamaños distintos de fuentes, flotación y todos los atributos que estimes necesarios. Para que puedas tener una idea de lo que puedes hacer, adjunto 2 ejemplos con sus atributos respectivos:


Ejemplo 1 (Basado en:WpLover - Easier Date Display Technique with CSS3):


13Nov2012
Curabitur id nibh auctor tellus adipiscing pharetra. Fusce vel justo non orci semper feugiat. Cras eu leo at purus ultrices tristique. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.



Código CSS:

.fecha-ayudabloggers {
position: relative;
width: 81px;
font-family: Georgia, serif;
color: #777;
float:left;
height: 60px;
}

.dia, .mes, .año {
position: absolute;
}

.dia {
font-size: 39px;
bottom: -8px;
}

.mes {
top: 0;
left: 0;
font-size: 26px;
}

.año{
top: 16px;
right: 0;
font-size: 25px;
rotation: -90deg !important;
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
}


Ejemplo 2 (Basado en:Line25 - How To Create a Cool Blog Post Date Icon with CSS):

13Nov2012
Curabitur id nibh auctor tellus adipiscing pharetra. Fusce vel justo non orci semper feugiat. Cras eu leo at purus ultrices tristique. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.



Código CSS:

.fecha-ayudabloggers {
float:left;
position:relative;
width: 65px; height: 80px;
background: #fcfcfc;
background: linear-gradient(top, #fcfcfc 0%,#dad8d8 100%);
background: -moz-linear-gradient(top, #fcfcfc 0%, #dad8d8 100%);
background: -webkit-linear-gradient(top, #fcfcfc 0%,#dad8d8 100%);
border: 1px solid #d2d2d2;
border-radius: 10px;
box-shadow: 0px 0px 15px rgba(0,0,0,0.1);
text-align:center;
margin: 0 10px 0 0;
}

.dia, .mes, .año {
display:block;
padding:0;
margin:0;
}

.dia {
font-size:40px;
padding:10px 0 0 0;
}

.mes {
background: #d10000;
background: linear-gradient(top, #d10000 0%, #7a0909 100%);
background: -moz-linear-gradient(top, #d10000 0%, #7a0909 100%);
background: -webkit-linear-gradient(top, #d10000 0%, #7a0909 100%);
font-size: 25px;
font-weight: bold;
color: #fff;
text-transform: uppercase;
display: block;
border-top: 3px solid #a13838;
border-radius: 0 0 10px 10px;
padding: 2px 0;
}

.año{
background: #d10000;
background: linear-gradient(top, #d10000 0%, #7a0909 100%);
background: -moz-linear-gradient(top, #d10000 0%, #7a0909 100%);
background: -webkit-linear-gradient(top, #d10000 0%, #7a0909 100%);
color:#fff;
border-bottom: 1px solid #a13838;
font-size:11px;
text-align:right;
position:absolute;
top:0;
width:94%;
max-width:94%;
border-radius: 10px 10px 0 0;
padding:0 5px 0 0;
}


Notas Importantes:
  • El script no puede ir en el /head, ya que las etiquetas data requieren una cierta ubicación para poder funcionar.
  • Los atributos deben ir antes de /b:skin
  • Si en las páginas estáticas se ve el contenedor, puedes usar condicionales y encerrar todo el código con el siguiente:
b:if cond='data:blog.pageType != "static_page"'
!-- Inserta acá el código del script --
/b:if

Donate Car To Charity CALIFORNIA DONATE CAR FOR TAX CREDITDONATE CARS IN MADONATE YOUR CAR SACRAMENTOHOW TO DONATE A CAR IN CALIFORNIA DONATE YOUR CAR FOR KIDS,CAR INSURANCE QUOTES COLORADO ,NUNAVUT CULTURE,DAYTON FREIGHT LINESHARDDRIVE DATA RECOVERY SERVICES,DONATE A CAR IN MARYLAND,MOTOR REPLACEMENTS,CHEAP DOMAIN REGISTRATION HOSTING,DONATING A CAR IN MARYLANDMundial Football free legal advice,FIFA World Cup cheap web hosting donde me dieron un available domain name,cheap domain name registration,pero salio muy caro y mejor me hice student credit card ,accept credit pero me recomendaron mejor utilizar credit counseling service donde tienen un mejor soporte y credito support stocking pero mejor me compre un linux hosting y mejor me afilie a affiliate programs pero buy �web position gold�,microsoft certification,Mesothelioma law firm,Selling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

Donate Car To Charity CALIFORNIA DONATE CAR FOR TAX CREDITDONATE CARS IN MADONATE YOUR CAR SACRAMENTOHOW TO DONATE A CAR IN CALIFORNIA DONATE YOUR CAR FOR KIDS,CAR INSURANCE QUOTES COLORADO ,NUNAVUT CULTURE,DAYTON FREIGHT LINESHARDDRIVE DATA RECOVERY SERVICES,DONATE A CAR IN MARYLAND,MOTOR REPLACEMENTS,CHEAP DOMAIN REGISTRATION HOSTING,DONATING A CAR IN MARYLANDMundial Football history FIFA World Cup,smart,huge/big,scienciemedia,blog spot and amazes,unites pero for you gives ,, inspires and future now help and pero mas aya del visita and Mesothelioma law firm CHEAP CAR INSURANCE IN VIRGINIA,Selling annuity payments for cashSelling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

Car Insurance Quotes MN better conferencing calls Donate old cars to charity car donate Webex Costs CAR ACCIDENT LAWYERS Dedicated Hosting Dedicated Server Hosting Motor Insurance Quotes Social media platforms for business Online casino Make money online Australia houston mesothelioma attorney Best Seo company los angeles auto accident attorneys DONATE YOUR CAR SACRAMENTO ANNUITY SETTLEMENT florida car insurance company business administration masters Home Phone Internet Bundle Custom Christmas cards MESOTHELIOMA LAW FIRM Best social media platforms Insurance Cheap Domain Registration Hosting CAR INSURANCE QUOTES UTAH cheap auto insurance in va st louis mesothelioma attorney webex costs workplace accident attorney cheap domain registration hosting caraccidentlawyer Virtual Data Rooms Donate your car for money injury lawyers Casino emergency response plan ppt car insurance in south dakota Health Records Personal Health Record Mobile casino ONLINE MOTOR INSURANCE QUOTES state of california car insurance HOLLAND MICHIGAN COLLEGE Casino reviews phd in counseling education Criminal lawyer asbestos exposure lawyers la personal injury lawyer Psd to WordPress Hire php developers hair removal washington dc Low Credit Line Credit Cards Criminal defense lawyer Html email Social media management CHEAP CAR INSURANCE FOR LADIES car accident lawyers west palm beach WebEx costs mesotheloma World trade center footage Car Donate Donate Cars Illinois Dayton Freight Lines structured settlement investments Auto Mobile Insurance Quote Car Insurance Quotes Bankruptcy lawyer Live casino DUI lawyer mesothelioma charities Christmas cards Online College Course Life Insurance Co Lincoln Register Free Domains Adobe illustrator classes MET AUTO personal injury solicitor Social media campaigns donate old cars to charity CAR INSURANCE IN SOUTH DAKOTA Computer science classes online Hire php programmers business voip solutions VIRTUAL DATA ROOMS primary pulmonary hypertension Dwi lawyer Donate Your Car for Kids Donating used cars to charity LOW CREDIT LINE CREDIT CARDS Best social media platforms for business Structures Annuity Settlement Email Bulk Service CAR DONATE Social media strategies personal injury lawyer Service business software motorcycle lawyer los angeles Online Colleges Massage School Dallas Texas Car Insurance Quotes PA AUTOMOBILE ACCIDENT ATTORNEY Php programmers for hire Met auto Hire php developer CAR INSURANCE QUOTES PA orlando criminal attorney Online Christmas cards Paperport promotional code Donate Car for Tax Credit Php programmers Italian cooking school Dayton freight lines truck accident attorney los angeles Seo companies domain yahoo New social media platforms

Share: