{"id":19114886,"url":"https://github.com/namelesscoder/dialog","last_synced_at":"2025-08-07T00:35:38.519Z","repository":{"id":5005963,"uuid":"6164279","full_name":"NamelessCoder/dialog","owner":"NamelessCoder","description":"TYPO3 extension Dialog: Discussion Components","archived":false,"fork":false,"pushed_at":"2013-02-21T13:33:45.000Z","size":602,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T16:59:52.857Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://extensions.fedext.net/dialog/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ember-cli/ember-cli-mocha","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NamelessCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-10T20:55:21.000Z","updated_at":"2018-03-06T15:35:37.000Z","dependencies_parsed_at":"2022-08-29T11:01:57.126Z","dependency_job_id":null,"html_url":"https://github.com/NamelessCoder/dialog","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamelessCoder%2Fdialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamelessCoder%2Fdialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamelessCoder%2Fdialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamelessCoder%2Fdialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NamelessCoder","download_url":"https://codeload.github.com/NamelessCoder/dialog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240170104,"owners_count":19759145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T04:44:49.832Z","updated_at":"2025-02-22T12:13:30.360Z","avatar_url":"https://github.com/NamelessCoder.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"TYPO3 Extension Dialog: Lightweight Discussion Components\n=========================================================\n\n## What is it?\n\n`Dialog` is a collection of components whose only purpose is to facilitate discussions between users of your web site. There are\ncurrently two types of plugins: a Chat and full Discussion (forum-style) plugin. And three Widget types: Chat, Discussion and\nComment - the first two of which are the Widget versions of the two main plugins and the last one, Comment, a specially\nintegrated version of the Discussion Widget which automatically creates Discussions and connects these to any type of content -\nfor example any record from your own extension or a content element.\n\n`Dialog` integrates with `Notify` (see https://github.com/NamelessCoder/notify) to enable subscription to new records - new\nDiscussions, Threads or Posts. `Notify` includes a special Timeline View which is very useful as a \"My watched threads\" interface,\nas well as the necessary logic to send digest-style emails based on Fluid templates.\n\n`Dialog` features multiple formatting syntaxes for texts: the default \"html\" mode which uses lib.parseFuncHtml, \"raw\" which does\nno escaping at all (of course only for trusted use!), \"nl2br\" which strips all HTML but turns line breaks into `\u003cbr\u003e` or the more\nadvanced \"markdown\" mode - which uses the CLI utility [Markdown, a simple Perl script](http://daringfireball.net/projects/markdown/).\n\n## What does it do?\n\n`Dialog` provides plugins and Widgets which have extensive configuration options. Plugins are configured as content elements and\nWidgets are provided as ViewHelper Widgets which can be used in any Fluid template. `Dialog` uses a very simple set of Models:\nDiscussion, Thread, Post and Poster. Each Discussion can have any number of Posts (for a flat structure like the Comment Widget)\nor it can have any number of Threads attached to it. Threads are simple collections of either Threads or Posts and as such are a\nlot like Discussions but are different and stored differently to clearly separate their purpose from that of Discussions. Posts\nare of course the main \"user contributed content\"; the Model for each individual posted user comment but also used as sub-object\non Discussions and Threads to allow the Discussion/Thread creator to write a piece of text for that Discussion/Thread topic.\nLastly, the Poster is of course each person who has created a Post, Discussion or Thread - one Poster per identity. The Poster can\nbe automatically created based on a FrontendUser if one is logged in.\n\nDiscussion and Threads are simple containers used to represent and store the hierarchy. Posts are the individual objects used to\nstore text submitted by users either as replies to Discussions, Threads or other Posts - or as main topic text for Discussion and\nThread.\n\nDiscussions can be seen as master Threads; creation of Discussions can be prohibited but creation of Threads enabled, making it\npossible for users to create new \"subjects\" (sub-topics of discussion under a main topic which is a Discussion) and for other\nusers to post individual replies to that sub-topic (the Thread). Finally it is possible to enable replies to each individual Post\nto have a threaded forum structure.\n\nThe Comment Widget for example uses a main Discussion without topic text which is automatically created and attached to the\nrecord/ID/whatever, then stores a flat list of Posts (without Threads, without option to reply to individual Posts) under that\nDiscussion.\n\nAnd the Discussion plugin for example uses a main list of Discussions created by the site admin, then enables creation of Threds\nunder each Discussion, then enables a flat list of direct Post replies with the option to reply to each individual Post.\n\nAny user-submitted text is processed the same regardless of the context in order to simplify usage and have a short learning curve.\n\n## How does it do it?\n\n`Dialog` is a fairly simple Extbase extension with just a few extended features, mainly the use of Flux to enable a highly\ndynamic configuration for plugins using a FlexForm-style integration between Fluid and TYPO3. The Fluid templates are standardised\nand follow the conventions - with one slightly off standard pragma: each component type stores almost all rendering related to\nthat component type in a Partial template. This is done in order to re-use this Partial template from both a TYPO3 content element\nplugin and a Fluid Widget without splitting much of the structured template in two.\n\n`Dialog` works in two ways: if a FrontendUser is not logged in but the page on which `Dialog` is inserted can be accessed, `Dialog`\nworks in \"guest mode\" which means public commenting is allowed - but requires authentication through an email that is sent by the\nTYPO3 site when a guest submits a Post (or Thread, or Discussion). The authentication is stored in a session or a long term cookie.\nIf a FrontendUser is logged in then that user will be used as Poster identity.\n\n## Examples\n\nIn general you will find every configuration option you need right in the plugin/Widget you are using. The components are designed\nto be as flexible as possible, allowing you to enable or disable any option you desire in order to get just the behavior your want:\nthreaded/flat, comment-style, fixed topics and so on.\n\nViewHelpers are documented by their XSD schema which you can find at this URL: http://fedext.net/ns/dialog/ViewHelpers - use either\nthis URL as schemaLocation or download the XSD and create the necessary mapping in your IDE.\n\n### Referencing the XSD schema\n\nThe full version relevant for templates that use a Layout and contain Sections.\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" ?\u003e\n\u003chtml xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\"\n\t  xmlns:dialog=\"http://fedext.net/ns/dialog/ViewHelpers\"\u003e\n\u003chead\u003e\n\t\u003ctitle\u003e\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\n{namespace dialog=Tx_Dialog_ViewHelpers}\n\n\u003c!-- Fluid goes here --\u003e\n\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nThe short version better suited for Partials etc.\n\n```xml\n{namespace dialog=Tx_Dialog_ViewHelpers}\n\u003cdiv xmlns:dialog=\"http://fedext.net/ns/dialog/ViewHelpers\"\u003e\n\u003c!-- Fluid goes here --\u003e\n\u003c/div\u003e\n```\n\n### Comment Widget available only to desired FrontendUserGroup\n\n```xml\n\u003cv:security.allow frontendUserGroup=\"{settings.myExtensionsAuthSettings.someGroupUid}\"\u003e\n\t\u003cdialog:widget.comment\n\t\thash=\"Tx_MyExt_Domain_Model_MyObject:{object.uid}\"\n\t\tpresetSubject=\"Comment: {object.title}\"\n\t\tcustomTitle=\"{f:translate(key: 'commentsFor', default: 'commentsFor')} {object.title}\"\n\t\tplaceholder=\"\u003ci class='icon icon-comments'\u003e\u003c/i\u003e {f:translate(key: 'commentsPlaceholder', default: 'commentsPlaceholder')} (%s)\"\n\t\t/\u003e\n\u003c/v:security.allow\u003e\n```\n\n### Rebuilding cached Markdown after upgrade from old version\n\nAnywhere in any controller, implement this short piece of code. Allow at least one execution, then remove the code again. The\nMarkdown representation of every Post will be saved (but of course the original, untransformed version remains and is the one\nwhich will be edited). When saving a Post in any context (except for TYPO3 BE) the Markdown representation is automatically\nrenewed.\n\nPlease note that Markdown pre-caching this way will silently ignore any Exceptions, fx caused by missing Markdown CLI command.\n\n```php\n\n/**\n * @var Tx_Dialog_Domain_Repository_PostRepository\n */\nprotected $postRepository;\n\n/**\n * @param Tx_Dialog_Domain_Repository_PostRepository $postRepository\n */\npublic function injectPostRepository(Tx_Dialog_Domain_Repository_PostRepository $postRepository) {\n\t$this-\u003epostRepository = $postRepository;\n}\n\npublic function anyDesiredActionOrCommand() {\n\tforeach ($this-\u003epostRepository-\u003efindAll() as $post) {\n\t\t$post-\u003esetContent($post-\u003egetContent());\n\t\t$this-\u003epostRepository-\u003eupdate($post);\n\t}\n}\n```\n\n### Core settings\n\n```\nplugin.tx_dialog {\n\tsettings {\n\t\t# format used for all dates\n\t\tdateFormat = Y-m-d H:i\n\t\t# a CSV list of HTML tags that are not removed from Post's text content\n\t\tallowedHtmlTags = pre,code,quote,blockquote,link,list,em,strong\n\t\t# hero unit: the jumbotron text box with topics' descriptions\n\t\tenableHeroUnit = 1\n\t\t# toolbar: a top navigation toolbar to move between sections\n\t\tenableToolbar = 1\n\t\t# subscriptions: if enabled and EXT:notify installed, allows subscription to events (new Posts etc) in the forum\n\t\tenableSubscriptions = 1\n\t\t# direct commenting: place Post form inline in all appropriate views\n\t\tenableDirectCommenting = 1\n\t\t# bread crumb: track of Discussion -\u003e Thread -\u003e Post path as Bootstrap bread crumb component\n\t\tenableBreadCrumb = 1\n\t\t# if enabled, places a button that quickly sends a \"user thinks content is inappropriate\" email to sysadmin\n\t\tenableInappropriateContentReporting = 1\n\t\t# gravatars: enable the use of avatars from gravatar.com\n\t\tenableGravatars = 1\n\t\t# gravatars: gravatar width, raw pixels. Gravatar will always be square.\n\t\tgravatarWidth = 180\n\t\t# gravatars: default image used by gravatar.com when user does not exist\n\t\tgravatarDefault = retro\n\t\t# discussion creation: If enabled, allows users to create new Discussions (root-level object, should normally be controlled by site admin)\n\t\tenableDiscussionCreation = 0\n\t\t# editing: enable users' ability to edit own Posts\n\t\tenableEditing = 1\n\t\t# editing expiration: revoke editing access to own Posts after this many seconds. Set to zero to permanently allow editing of any of users' previous Posts.\n\t\teditingExpiration = 3600\n\t\t# expanding textareas: enable as-you-type expansion of textarea height. If disabled, the CSS height is used. If enabled, the CSS height is ignored.\n\t\tenableExpandingTextareas = 1\n\t\t# prefix automatically added to Posts' subjects when Post is made as a reply as opposed to a new topic\n\t\tresponsePrefix = Re:\n\t\t# the number of most recent Posts to display in the Discussion list\n\t\tnumberOfLatestPosts = 5\n\t\t# maximum number of Posts to display per page - currently only applies to Post list\n\t\titemsPerPage = 20\n\t\t# postTableClass: class name (Twitter Bootstrap table classes) of tables containing Posts.\n\t\tpostTableClass = table-condensed table-striped\n\t\t# last post max characters: number of characters to display from latest post in Discussion/Thread\n\t\tlastPostMaxCharacters = 150\n\t\tdiscussion {\n\t\tlist {\n\t\t\t# Discussion overview description display: wether or not to display the description of each Discussion in the main Discussion list, before list of most recently active Threads\n\t\t\t\tdisplayDescription = 1\n\t\t\t\t# Discussion overview description display, maxCharacters: how many characters to display at maximum from the Discussion description. Zero disables cropping.\n\t\t\t\tdisplayDescriptionCharacters = 140\n\t\t\t}\n\t\t\tshow {\n\t\t\t\t# Discussion overview description display: wether or not to display the description of each Discussion in the main Discussion list, before list of most recently active Threads\n\t\t\t\tdisplayDescription = 1\n\t\t\t\t# Discussion overview description display, maxCharacters: how many characters to display at maximum from the Discussion description. Zero disables cropping.\n\t\t\t\tdisplayDescriptionCharacters = 0\n\t\t\t}\n\t\t}\n\t\tattachments {\n\t\t\tfiles {\n\t\t\t\t# file uploads: enable uploading of files when posting\n\t\t\t\tenable = 1\n\t\t\t\t# file uploads: number of file upload fields\n\t\t\t\tcount = 5\n\t\t\t\t# file uploads: allowed file extensions\n\t\t\t\textensions = php, js, zip, tar, gz, bz, bz2, doc, docx, odt, odf, txt\n\t\t\t}\n\t\t\timages {\n\t\t\t\t# image uploads: enable uploading of images when posting\n\t\t\t\tenable = 1\n\t\t\t\t# image uploads: number of image upload fields\n\t\t\t\tcount = 5\n\t\t\t\t# image uploads: allowed file extensions\n\t\t\t\textensions = jpg, jpeg, gif, png\n\t\t\t\t# image uploads: width of displayed image attachments, TS object syntax i.e. \"350m\" to scale and maintain aspect, \"500c\" to crop at width 500. Default tuned to Bootstrap.\n\t\t\t\twidth = 770m\n\t\t\t\t# image uploads: height of displayed image attachments, suggest a reasonably high value such as \"2000m\"\n\t\t\t\theight = 2000m\n\t\t\t\t# image uploads: placeholder image\n\t\t\t\tplaceholder = http://www.placehold.it/85x85/EFEFEF/AAAAAA\u0026text=Image\n\t\t\t\t# image uploads: image display class, Bootstrap (or own) CSS name. Useful values: \"img-rounded\" and \"img-polaroid\", less useful but also supported is \"img-circle\". When using \"img-polaroid\" subtract padding (default: 5+5 px) from image width setting\n\t\t\t\tclass = img-polaroid\n\t\t\t}\n\t\t\t# extension rename mapping. Uploaded files' extensions are renamed by \u003coriginal\u003e = \u003ctarget\u003e\n\t\t\trenaming {\n\t\t\t\tphp = phps\n\t\t\t}\n\t\t}\n\t\t# duration of the cookie that is sent when a guest user uses the \"store in cookie\" confirmation link from the confirmation email\n\t\tcookieLifetime = 8046000\n\t\tpagination {\n\t\t\tabove = 1\n\t\t\tbelow = 1\n\t\t}\n\t\tsubscription {\n\t\t\tcomponents {\n\t\t\t\theroUnit {\n\t\t\t\t\t# this is an array of settings as used by the Widget for subscriptions, from EXT:dialog\n\t\t\t\t\tdisplay {\n\t\t\t\t\t\tmode = Button\n\t\t\t\t\t\tlink {\n\t\t\t\t\t\t\tsubscribed = Notifications enabled\n\t\t\t\t\t\t\tunsubscribed = Enable notifications\n\t\t\t\t\t\t\ttitle = Click to enable notifications sent to your email address\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmarkup {\n\t\t\t# options: default (html), markdown, raw, nl2br, template. Mode \"markdown\" requires CLI command \"markdown\" installed\n\t\t\tmode = default\n\t\t\t# if mode = template, a path to a Fluid (Partial) template which renders each Post text\n\t\t\ttemplate =\n\t\t\t# if mode = markdown, this variable determines wether htmlentities() is applied before markdown transformation. Is safer but may interfere with pasted HTML code examples.\n\t\t\tmarkdown.htmlentities = 0\n\t\t\t# if mode = markdown, this variable determins wether trim() is applied before markdown transformation\n\t\t\tmarkdown.trim = 1\n\t\t}\n\t\tposting {\n\t\t\tcleaning {\n\t\t\t\t# a value of 3 here allows a single line of space between lines\n\t\t\t\tmaximumConsequetiveLineBreaksAllowed = 3\n\t\t\t}\n\t\t}\n\t\temail {\n\t\t\tfromEmail =\n\t\t\tfromName =\n\t\t}\n\t}\n}\n```\n\n## Known problems and limitations\n\n* The Post list under uses Fluid's Pagination Widget which means that the link to page is incorrect when standing on page one, on\n  versions of TYPO3 below 6.0.\n* `Dialog` overrides certain parts of a default Twitter Bootstrap theme - if you use a custom them, make sure you override these\n  overrides, too.\n* jQuery used but not force-included; may not work on older (below 1.6) versions of jQuery.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamelesscoder%2Fdialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamelesscoder%2Fdialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamelesscoder%2Fdialog/lists"}