Widgetizing Your Blog Widgetizing tu blog
June 15th, 2007 · by David Bradley 15 de junio de 2007 por David Bradley
If you have already upgraded to Wordpress 2.2, then this post is not for you. Si ya has actualizado a Wordpress 2,2, y luego este puesto no es para usted. But, if you are languishing on an earlier installation and running a theme that does not support widgets, then you may like to check out how to get widgetized. Pero, si usted está languideciendo en una anterior instalación y el funcionamiento de un tema que no es compatible con reproductores, como puede comprobar cómo conseguir widgetized. But, first what are widgets? Pero, en primer lugar ¿Qué son los Widgets? Well, they’re little snippets of code that sit in their own boxes within your sidebar and can be reordered with a simple drag and drop. Bueno, son pocos fragmentos de código que se sientan en sus propias cajas dentro de la columna lateral y pueden ser reordenados con un simple arrastrar y soltar. So, your search box is at the bottom and your Feedburner count at the top but you want them the other way around? Así, el cuadro de búsqueda se encuentra en la parte inferior y su Feedburner contar en la parte superior, pero quieras al revés? It’sa lot of cutting and pasting with the standard sidebar in Theme Editor, but if your blog is widgetized all you do is drag the search widget to the top of the stack and the Feedburner block to the bottom. Se trata de un lote de cortar y pegar con la norma lateral en Tema: Editor, pero si tu blog es widgetized todo lo que hacen es arrastrar el widget de búsqueda en la parte superior de la pila y el bloque de Feedburner a la parte inferior. And save the new settings. Y guardar la nueva configuración.
The Automattic site has the full skinny on Automattic El sitio cuenta con el pleno a skinny widgetizing your site widgetizing su sitio and provides you with the necessary downloads, so I am not going to repeat their wise words here. y le proporciona la necesaria descargas, por lo que no voy a repetir sus sabias palabras aquí. But, one aspect of widgetizing the Sciencebase site earlier this year, prior to the release of version 2.2, was that I simply could not eradicate an orphaned bullet point that was appearing at the top of the sidebar with no entry to which is was associated. Sin embargo, un aspecto de widgetizing la Sciencebase sitio a comienzos de este año, antes de la liberación de la versión 2,2, fue que yo simplemente no podía erradicar una viñeta que han quedado huérfanos que se aparecen en la parte superior de la columna lateral con ninguna entrada a la que se estaba asociada. I messed around with the li and ul tags in the widgets themselves, played with the css in the widgets.php (adding the list-style-type: none; tag to all and sundry to try and delete the little dot). Me ensucié un poco con el li ul etiquetas y en los reproductores propios, juega con el css en la widgets.php (añadiendo la lista de estilo de tipo: ninguno; etiqueta a todos y cada uno para tratar de borrar el pequeño punto). Actually, I grew quite fond of the little critter in the end, but knew that most visitors would prefer not to see the bullet, it was far too distracting. En realidad, yo crecí muy aficionado a la poco Critter en la final, pero sabía que la mayoría de los visitantes prefiere no ver la viñeta, se distraen demasiado.
Finally, after searching the web and reading the manual a dozen times or more I went back to the Automattic site, where it finally dawned on me that a hack they mentioned in regard to formating non-standard sidebars ready to be widgetized might actually work for me too. Por último, después de la búsqueda en la web y leer el manual de una docena de veces o más volví a la Automattic sitio, donde finalmente amaneció en mí que un hack que se menciona en cuanto a formatear no estándar barras laterales listo para ser widgetized podría trabajar para yo también.
To make widgets work in versions of Wordpress pre-2.2 you have to have a file called functions.php in your theme’s folder. Para realizar los trabajos reproductores en las versiones de Wordpress pre-2,2 tienes que tener un archivo llamado functions.php en tu tema de la carpeta. This file holds nothing but a conditional tag to render the widgetized sidebar as appropriate, but you can add an extra argument or two to make the widget plugin ignore some of the formating in its inbuilt CSS: Este archivo tiene nada más que un código condicional para hacer que la barra lateral widgetized en su caso, pero usted puede añadir un argumento extra o dos para hacer que el widget plugin hacer caso omiso de algunas de las formatear incorporado en su CSS:
<?php <? PHP
if ( function_exists(’register_sidebar’) ) if (function_exists ( 'register_sidebar'))
register_sidebar(array( register_sidebar (array (
‘before_widget’ => ”, // Removes the list tag 'Before_widget "=>", / / Elimina la lista de etiqueta
‘after_widget’ => ”, // Removes removes the end list entry tag 'After_widget "=>", / / Remueve el fin elimina la lista de entrada etiqueta
‘before_title’ => ”, // Removes the head tag 'Before_title "=>", / / Remueve el jefe etiqueta
‘after_title’ => ”, // Removes the end head tag 'After_title "=>", / / Remueve el fin jefe etiqueta
));
?> >
Once I’d added this code, fixing the angle brackets to be the actual html enclosures, and reloaded the Sciencebase site up it popped, sans bullet. Una vez que había añadido este código, la fijación de los paréntesis angulares a ser el real html recintos, y la recarga Sciencebase sitio hasta que popped, sin bala. I will miss the little critter though. Voy a perder el poco aunque Critter.






















2 responses so far ↓ 2 respuestas hasta el momento ↓
Eliena // Eliena / / Jun 17, 2007 at 2:35 pm Jun 17, 2007 a las 2:35 pm
can i implement this code on my blog page ? i puede aplicar este código en mi blog?
David Bradley David Bradley // / / Jun 17, 2007 at 7:02 pm Jun 17, 2007 a las 7:02 pm
Sorry Eliena, but I don’t understand why you would want to do that in the first place. Eliena Lo sentimos, pero no entiendo por qué usted quiere hacer que en primer lugar. Blogspot is its own system, presumably you have not above blog folders anyway, so what would you be implementing, regardless of the fact the hack is for Wordpress? Blogspot es su propio sistema, es de suponer que usted tiene, ni superior al blog carpetas de todos modos, así que lo que usted debe poner en práctica, independientemente del hecho de cortar es la de Wordpress?
db DB
Leave a Comment Déjanos tu comentario