Posted by avolve on August 31, 2005 at 8:11am
Hi All
I have given my site (only a couple months old) a complete overhaul with my own theme and a change in structure.
To reflect this I want to remove "colin's blog" from under all my postings. My latest posting is a story so it negates this, yet how do I change all previous content from blogs to story's to make this uniform.
I had someone mention that I need to change the database file, but the advice they gave me didn't work (i.e. what they said to change didn't exist in the databse).
thanx
c.
Comments
*bump*
really need some help/advice with this...
thanks for the info...
someone hacked my site and the database was lost, so kinda makes this thread defunct for me now...
positive is that I have almost finished a new theme that will be launched very soon...
http://drupal.org/security
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
turn it off in themes
Turn it off in the themes section. I don't recognize the theme so can't be more specific. Content is seperate from the display of content. You need make no db changes for this.
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mount
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
doesn't remove what i want...
this only removes submitted by, i want what were originally entered as blogs to now be stories so they no longer have "colin's blog" appear.
anyone else have some ideas???
thanx
c.
Try this on one blog post to
make sure it works.
And only try this after you have done a db dump of your entire site. The fastest way to do this involves interacting with the tables of your drupal db directly, and this is rarely a good idea, because you can mess up your site VERY quickly by doing this.
*End disclaimer*
I also recommend using phpmyadmin, unless you are an absolute whiz at the command line.
So, to change the node type:
Look at the contents of the vocabulary_node_types table. Make sure that you have have both the "blog" and the "story" content type in the "type" column.
Assuming that the answer to this is yes, go to the node table. In the "type" column, change "blog" to "story".
Then, empty(truncate) your cache table, and that should do it.
*Another Disclaimer*
I don't know if blogs and stories share the same info in the same fields -- in all likelihood they do, but on the off chance they don't, try this on a blog post you wouldn't mind losing to see how it works. I have done this to change forum posts to pages, but not blogs to stories.
Hope this helps.
Cheers,
bonobo
-------
http://www.funnymonkey.com
Tools for Teachers
-------
http://www.funnymonkey.com
Click. Connect. Learn.
Using Drupal in Education
Snippet for doing the conversion
How about the following snippet? All disclaimers in the parent post apply to this also.
I am not sure how safe is this. Hence take a DB backup before doing this.
Procedure:
Add new the following code to the body
<?php
$result = db_query('SELECT nid FROM {node} WHERE type = "blog"');
while($obj = db_fetch_object($result))
{
print "<br>changing node/". $obj->nid." to story";
db_query('UPDATE {node} SET type = "story" WHERE nid ='. $obj->nid);
}
?>
select PHP code radio button as type.
Now click 'edit' tab and delete the post. Do not keep this code lying around.
Warning once more:
I haven't tried the above code. So, the bold minded guys could try this out _ONLY AFTER BACKING UP_ their database. Good luck.
There's altertype module
Hi
I have got a altertyp module from some site, i don't have the link to that site. I made a search i didn't get it, if you want just drop your email.
You change any node type to any type with that module ex blog - story, blog - page or viceversa.
However, regarding the categeroies you need to edit twice to change the categeory.
ex: Suppose a blog artcile with dairy categeory and want's to change to story type. In story i have another categeory called personal.
First you need to edit the page and change the node type from blog to story
and again edit the page to select the categeory to personal.
If your vocabolary has same categeory for both the types you don't need to redit it.
If you need the module drop your email address and i'l send to you.
The module is very small and no database tables recquired. After changing your content type you can delete it safely, it worked well for me.
Sunny
www.gleez.com
Sunny
www.gleez.com | www.sandeepone.com
where, where?
any more information about that? was there a info.txt file with the module or something?
Check this
http://www.settingtheworldtorights.com/node/417
Sunny
www.gleez.com
Sunny
www.gleez.com | www.sandeepone.com
There's a module for that:
There's a module for that: http://drupal.org/project/node_convert
Think they might have figured
Think they might have figured out a resolution . . . considering the last post prior to your reply was more than 5 years ago :)
Yeah, I realized that after I
Yeah, I realized that after I already posted ;) Anyway, this thread is top search result, so it might be helpful for somebody in the future.
I did find this reply useful,
I did find this reply useful, as it pointed to a tool to help make that transition. Node Convert has some issues, though, that may hose your content, so use it with care and make a backup of your db.
--
Have you filed a support request in the {insert module/theme name here} issue queue? That's where you'll find users (and developers) familiar with your problem.