mediadreams/md_newsfrontend

This TYPO3 extension enables frontend users to created news records.

Installs: 1 000

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 4

Language:JavaScript

Type:typo3-cms-extension

2.0.2 2021-01-11 20:48 UTC

This package is auto-updated.

Last update: 2021-03-25 08:42:35 UTC


README

This extension enables a frontend user to add ext:news-records. Beside adding content for the normal text fields like title, teaser, bodytext it is also possible to upload an image and a file download as well as selecting a category.

Templates are ready to use with the bootstrap framework and icons will be shown, if you have Font Awesome icon set included in your project. Validation of input is done in the frontend, rich text editing enabled for the textarea and a date picker in place for the archive date.

Requirements

  • TYPO3 >= 8.7
  • ext:news >= 7.0

Installation

  • Install the extension by using the extension manager or use composer
  • Include the static TypoScript of the extension
  • Configure the extension by setting your own constants

Usage

  • Add the pluign News frontend on a page, which is restricted by the frontend user login
  • Select a storage page in the plugin-tab in the field Record Storage Page
  • Now a frontend user is able to add, edit and delete own records

Signal slots

Following signal slots are available:

  • createActionBeforeSave: Called just before saving a new record
  • createActionAfterPersist: Called after a new record was saved (new record Id is available)
  • updateActionBeforeSave: Called just before an existig record will be updated
  • deleteActionBeforeDelete: Called just before a record will be deleted

Example, how to catch a signal:

Add following lines in ext_localconf.php of your own extension:

$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);

// slot for ext:md_newsfrontend
$signalSlotDispatcher->connect(
    \Mediadreams\MdNewsfrontend\Controller\NewsController::class,
    'createActionBeforeSave',
    \Vendor\Extension\Slot\YourClass::class,
    'yourMethod'
);

Add the class Vendor\Extension\Slot\YourClass with the method yourMethod in your extension.

Example:

namespace Vendor\Extension\Slot;

class YourClass
{

    /**
     *
     * @param object $news The news object
     * @param object $obj The controller object
     * @return void
     */
    public function yourMethod($news, $obj) {
        // do something...
    }
}

Bugs and Known Issues

If you find a bug, it would be nice if you add an issue on Github.

THANKS

Thanks a lot to all who make this outstanding TYPO3 project possible!

Credits

  • Extension icon was copied from ext:news and enriched with a pen from Font Awesome.
  • Thanks to Parsley.js, which I use for validating the form in the frontend.
  • Thanks to tiny, which I use as rich text editor in the frontend.
  • Thanks to flatpickr, which I use as date picker in the frontend.
  • And last but not least thanks to the guys at jQuery.