This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$content['type'] = array( | |
'name' => 'Example CCK Content', | |
'type' => 'example_cck_content', | |
// ... cut code ... | |
$content['fields'] = array( | |
0 => | |
array( | |
'label' => 'Box Image', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function _example_cck_content_cck_export() { | |
// code of the exported content type goes here | |
return $content; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function _example_cck_content_save_cck_node() { | |
module_load_include('inc', 'example_cck_content', 'example_cck_content.def'); | |
$content = _example_cck_content_cck_export(); | |
// we do not want too many modules enabled - the content_copy and | |
// alternate_content_copy modules are just needed in order to install the | |
// content type, so we just require them here (require_once prevent to | |
// include it more than once in case it is already enabled) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_install | |
*/ | |
function example_cck_content_install() { | |
_example_cck_content_save_cck_node(); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; $Id$ | |
name = Example CCK Content | |
description = Provide an example CCK content type | |
dependencies[] = content | |
dependencies[] = filefield | |
dependencies[] = imagefield | |
dependencies[] = text | |
core = 6.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_requirements() | |
*/ | |
function example_cck_content_requirements($phase) { | |
$requirements = array(); | |
$t = get_t(); | |
// an array of the dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function _example_cck_content_save_cck_node($op = 'install') { | |
module_load_include('inc', 'example_cck_content', 'example_cck_content.def'); | |
$content = _example_cck_content_cck_export(); | |
// we do not want too many modules enabled - the content_copy module is just needed | |
// in order to install the content type, so we just require it here (require_once prevent to | |
// include it more than once in case it is already enabled) | |
require_once './' . drupal_get_path('module', 'content') . '/modules/content_copy/content_copy.module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function correct($word, $dic) { | |
if (array_key_exists($word, $dic)) { | |
return $word; | |
} | |
$search_result = $dic[soundex($word)]; | |
foreach ($search_result as $key => &$res) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat yourprofile.info | grep "dependencies\[]" | cut -d "=" -f 2 | while read MODULE; do echo "${MODULE}: $(find /var/www/yoursite -iname ${MODULE}.module | wc -l)"; done | sort | grep ": 0" | cut -d ":" -f 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mlid int(10) unsigned NO PRI 0 | |
nid int(10) unsigned NO UNI 0 | |
bid int(10) unsigned NO MUL 0 |
OlderNewer