CMS MADE SIMPLE FORGE

AdvancedContent

 

[#8837] 'Set all pages to type Advanced Content'

avatar
Created By: Lewis Howles (lewishowles)
Date Submitted: 2013-01-17 08:27

Assigned To:
Resolution: Won't Fix
State: Open
Summary:
'Set all pages to type Advanced Content'
Detailed Description:
I'd love to see a return of the above feature. I don't know if it was removed
for technical reasons but it was great if, half way through a project, you
realised you'd need to use AdvancedContent!

Thanks.

History

Comments
avatar
Date: 2013-01-18 08:12
Posted By: Georg Busch (nan)

Sorry but this feature won't come back soon. To change a type of a page i
modified the fields in the database directly. This violates the forge rules. The
alternative way is also not possible since i would need to use functions of the
core that are not meant to be used by 3rd party scripts. So in order to keep
this module in the forge i removed this feature.
      
avatar
Date: 2013-01-18 08:16
Posted By: Lewis Howles (lewishowles)

Ah that's a shame, I don't know why they don't let people use their functions
but I understand. Thanks anyway!
      
avatar
Date: 2013-01-18 08:24
Posted By: Georg Busch (nan)

Anyway i created an UDT to change the content type by yourself:

# enter the name of the original content type you wish to change
# e.g. content, content2, advanced_content ...
$old_type = 'content2';

# enter the name of the new content type you wish to apply
# e.g. content, content2, advanced_content ...
$new_type = 'advanced_content';

# database stuff
$db       = &cmsms()->GetDb();
$query    = "UPDATE ".cms_db_prefix()."content SET type = ? WHERE type = ?";
$db->Execute($query, array($new_type, $old_type));

# do not forget to clear the cache after this!

Just save this as UDT and process it in backend.
      
avatar
Date: 2013-01-18 08:33
Posted By: Lewis Howles (lewishowles)

That's amazing, thanks for that!
      
Updates

Updated: 2013-01-18 08:12
resolution_id: => 8