Archive for category Portfolio
New Portfolio Site Launch!
Posted by sosuke in Flash, Portfolio, Website Analysis on May 29, 2008
I launched my new portfolio site for Barrett Sonntag Online and wanted to talk a little on the technical aspects of the new all Flash site. After doing my analysis on the World of Warcraft website (worldofwarcraftcom front and back-end analysis) I wanted to see what it would take to combine a little JavaScript, HTML and Flash to create a SEO compliant full page Flash site. I have been shy about using full page Flash since getting my name listed in the major search engines, Flash is notoriously bad at SEO because it’s content is not usually indexable.
I wanted Flash to take the content straight from the page it was loaded it, to make it’s containing page have the XML data it would load. JavaScript provided the method required already, innerHTML. The innerHTML functionality works to take a HTML DOM elements subnodes and copy the structure and body text as a string. It worked great in Firefox and Safari but IE was screwing with the output forcing element names to uppercase and stripping quotes (“) from attribute values. Flash choked on this malformed XML data and I was stuck. I looked for a couple hours for how I could remedy IE’s nasty way of handling innerHTML and decided to sleep on it after posting on a popular online forum WebDeveloper.com. I didn’t get the answer handed so much as the path shown when I woke up the next morning, regular expressions. You can see the thread and my terrible but working solution http://www.webdeveloper.com/forum/showthread.php?t=182391.
With the IE innerHTML issue out of the way I was able to move on to the design of the site. Multiple columns with minimum wide items that auto adjusted just like inline elements in HTML. I don’t envy web browser developers this was no easy task. The next issue I ran into was setting up the Actionscript 3.0 event MouseWheel.MOUSE_SCROLL to fire allowing for the rows to move via the mousewheel or trackpad scrolling. It worked wonderfully in all browsers on my PC and failed completely on the test Macs I had access too. Lucky for me someone had already done the footwork and setup a JavaScript function that told the Flash file when the MOUSE_SCROLL event was being fired since Firefox and Safari on the Mac were not. Gabriel is to thank for this wonderfully easy to setup solution you can find on his site http://blog.pixelbreaker.com/flash/as30-mousewheel-on-mac-os-x/.
I am extremely happy with the outcome of this site as it is that full page Flash I was hoping for while still allowing search engines to see the full content of the site laid out in divs using class and id attributes.
Using multiple categories in EventCalendar3 for WordPress (update 1)
wp-includes/classes.php line 679-702, for the Events listed outside of the Event category
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | if (mysql2date('U', $this->posts[0]->post_date_gmt) > mysql2date('U', $now)) { //it's future dated $this->is_preview = true; /* DIRTY FUTURE-POSTS HACK FOR EC3 */ if (function_exists('ec3_get_calendar')) { global $ec3; $ec3_post_0_is_event = intval($wpdb->get_var( "SELECT COUNT(0) FROM $wpdb->post2cat WHERE post_id=" .$this->posts[0]->ID." AND category_id IN ('$ec3->event_category','14')")); if ($ec3_post_0_is_event) { $this->is_preview = false; } } if ($this->is_preview) /* DIRTY FUTURE-POSTS HACK FOR EC3 */ if (!current_user_can('edit_post', $this->posts[0]->ID)) { $this->posts = array ( ); } } |
eventcalendar3.php line 1048
1 2 3 | $post_list=$wpdb->get_results( "SELECT DISTINCT(post_id) FROM $tablepost2cat " . "WHERE category_id IN ('$ec3->event_category','14')" ); |
Using multiple categories in EventCalendar3 for WordPress
So I read at a few points that EventCalendar 3.1 was on its way, but I decided to start mangling some code to get multiple event categories to work!
Open eventcalendar3.php near line 525;
1 2 3 4 5 6 | // Which posts are we interested in? if($ec3->show_only_events) { // Category ID number for event posts. $where_post = "category_id IN ('$ec3->event_category','14')"; } |
I changed $where_post to add another category, this category will show up in the calendar now!
Also update line 540 to incorperate the same code so the date will be colored!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | $calendar_entries = $wpdb->get_results( "SELECT DISTINCT post_title, post_date, DAYOFMONTH(post_date) AS day, MONTH(post_date) AS month, YEAR(post_date) AS year, (category_id IN ('$ec3->event_category','14')) AS is_event FROM $tableposts,$tablepost2cat WHERE post_date >= '$begin_date' AND post_date < '$end_date' AND post_status = 'publish' AND id = post_id AND $where_post ORDER BY post_date ASC" ); |
Each of my Event categories I want to add will be entirely seperate categories, no sub-categories, I did this so I could exclude some categories from showing up where I did not want them.
To add each category to show up like the events open eventcalendar3.php again near line 1032;
1 2 3 | $ec3->is_listing = (preg_match("/\bcategory_id\s*=\s*'?($ec3->event_category|3|4|14|8|9)'?\b/",$where) || preg_match("/\bcategory_nicename\s*=\s*'$event_cat_nicename'/",$where)); |
I changed preg_match(“/\bcategory_id\s*=\s*’?$ec3->event_category’?\b/”,$where) || to add the extra categories.
Each category I want to show up in the calendar view I make sure that they are part of the Event category as well as their own.
You can see this in effect at www.austinpublic.com