Giter Site home page Giter Site logo

omeka-blogger's Introduction

Omeka Blogger

A plugin for Omeka Classic, eliminating the need to recreate the behaviour of a blog using Simple Pages.

Instead, this plugin allows you to present any RSS feed as a list of blog posts. This means that you can let a blogging platform like Wordpress handle the blog functionality and simply include that content into your Omeka site.

All you have to do is add a shortcode to your simple page, and this plugin will automatically fetch and render the blog posts for you.

How do I use this?

Just add the following shortcode in your Simple Page:

[blog url=http://example.com/blog]

The URL parameter is required, and should provide the URL to the RSS feed you would like to embed.

The plugin provides a number of parameters to tweak the behaviour of the plugin:

Display

  • display=long renders the full content of each blog post in the page.
  • display=short renders a shorter version of the blog post in the page.

For example:

[blog url=http://example.com/blog display=short]

Default value: long if not specified.

Limit

Limits the number of posts to include in the page.

For example, the following will include at most 5 blog posts:

[blog url=http://example.com/blog limit=5]

Default value: displays all posts if not specified.

Links

Control wether the blog titles are presented as links or not.

  • links=true will present blog titles as links pointing to the source blog post.
  • links=false will present the blog titles as plain text.

For example:

[blog url=http://example.com/blog links=true]

Default value: false if not specified.

More

Controls whether a link to the blog is presented at the bottom of the blog list.

  • more=true will include a More link
  • more=false will not include a More link.

For example:

[blog url=http://example.com/blog more=true]

Default Value: false if not specified.

omeka-blogger's People

Contributors

doana avatar

Stargazers

Eric C. Weig avatar

Watchers

James Cloos avatar  avatar

Forkers

jcmundy

omeka-blogger's Issues

Error: non-static method BloggerPlugin::renderBlog() cannot be called statically

I'm testing out Omeka Blogger on a fresh instance of Omeka 3.1.2 and an instance of Omeka 2.8. Edit to add that I've tested with PHP 8 and PHP 7.4 with same results.

When loading a simple page with the blog shortcode, I see no content. Both error logs show the error below. I've tried a couple of different wordpress feed urls: https://elaboratories.org/feed/ and https://janeaddams.ramapo.edu/feed/

I'm adding the shortcode like this: [blog url=https://elaboratories.org/feed/]

[07-Feb-2024 20:26:36 UTC] PHP Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method BloggerPlugin::renderBlog() cannot be called statically in /home/annelies/public_html/englewood/application/views/helpers/Shortcodes.php:80
Stack trace:
#0 [internal function]: Omeka_View_Helper_Shortcodes->handleShortcode(Array)
#1 /home/annelies/public_html/englewood/application/views/helpers/Shortcodes.php(63): preg_replace_callback('/\[(\w+)\s*([^\...', Array, '[blog url=https...')
#2 /home/annelies/public_html/englewood/application/libraries/Zend/View/Abstract.php(350): Omeka_View_Helper_Shortcodes->shortcodes('[blog url=https...')
#3 /home/annelies/public_html/englewood/plugins/SimplePages/views/public/page/show.php(20): Zend_View_Abstract->__call('shortcodes', Array)
#4 /home/annelies/public_html/englewood/application/libraries/Omeka/View.php(114): include('/home/annelies/...')
#5 /home/annelies/public_html/englewood/application/libraries/Zend/View/Abstract.php(889): Omeka_View->_run('/home/annelies/...')
#6 /home/annelies/public_html/englewood/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render(NULL)
#7 /home/annelies/public_html/englewood/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(933): Zend_Controller_Action_Helper_ViewRenderer->renderScript('page/show.php', NULL)
#8 /home/annelies/public_html/englewood/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(972): Zend_Controller_Action_Helper_ViewRenderer->render()
#9 /home/annelies/public_html/englewood/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#10 /home/annelies/public_html/englewood/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#11 /home/annelies/public_html/englewood/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('showAction')
#12 /home/annelies/public_html/englewood/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#13 /home/annelies/public_html/englewood/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(106): Zend_Controller_Front->dispatch()
#14 /home/annelies/public_html/englewood/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#15 /home/annelies/public_html/englewood/application/libraries/Omeka/Application.php(73): Zend_Application->run()
#16 /home/annelies/public_html/englewood/index.php(23): Omeka_Application->run()
#17 {main}
thrown in /home/annelies/public_html/englewood/application/views/helpers/Shortcodes.php on line 80

Blogger down

I have been using blogger on a site with multiple RSS feeds. I have only had the page crash if a feed goes down. Right now though I cannot get the page to load unless I remove all RSS feeds. Is there another setting that would error and blank the page? Thank you so much!

Working example

Hi:
Could someone post a link to an omega site being fed a blog by this plugin? I'd like to see it in operation. Thanks,
Barry

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.