Looking at similar issues to this older post - Add entry admin dashboard
Omeka 3.0
I have the following in class PDFtotextNgramBridgePlugin extends Omeka_Plugin_AbstractPlugin
:
public function hookDefineAcl($args)
{
$args['acl']->addResource('PDFtotextNgramBridge_Index');
}
/**
* Add the Derivative Images navigation link.
*/
public function filterAdminNavigationMain($nav)
{
$nav[] = array('label' => __('PDFtext to Ngram Bridge'),
'uri' => url('PDFtotextNgramBridge'),
'resource' => 'PDFtotextNgramBridge_Index',
'privilege' => 'index');
return $nav;
}
define_acl
is in $_hooks
.
In views/admin/index I have index.php with my php page - has a form.
in controllers/IndexController.php
I have
class PDFtotextNgramBridge_IndexController extends Omeka_Controller_AbstractActionController
{
public function init()
{
// Set the model class so this controller can perform some functions,
// such as $this->findById()
//$this->_helper->db->setDefaultModelName('PDFtotextNgramBridgePage');
}
public function indexAction()
{
if ($this->getRequest()->isPost()) {
$options = array('pdftotextngrambridge_run' => $this->getParam('pdftotextngrambridge_run'),
'pdftotextngrambridge_replace' => $this->getParam('pdftotextngrambridge_replace'));
Zend_Registry::get('bootstrap')->getResource('jobs')
->sendLongRunning('PDFtotextNgramBridgeJob', $options);
$this->_helper->flashMessenger(__('Processing files. This may take a while. You may continue administering your site.'), 'success');
}
/*$db = $this->_helper->db->getDb();
$sql = "SELECT mime_type FROM $db->File GROUP BY mime_type";
$this->view->mime_types = $db->fetchCol($sql);*/
}
}
This will all be edited. At this point I’m just trying to get the admin page on the dashboard to show up. It’s stuck at a 404… which to me points to view / resource issues. But can’t find the problem