I have needed this feature in Joomla for 6 months now. Of course when I go to use it it doesnt work.
Anyhow, enough crying.
Installed as per instructions.
When I go to components--->autopopulate
I get this output in my Joomla backend. All my normal Joomla backend is there, but the buttons for this component are not. They get errors as well.
Hopefully this isnt a php5 issue. I have no choice in that matter.
Quote:
getPath( 'admin_html' ) ); require_once( $mainframe->getPath( 'class' ) ); require_once ($mosConfig_absolute_path . '/administrator/components/com_docman/docman.config.php'); require_once ($mosConfig_absolute_path . '/administrator/components/com_autopopulate_for_docman/autopopulate_for_docman.config.php'); $dmConfig = new dmConfig(); $AConf = new AutopopulateConf(); switch ($task) { case "new" : tasknew(); break; default: taskdefault(); break; } function taskdefault() { global $dmConfig, $AConf, $option; $files = false; $FilesInDatabase = Autopopulate::GetFilesInDatabase(); //files that already have a doc entry $Categories = Autopopulate::GetCategories(); $handle = opendir($dmConfig->dmpath) or die ("Problem opening " . $dmConfig->dmpath); while (false !== ($file = readdir($handle))) { if ( (!in_array($file, $AConf->skipfiles)) AND (!in_array($file, $FilesInDatabase))) { $files[] = $file; } } if (!$files) { echo "All files in ".$dmConfig->dmpath." are already present in the docman database"; } else { sort($files); HTML_Autopopulate::taskdefault($option, $files, $dmConfig, $Categories); }; } function tasknew() { global $database, $dmConfig, $AConf; $files = mosGetParam( $_POST, 'files', false ); $catid = mosGetParam( $_POST, 'catid', 0 ); $msg = ""; if (!$files) { echo "No files selected"; return false; } foreach ($files as $file) { $database->setQuery( "INSERT INTO `#__docman` SET `dmfilename` = '".$file."', `dmname` = '".$file."', `catid` = '".$catid."', `dmdescription` = '".$AConf->dmdescription."', `dmdate_published` = '".$AConf->dmdate_published."', `dmowner` = '".$AConf->dmowner."', `published` = '".$AConf->published."', `dmurl` = '".$AConf->dmurl."', `dmcounter` = '".$AConf->dmcounter."', `checked_out` = '".$AConf->checked_out."', `checked_out_time` = '".$AConf->checked_out_time."', `approved` = '".$AConf->approved."', `dmthumbnail` = '".$AConf->dmthumbnail."', `dmlastupdateon` = '".$AConf->dmlastupdateon."', `dmlastupdateby` = '".$AConf->dmlastupdateby."', `dmsubmitedby` = '".$AConf->dmsubmitedby."', `dmmantainedby` = '".$AConf->dmmantainedby."', `dmlicense_id` = '".$AConf->dmlicense_id."', `dmlicense_display` = '".$AConf->dmlicense_display."', `access` = '".$AConf->access."', `attribs` = '".$AConf->attribs."' ;" ); if (!$database->query()) { $msg[$file] = "". $database->getErrorMsg() .""; } else { $msg[$file] = "Added to database"; } } HTML_Autopopulate::tasknew($msg); } ?>