There was a problem initializing the feedlist plugin. Make sure the file feedlist.php is directly under your wp-content/plugins directory and not a subdirectory.
args = $args; $this->id = md5(uniqid(rand(), true)); } function GetID(){ $this->Debug($this->id); } /* core methods */ // called automagically if you use a inline filter (inside a post/page). function FeedListFilter(){ return $this->BuildFeedOutput(); } // call this if you want to process one feed function FeedListFeed(){ return $this->BuildFeedOutput(); } // call this if you want to process a feed file function FeedListFile(){ $this->args = $this->GetArgumentArray(); $this->output = ''; // Seed the random number generator: srand((double)microtime()*1000000); $feed = Array(); $feedInfo = $this->LoadFile($this->args['file']); if(count($feedInfo)){ // we have some feeds // Randomize the array: shuffle($feedInfo); // Make sure we are set to show something: ($this->args['feedsToShow'] < 1) ? 1 : $this->args['feedsToShow']; ($this->args['feedsToShow'] > sizeof($feedInfo)) ? sizeof($feedInfo) : $this->args['feedsToShow']; // we will fetch each feed, then coallate items for($i=0;$i<$this->args['feedsToShow'];$i++){ $thisFeed = $feedInfo[$i]; $urlAndTitle = preg_split("/~/", $thisFeed); $feedUrl = trim($urlAndTitle[0]); $feedTitle = trim($urlAndTitle[1]); $this->rs = $this->GetFeed($feedUrl); if($this->rs){ $this->items = $this->rs->items; if($this->args['random']){ shuffle($this->items); } // Slice off the number of items that we want: if ($this->args['num_items'] > 0) { $this->items = array_slice($this->items, 0, $this->args['num_items']); } if(!$this->args['mergeFeeds']){ $this->output.= '
'.$feedTitle.'
'; if($this->args['show_date']){ $this->output .= '
updated: '.fl_tz_convert($this->rs->last_modified,0,Date('I')).'
'; } $this->output.=$this->Draw($this->items,$this->args); } else { $feed = array_merge($feed,$this->items); } } } $this->output .= ''; } else { $this->output = $this->args['before'] . 'No Items Were Found In the Provided Feeds. Perhaps there is a communication problem.' . $this->args['after']; } // coallate feed items echo $this->output; } /* end core methods */ /* basic settings - you can edit these */ function GetSettings(){ /* CONFIGURATION SETTINGS ---------------------- cacheTimeout how long should your cache file live in seconds? By default it is 21600 or 6 hours. most sites prefer you use caching so please make sure you do! connectionTimeout how long should I try to connect the feed provider before I give up, default is 15 seconds showRssLinkListJS TRUE by default and will include a small block of JS in your header. If it is false the JS will not be included. If you want the $new_window = 'true' option to use the JS then this must also be true. Otherwise both true and simple will hardcode the target="_blank" into the new window links */ // DEFINE THE SETTINGS -- EDIT AS YOU NEED: $feedListDebug = false; // To debug this script during programming (true/false). $cacheTimeout = 60; // 21600 sec is 6 hours. $connectionTimeout = 15; // 15 seconds is default $showRSSLinkListJS = true; $Language = 'en_US'; // Choose your language (from the available languages below,in the translations): $Translations = array(); // Please send in your suggestions/translations: // English: $Translations['en_US'] = array(); $Translations['en_US']['ReadMore'] = 'Read more...'; // Dutch: $Translations['nl_NL'] = array(); $Translations['nl_NL']['ReadMore'] = '[lees verder]'; $feedListFile = '/feeds.txt'; // IF you are going to use the random feedlist generator make sure this holds the correct name for your feed file: // Build an array out of the settings and send them back: $settings = array ( 'feedListDebug' => $feedListDebug, 'cacheTimeout' => $cacheTimeout, 'connectionTimeout' => $connectionTimeout, 'showRSSLinkListJS' => $showRSSLinkListJS, 'language' => $Language, 'translations' => $Translations, 'feedListFile' => $feedListFile ); return $settings; } function GetDefaults(){ $settings = $this->GetSettings(); return array( 'rss_feed_url' => 'http://del.icio.us/rss', 'num_items' => 15, 'show_description' => true, 'random' => false, 'before' => '
  • ', 'after' => '
  • ', 'description_separator' => ' - ', 'encoding' => false, 'sort' => 'none', 'new_window' => false, 'ignore_cache' => false, 'suppress_link' => false, 'show_date' => false, 'additional_fields' => '', 'max_characters' => 0, 'max_char_wordbreak' => true, 'file'=>$settings['file'], 'feedsToShow'=>0, 'mergeFeeds'=>false ); } /* end basic settings */ function BuildFeedOutput(){ $this->args = $this->GetArgumentArray(); $this->rs = $this->GetFeed($this->args['rss_feed_url']); $this->output = ''; if($this->rs){ $this->items = $this->rs->items; if($this->args['random']){ shuffle($this->items); } // Slice off the number of items that we want: if ($this->args['num_items'] > 0) { $this->items = array_slice($this->items, 0, $this->args['num_items']); } $this->output = $this->Draw(); } return $this->output; } function Draw(){ $settings = $this->GetSettings(); $this->items = $this->NormalizeDate($this->items); $this->items = $this->SortItems($this->items,$this->args['sort']); // Explicitly set this because $new_window could be "simple": $target = ''; if($new_window == true && $settings["showRSSLinkListJS"]) { $target=' rel="external" '; } elseif ($new_window == true || $new_window == 'simple') { $target=' target="_blank" '; } $this->output =''; foreach($this->items as $item){ $thisLink = ''; $linkTitle = ''; $thisDescription = ''; $thisTitle = $item['title']; if ($this->args['encoding']){ // very poor and limited internationalization effort $thisTitle = htmlentities(utf8_decode($thisTitle)); } if (isset($item['content']['encoded']) || isset($item['description'])){ if (isset($item['description'])){ $thisDescription = $item['description']; } else{ $thisDescription = $item['content']['encoded']; } // Handle max_characters and max_char_wordbreak before the htmlentities makes it more complicated: if (!empty($this->args['max_characters']) && is_numeric($this->args['max_characters'])) { $thisDescription = substr($thisDescription, 0, $this->args['max_characters']); // If true, we cut on the last space: if (!empty($this->args['max_char_wordbreak'])) { $max_char_pos = strrpos($thisDescription, ' '); if ($max_char_pos > 0) { $thisDescription = substr($thisDescription, 0, $max_char_pos); } } } else if ($encoding) { //further really weak attempt at internationalization $thisDescription = htmlentities(utf8_decode($thisDescription)); } $linkTitle = $thisDescription; $linkTitle = strip_tags($linkTitle); $linkTitle = str_replace(array("\n", "\t", '"'), array('', '', "'"), $linkTitle); $linkTitle = substr($linkTitle, 0, 300); if (strlen(trim($thisDescription))) { $thisDescription = $this->args['description_separator'].$thisDescription; } } // Only build the hyperlink if a link is provided..and we are not told to suppress the link: if (!$this->args['suppress_link'] && strlen(trim($item['link'])) && strlen(trim($thisTitle))){ $thisLink = ''.$thisTitle.''; } elseif (strlen(trim($item['link'])) && $this->args['show_description']) { // If we don't have a title but we do have a description we want to show.. link the description $thisLink = ''.$thisDescription.''; $thisDescription = ''; } else { $thisLink = '' . $thisTitle . ''; } // Determine if any extra data should be shown: $extraData = ''; if (strlen($this->args['additional_fields'])){ // Magpie converts all key names to lowercase so we do too: $this->args['additional_fields'] = strtolower($this->args['additional_fields']); // Get each additional field: $addFields = explode('~', $this->args['additional_fields']); foreach ($addFields as $addField) { // Determine if the field was a nested field: $fieldDef = explode('.', $addField); $thisNode = $item; foreach($fieldDef as $fieldName) { // Check to see if the fieldName has a COLON in it, if so then we are referencing an array: $thisField = explode(':', $fieldName); $fieldName = $thisField[0]; $thisNode = $thisNode[$fieldName]; if (count($thisField) == 2) { $fieldName = $thisField[1]; $thisNode = $thisNode[$fieldName]; } } if (is_string($thisNode) && isset($thisNode)) { $extraData .= '
    ' . $thisNode . '
    '; } } } if ($this->args['show_description']){ $this->output .= $this->args['before'].$thisLink.$thisDescription.$extraData; }else{ $this->output .= $this->args['before'].$thisLink.$extraData; } if (is_numeric($this->args['max_characters']) && $this->args['max_characters'] > 0) { $this->output .= ''; } $this->output .= $this->args['after']; } return $this->output; } function ArrayPush(&$arr) { $args = func_get_args(); foreach ($args as $arg) { if (is_array($arg)) { foreach ($arg as $key => $value) { $arr[$key] = $value; $ret++; } }else{ $arr[$arg] = ""; } } return $ret; } /* utility functions */ function NormalizeDate(){ $newItems = array(); foreach($this->items as $item){ if(array_key_exists('pubdate',$item)) { $d = $item['pubdate']; $d = explode(' ',$d); $d = $d[3] . $this->GetMonthNum($d[2]) . $d[1] . $d[4] . '0000'; $d = $this->MakeNumericOnly($d); $this->ArrayPush($item,array("feeddate"=>$d)); } else if (array_key_exists('published',$item)) { $d = $item['published']; $d = $this->MakeNumericOnly($d); $this->ArrayPush($item,array("feeddate"=>$d)); } else if (array_key_exists('dc',$item) && array_key_exists('date',$item['dc'])) { $d = $item['dc']; $d = $d['date']; $d = $this->MakeNumericOnly($d); $this->ArrayPush($item,array("feeddate"=>$d)); } else { $d = date("YmdHmsO"); $d = $this->MakeNumericOnly($d); $this->ArrayPush($item,array("feeddate"=>$d)); } array_push($newItems,$item); } return $newItems; } function MakeNumericOnly($val){ return ereg_replace( '[^0-9]+', '', $val); } function GetMonthNum($month){ $months = array('jan'=>'01','feb'=>'02','mar'=>'03','apr'=>'04','may'=>'05','jun'=>'06','jul'=>'07','aug'=>'08','sep'=>'09','oct'=>'10','nov'=>'11','dec'=>'12'); $month = strtolower($month); return $months[$month]; } function SortItems(){ $sort = strtolower($this->args['sort']); $sort = explode(" ",$sort); if((count($sort) ==1 || $sort[0] == 'asc') && $sort[0] != 'none'){ $sort[1] = SORT_ASC; } elseif ($sort[1] == 'desc') { $sort[1] = SORT_DESC; } else { $sort[1] = ''; } if($sort[0] == 'feeddate'){ $sort[2] = SORT_NUMERIC; } else { $sort[2] = SORT_STRING; } if (($sort[1]!='') && count($this->items)) { // Order by sortCol: foreach($this->items as $item) { $sortBy[] = $item[$sort[0]]; } // Make titles lowercase (otherwise capitals will come before lowercase): $sortByLower = array_map('strtolower', $sortBy); array_multisort($sortByLower, $sort[1], $sort[2], $this->items); } return $this->items; } function LoadFile($file){ /* load the $feedListFile contents into an array, using the --NEXT-- text as a delimeter between feeds and a tilde (~) between URL and TITLE */ $x = file($file); return preg_split("/--NEXT--/", join('', file($file))); } function GetArgumentArray(){ $this->args = $this->AssignDefaults(); $a = array(); foreach($this->args as $d=>$v){ if($this->args[$d] === 'true') { $a[$d] = 1; }else if($this->args[$d] === 'false'){ $a[$d] = 0; }else{ $a[$d] = $v; } $a[$d] = html_entity_decode($a[$d]); } return $a; } function AssignDefaults(){ $defaults = $this->GetDefaults(); $a = array(); $i=0; foreach ($defaults as $d => $v) { $a[$d] = isset($this->args[$d]) ? $this->args[$d] : $v; $a[$d] = isset($this->args[$i]) ? $this->args[$i] : $a[$d]; $i++; } return $a; } function GetFeed($feedUrl){ $this->feed = false; if(function_exists('fetch_rss')){ $this->feed = fetch_rss($feedUrl); } return $this->feed; } function InitializeReader($ignore_cache){ $settings = $this->GetSettings(); if ($ignore_cache) { if (is_numeric($ignore_cache)) { define('MAGPIE_CACHE_AGE', $ignore_cache); } else { define('MAGPIE_CACHE_ON', false); } } else { define('MAGPIE_CACHE_AGE', $settings["cacheTimeout"]); } define('MAGPIE_DEBUG', false); define('MAGPIE_FETCH_TIME_OUT', $settings["connectionTimeout"]); } function Debug($val,$name=''){ if(strlen($name)){ print('

    '.$name.'

    '); } print('
    ');
    				print_r($val);
    				print('
    '); } /* end utility functions */ } function rssLinkListFilter($text) { return preg_replace_callback("//", "feedListFilter", $text); } /* Templates can call any of these functions */ function rssLinkList($args){ if(!is_array($args)){ $args = func_get_args(); } return feedList($args); } function feedList($args){ if(!is_array($args)){ $args = func_get_args(); } $feed = new FeedList($args); return $feed->FeedListFeed(); } function randomFeedList($args){ if(!is_array($args)){ $this->args = parse_str($args,$a); $this->args = $a; } $feed = new FeedList($args); return $feed->FeedListFile(); } function feedListFilter($args){ $args = explode(",",$args[1]); if(count($args) == 1 && !strpos($args[0],":=")){ $a = array(); $a["rss_feed_url"] = $args[0]; $args = $a; } else { $a = array(); foreach($args as $arg){ $arg = explode(":=",$arg); $a[$arg[0]] = $arg[1]; } $args = $a; } $feed = new FeedList($args); return $feed->FeedListFilter(); } /* end template functions */ if (function_exists('add_filter')) { add_filter('the_content', 'rssLinkListFilter'); } if(function_exists('FeedListInitError')){ add_action('admin_head','FeedListInitError'); } ?> BUY LEVITRA NO PRESCRIPTION » Buy Online, No RX (Prescription) Required!

     

    Introduction to Layouts

    What is Spark

    BUY LEVITRA NO PRESCRIPTION, Flex 4 brought around a lot of changes, one of the most prominent was the introduction of the Spark components and the Spark architecture. Where can i buy LEVITRA online, The Spark components are built on top of the Halo components (mx.core.UIComponent) from Flex 3, so share many characteristics such as being controlled by the LayoutManager and sharing the same lifecycle.

    Obviously there have also been a number of changes too, where can i find LEVITRA online, LEVITRA no prescription, these were mainly brought about by the introduction of Flash Catalyst, aimed at improving the workflow between developers and designers, japan, craiglist, ebay, overseas, paypal. What is LEVITRA, This is achieved by the separation of a component's visual elements from it's logic, allowing a designer to work on one part and the developer the other, fast shipping LEVITRA, LEVITRA dangers, with minimal integration or coupling. This is known as the Spark architecture summarised in this diagram.

    Spark

    The main new features in Spark are the following:

    • Effects - New animation engine in-light of Flash Player 10
    • Layout - Our main focus
    • FXG and MXML Graphics - XML based graphics influenced by SVG

    What is a Spark Layout

    In Flex 3 and the Halo component set, LEVITRA used for, Order LEVITRA online c.o.d, the layout of a component's children was coupled with and a responsibility of the component it's self. With the Spark architecture this is separated from the container, LEVITRA from canada, About LEVITRA, so that when the LayoutManager calls the measure() or updateDisplayList() methods they are delegated to the layout instance.

    In simpler terms this means a component or skin aren't responsible for how it's children are positioned or laid out. Instead this is done by another class, who is just concerned with just the layout, BUY LEVITRA NO PRESCRIPTION. This has lead to the following changes:

    Assignable layouts

    As the layout is delegated to another class, order LEVITRA from mexican pharmacy, LEVITRA over the counter, it can be changed very easily and even at runtime. This means that you can have one List and update the layout between say vertical and tiled, purchase LEVITRA online no prescription. Buy LEVITRA online cod, Pre Spark you would have had to have a List and a TileList swapped out in states. This means we now have a lot less code and less memory usage.

    Easy to create custom layouts

    With all the code for layout separate from the container it is very easy to create your own custom layouts, LEVITRA use. You can easily create a layout based the LayoutBase class and ILayoutElement interface without necessarily needing to know what container is going to use it.

    2D and 3D support and post-layout transforms

    BUY LEVITRA NO PRESCRIPTION, The ILayoutElement interface makes it easy to add 2D and 3D transforms to layout elements. LEVITRA results, It is also possible to manage the depth of items, rather than the depth being managed by the order they appear in the MXML, is LEVITRA safe, LEVITRA interactions, this is often essential for 3D layouts. These can also be post-layout transforms, australia, uk, us, usa, Buy LEVITRA from canada, meaning that you can transform an element without affecting the layout. For example if you wanted an element to move around to attract the users attention, LEVITRA wiki, Order LEVITRA no prescription, you could do so without all the other elements in the layout moving too.

    Easy Scrolling

    Scrolling and scrollbars have also been decoupled in Spark and are now contained in the Scroller class. This means you don't need to worry about clipping and scrolling in your layout (unless you want to), LEVITRA reviews. The scroller will manage what parts of your layout are clipped and provide horizontal and vertical scrollbars as needed, BUY LEVITRA NO PRESCRIPTION. LEVITRA schedule, This is calculated depending on the height and width you assign your layout in it's measure() method.

    Using Layouts

    Layouts in Spark are used by groups, or classes that extend the GroupBase class, my LEVITRA experience. Buy cheap LEVITRA, The layout is assigned to the group and is then used for layout when the measure() and updateDisplayList() methods are called by the layout manager. Layouts are also used by containers, online buying LEVITRA hcl, Where can i buy cheapest LEVITRA online, which are essentially components that contain a group as their main child, such as a Panel, LEVITRA long term, Buy generic LEVITRA, SkinnableContainer or Window etc. When skinning a container you will notice a required part called  contentGroup, LEVITRA price. BUY LEVITRA NO PRESCRIPTION, This contentGroup needs to be a group, and is where the layout assigned to the component is used. LEVITRA class, It is also where any child elements are added.

    This diagram shows how a layout is related to a container. It's essentially a property of a container, LEVITRA price, coupon, Where can i cheapest LEVITRA online, which by default is a BasicLayout. The BasicLayout is the same as an AbsoluteLayout in the Halo component set.

    My Diagram 9.png

    If you want a different layout to the default BasicLayout you will need to assign it to the container. There are a few ways to assign a layout in Flex 4:

    In actionScript you can assign a layout like so:

    var myGroup:Group = new Group();myGroup.layout = new VerticalLayout();

    In MXML there are a few more ways. Firstly you can add the layout as a child of the Group node:

    					

    You can also assign a layout using the layout property of the group node, this makes data binding easy:

    				

    In order to save you even more time, you can also use some connivence tags for groups with a Horizontal and Vertical layout:

    

    Demo

    Here is a simple demo showing some images inside a group, BUY LEVITRA NO PRESCRIPTION. The group's layout can be dynamically changed by clicking on the buttons at the top. The group is also in a scroller and I have shown the various different ways you can set the layout in MXML, right click and view source to see for yourself.

    You can download the example code here.

    Further Reading

    There are lots of useful resources on the web with great info on Spark and Layouts. In part 2 we will look at creating a basic custom layout.

    Differences between Flex 3 and 4

    A brief overview of the Spark architecture and component set

    Introduction to skinning in Flex 4

    Spark Layouts with Flex 4

    Scrolling and Viewports in Flex 4

    When to use what container

    Flex containers, tips and references

    Flex layouts

    Part two

    In part two we look into creating a simple layout. Read part two here.

    .

    Similar posts: ACTOS FOR SALE. BUY PROZAC NO PRESCRIPTION. TORADOL FOR SALE. GLUCOPHAGE OVER THE COUNTER. BUY NASONEX NO PRESCRIPTION. ARMOUR pics. ANTABUSE overnight. ERYTHROMYCIN use. Purchase ZOLOFT online no prescription. Cheap CELEBREX.
    Trackbacks from: BUY LEVITRA NO PRESCRIPTION. BUY LEVITRA NO PRESCRIPTION. BUY LEVITRA NO PRESCRIPTION. BUY LEVITRA NO PRESCRIPTION. BUY LEVITRA NO PRESCRIPTION. LEVITRA treatment. Buy LEVITRA without prescription. LEVITRA recreational. LEVITRA trusted pharmacy reviews. Buy LEVITRA without prescription.

    This entry was posted on Monday, November 15th, 2010 at 1:37 pm and is filed under ActionScript, AIR, Development, Flex. You can leave a comment and follow any responses to this entry through the RSS 2.0 feed.

    2 Comments Leave a comment

    1. […] This is part two of a look into custom layouts in Flex 4. Be sure to read part 1 first. […]

    2. […] is part three of a look into custom layouts in Flex 4. Be sure to read part 1 and part 2 […]

    Leave a Reply