Skip to content

Commit

Permalink
split repos
Browse files Browse the repository at this point in the history
  • Loading branch information
mcurry committed Apr 24, 2009
1 parent 15c1c5a commit b5935b8
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 350 deletions.
28 changes: 2 additions & 26 deletions components/layout_switcher/README
Original file line number Diff line number Diff line change
@@ -1,26 +1,2 @@
/*
* Layout Switcher CakePHP Component
* Copyright (c) 2008 Matt Curry
* www.PseudoCoder.com
* http://github.com/mcurry/cakephp/tree/master/components/layout_switcher
* http://sandbox2.pseudocoder.com/demo/layout
*
* @author Matt Curry <matt@pseudocoder.com>
* @license MIT
*
*/

/* Notes */
* This component doesn't work if cache is enabled. All domains will get the cached view.

/* ReadMe */
1. You'll need a working version of CakePHP installed. This is running on 1.2.0.7692 RC3.
2. Download the component and unzip the contents to app/controllers/components.
3. Add the component to your /app/app_contoller.php so that it will work on every page:
var $components = array('LayoutSwitcher');
4. Create layout files for each domain you want to have a distinct look. The templates should be named domain.thtml and placed in the normal layout folder, /app/views/layouts. This site has layouts sandbox.pseudocoder.com.thtml and sandbox.siteamomth.com.thtml. Leave off the "www.".

/* Tips */
* Make a symlink from default.thtml to the layout to be defaulted to in case someone reaches the site from some other url.
* Organize your CSS in a similar way to your layouts. The two stylesheets for this site are pseduocoder.style.css and sitamonth.style.css. You can have a third, common.style.css, that is included first for styles that are common to both sites.
* You can always override the automatically selected layout in your controller in the same way you'd override the default layout
This code has been moved to it's own repository:
http://github.com/mcurry/cakephp_component_layout_switcher/tree/master
43 changes: 0 additions & 43 deletions components/layout_switcher/layout_switcher.php

This file was deleted.

2 changes: 2 additions & 0 deletions components/pagination_recall/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This code has been moved to it's own repository:
http://github.com/mcurry/cakephp_component_pagination_recall/tree/master
51 changes: 0 additions & 51 deletions components/pagination_recall/pagination_recall.php

This file was deleted.

43 changes: 2 additions & 41 deletions components/seo/README
Original file line number Diff line number Diff line change
@@ -1,41 +1,2 @@
/*
* SEO CakePHP Component
* Copyright (c) 2008 Matt Curry
* www.PseudoCoder.com
* http://github.com/mcurry/cakephp/tree/master/components/seo
*
* @author Matt Curry <matt@pseudocoder.com>
* @license MIT
*
*/

/* About */
The intent of this component is to automatically set relevent page titles and meta descriptions
based on the content being sent to the view. It also assists in make pretty urls.

/* Notes */
* This component is in a very early state. It probably won't work automatically in your application.
* Patches for supporting a larger application base are appreciated.

/* Instructions */
1. Include the component in your app controller:
var $components = array('Seo');

2. The component will automatically try to pull relevant information for the title/meta description from:
a. $Controller->data
b. $Controller->viewVars

3. In your view the meta description is assigned to $meta_description_for_layout.

4. The page title will be $title_for_layout (CakePHP standard);

5. There is also a 2nd class "Seo" which has a static function for creating pretty urls.
Say you were making a link to view a blog post and you wanted the link to be
"/post/view/12/this-is-the-blog-post-title" you would create the link:
$html->link($post['Post']['name'], array('action' => 'view', seo::uri($post['Post'])));
The url function will automatically pull the id and title from $post and create the link.

6. In your controller you can leave the view function as is "function view($id) { ... }".
CakePHP will automatically populate the $id and ignore the extra title param.


This code has been moved to it's own repository:
http://github.com/mcurry/cakephp_component_seo/tree/master
100 changes: 0 additions & 100 deletions components/seo/seo.php

This file was deleted.

39 changes: 2 additions & 37 deletions components/simplepie/README
Original file line number Diff line number Diff line change
@@ -1,37 +1,2 @@
/*
* SimplePie CakePHP Component
* Copyright (c) 2008 Matt Curry
* www.PseudoCoder.com
* http://github.com/mcurry/cakephp/tree/master/components/simplepie
* http://sandbox2.pseudocoder.com/demo/simplepie
*
* Based on the work of Scott Sansoni (http://cakeforge.org/snippet/detail.php?type=snippet&id=53)
*
* @author Matt Curry <matt@pseudocoder.com>
* @license MIT
*
*/

/* Notes */
* SimplePHP is a PHP class for retrieval and parsing of RSS feeds. This is a wrapper to that class making it easy to use in the CakePHP framwork.
* Much of this component is taken from the work of Scott Sansoni (http://cakeforge.org/snippet/detail.php?type=snippet&id=53). This is mostly an update so the component works with the lastest version of SimplePie

/* Instructions */
1. You'll need a working version of CakePHP installed. This is running on 1.2.0.7692 RC3.
2. Download SimplePie 1.0.1 and unzip the contents. Move the simplepie.inc to one of the vendors folders. Rename the file to simplepie.php. I like to put the file in the sub folder with the README.txt and LICENSE.txt for easy reference.
3. Download the component and unzip it to app/controllers/components.
4. Include the component in any controller that will need it:
var $components = array('Simplepie');

5. In your controller you can load a feed using:
$items = $this->Simplepie->feed('http://feeds.feedburner.com/pseudocoder');
$this->set('items', $items);

6. Then to show the items in your view (you probably want to format it better than this):
foreach($items as $item) {
echo $html->link($item->get_title(), $item->get_permalink()) . '<br />';
}

/* Tips */
* This component automatically creates a directory tmp/cache/rss to store the cached feeds.
* SimplePie has great docs. There is a ton of additional functionality that this component doesn't touch.
This code has been moved to it's own repository:
http://github.com/mcurry/cakephp_component_simplepie/tree/master
52 changes: 0 additions & 52 deletions components/simplepie/simplepie.php

This file was deleted.

0 comments on commit b5935b8

Please sign in to comment.