Editing Theme (Minimalist)

I would like to place little flag icons that link to versions of my site in different languages in the header, so I’m trying to figure out how to tinker with the theme’s code. I don’t have a ton of programming experience, but I think I need to go to /themes/minimalist/common/header.php and add a php echo statement within the <div class="site-title"></div> tag to place my icons within the header section. And that’s as far as I can get on my own.

Questions:

  1. Do I need to define my icons as a variable somewhere and then write an echo statement to the effect of: <?php echo VARIABLE; ?> Php at this level is above my head, but it looks like this is how content is being generated.

  2. Could I add an echo statement in the location suggested above without using a variable or constant? Maybe something like this? <?php echo <a class="lang" href="URL to Arabic language site"><img src="URL to flag image"/></a>; ?> And then I could style the .lang class to push the flags to the bottom right corner of the site-title div.

Just wanted to ask before I start experimenting and break the site.

Hi.
Have you considered using the multilanguage plugin? Here’s my fork: GitHub - DBinaghi/Multilanguage: A limited attempt to make parts of Omeka multilanguage
Hope this helps.

Thanks for the suggestion, but this is the second plugin I’ve tried to use from GitHub and both times I’ve gotten an error message saying “This is not a valid plugin.” Is it something I’m doing?

Just installed it now and it works fine for me.

The plugin should work on any Omeka Classic version from 2.1 (I’m on 3.0.3 here), could it be that your Omeka version is older than that?
And are you following the Installation section instructions of the plugin, including renaming the folder (see Working with Plugins - Omeka Classic User Manual for more info about plugin installation).

Hope this helps.

I’m on Omeka Classic 3.0.2, so I don’t think it’s a version issue. I followed the instructions for installing plugins specific for CPanel, which what I’m using.

The file did originally download as Multilanguage-master.zip, so I removed “-master” from the title. I didn’t see a redundant folder level, so I didn’t think anything else needed to be done. But when I uninstalled and then reinstalled it, it’s still not working for me.

I’d love to get this to work, but I also still want to know how to manually edit a theme.

The file Multilanguage-master.zip, when uncompressed in CPanel, results in a folder called “Multilanguage-master”; renaming the .zip file does not change the name of the uncompressed folder. So, according to what you said, I guess that could be your problem.

How to fix it: rename “Multilanguage-master” folder to “Multilanguage” in your Omeka’s plugins folder, then install plugin through the admin’s plugins page.

Thanks for your patience, but it’s still not working. As soon as I click install, I get an error message. But I’m having some trouble logging in to read my error messages, so I can’t give any more details at the moment.


I was able to get the error message to display. Not sure if this means anything to you, I can’t make sense of it:

Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Specified key was too long; max key length is 255 bytes in /home/archive9/public_html/application/libraries/Zend/Db/Statement/Mysqli.php:215
Stack trace:
#0 /home/archive9/public_html/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/archive9/public_html/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 /home/archive9/public_html/application/libraries/Omeka/Db.php(80): Zend_Db_Adapter_Abstract->query(’\nCREATE TABLE I…’)
#3 /home/archive9/public_html/plugins/Multilanguage/MultilanguagePlugin.php(101): Omeka_Db->__call(‘query’, Array)
#4 /home/archive9/public_html/application/libraries/Omeka/Plugin/Broker.php(142): MultilanguagePlugin->hookInstall(Array)
#5 /home/archive9/public_html/application/libraries/Omeka/Plugin/Installer.php(126): Omeka_Plugin_Broker->callHook(‘install’, Array, Object(Plugin))
#6 /home/archive9/public_html/application/controllers/PluginsController.php(95): Omeka_Plugin_Installer->install(Object(Plugin))
#7 /home/archive9/public_html/application/libraries/Zend/Controller/Action.php(516): PluginsController->installAction()
#8 /home/archive9/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘installAction’)
#9 /home/archive9/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#10 /home/archive9/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#11 /home/archive9/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#12 /home/archive9/public_html/application/libraries/Omeka/Application.php(73): Zend_Application->run()
#13 /home/archive9/public_html/admin/index.php(28): Omeka_Application->run()
#14 {main}

When I try to add some text using either php or html to the header.php file within the tag, why does nothing show up on the website? How can I add something to the header?

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.