Skip to content
backdrop-contribPublic

About

Integration with the microblogging app Moby, for iOS and Android.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Moby Mobile Microblogging

The Moby module for Backdrop CMS lets the "Moby Mobile Microblogging" apps for iOS and Android post to a Backdrop site. It provides a REST API for creating posts with a description, a date, a location, tags, and photos or videos, saved into a content type you choose.

Requirements

This module requires only Backdrop core.

Optionally, the Geofield module may also be installed to store location information. Without it, posts can still include a location name.

Installation

  • Install this module using the official Backdrop CMS instructions at https://docs.backdropcms.org/documentation/extend-with-modules.

  • Enabling the module shows a link to a setup wizard, which is also available from the settings page. It walks through the steps below, and can create a new "Mobile Post" content type with all the fields it needs.

  • Grant Post via Moby to the roles that may post from the app, along with permission to create, edit, and delete their own content of the content type. Also grant View own unpublished content, so users can read back drafts they post.

  • Visit the configuration page under Administration > Configuration > Web services > Moby (admin/config/services/moby). Select a content type and save. Then map the description, date, location, and media to that content type's fields.

  • Optionally, to store location coordinates, enable the Geofield module, add a Geofield to the content type, and select it as "Location coordinates". Without Geofield, this setting is hidden, and the app only offers a location name.

  • Optionally, to store a thumbnail for each video, add an image field to the Video file type (Structure > File types) and select it as the "Video thumbnail field".

  • Tags from the app, and #hashtags in descriptions, are saved in a "Tag vocabulary", which uses the Backdrop out-of-box "Tags" vocabulary if the site has it.

  • Optionally, choose the "Thumbnail image style" that apps show in place of full-size photos and video thumbnails. A "Moby preview (1200x1200)" style (moby_preview) is provided on install. Uninstalling Moby removes it, unless it has been changed, in which case it's kept as an ordinary style.

Documentation

Showing posts

Posts are shown with templates/moby-post.tpl.php, which the theme's node template prints in place of the post's fields. To change the layout, copy the template into your theme.

The Moby Carousel formatter, for file and image fields, shows photos and videos one at a time. The setup wizard uses it for the media field. The Moby Carousel is a custom library, built for this module.

Logging in

By default, the app logs in with a username (or email address) and password. The included Moby email login module (moby_auth_email) adds logging in with a 6-digit code emailed to the user. The site needs to be able to send email.

When more than one way of logging in is available, the order of login methods can be configured under Logging in on the Moby settings page, and drag them into order. The app shows the first one, with the others under "Log in a different way".

API

The REST API is described in API.md, with the rest of the Moby documentation.

Extending

Other modules can provide authentication mechanisms with hook_moby_auth_info(). See moby.api.php and includes/moby_auth.class.inc.

Tests

The test cases in the Moby group log in through the REST API as the apps do:

  • Multi-step login API (tests/), with the three steps of the Moby login test module.
  • Email login API (modules/moby_auth_email/tests/), with codes emailed by the Moby email login module.
  • Install defaults (tests/), which checks that installing Moby adds its image style and uses it by default, and that uninstalling removes it.

Tests can be run with:

php ./core/scripts/run-tests.sh --url http://localhost --force --group Moby

Status

Under development. The APIs are not solidified. The APIs are versioned to be compatible with specific builds of the iOS and Android apps.

Current API version: 2

Issues

Bugs and Feature Requests should be reported in the Issue Queue: https://github.com/backdrop-contrib/moby/issues.

Use of AI

Significant portions of this module were written with assistance of AI tools.

Use of AI includes:

  • Code in both the module, but especially in the mobile apps.
  • Integration testing the complete suite of module + apps.
  • Drafting documentation.

Current Maintainers

Credits

License

This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.

About

Integration with the microblogging app Moby, for iOS and Android.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages