Technology RSS feed for this section

Best Category Pages in Thesis Theme 1.8 – Guarenteed!

12 Jun

I do a lot of work with Thesis theme and now they have a Custom Loop API which makes it even better than it was before. While I am not a php guru by any means I have managed to put this [awesome] structure for category pages together. I commented it so that people would know what is going on….the result is at the bottom so you know what it looks like…style it as your please…

The final code:

//CUSTOM CATEGORY LOOP//
$loopty_loop = new seans_loop; //START THE LOOP
function bm_dont_display_it($content) { //START THE FILTER TO NOT SHOW CATEGORIES IF THERE ARE NONE
  if (!empty($content)) {
    $content = str_ireplace('<li>' .__( "No categories" ). '</li>', "", $content);
  }
  return $content;
}
add_filter('wp_list_categories','bm_dont_display_it');//END THE FILTER TO NOT SHOW CATEGORIES IF THERE ARE NONE
class seans_loop extends thesis_custom_loop {
function category() {
	if ( is_category() && !is_paged() ) {
	thesis_archive_intro();
	echo "<div class=\"post_box top\">\n";
	echo "\t<div class=\"format_text\">\n";
	echo "\t<div class=\"artz\">\n"; //MAKE A DIV AROUND RECENT ARTICLES SO I CAN FLOAT SIDE BY SIDE WITH SUBCATEGORIES
	echo "<h3>Related Articles:</h3>";
	echo "\t\t<ul>\n";
	while (have_posts()) {
		the_post();
		echo "\t\t\t<li><a href=\"" . get_permalink() . "\">" . get_the_title() . "</a></li>\n";
	}
	echo "\t\t</ul>\n";
	echo "\t</div>\n"; //ENDS THE RELATED POSTS DIV
	//this is where I start the if statment for the subcategories...if I can ever figure this fucking thing out
	echo "\t<div class=\"subs\">\n"; //MAKE A DIV AROUND SUB CATTYS SO I CAN FLOAT SIDE BY SIDE WITH ARTICLES
	echo "<h3>Sub Categories:</h3>"; //H3 FOR NAME OF SUBCATEGORIES
	$cat_id = get_query_var('cat'); //GET THE CURRENT SUB CATTY DYNAMICALLY
	wp_list_categories('orderby=id&show_count=0&hide_empty=1&use_desc_for_title=0&hierarchical=0&title_li=&child_of=' . $cat_id); //LIST THE SUBCATEGORIES
	echo "\t</div>\n"; //ENDS THE SUB CATTYS DIV
	//add another if statement for the rest of the stuff if you get the 1list part on line 592
	echo "\t</div>\n";
	echo "</div>\n";
	}
	if ( is_category() && is_paged() ) {
	echo "<div class=\"post_box top\">\n";
	echo "\t<div class=\"format_text\">\n";
	echo "<h3>Related Articles:</h3>";
	echo "\t\t<ul>\n";
	query_posts('posts_per_page=20'); //THIS SETS OUT THE AMOUNT OF POSTS WE WANT TO SHOW WHEN THE PAGE IS_PAGED
	while (have_posts()) {
		the_post();
		echo "\t\t\t<li><a href=\"" . get_permalink() . "\">" . get_the_title() . "</a></li>\n";
	}
	echo "\t\t</ul>\n";
	echo "\t</div>\n";
	echo "</div>\n";
	}
}
}
//END THE CUSTOM CATEGORY LOOP//

and here is the CSS I used to float it next to each other:

.subs{
	float:right;
	width:49%;
}
.subs li.cat-item {
    list-style: disc outside url("http://www.startuploans.org/images/list.gif");
    margin: 0 10px 0 60px;
}
.artz{
	float:left;
	width:49%;
}

The Result for main category Page:

page 1 category page thesis theme

The result for pages that are paged (is_paged):
page 2 thesis theme category pages is_paged

Here are also some articles that helped me get to where I needed to be and understand everything:

So, there you have it- a custom category loop using Thesis Theme 1.8+ Custom Loop API. :-)

Cybercast International Hosting (CCI Hosting) is a joke! Terrible!

19 Jun

What a rip off. CCi Hosting support (cyber cast international) is disgusting. The story is like this:
Our account was paid up, except for 1 month about 6 months ago (which we didn’t know because their invoice system is terrible). I called CCi Hosting, or Cybercast International, because the site was down. They literally laughed about it and said it worked fine for them.

So, I checked host-tracker.com to make sure that it wasn’t just me. All servers said it was down! I showed them the proof that it wasn’t just me and they laughed (literally). So, I got angry and told the guy that their system was a joke. What did he do?

DELETED THE ENTIRE ACCOUNT AND MY DATABASE. Wow! What kind of customer support is that? Ridiculous. So, like anyone else would do I asked them if they could give me a backup of my virtually inaccessible database and they said no way. My database! They told me no, they would not give a customer for over 1 year a copy of their own damn database. So…the moral of the story is this. If you like to use a hosting company that will laugh at your customer support inquiries and delete your account within minutes- well- join CCi Hosting- cybercast international hosting. They are a joke. Extremely unprofessional.

You can find them online at www.ccihosting.com

Please, I beg you, do not support this terrible company. Their servers are always slow, they are down often and their support is one of the worst I have ever seen. It’s worse than Microsoft’s support in India. Terrible.

Googles this week in Search

31 May

This is one of a regular series of posts on search experience updates. Look for the label This week in search and subscribe to the series. – Ed. Safety, security and privacy are important parts of the search equation for us at Google, particularly as we continue to bring you the best possible search experience on the web. Security in particular can be an important part to your interaction with the Google search box, so we’re always looking for ways to make changes and enhancements to that interaction secure. Especially as we all spend more time online, the importance of security has taken center stage. So in addition to this week’s secure search enhancement, you can read our latest news and insights at our Online Security Blog. More secure searches Years ago we added Secure Sockets Layer (SSL) encryption to products ranging from Gmail to Google Docs, as part of our effort to advance the safety and security of our products for you. Now you have a new choice to search more securely using https://www.google.com. When you use this https address, an encrypted session is established between your browser and Google that uses an SSL connection. Just like on an online banking page, the “https” confirms that you are using a more secure connection that will help protect your search terms and your search results from being intercepted by a third party. For more information on this security enhancement, read our announcement. Example of encrypted search: [flowers] Whether you’re planning a trip by train or scouring the real-time web, this week’s roundup also includes two search enhancements that should greatly improve the richness of yor search results — no matter what you’re looking for. Images in real-time search updates Ten blue links on a search results page can provide you with a lot of really helpful information, but sometimes you’re searching for content that is richer than a textual web page. For instance, what are people saying about Lady Gaga’s latest garb? Until now, it’s been hard to get this kind of rich visual detail that’s really fresh. So this week we began rolling out a feature for images in real-time search. When searching for the latest content across the real-time web, you’ll be able to quickly see the images people are talking about right now (based on URLs of those images in their public updates.) To view this new feature, click on “Updates” in the lefthand panel when you complete a search. Then click on “Updates with images.” Example search: [pac-man doodle] Transit search enhanced Often when we search, it’s to get from point A to point B, such as when the best route is by train. Then it’s important to know the specific details of the train station near you, like which lines it serves. Now you can easily get this information in the lefthand panel on Google Maps by searching for the transit station. The lines are colored and grouped by transit type to make it easier to find the line you’re looking for. For rail trains, you can see the departure time directly. For other types of transit like subways, buses and commuter trains, you can click on the line name to get the next departure time of each direction—all without having to leave the current page. Example search: [Broadway-Lafayette St Station] Thanks for reading, and stay tuned next week for more search news. Search on!