Update on Wordpress sans Wordpress
I wanted to give an update (so soon?) on my progress on making the wordpress front end without wordpress. This is my third part day (because I work all day on other things) working on it, and today I decided to add a nice look to the main page. I've asked a few people and the general consensus is that my design skills are lacking. You can view what's been done so far here: http://core.ioreader.com/wwwroot/. Now, for the good stuff. Here are what a few of the current templates look like that make that page:
home.html
Caveat: there are a lot of divs there to accomplish those nice rounded corners + shadows that I wanted.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>{$blog_name}</title> <link rel="stylesheet" type="text/css" media="screen" href="{/}css/reset.css" /> <link rel="stylesheet" type="text/css" media="screen" href="{/}css/style.css" /> </head> <body> <div id="header"> <v:component id="menu" /> <h1><a href="{/}" title="{$blog_name}">{$blog_name}</a></h1> <h2>{$blog_description}</h2> </div> <div class="t"><div><div></div></div></div> <div id="content"> <div class="dialog"> <div id="main_content"> <div id="content_left"> <v:import id="main" /> </div> <div id="content_right"> <v:component id="calendar" /> <v:component id="categories" /> <v:component id="archive" /> <v:component id="blogroll" /> </div> <br style="clear:both;" /> </div> </div> </div> </body> </html>
posts.html
This is the template that displays all of the posts on the main page.
SQL Queries
Okay, you get the point. Now, if you're a big wordpress person and are wondering what the SQL queries I am doing to accomplish all of this are, here all of them are:
--- Get all menu items SELECT p.post_name, p.post_title FROM wp_posts p WHERE p.post_status='publish' AND p.post_type='page' ORDER BY p.menu_order ASC --- Get only the options needed SELECT * FROM wp_options WHERE option_name IN('posts_per_page','blogname','blogdescription') --- Get the front page posts SELECT p.*, u.display_name AS author_name, u.ID as author_id, GROUP_CONCAT(ptc.category_id SEPARATOR ',') AS category_ids FROM wp_posts p, wp_users u, wp_post2cat ptc WHERE p.post_author=u.ID AND p.post_status='publish' AND p.post_type='post' AND ptc.post_id=p.ID GROUP BY p.ID ORDER BY p.ID DESC LIMIT 0, 10 --- Get posts to place into the calendar SELECT DAY(post_date) AS day FROM wp_posts WHERE MONTH(post_date) = 7 AND YEAR(post_date) = 2007 GROUP BY DAY(post_date) --- Get all top-level categories SELECT * FROM wp_categories WHERE category_parent = 0 AND category_nicename <> 'blogroll' --- Get all sub-level categories SELECT * FROM wp_categories WHERE category_parent > 0 --- Get Blogroll links SELECT * FROM wp_links WHERE link_visible='Y' ORDER BY link_name ASC --- Get the archives SELECT MONTH(post_date) as month_num, YEAR(post_date) AS year, COUNT(ID) AS num_posts FROM wp_posts WHERE post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY YEAR(post_date) DESC, MONTH(post_date) DESC
I think that's a good sum up of my progress thus far.
Comments
-
I have found few blogs having good content. And I think you are doing a very good work buddy. Keep up your work. This post was really a nice piece of your work.posted by Penisa on Aug 19, 2007 at 6:55am
-
Peter, Hi - Lots of junk comments here so I am not sure this is going to get through. I am looking to hire someone to do some programming work for me on a proof of concept. The first part involves scraping data from the web and the second part involves sending that data to a mobile phone using sms. About me: I have a start up company in baltimore md in financial services. I have a business background but understand tech fairly well but are limited in my programming ability. Let me know if you would like to learn more about this project. I saw your article on DIGG. Andrewposted by Akkdio on Aug 19, 2007 at 6:31pm
Comment