## # Fishpig's WordPress Integration for Magento eCommerce # # Author: FishPig Limited (Ben Tideswell) # Documentation: http://fishpig.co.uk/wordpress-integration.html # Email Support: help@fishpig.co.uk # Installation: http://fishpig.co.uk/wordpress-integration-setup.html ## TODO - Skeleton controller action. Move things away from a controller with single extended index action. Overcome layout issue using the update command - Add a WordPress CSS file that can be enabled/disabled from the WordPress Admin. 20/08/2012 - v2.4.3 - Fixed issue that caused previewing a scheduled post to 404 12/08/2012 - v2.4.2 - Fixed issue that caused some posts to 404 when previewing - Added creator (user_nicename) field to the RSS feed 12/08/2012 - v2.4.1 - Fixed issue with post images 11/08/2012 - v2.4.0 - Revamp of database code and events to work better with BuddyPress Integration (currently in alpha testing) - Improved product meta description. All new lines and tabs have been removed, as well as JS - Fixed issue with WP No Category Base plugin and upgraded to WPML version - Cleaned AllinOneSeo Helper file - Moved Opengraph helper into plugins directory - Moved Recaptcha helper into plugins directory - Removed references to /db helper and updated getTableName calls - Added new meta system for posts and users - Fixed comments XSS issue - If No-Category Base installed, redirect old category URL to new category URL - Removed redundant controllers and merged actions into Misc controller 18/07/2012 - v2.3.15 - Fixed issue that stopped config defaults from being used by the extension - Added option to disable WordPress Integration from the Magento Admin - Cleaned up config comments and disabled logs by default - Multiple Admin/integration test improvements 18/07/2012 - v2.3.14 - Fixed issue that sometimes stopped related products appearing on blog posts - Fixed issue that stopped All In One SEO from working - Fixed pricing issue on related products 18/07/2012 - v2.3.12 - Fixed issue that caused a 404 page when user tries to auto-login to WordPress but has no/invalid details 18/07/2012 - v2.3.11 - Fixed issue that stopped YouTube video's working that an underscore in their code 18/07/2012 - v2.3.10 - Cleaned up code and refactored 11/07/2012 - v2.3.6 - Fixed issue with invalid sidebar widget ID's (ID must start with a-z) 11/07/2012 - v2.3.5 - Fixed issue that caused jQuery to be included twice if Slick Social Buttons and Next GENGallery were activated - Added getPath to Term model 05/07/2012 - v2.3.2 - Fixed tag fatal error 05/07/2012 - v2.3.1 - Fixed More Tag issue. More Tag now displays excerpt in feed even if 'Full Post' is enabled in WP Admin - Fixed issue that caused an uncaught Magento exception when viewing a product with related blog posts and/or categories. - Added support for the blog_public WP Admin option. This allows you to set the whole blog as noindex,nofollow from the WP Admin. - Improved WP Term/Taxonomy system, which brings speed improvements and less code! 03/07/2012 - v2.2.36 - Allowed Auto-Login to WP Admin's that use HTTPS - Removed anchor tags from comment author's that haven't specified a link 30/06/2012 - v2.2.35 - Fixed issue that stopped post view template being changed from the Magento Admin 30/06/2012 - v2.2.34 - Fixed issue that caused an empty WP user to be created in WordPress when using Customer Synchronisation 30/06/2012 - v2.2.33 - Improved integration test error message 30/06/2012 - v2.2.32 - Added support for RSS sidebar widget 29/06/2012 - v2.2.31 - Fixed issue that caused duplicate blog route in WP MU permalinks 28/06/2012 - v2.2.30 - Added custom fields to post collection - Added support for WP PostViews plugin 28/06/2012 - v2.2.28 - Added support for Slick Social Buttons plugin - Added support for Twitter Pro widget - Added support for Facebook Like Box plugin 17/06/2012 - v2.2.25 - Added support for HumansNotBots plugin - Added support for UserPhoto WordPress plugin - Added OpenGraph tag support 05/06/2012 - v2.2.23 - Fixed comment issue for minority of users 05/06/2012 - v2.2.22 - Fixed trailing slash issue for permalinks and other URL's 04/06/2012 - v2.2.19 - Fixed no post object in comment controller - Added desc post_date order to related posts on product page 01/06/2012 - v2.2.18 - Added support for displaying full post in feed (homepage, category, tags etc) 01/06/2012 - v2.2.17 - Added fix for All In One SEO in default site when using WordPress MU 31/05/2012 - v2.2.15 - Removed All In One SEO and WP No Category Base static messages from Magento config - Improved integration tests - Improved test to determine whether WordPressMu is installed - Added link to featured image in the post list template 24/05/2012 - v2.2.14 - Changed Content-Type header for RSS feeds to application/rss+xml - Fixed issue with Yet Another Related Posts Plugin 01/05/2012 - v2.2.12 - Added support for installing via Direct Package File Uploader 28/04/2012 - v2.2.11 - Added fix for redirecting back to post page when logging in to post a comment 26/04/2012 - v2.2.10 - Added updates to work better with NextGEN Gallery 16/04/2012 - v2.2.9 - Added support for Yarpp (Yet Another Related Posts Plugin) 14/04/2012 - v2.2.7 - Fixed wpautop issue 13/04/2012 - v2.2.6 - Added events before and after post filter - Updated wpautop method 11/04/2012 - v2.2.5 - Added event to page collection 10/04/2012 - v2.2.4 - Added fix for using tag base - Improved integration test error messages 09/04/2012 - v2.2.3 - Fixed issue that caused multiple error log entries to be written - Removed log entry when invalid captcha code entered 09/04/2012 - v2.2.2 - Added fix for post images 07/04/2012 - v2.2.1 - Added more improvements for WordPress MU 04/04/2012 - v2.2.0 - Added update to work with WordPress MU (requires Fishpig_WordpressMu be installed) 03/04/2012 - v2.1.42 - Fixed potential issue in WordPress session 03/04/2012 - v2.1.41 - Added std tag to post/page entry div (adds bullets and other CMS styling) - Added timeout to Auto-Login cUrl request 02/04/2012 - v2.1.40 - Added Gravatar support for comments 02/04/2012 - v2.1.39 - Added fix for pager on author and tag pages 18/03/2012 - v2.1.38 - Added fix for page comment links 16/03/2012 - v2.1.37 - Added support for Page comments 13/03/2012 - v2.1.36 - Added support for post/page passwords. - Added proper redirect when users access extension controller directly. User is now redirected to pretty blog URL 06/02/2012 - v2.1.35 - Added fix for custom dimensions when using YouTube shortcode - Added UserAgent to auto-login 17/02/2012 - v2.1.34 - Added post event data - Added support for Advanced Custom Fields plugin (email help@fishpig.co.uk for more information) 06/02/2012 - v2.1.33 - Added small database fix that caused wrong integration test results when sharing DB 06/02/2012 - v2.1.32 - Add ability to change page template via config - Added supported-plugins.txt file to WordPress folder 02/02/2012 - v2.1.31 - Fixed issue with custom WP upload directory - Changed 1.3 depreciation to Q2 - Fixed issue when table prefix was incorrect, DB claimed to be not connected 01/02/2012 - v2.1.30 - Added fix for associated products not displaying in Admin grid when using single store 31/01/2012 - v2.1.29 - Fixed issue with product associations 30/01/2012 - v2.1.28 - Added fix for permalink structure's that contain 2 tokens inside one directory (eg. /%postname%-%post_id%) - Added support for 'Category Order and Taxonomy Terms Order' WordPress plugin so that you can order your blog categories - Added support for 'Category Posts Widget' WordPress plugin so that you add recent posts widgets to your sidebar filtered by a category - Removed breadcrumbs on WP homepage when being used as Magento homepage - Added Dutch language translation file 25/01/2012 - v2.1.27 - Added functionality so that when custom page is blog homepage, posts can be displayed on a different page 25/01/2012 - v2.1.26 - Added database and sidebar widget block change to stop exceptions with invalid WP details 25/01/2012 - v2.1.25 - Added try/catch around options to stop exceptions 25/01/2012 - v2.1.24 - Added basic Gravatar functionality (more to come!) - Added fix for Compiler when on case-sensitive systems 24/01/2012 - v2.1.23 - fixed issue that caused blog homepage redirect - Fixed issue that broke Magento 1.3.2.4 when blog homepage was used as Magento homepage - Fixed issue when category URL prefix was set to 'category' or included a '/' - Added ability to force single store mode for associated products. This applies if you have multiple stores that share the same blog and don't want to have associate entities for each store 22/01/2012 - v2.1.22 - Added case-insensitive blog routes - Refactored abstract helper code 20/01/2012 - v2.1.21 - Small fix for category URL 20/01/2012 - v2.1.20 - Added fix for custom image upload directory - Added ability to add static page as blog homepage - Improved way extension retrieves config values for multistore 04/01/2012 - v2.1.19 - Added change to sidebar block caching system to allow for duplicate blocks with different configs - Added fix for no image on associated products - Added Auto-Login flow improvement 28/12/2011 - v2.1.18 - Fixed multi-store issue 22/12/2011 - v2.1.17 - Added fix for getAssociatedProducts - Updated the WordPress auto paragraph function - Applied fix for Syntax Highlighter 16/12/2011 - v2.1.16 - Simplified shortcode system to allow for easy adding of new shortcodes and plugins - Added fix for getAssociatedProducts 14/12/2011 - v.2.1.15 - Fixed another associations issue for single-store Magento installations 13/12/2011 - v.2.1.14 - Fixed issue that stopped associations working 13/12/2011 - v.2.1.13 - Added fix to comment link that adds http:// onto start of malformed link 13/12/2011 - v.2.1.12 - Re-added gallery shortcode - Added legacy Magento check to integration tests 12/12/2011 - v2.1.11 - Removed the sidebar META widget - Updated associated product block template - Fixed issue with comments - Re-added blog/category associations & refactored 12/12/2011 - v2.1.10 - Re-added associate category posts - Fixed issue that stopped Auto-Login links from opening in a new tab 12/12/2011 - v2.1.9 - Fixed issue with comment count on old templates - Fixed issue with multi-store config value retrieval - Fixed issue with semi-integration test results displaying when in full-integration mode on multi-store 05/12/2011 - v2.1.7 - Fixed issue with table mapping when using same database 05/12/2011 - v2.1.6 - Added support for associated posts on multi-stores - Removed associated blog categories - Small bug fixes 05/12/2011 - v2.1.4 - Refactored more code - Minor bug fixes - Added Magento 1.3.2.4 fix that means {{block}} won't work inside a post 04/12/2011 - v2.1.1 - Added ability to change top link label and blog breadcrumb label via config - Rewritten database loading to use a lazy loading system. This makes the extension much faster - Refactored a lot of code - Added default titles for sidebar widget blocks - Add WordPress Sidebar block caching. If your blocks don't update, refresh the Block HTML Output cache type - Ability to use {{block type="core/template" name="block_name" template="custom/template.phml"}} in WordPress posts & pages - Added category posts RSS feeds & link in head - 20% improvements in speed/memory on our development server - Added integration for Links sidebar widget - Added integration for Meta sidebar widget - Small fix for sites running Magento in the same database 02/12/2011 - v2.0.14 - Added changes for BuddyPress BETA testing - Added more fixes to allow old sidebar blocks/templates to function (although you should update to the new format ASAP). - Added change to database loading to improve WordPress Customer Synchronisation extension 30/11/2011 - v2.0.13 - Added fix for Magento 1.4.1.1 and before that caused blog homepage to 404 30/11/2011 - v2.0.12 - Added fix for sites using index.php/ in their URL's that caused blog homepage to 404 29/11/2011 - v2.0.11 - Added fix for Magento 1.3.2.4 29/11/2011 - v2.0.10 - Added ability to set WordPress blog as Magento homepage - Hooked up custom post view template to new configuration option - Added backwards compatibility for Magento 1.3.0.0 (although you shouldn't be using such an old version of Magento!) - Fixed issue that stopped category list as dropdown displaying - Fixed issue that stopped sidebar dropdowns not changing page location - Fixed issue that stopped keywords displaying - Improved All In One SEO integration - Integrated All In One SEO's menu label option for pages which allows you to set a custom label for pages in the navigation - Re-added old sidebar blocks to stop errors. These have been deprecated so please update to new blocks - Removed blocks related to WpCustomerSynch - Add 301 redirects for all attachment links to stop 404 errors in Google Analytics 26/11/2011 - v2.0.5 - Added fix for pages on Magento 1.3.2.4 26/11/2011 - v2.0.4 - Added support for 2 sidebar columns, controllable by the WP Admin Widgets section (left & right) - Added functionality to alter blog page templates via the Magento configuration area - Improved blog search to work without JS - Deprecated Fishpig_Wordpress_Model_User::getMeta() (replaced with getCustomField()) - Deprecated Fishpig_Wordpress_Model_Mysql_User::getMeta() (replaced with getMetaValue()) 24/11/2011 - v2.0.3 - Added fix to stop trashed pages displaying - Fixed issue with SyntaxHighlighter integration 24/11/2011 - v2.0.2 - Fixes for sub-page URL's 24/11/2011 - v2.0.1 - Added fix for pages when post permalink code is %post_name% - Added fix for sub-pages being displayed as root pages 20/11/2011 - v2.0.0 - Added Page support - Added sidebar widget control in the WordPress Admin. Now you can control your sidebar widgets using the WP Admin GUI! - Added decorateList JS call to sidebar list elements 11/11/2011 - v1.9.14 - Fixed issue stopping users auto-logging in to WP Admin 09/11/2011 - v.1.9.13 - Added improvement to stop frontend error when incorrectly configured - Updated sidebar templates - added 'item' class name so default formatting looks better - Fixed issue with regular expression in caption shortcode - Fixed issue with $category->getParentCategory() method 01/11/2011 - v.1.9.12 - Added fix for centered captions 27/10/2011 - v1.9.11 - Added improvements for multi-store in older versions of Magento 12/10/2011 - v1.9.10 - Added isEnabledForStore() method to Customer Comments controller 11/10/2011 - v1.9.9 - Fixed issue with category and archive pager 06/10/2011 - v1.9.8 - Added check in controller to see whether blog is enabled for store 05/10/2011 - v1.9.7 - Added support for 'Noindex for Categories' in AllInOne SEO - Added support for 'Noindex for Archives' in AllInOne SEO - Added support for 'Noindex for Tags' in AllInOne SEO 04/10/2011 - v1.9.6 - Fixed issue breaking router when 'WP No Category Base' is installed 04/10/2011 - v1.9.5 - Added robots.txt to blog. Content can be changed via config or disabled completely - Added option to display RSS feed link on all pages and not just blog pages (enabled by default) 03/10/2011 - v1.9.4 - Added Cryillic support for tag URL's 29/09/2011 - v1.9.3 - Fixed associated posts issue - Added default values for XML homepage/post update frequency - Added support for Unicode characters in permalinks. This feature is disabled by default but can enabled in the config 28/09/2011 - v1.9.2 - Fixed issue with store saving - Improved router/database response time - Improve _getStoreConfig 16/09/2011 - v1.9.1 - Fixed _getStoreForConfig issue which stopped stores being editable - Improved performance while in Admin area 13/09/2011 - v1.9.0 - Added read-more class name to teaser anchor - Added Fishpig_Wordpress_Model_Post::getCustomField($key) 12/09/2011 - v1.8.41 - Added getChildrenCategories() to post category - Updated category list template to include first level sub-categories 11/09/2011 - v1.8.40 - Fixed bug - Fixed issue which caused empty archive pages to not correctly show the 404 page 11/09/2011 - v1.8.39 - Improved WordPress URL's integration test - Improved Blog Route integration test for multi-stores when using store-codes - Improved getStoreForConfig 08/09/2011 - v1.8.38 - Fixed bug for _getStoreForConfig(); 08/09/2011 - v1.8.37 - Improved multi-store support (fixed a bug) 08/09/2011 - v1.8.36 - Improved multi-store support 08/09/2011 - v1.8.35 - Added _nosid to getUrl to prevent SID being added to multistore URL's - Improved getStoreConfig for Adminhtml to ensure correct store values used in integration tests 08/09/2011 - v1.8.34 - Improved multi-store support - Removed config options from website view. Config options must now be entered globally or per store - Improved getUrl 07/09/2011 - v1.8.33 - Update French translation file (thanks Benoit!) - Fixed division by 0 error in Comment model 04/09/2011 - v1.8.32 - Changed return type of controller::_init to bool/null 04/09/2011 - v1.8.31 - Added div wrapper to post view content - Added fix to stop feed URL giving 404 31/08/2011 - v1.8.30 - Added fix which stopped post comment feed working - Converted recent posts template to block, block-title, block-content sidebar style - Added recent comments block to the sidebar 30/08/2011 - v1.8.29 - Added fix for recoverable error in DatabaseSetup.php - Added static route for post comments - Added improvements to preview post from WP Admin 23/08/2011 - v1.8.28 - Fixed error in archive list block when using table prefix other than 'wp_' 20/08/2011 - v1.8.27 - Added try/catch block for get top link to stop homepage errors when installing 18/08/2011 - v1.8.26 - Added fix for link category class extend - Fixed issue that forced users to login to comment, regardless of WP-Admin Setting 13/08/2011 - v1.8.25 - Added basic support for the gallery shortcode 12/08/2011 - v1.8.24 - Changed $this->stripTags for strip_tags - Changed tag block title from Categories to Tags - Added functionality to force user to login before commenting 10/08/2011 - v1.8.22 - Added ability to add store code to blog URL's - Fixed issue with multiple comment pages - Removed AllInOneSeo from post model. (Still need to go further and remove completely so multiple SEO plugins can be supported) - Added keywords to AllInOneSEO 04/08/2011 - v1.8.21 - Added check to search form template to determine whether search is enabled - Removed shortcode/filter selectors form Admin and set hard-coded default values - Add post auto-excerpt generation - Fix post teaser tag () - Automatically generate META description if not added via All In One SEO 03/08/2011 - v1.8.20 - Added small fix for Syntax Highlighter integration - Added fix for comment whitelist to help combat spam (if you have spam, use the built in Recaptcha support for comments) - Re-added preview mode 31/07/2011 - v1.8.19 - Added improved support for Syntax Highlighter extension 31/07/2011 - v1.8.18 - Removed Syntax Highlighter support (If you still want to use the Syntax Highlighter, please download the extension Syntax Highlighter) 31/07/2011 - v1.8.17 - Fixed another All In One SEO bug 30/07/2011 - v1.8.16 - Fixed All In One SEO bug 28/07/2011 - v1.8.15 - Added fixed for different timezones - Added noRoute forward when permalink matches format but no post - Changed post permalink pattern to allow for some special characters 27/07/2011 - v1.8.14 - Added comments fix for Magento 1.6.0.0.rc2 - Added fix for Magento 1.3.2.4 when using the same database - Added another (and the last) htmlEscape/escapeHtml fix for Magento 1.3.2.4 25/07/2011 - v1.8.13 - Added getTopLinkUrl so that topLink can be generated for semi-integration as well as full-integration 23/07/2011 - v1.8.12 - Fixed escapeHtml issue that triggered a notice error - Removed customer synchronisation features - Added WordPress path to integration tests - Removed path checking observer 23/07/2011 - v1.8.11 - Updated support email (help@fishpig.co.uk) - Fixed issue in tag cloud template - Added support for old WordPress passwords that use md5 06/07/2011 - v1.8.10 - Fixed issue when calling WordPress extension functions via CRON. The initConnection (database) wasn't getting called, meaning errors occured. - Fixed issue with AW FollowUpEmail 06/07/2011 - v1.8.8 - Fixed caption shortcode classes 05/07/2011 - v1.8.8 - Fixed htmlEscape/escapeHtml issue for Professional edition - Improve isLegacyMagento method 05/07/2011 - v1.8.7 - Fixed RSS feed image tags 05/07/2011 - v1.8.6 - Increased username/password field length to fix auto login on Professional edition 06/07/2011 - v1.8.5 - Fixed caption shortcode. Added wp-caption tag to wrapping div 05/07/2011 - v1.8.4 - removed donation links - Fixed issue in router that stopped some categories displaying - Added excerpt and featured image into RSS feed - Added excerpt and featured image into ShareThis plugin - Improved getFeaturedImage in Post model - Added daily archives - Added redirect for blog-route/post-id to post permalink 03/07/2011 - v1.8.00 - Rewritten router to use pattern matching rather than databas lookups. This means the loading of blog pages will be dramatically quicker 26/06/2011 - v1.7.9 - Added ability to associate posts with products at the category level - Fixed invalid user URL's that contain invalid characters 24/06/2011 - v1.7.8 - Fixed js/wordpress/main.js. Changed class in search form - fixed escapeHtml issue in 1.4.* 21/06/2011 - v1.7.7 - Fix xHTML validation error in wordpress/search/form.phtml - Added CDATA tags to SyntaxHighlighter trigger file - Added fix for comment form not displaying if not in XML - Fixed bug that caused trashed comments to be displayed 20/06/2011 - v1.7.6 - Given route control to Controller_Abstract::_init - Added comment pages, pager and comment RSS feeds - Improved comment blocks - Added post comment RSS feed - Added is-blog class to body tag of all extension pages - Fixed archive list order, changed to desc 20/06/2011 - v1.7.4 - Fixed issue with XML sitemap - Improved document outline (heading tags) on blog view page - Changed 'Response to %s' string to 'Responses to %s' when more than 1 (or 0) comments are available - Added setWrapperClassName to recent posts block 19/06/2011 - v1.7.3 - Re-ordered logic in Observer_Customer::isCustomerSynchronisationEnabled - Added translation fix in wordpress.xml - Removed link from current page breadcrumb on blog view page - Added fix in tag cloud when no tags are present - Added fixes for dependencies on Catalog module - Fix Support & WP-Login block issues 18/06/2011 - v1.7.2 - Added event to _init function in abstract controller. 14/06/2011 - v1.7.0 - Re-uploaded version 1.6.25 as 1.7.0 14/06/2011 - v1.6.25 - Added translation of date on archive view page 13/06/2011 - v1.6.24 - Added a link_list block to display links. XML added to wordpress.xml but needs to be uncommented to display - Enabled comment order option in WordPress Admin - Added config option to hide/display the blog link in the top links block - Auto hide 'My Blog Comments' section if customer synchronisation is disabled 24/05/2011 - v1.6.23 - Added fix for XML sitemap generation - Added roles for WordPress Admin login redirect and Magento settings pages - Rewritten associated blog posts & categories in product admin - Added more comments in Post model - Stopped All-In-One SEO product data loading with products in admin - Added change-log.txt to module folder