[typo] Converting from Wordpress - a few q's

gpshewan gpsnospam at gmail.com
Wed Nov 30 10:36:33 EST 2005


Don't know about Tags because I never use them.  But as far as the  
redirects go I do have a solution.  I have a feeling that Scott was  
working on something to handle redirects when you migrate from  
another engine ... but can't remember.  But here's the solution I found:

> To resolve the legacy links issue from Wordpress you need to alter  
> some code in the config/routes.rb file of Typo. In there you will  
> see an entry like this:
>
>     map.connect ‘articles/:year/:month/:day/ 
> page/:page’, :controller => ‘articles’, :action =>  
> ‘find_by_date’, :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d 
> {1,2}/, :page => /\d+/
>
> For each instance of this code, I copied it and removed the  
> ‘article’ part. So below this you would end up with:
>
>     map.connect ’:year/:month/:day/page/:page’, :controller =>  
> ‘articles’, :action => ‘find_by_date’, :year => /\d{4}/, :month => / 
> \d{1,2}/, :day => /\d{1,2}/, :page => /\d+/
>
> So this means the /article/ part of the URL doesn’t have to be in  
> the URL – perfect for old links from search engines or other  
> peoples sites.

Bit of a workaround but it's not that hard to implement.

Gary


On 30 Nov 2005, at 15:24, Jason Bainbridge wrote:

> All,
>
> I apologize if this is a frequent topic and y'all are sick of
> answering the same questions but I did some quick googling and glanced
> through recent archives so I did do at least some due diligence first
> before coming here. :)
>
> I'm currently performing a trial conversion from Wordpress to Typo and
> have gotten most of the way there using the distributed Wordpress
> converter (by the way in WP 2.0 user_nickname is now user_nicename but
> that was the only change I needed to make in the converter).
>
> The issues I am looking at resolving are:
>
> Permalinks - Any easy way to remove the articles/ prefix that Typo has
> by default?  Other than that the permalinks appear to be the same. Has
> anyone else dealt with this before and maybe have a solution put
> together already?
>
> Tags - Recently I have been using Taggerati more heavily to classify
> my Wordpress posts using tags and only lightly using the categories.
> The way the tagging works in Taggerati is:
>
> <tag>tagname</tag> will tag the post and link tagname in the post to
> the tag page for that tag
>
> <tag url=http://blah.com>tagname</tag> will tag the post but the link
> will be to the site specified in the URL and not to the tag page for
> that tag.
>
> <itag>tagname</itag> will tag the post with tagname but it won't
> appear in the post
>
> Has anyone got any pointers on how I can convert these over to Typo's
> tagging system? The converter keeps the raw tags in place so I'm
> thinking some SQL and regexp's are going to be needed to tag the posts
> in Typo and a custom filter to transform the text in the post to the
> appropriate links (or hide them if an itag) but if someone could point
> me in the right direction it would be much appreciated.
>
> Cheers,
> --
> Jason Bainbridge
> An Aussie geek stuck in Texas - http://jasonbainbridge.com
> Advertisement free blogs for those affected by emergency situations -
> http://911blogs.com
>
> _______________________________________________
> Typo-list mailing list
> Typo-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/typo-list




More information about the Typo-list mailing list