Absolutely. I imported nearly 1000 quotations, and then I upgraded to Drupal 5 and I can't use them anymore! :) I would be happy enough if I could use the built-in CCK content type creator to create a content type that would re-use the "quotes" nodes, then I could display them with Views. I suppose I just need to know what kind of fields to add?
I can't tell you what it would take to just use content for this purpose, although I will be looking into it myself because there's no reason in particular to wait for quotes to be ported when CCK will do the job.
I CAN tell you that when I did the upgrade the schema was not updated correctly so I actually made CCK types for both page and story... and both work.
Regardless, there is not one thing in quotes that would not be better handled by CCK. In particular, quote attribution could be better handled.
Even if it's not so simple as to just create a new content type, I don't think the answer is to continue development of quotes, at least not as it is. It would make more sense to let CCK/content handle the data, and if anything the quote module should simply provide the upload function and maybe some aggregation so that you don't have to have quote authors as nodes. (One excellent way to handle attribution would be with a free tagging taxonomy category.) This would allow you to place a view with arguments that searches for other quotes by the same author into the view template for the full node.
Just as an aside, quote data is spread throughout the database. In particular there is a table called "quotes" that appears to contain attribution information. Moving this data to another data type will involve some SQL, it's probably a very simple join and I hope to one day figure out how to do it :D (I know bugger-all about SQL, to be honest.)
Also, just to save anyone else the trouble of trying it; if you make an info file for the module, it will let you access quotes, but you can't actually see any of the parameters of them beyond title and body.
This was my quotes.info file:
; $Id: quotes.info,v 0.0a 2007/01/25 00:38:16 drink Exp $
name = Quotes
description = "Maintains a database of quotations"
version = "5.x-0.0"
project = "quotes"
I don't really know anything about porting modules to 5.0 and don't think that the knowledge would be all that valuable if I did. I think the answer here is to manually convert the quotes node data to another node type using a big fat SQL statement, then manually delete all the quotes notes with another one.
I tried that with no luck. I then thought about setting up a quotes content type and using views to give a random node, but could not figure out how to present it nicely without it ending up in a list with the accompanying variation in background... it did the job though. Could probably style the output with css though, or try harder with views. Maybe easier than porting this and quicker than waiting?
I did however figure out how to use joins to combine the data from the various locations in order to define a quote:
select node.nid, node.vid, node.title, node.uid, node.created, node.changed, node_revisions.body, quotes.author, node_revisions.teaser, node_revisions.timestamp, node_revisions.format, node_revisions.log from node join node_revisions on node.vid = node_revisions.vid join quotes on node.vid = quotes.vid where node.type = 'quotes';
The result is a dump of all relevant information about a quote. It doesn't include the status of the quote, whether it's sticky or not, whether it's in the moderation queue, etc. But as you can see this includes the owner, the nid and vid which you frankly won't need for creating new nodes, body and teaser contents from the latest (I hope) revision, the author entry, the timestamps, the input format delta... basically all the things that are important. Now I just have to create a CCK type and figure out how to stuff the data into it from this query via a select into. That will have to wait until tomorrow at the earliest (I need to go work on my car right now, having electrical issues) but this is a good first step I think. If anyone sees anything I missed then by all means leave a comment.
Oh yeah and one last thing for today: this topic may be helpful in figuring out how to get content where it needs to go.
By the way, there's probably a better way using a function, but select vid from node_revisions order by vid desc limit 1; will return the last vid (revision ID) in the database. By adding 1 to this you get the next available vid, which you can use when manually stuffing data. I haven't quite got that far though.
That's great news. I had forgotten about the Quote vs Quotes module and was happy for a bit there when I thought that I was going to be able to turn on my old quotes pieces.
Anyways, looking forward to helping with the testing here -> http://poped.org/
I'm not sure if this was the fault of the quotes module, or not, but I had some strange behavior after an upgrade to 5.1. I edned up having to run the following command to fix them:
update node_type set module="quotes" where type="quotes";
Comments
Comment #1
canadrian commentedAbsolutely. I imported nearly 1000 quotations, and then I upgraded to Drupal 5 and I can't use them anymore! :) I would be happy enough if I could use the built-in CCK content type creator to create a content type that would re-use the "quotes" nodes, then I could display them with Views. I suppose I just need to know what kind of fields to add?
Comment #2
spooky69 commentedAnother vote for this.
Comment #3
dbuckles commentedAnother vote for this one. Heck, I'll throw US$20 to the first person to port it...I miss my quotes file!
Comment #4
hyperlogos commentedI can't tell you what it would take to just use content for this purpose, although I will be looking into it myself because there's no reason in particular to wait for quotes to be ported when CCK will do the job.
I CAN tell you that when I did the upgrade the schema was not updated correctly so I actually made CCK types for both page and story... and both work.
Regardless, there is not one thing in quotes that would not be better handled by CCK. In particular, quote attribution could be better handled.
Even if it's not so simple as to just create a new content type, I don't think the answer is to continue development of quotes, at least not as it is. It would make more sense to let CCK/content handle the data, and if anything the quote module should simply provide the upload function and maybe some aggregation so that you don't have to have quote authors as nodes. (One excellent way to handle attribution would be with a free tagging taxonomy category.) This would allow you to place a view with arguments that searches for other quotes by the same author into the view template for the full node.
Comment #5
hyperlogos commentedJust as an aside, quote data is spread throughout the database. In particular there is a table called "quotes" that appears to contain attribution information. Moving this data to another data type will involve some SQL, it's probably a very simple join and I hope to one day figure out how to do it :D (I know bugger-all about SQL, to be honest.)
Comment #6
hyperlogos commentedAlso, just to save anyone else the trouble of trying it; if you make an info file for the module, it will let you access quotes, but you can't actually see any of the parameters of them beyond title and body.
This was my quotes.info file:
I don't really know anything about porting modules to 5.0 and don't think that the knowledge would be all that valuable if I did. I think the answer here is to manually convert the quotes node data to another node type using a big fat SQL statement, then manually delete all the quotes notes with another one.
Comment #7
spooky69 commentedI tried that with no luck. I then thought about setting up a quotes content type and using views to give a random node, but could not figure out how to present it nicely without it ending up in a list with the accompanying variation in background... it did the job though. Could probably style the output with css though, or try harder with views. Maybe easier than porting this and quicker than waiting?
Comment #8
hyperlogos commentedI did however figure out how to use joins to combine the data from the various locations in order to define a quote:
The result is a dump of all relevant information about a quote. It doesn't include the status of the quote, whether it's sticky or not, whether it's in the moderation queue, etc. But as you can see this includes the owner, the nid and vid which you frankly won't need for creating new nodes, body and teaser contents from the latest (I hope) revision, the author entry, the timestamps, the input format delta... basically all the things that are important. Now I just have to create a CCK type and figure out how to stuff the data into it from this query via a select into. That will have to wait until tomorrow at the earliest (I need to go work on my car right now, having electrical issues) but this is a good first step I think. If anyone sees anything I missed then by all means leave a comment.
Comment #9
hyperlogos commentedOh yeah and one last thing for today: this topic may be helpful in figuring out how to get content where it needs to go.
By the way, there's probably a better way using a function, but
select vid from node_revisions order by vid desc limit 1;will return the last vid (revision ID) in the database. By adding 1 to this you get the next available vid, which you can use when manually stuffing data. I haven't quite got that far though.Comment #10
amedjones commentedthis is a great module and im all in to have it imported to drupal 5.x. like many other modules that i am waiting for.
Comment #11
jhriggs commentedI am working on the Drupal 5 version.
Comment #12
mgiffordThat's great news. I had forgotten about the Quote vs Quotes module and was happy for a bit there when I thought that I was going to be able to turn on my old quotes pieces.
Anyways, looking forward to helping with the testing here -> http://poped.org/
Mike
Comment #13
jhriggs commentedI just committed version 5.x-1.0 to CVS. Note that it may take awhile for the download packages to appear on drupal.org.
Comment #14
alpinejag commentedI set up the module last night. It works perfectly, shows all my old quotes from 4.7. Thanks porting it!
Comment #15
mgiffordJust got this error when trying to update the site from the CVS:
Fatal error: Call to undefined function quotes_version() in /home/dm_50/sites/all/modules/quotes/quotes.install on line 90
// $Id: quotes.install,v 1.4 2007/02/14 15:28:35 jhriggs Exp $
Mike
Comment #16
jhriggs commentedI just committed version 5.x-1.1 that removes the reference to quotes_version().
Comment #17
mvanwink commentedI'm not sure if this was the fault of the quotes module, or not, but I had some strange behavior after an upgrade to 5.1. I edned up having to run the following command to fix them:
update node_type set module="quotes" where type="quotes";I posted a forum update with the symptoms here:
http://drupal.org/node/121550
Comment #18
(not verified) commented