I saw this video on @KurtyD’s blog, http://daradics.com. He said that the video had a transformational effect on him. I’m going to have to agree.
[youtube]http://www.youtube.com/watch?v=NLlGopyXT_g[/youtube]
I saw this video on @KurtyD’s blog, http://daradics.com. He said that the video had a transformational effect on him. I’m going to have to agree.
[youtube]http://www.youtube.com/watch?v=NLlGopyXT_g[/youtube]
Recently I have been doing a lot of work with WordPress. I love WordPress. one of the things I like most about WordPress is the plugins and themes.
I recently bought a copy of the MimboPro theme. Mimbo is clean and very professional. More of a CMS theme then a blogging theme, prefect for what I want to use it for.
As I dug into MimboPro and WordPress, I realized something strange, the MimboPro theme doesn’t support paging in a category view. What this means is EVERY SINGLE post you make is shown on one page. If you have a very active site, like the one I’m working on, this quickly gets out of hand. Look at this image and you will see what I mean (click for full version).
One of the reasons I like MimboPro was the support that the authors of the theme offer. I headed over to their message forums and found other people like me asking for the Additon of Paged Navigation To Category Pages. The original post was 8 months ago, and no one had resolved anything. I made a post to the MimboPro authors only to be told that there is going to be a new theme that will handle this and it will be available at a deep discount to MimboPro owner. This upset me a bit, so taking matters into my own hand, I fixed what Mimbo wont, and I am handing out my own patch to solve this issue. Below are the instructions to hack your own files, or you can just download my zip file with the pre-hacked files.
Pre-Hacked Files:
Download with pre-hacked files: JoshHighlands_MimboPro_CategoryPagingHack.zip
DIY INSTRUCTIONS (click images for full sizes):
That’s it! MimboPro will now have paging in all of the categories. The next and previous links will only show up when you have enough posts. The WordPress default is 10 posts. You can edit the number of posts by going to change the number of posts to show on a category page, go into to the admin and under “setting” > “reading” you will find the option, as highlighted here.
If you had any problem reading the code in the image files, download the zip files with the pre-hacked files in them.
Download with pre-hacked files: JoshHighlands_MimboPro_CategoryPagingHack.zip
If you have any further questions, please post them in the comment.
I have been a loyal fan of the kick-ass php framework, codeIgniter, for some time now. A while back I made a post on how to improve the view handling of codeIgniter. I would like to retract that post. Through the comments on that post I found out about an undocumented parameter (as of version 1.7, it has been documented) that allows view to be rendered into a variable. This changes everything, and totally negates any of the complaint I had about how CI handles layouts and views.
Below is an example of live code I have running at loudsongs.com. It shows how I have been able to take advantage of of this powerful third parameter that stops CI from rendering a view to the screen when loading it.
Inside of my controller
function index()
{
$base_url = base_url();
//what the nav needs
$navigation_data['navTab'] = "home";
//basic info for the header
$layout_data['pageTitle'] = "LoudSon.gs";
$layout_data['meta_description'] = "Under Ground Lyrics, hardcore, metal, emo, rock";
$layout_data['meta_keywords'] = "lyrics,song,songs,words,hardore,metal,emo,rock";
$layout_data['meta_url'] = "$base_url";
$layout_data['meta_classification'] = "home";
$layout_data['searchInput'] = "";
$layout_data['searchOptions'] = "";
$this->load->model('search');
$lastest_albums = $this->search->last_n_albumsAdded(10);
$popular_songs = $this->search->popular_n_songs(10);
//get the featured Albums
$featuredAlbums = $this->search->getFeaturedAlbums();
$body_data['featured'] = $featuredAlbums;
$body_data['newest'] = $lastest_albums;
$body_data['popular'] = $popular_songs;
//load the content variables
$layout_data['content_navigation'] = $this->load->view('navigation', $navigation_data, true);
$layout_data['content_body'] = $this->load->view('home/homePage', $body_data, true);
$this->load->view('layouts/main', $layout_data);
}
/views/navigation.php
<div id="header">
<h1 title="Loud Songs Logo">LoudSongs search - hard to find obscure lyrics</h1>
<ul title="navigation">
<li <? if($navTab == "about"){echo " id=\"active\"";}?>><a href="<?= base_url(); ?>about" title="About Page">About</a></li>
<li <? if($navTab == "add"){echo " id=\"active\"";}?>><a href="<?= base_url(); ?>add" title="Add Lyrics">Add Lyrics</a></li>
<li <? if($navTab == "home"){echo " id=\"active\"";}?>><a href="<?= base_url(); ?>" title="Home Page">Home</a></li>
</ul>
</div>
/views/home/homePage.php
<div>
Thanks for visiting LoudSongs
<br/>
We are trying to build a maintain a collection of punk rock, hardcore, emo, metal and other lyrics.
This website is free and open to all.
Please help us by <a href="http://www.LoudSon.gs/add">contributing to the collection</a>.
</div>
<div>
<? $this->load->view('home/featuredAlbums'); ?>
</div>
<div class="middle_col_split">
<? $this->load->view('home/recentlyAdded'); ?>
</div>
<div class="middle_col_split">
<? $this->load->view('home/mostPopularSongs'); ?>
</div>
/views/layouts/main.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
<meta name="description" content="<?= $meta_description ?>">
<meta name="keywords" content="<?= $meta_keywords ?>">
<meta http-equiv="expires" content="0" />
<meta name="classification" content="<?= $meta_classification ?>" />
<meta name="Robots" content="index,follow">
<meta name="revisit-after" content="2 Days">
<meta name="language" content="en-us">
<link href="<?= base_url() ?>includes/styles/lyrics.css" rel="stylesheet" type="text/css" media="screen" title="default">
<script language="javascript" type="text/javascript" src="<?= base_url() ?>includes/scripts/jquery-1.2.6.min.js"></script>
<title><?= $pageTitle ?></title>
</head>
<body id="home">
<div id="nav">
<?= $content_navigation; ?>
</div>
<div id="middle_column">
<?= $content_body ?>
</div>
</body>
</html>
wow, ok, so that might be a lot to digest. The bottom line is this, CI doesnt have “layouts” like other frameworks, so you have to become creative and use a view AS a layout by using the mythical 3rd parameter when loading a view. We load data into the navigation view and store all of that into the $layout_data array, then we load a view named homePage and pass data into it, and stor it into the $layout_data array. When we are done loading all of the views into the array, we pass that array into another view. This view acts as our layout. easy as that! check it out below:
//load the content variables
$layout_data['content_navigation'] = $this->load->view('navigation', $navigation_data, true);
$layout_data['content_body'] = $this->load->view('home/homePage', $body_data, true);
$this->load->view('layouts/main', $layout_data);
I hope this helps someone understand how codeigniter does have layout and view functionality, you just have to structure it that way in your code.
post some comments if you need more clarification.
There was a new feature introduced with the iPhone 2.1 firmware update that is driving me crazy and making me curse apple an my iPhone daily. I am talking about the SMS multi reminder.
The SMS multi reminder is designed to notify you with an alert if you have an unread SMS (text) message. Sounds good in theory, but trust me, it horrible in practice.
When you receive a new SMS message to your iPhone, the first few lines are displayed in what I can best describe as a pop up box. Often if the message is short, “hey I’m running late”, you see the entire message. This is where the trouble lies. If you get an SMS message and you don’t unlock the phone, open the SMS app, then open the specific SMS thread, the iPhone thinks you haven’t gotten the message, so it will remind you 5 minutes later, and 10 minutes later that you have an unread message, for a total of 3 alerts in 10 minutes for a message you might have already seen.
Example of why this is annoying:
I’m sitting here working on my blog, “PING!”, ah I have a new SMS message on my iPhone, the screen is lit up and the preview box is showing. “From TWITTER: xFLORIDAx – I look like a shaved ape”. Ok, no response needed, I set my phone down. 5 minutes later “PING!” ah! I must have a new SMS message… strange my screen isnt lit up, turn on the screen. no new SMS messages, weird. 5 minutes after that, “PING!”…. so in 10 minutes, I have been alerted 3 times for a message I have already read. ANNOYING! I don’t want to unlock my phone for every little message that is sent to me.
I understand how this could be useful for someone who gets 1-5 text message a day… I average over 200 a day. Most messages come from twitter and don’t require a response. I would disable the multi reminder if I could, but apple doesn’t allow you to change the setting for it. It’s just on, like it or not. The only way to prevent the SMS multi reminder is to disable text notifications all together, and I’m not going to do that. I like getting one and only one notification when I get a new message.
If im in a meeting, should my pocket buzz 6 times in 20 minutes to let me know I have 2 text messages? GTFO! I should only be notified two times.
I really hope that Apple allows people to turn the SMS multi reminder on and off in the next update. I can’t imagine it’s to hard to do.
Yesterday spore was released. I have been waiting for this game for years, literally. Mostly because I wanted to see what the hype was about. I am a casual gamer. I got into computers through games, but I don’t have time to play them for days on end like I used to.
If you dont know what spore is:
Spore is a multi-genre massively single-player online game. It allows a player to control the evolution of a species from its beginnings as a unicellular organism, through development as an intelligent and social creature, to interstellar exploration as a spacefaring culture. It has a massive scope, and is very open-ended. Basically no two people will ever have the same expience with this game, and its completely different frm any other game you have played before.
Riding on the hype of the game, I secured a copy and installed it. Before I could start playing spore, it made me update my nvidia graphics card drivers. Odd, but ok. After a quick reboot, I was up and playing. Instantly was blown away with the visual intensity of the game. It was very easy to figure out and learn to play right away with out any primers needed.
I selected to be an herbivore (I am a vegetarian you know!). I started off as this little swimming creature, hanging out and sucking up plant particles in the water. After I ate a few, I grew, well… actually the world got bigger. Everything that was around me in the water got smaller, and faded to the background. I was in a larger class of organisms now. This continued until I had acquired enough points to mate. This is where the game gets wild. I was able to design a new creature, selecting the body shape, orientation of the tale and mouth (In my case I had 2 mouths and 3 tales!). I also grew horns so I could ram other creatures trying to eat my veggies! Once the design was done, I got to play as that creature. Amazing.
After being in the water stage for a while, you grow legs and come onto land. I could go on and on about this game, but to sum up the land stage of the game, I grew taller, got gnarly claws and spikes. I had a sissy mouth (duck bill) for biting things because I was an herbivore (a decision i had made in the micro organism stage). I grew thick skin to protect me. I started to hunt in a pack, and I killed everything that was in my path. I could have made friends and built up relationships with the other creatures, I actually did that once, then I ripped them to shreds with my gnarly claws and duckbill.
Now I have the ability to start using tools and forming tribes with my duckbilled herbivore velociraptor rhinos
That’s how far I am in the game right now. I’m totally amped on it. From my understanding my tribe will become a society, and keep evolving and eventually be able to travel through space to other planets to set up trades and relationships with other cultures, or most likely in my case, freely handout beatdowns with my duckbill and raptor claws to anyone who wants some.