friendsofflarum / formatting Goto Github PK
View Code? Open in Web Editor NEWCustomize TextFormatter with plugins through the admin interface
License: MIT License
Customize TextFormatter with plugins through the admin interface
License: MIT License
Can not change settings in admin panel after upgrade flarum/core to 0.1.0-beta14
Uncaught Error: The ModalManager can only show Modals
show ModalManagerState.js:18
"fof-formatting" index.js:9
handleEvent render.js:888
M render.js:910
C render.js:735
l render.js:730
...
Image links from imgur seem to embed it as an album format (with the white imgur borders) instead of the image itself directly.
For example: https://grid.co.il/d/66/4
Comment content: https://i.imgur.com/FUUVV9u.jpg
Could you please embed this for Youtube?
https://github.com/TeamPiped/Piped
A clear and concise description of what the problem is. eg. I have an issue when [...]
YouTube has an extremely invasive privacy policy which relies on using user data in unethical ways. You give them a lot of data - ranging from ideas, music taste, content, political opinions, and much more than you think.
By using Piped, you can freely watch and listen to content without the fear of prying eyes watching everything you are doing.
A detailed description of your proposed solution. Include:
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Current Behavior
I have encountered two issues related to formatting Medium links.
Error loading images
When attempting to load an image from a Medium link, a 404 error is returned. This prevents images from displaying correctly in the content.
Example of affected URL:
https://medium.com/ssense-tech/hexagonal-architecture-there-are-always-two-sides-to-every-story-bc0780ed7d9c
Problem with special characters (accents)
When a Medium URL contains special characters in Spanish, such as accents (e.g., "cómo"), the URL is not formatted correctly. The first 'ó' gets converted into encoded characters, resulting in a non-functional link.
Example of affected URL:
https://medium.com/datapath/c%C3%B3mo-usar-read-ai-transcribe-y-mejora-tus-reuniones-virtuales-93ca8cc3ba66
Expected Behavior
I expected to see a preview of the links. In the first case it is formatted but without the image, in the second nothing is shown other than the iframe without content.
Environment
+-------------------------------------------+---------+------------------------------------------+
| Flarum Extensions | | |
+-------------------------------------------+---------+------------------------------------------+
| ID | Version | Commit |
+-------------------------------------------+---------+------------------------------------------+
| flarum-likes | v1.8.0 | |
| flarum-flags | v1.8.0 | |
| antoinefr-money | v1.3.1 | |
| flarum-sticky | v1.8.0 | |
| flarum-tags | v1.8.0 | |
| flarum-markdown | v1.8.0 | |
| flarum-suspend | v1.8.0 | |
| flarum-lock | v1.8.0 | |
| flarum-approval | v1.8.0 | |
| afrux-forum-widgets-core | v0.1.7 | |
| flamarkt-backoffice | 0.1.3 | |
| ziiven-money-leaderboard | v0.1.7 | |
| zerosonesfun-direct-links | 3.1 | |
| zerosonesfun-composer-preview | 1.2 | |
| v17development-seo | v1.8.0 | |
| the-turk-stickiest | 2.0.3 | |
| sycho-move-posts | v0.1.7 | |
| rob006-last-post-avatar | 1.2.4 | |
| michaelbelgium-discussion-views | v7.2.1 | |
| matteocontrini-imgur-upload | v3.9.1 | |
| maicol07-sso | 1.11.5 | |
| kilowhat-audit-free | 1.6.0 | |
| justoverclock-welcomebox | 1.3.8 | |
| justoverclock-related-discussions | 1.3.4 | |
| justoverclock-hot-discussions | 0.1.2 | |
| justoverclock-custom-html-widget | 0.1.4 | |
| fof-webhooks | 1.2.3 | |
| fof-user-bio | 1.3.2 | |
| fof-terms | 1.2.1 | |
| fof-sitemap | 1.0.3 | |
| fof-share-social | 1.2.0 | |
| fof-sentry | 1.3.2 | |
| fof-recaptcha | 1.3.2 | |
| fof-pretty-mail | 1.1.1 | |
| fof-nightmode | 1.5.2 | |
| fof-masquerade | 2.1.4 | |
| fof-links | 1.2.2 | |
| fof-linguist | 1.1.1 | |
| fof-forum-statistics-widget | 1.2.1 | |
| fof-formatting | 1.0.3 | |
| fof-disposable-emails | 1.0.0 | |
| fof-default-user-preferences | 1.2.0 | |
| fof-cookie-consent | 1.1.1 | |
| flarum-subscriptions | v1.8.0 | |
| flarum-statistics | v1.8.0 | |
| flarum-mentions | v1.8.0 | |
| flarum-lang-spanish | 1.8.0 | |
| flarum-emoji | v1.8.0 | |
| flarum-bbcode | v1.8.0 | |
| davwheat-ads | 1.2.0 | |
| datlechin-link-preview | v1.4.0 | |
| clarkwinkelmann-post-stream-search | 1.1.0 | |
| clarkwinkelmann-post-permissions | 1.0.0 | |
| clarkwinkelmann-first-post-approval | 1.0.1 | |
| clarkwinkelmann-emojionearea | 1.0.0 | |
| clarkwinkelmann-author-change | 1.0.3 | |
| clarkwinkelmann-advanced-search-highlight | 1.0.2 | 7ced2d62976bc24f7d49c7a631534a5a1ac02913 |
| askvortsov-discussion-templates | v0.8.3 | |
| askvortsov-categories | v3.0.9 | |
+-------------------------------------------+---------+------------------------------------------+
Additional Context
I have searched the repository for similar issues and found this link, I don't think it is caused by another extension but perhaps I am wrong.
I have a discussion with tons of videos (100+) an the load time is crazy. Could something be done with this? Maybe some lazy loading when it starts loading the video the only time you click on it?
https://discuss.flarum.org/d/17770-friendsofflarum-formatting/399
I found that when I inserted the telegram link, the html code was escaped, so the content could not be displayed normally
After being escaped, it looks like this
https://s9e.github.io/iframe/2/telegram.min.html%20%3Ca%20href=
Hi, would it be possible to add embed support for Mastodon (https://joinmastodon.org) and PeerTube instances (https://joinpeertube.org/)?
Describe the solution you'd like
Maybe, the instance list accepted could be add in the back office extension options since there is no centralized domain for these services.
How can I display the video playback control, because the video uploads without controls, the user will mistake the video card for death.
Support for MOV video file type. Provides the ability for iOS users to upload videos.
Describe the solution you'd like
Auto video support for the .MOV file extension. This would be useful for iOS users because all iOS videos are recorded as an MOV file.
I've just add site defines for s9e\TextFormatter\Plugins\MediaEmbed
in s9e/TextFormatter#181, it's works fine for newly published or edited posts.
But existing link in old posts which stored in database are not wrapped with <SITE></SITE>
, so links will not transform to <iframe>
by s9e\TextFormatter\Renderer
.
I guess the wrapping is done by s9e\TextFormatter\Parser
, so I'm wondering how can I re-parse all posts without edit them one by one.
Add Bilibili Video Support.
Describe the solution you'd like
It's probably not that difficult.
When detect links like https://bilibili.com/video/BV1B7411m7LV
or https://b23.tv/BV1B7411m7LV
, transfer it to <iframe src=“//player.bilibili.com/player.html?bvid=BV1B7411m7LV” scrolling=“no” border=“0” frameborder=“no” framespacing=“0” allowfullscreen=“true”></iframe>
.
Thanks for considering my suggestion.
Hi !
Like I reported on flarum/core, there is a mistake between fof/formatting and flarum/mentions.
Current Behavior
Hi !
Since I updated to Flarum 0.1.0-beta.12 and upgraded all extensions, when I tried to enabling "Mentions" and "Formatting" together, all others extensions seems to be disabled.
Steps to Reproduce
After an upgrade of flarum core and all extensions :
Trying to resolve
Environment
Flarum core 0.1.0-beta.12
PHP version: 7.4.3
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gettext, iconv, imagick, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, Zend OPcache
+---------------------------------+-----------------+------------------------------------------+
| Flarum Extensions | | |
+---------------------------------+-----------------+------------------------------------------+
| ID | Version | Commit |
+---------------------------------+-----------------+------------------------------------------+
| milescellar-lang-french | v1.6.0 | |
| rooaaar-lang-french-extended | dev-master | 82b5d98816ce341df17bc0ab25b8052679426457 |
| flarum-tags | v0.1.0-beta.12 | |
| flarum-approval | v0.1.0-beta.12 | |
| flagrow-analytics | 0.8.0 | |
| the-turk-diff | 0.1.0-beta.7 | |
| michaelbelgium-discussion-views | v0.1.0-beta.8.3 | |
| flarum-emoji | v0.1.0-beta.12 | |
| flagrow-direct-links | 0.2.0 | |
| flagrow-impersonate | 0.2.0 | |
| flagrow-sitemap | 0.2.0 | |
| flarum-flags | v0.1.0-beta.12 | |
| fof-ban-ips | 0.1.5 | |
| fof-default-group | 0.1.0 | |
| fof-disposable-emails | 0.1.0 | |
| fof-drafts | 0.1.4 | |
| fof-follow-tags | 0.3.4 | |
| fof-formatting | 0.1.4 | |
| fof-geoip | 0.1.7 | |
| fof-ignore-users | 0.1.5 | |
| fof-links | 0.2.1 | |
| fof-merge-discussions | 0.3.3 | |
| fof-pages | 0.2.7 | |
| fof-prevent-necrobumping | 0.2.0 | |
| fof-pretty-mail | 0.1.6 | |
| fof-pwned-passwords | 0.3.0 | |
| fof-reactions | 0.2.1 | |
| fof-socialprofile | 0.1.2 | |
| fof-spamblock | 0.2.1 | |
| fof-split | 0.4.3 | |
| fof-stopforumspam | 0.2.1 | |
| fof-subscribed | 0.2.3 | |
| fof-terms | 0.4.1 | |
| fof-upload | 0.8.3 | |
| fof-user-directory | 0.3.4 | |
| fof-username-request | 0.2.0 | |
| fof-recaptcha | 0.1.2 | |
| flarum-likes | v0.1.0-beta.12 | |
| flarum-lock | v0.1.0-beta.12 | |
| flarum-markdown | v0.1.0-beta.12 | |
| michaelbelgium-profile-views | v0.1.0-beta-8-5 | |
| flarum-pusher | v0.1.0-beta.12 | |
| flarum-statistics | v0.1.0-beta.12 | |
| flarum-sticky | v0.1.0-beta.12 | |
| flarum-subscriptions | v0.1.0-beta.12 | |
| jordanjay29-summaries | 0.3.1 | |
| flarum-suspend | v0.1.0-beta.12 | |
| amaurycarrade-syndication | v0.3.1 | |
| therealsujitk-gifs | v1.4.7 | |
| fof-byobu | 0.3.4 | |
+---------------------------------+-----------------+------------------------------------------+
Screenshots
Without "Mentions" and Formatting enabled
With "Mentions" and Formatting enabled
thanks for your reply !
Would be nice if this would automatically use the Youtube privacy enhanced mode that does not use cookies and thus is easier to use under GDPR legislation.
Describe the solution you'd like
As explained here: s9e/TextFormatter#154 (comment)
Thanks!
Is your feature request related to a problem? Please describe.
Currently, the Autovideo function cannot automatically convert WebM file URLs.
Describe the solution you'd like
A detailed description of your proposed solution. Include:
Describe alternatives you've considered
Continue to use H.264 MP4.
Hi !
I am not sure this is a bug. Thanks for your help.
TypeError thrown with message "Argument 1 passed to Flarum\Mentions\Formatter\FormatPostMentions::__invoke() must be an instance of s9e\TextFormatter\Renderer, instance of __PHP_Incomplete_Class given, called in /data/WWW/vendor/flarum/core/src/Foundation/ContainerUtil.php on line 30"
Stacktrace:
#62 TypeError in /data/WWW/vendor/flarum/mentions/src/Formatter/FormatPostMentions.php:27
#61 Flarum\Mentions\Formatter\FormatPostMentions:__invoke in /data/WWW/vendor/flarum/core/src/Foundation/ContainerUtil.php:30
#60 Flarum\Foundation\ContainerUtil:Flarum\Foundation\{closure} in /data/WWW/vendor/flarum/core/src/Formatter/Formatter.php:91
#59 Flarum\Formatter\Formatter:render in /data/WWW/vendor/flarum/core/src/Post/CommentPost.php:172
#58 Flarum\Post\CommentPost:formatContent in /data/WWW/vendor/flarum/core/src/Api/Serializer/BasicPostSerializer.php:44
#57 Flarum\Api\Serializer\BasicPostSerializer:getDefaultAttributes in /data/WWW/vendor/flarum/core/src/Api/Serializer/AbstractSerializer.php:87
#56 Flarum\Api\Serializer\AbstractSerializer:getAttributes in /data/WWW/vendor/tobscure/json-api/src/Resource.php:169
#55 Tobscure\JsonApi\Resource:getAttributes in /data/WWW/vendor/tobscure/json-api/src/Resource.php:75
#54 Tobscure\JsonApi\Resource:toArray in /data/WWW/vendor/tobscure/json-api/src/Document.php:187
#53 Tobscure\JsonApi\Document:Tobscure\JsonApi\{closure} in [internal]:0
#52 array_map in /data/WWW/vendor/tobscure/json-api/src/Document.php:186
#51 Tobscure\JsonApi\Document:toArray in /data/WWW/vendor/tobscure/json-api/src/Document.php:224
#50 Tobscure\JsonApi\Document:jsonSerialize in /data/WWW/vendor/flarum/core/src/Api/JsonApiResponse.php:27
#49 Flarum\Api\JsonApiResponse:__construct in /data/WWW/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php:121
#48 Flarum\Api\Controller\AbstractSerializeController:handle in /data/WWW/vendor/flarum/core/src/Api/Client.php:72
#47 Flarum\Api\Client:send in /data/WWW/vendor/flarum/core/src/Forum/Content/Index.php:121
#46 Flarum\Forum\Content\Index:getApiDocument in /data/WWW/vendor/flarum/core/src/Forum/Content/Index.php:86
#45 Flarum\Forum\Content\Index:__invoke in /data/WWW/vendor/flarum/core/src/Frontend/Frontend.php:63
#44 Flarum\Frontend\Frontend:populate in /data/WWW/vendor/flarum/core/src/Frontend/Frontend.php:55
#43 Flarum\Frontend\Frontend:document in /data/WWW/vendor/flarum/core/src/Frontend/Controller.php:32
#42 Flarum\Frontend\Controller:handle in /data/WWW/vendor/flarum/core/src/Http/RouteHandlerFactory.php:38
#41 Flarum\Http\RouteHandlerFactory:Flarum\Http\{closure} in /data/WWW/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php:27
#40 Flarum\Http\Middleware\ExecuteRoute:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#39 Laminas\Stratigility\Next:handle in /data/WWW/packages/flarum-ext-sso/src/Middleware/LogoutMiddleware.php:24
#38 Fstln\SSO\Middleware\LogoutMiddleware:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#37 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/FlarumPromotionHeader.php:29
#36 Flarum\Http\Middleware\FlarumPromotionHeader:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#35 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/ShareErrorsFromSession.php:57
#34 Flarum\Http\Middleware\ShareErrorsFromSession:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#33 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php:36
#32 Flarum\Http\Middleware\CheckCsrfToken:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#31 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php:67
#30 Flarum\Http\Middleware\ResolveRoute:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#29 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/SetLocale.php:50
#28 Flarum\Http\Middleware\SetLocale:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#27 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php:32
#26 Flarum\Http\Middleware\AuthenticateWithSession:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#25 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php:52
#24 Flarum\Http\Middleware\RememberFromCookie:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#23 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/StartSession.php:61
#22 Flarum\Http\Middleware\StartSession:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#21 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/CollectGarbage.php:46
#20 Flarum\Http\Middleware\CollectGarbage:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#19 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php:28
#18 Flarum\Http\Middleware\ParseJsonBody:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#17 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/HandleErrors.php:57
#16 Flarum\Http\Middleware\HandleErrors:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#15 Laminas\Stratigility\Next:handle in /data/WWW/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php:84
#14 Laminas\Stratigility\MiddlewarePipe:process in /data/WWW/vendor/middlewares/request-handler/src/RequestHandler.php:84
#13 Middlewares\RequestHandler:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#12 Laminas\Stratigility\Next:handle in /data/WWW/vendor/middlewares/base-path-router/src/BasePathRouter.php:101
#11 Middlewares\BasePathRouter:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#10 Laminas\Stratigility\Next:handle in /data/WWW/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php:42
#9 Laminas\Stratigility\Middleware\OriginalMessages:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#8 Laminas\Stratigility\Next:handle in /data/WWW/vendor/middlewares/base-path/src/BasePath.php:53
#7 Middlewares\BasePath:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#6 Laminas\Stratigility\Next:handle in /data/WWW/vendor/flarum/core/src/Http/Middleware/ProcessIp.php:24
#5 Flarum\Http\Middleware\ProcessIp:process in /data/WWW/vendor/laminas/laminas-stratigility/src/Next.php:61
#4 Laminas\Stratigility\Next:handle in /data/WWW/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php:84
#3 Laminas\Stratigility\MiddlewarePipe:process in /data/WWW/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php:73
#2 Laminas\Stratigility\MiddlewarePipe:handle in /data/WWW/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php:96
#1 Laminas\HttpHandlerRunner\RequestHandlerRunner:run in /data/WWW/vendor/flarum/core/src/Http/Server.php:44
#0 Flarum\Http\Server:listen in /data/WWW/public/index.php:26
Flarum core 0.1.0-beta.16
PHP version: 7.4.12
Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, ctype, curl, dom, filter, ftp, gd, gettext, hash, iconv, intl, json, mbstring, SPL, session, pcntl, standard, PDO, mysqlnd, pdo_sqlite, Phar, posix, Reflection, pdo_mysql, shmop, SimpleXML, soap, sockets, mysqli, sysvsem, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, fileinfo, redis
+-----------------------------------+----------------+--------+
| Flarum Extensions | | |
+-----------------------------------+----------------+--------+
| ID | Version | Commit |
+-----------------------------------+----------------+--------+
| flarum-flags | v0.1.0-beta.16 | |
| flarum-markdown | v0.1.0-beta.16 | |
| fstln-footer | dev-nothing | |
| flarum-bbcode | v0.1.0-beta.16 | |
| flarum-emoji | v0.1.0-beta.16 | |
| flarum-lang-english | v0.1.0-beta.16 | |
| flarum-lock | v0.1.0-beta.16 | |
| flarum-mentions | v0.1.0-beta.16 | |
| flarum-sticky | v0.1.0-beta.16 | |
| flarum-suspend | v0.1.0-beta.16 | |
| flarum-tags | v0.1.0-beta.16 | |
| flarum-statistics | v0.1.0-beta.16 | |
| flarum-likes | v0.1.0-beta.16 | |
| fof-polls | 0.3.2 | |
| flarum-approval | v0.1.0-beta.16 | |
| askvortsov-rich-text | v1.0.2 | |
| flarumite-simple-discussion-views | 0.3.0 | |
+-----------------------------------+----------------+--------+
Spotify changed the way they generate links to communities (example: https://link.tospotify.com/fzU48B0mLbb)
s9e/TextFormatter added support to it a few days ago, I'm wondering if we can include it too?
Thanks!
Hello.
Installed fof/formating and received «Error booting Flarum: Class FoF\Formatting\Listeners\FormatterConfigurator does not exist» message in the browser (white screen) after activating it.
All files in the place. Flarum is not working until I delete fof/formating from DB as an installed extension.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.