TIGblogs TIG | TIGblogs TIGBLOGS GRUPALES ENTRAR INSCRíBASE
betzster's Blog
betzster's Blog
« anteriores 5


WordPress login/out

Lately I’ve been putting a login link in the footer of my site, but it’s also nice for that to be a logout link when you’re already logged in as well as inserting a link to the site admin section. This line of code does exactly that:

<?php if ( is_user_logged_in() ) { echo "<a href='http://joshbetz.com/feed/" . get_option('siteurl') . "/wp-admin/'>Site Admin</a> |"; } ?> <?php wp_loginout(); ?>

December 30, 2009 | 11:12 AM Comentarios  0 comentarios

Etiquetas:


Dell Mini 10v unboxing

So the Dell Mini 10v that I’ve been waiting for since Christmas came in yesterday. What a great little machine. Right now I’m calling it the Macbook Mini since I installed OSX shortly after taking it out of the box.

Unfortunately the first thing I had to do was downgrade the BIOS, which was a little stressful, but after that it was smooth sailing. Here are some photos of the unboxing:

DSC01084
OSX bootup
DSC01082
Dell Mini BIOS
Dell Mini - Ubuntu
6-cell battery
Dell Mini
DSC01077
DSC01076
DSC01075
Ubuntu Terminal
DSC01073
DSC01072
DSC01071
Dell Mini, First Bootup
Dell EULA
DSC01068
DSC01067
DSC01066
Dell Mini unboxing
DSC01064
DSC01063


December 30, 2009 | 11:12 AM Comentarios  0 comentarios

Etiquetas:


Blogroll Links Favicons

I was recently having problems with the Blogroll Links Favicons WordPress plugin. The plugin gets the favicon for all the links that you have displayed on any given page using the WordPress links system. The problem was that the standard way the plugin does this is to add a new anchor link inside the list-item for each link. This was a problem for me because the anchor links were styled, so when I added the plugin everything was messed up.

I thought it would be better if the plugin just set the background image of the anchor link that was already there to the favicon and indented the text of the link. I’ve sent an email to the author of the plugin requesting that he make this the default way to display the favicons, but just incase that doesn’t happen, here’s the code that makes it happen:

$str = explode('<li>', $v);
$a = explode(' ', $str[1]); // Explode the anchor link
$new_bookmark = '<li><a'. $favicon.') left center no-repeat; -webkit-background-size: 16px; -moz-background-size: 16px; text-indent: 20px;" '; // Setup the background image on the link

if(!empty($favicon) || !empty($default_favicon)){
	if(!empty($favicon)) {
		$new_bookmark .= '<a href=http://joshbetz.com/feed/"'.$bookmark_fullurl.'"><img'.$favicon.'" alt="" /></a> ';
		} else if (!empty($default_favicon)) {
		$new_bookmark .= '<a href=http://joshbetz.com/feed/"'.$bookmark_fullurl.'"><img'.$default_favicon.'" alt="" /></a> ';
        }
    }
*/

//Get the rest of the pieces of the link
foreach($a as $b) {
    if($b != '<a') {
        $new_bookmark .= $b . ' ';
    }
}
$bookmark_arr[$k] = $new_bookmark;

You can obviously remove that big chunk in the middle that’s commented out. I just included that so it would be easier to see what to replace. The first and last lines of this example code are the same that are in the actual plugin, also as a reference.


December 30, 2009 | 10:12 AM Comentarios  0 comentarios

Etiquetas:


WordPress Archive Jump Menu with jQuery

With a bit of code from CSS-Tricks, an idea from the WordPress.com blog, and a little elbow grease, I was able to create something that really fits in well on my site. I transformed the jQuery that I found on CSS-Tricks, which was originally used for accordions and turned it into something largely different that I really happen to like.

All I’m doing here is creating a div with an anchor-link inside it for the controller and an unordered list for the menu items. Then I basically just create a jQuery function that turns the anchor-link into a toggle button.

<div>
<?php wp_get_archives('type=monthly&limit=12'); ?>
</ul>
$(document).ready(function($) {
$('#footer #archive-dropdown li').hide();
$('#footer #archive-dropdown li:first').show();
$('#footer .#archive-button a').click(function(){
$('#footer #archive-dropdown li:not(:first)').slideToggle();
})
});

If anybody wants this in plugin form, it would be easy to turn this into a widget. I’ll probably whip something up tomorrow.


December 15, 2009 | 12:12 PM Comentarios  0 comentarios

Etiquetas:


FancyFlickr Authentication

There have been a few people that have already let me know that FancyFlickr doesn’t work with hidden/private photos. Unfortunately the class that I’m using to power the plugin doesn’t have any way to authenticate. This isn’t a huge problem, as I’ve found other classes that do authenticate. The only problem is that the only one that I’ve found and like so far requires PHP5 and PEAR. Here I’d like to ask what the users of the plugin think. Should I continue on the current path — without authentication, or should I switch to a new class with these strict requirements. I’m have no idea how many shared hosting companies support PEAR, but it should be hard to find out if your hosting company does. I’d also like to hear from other developers to get their take on which route to take.

View Poll

If you have more to say than just “yes” or “no”, let me know in the comments.


December 2, 2009 | 10:12 AM Comentarios  0 comentarios

Etiquetas:


« anteriores 5


Perfil de Josh


Posteos Recientes
Network Favicons
Set up VirtualBox for...
Facebook Hackathon...
On Comments
WordPress &...

Archivo Mensual
Abril 2007
Mayo 2007
Junio 2007
Julio 2007
Agosto 2007
Septiembre 2007
Octubre 2007
Noviembre 2007
Diciembre 2007
Marzo 2008
Abril 2008
Mayo 2008
Junio 2008
Julio 2008
Septiembre 2008
Octubre 2008
Noviembre 2008
Diciembre 2008
Enero 2009
Febrero 2009
Marzo 2009
Abril 2009
Mayo 2009
Junio 2009
Julio 2009
Agosto 2009
Septiembre 2009
Octubre 2009
Noviembre 2009
Diciembre 2009
Enero 2010
Febrero 2010
Marzo 2010
Abril 2010
Junio 2010
Julio 2010
Agosto 2010
Septiembre 2010
Octubre 2010
Noviembre 2010
Diciembre 2010
Enero 2011
Febrero 2011
Marzo 2011
Abril 2011
Junio 2011
Septiembre 2011
Octubre 2011
Noviembre 2011
Diciembre 2011
Enero 2012

Cambiar idioma


Archivo de Etiquetas
apache apple asides blog blogs coding design dreamweaver florida gallery general globalwarming hosting internet johnmayer network nifty php plugins politics prom publications tech themes twitter vacation web windows wordpress youtube

Links
High School Reunion
Josh Betz Blog
Josh Betz Professional
Josh Betz Projects


27702 views