3.1.10 markdown

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
mike1974
Registered User
Posts: 2
Joined: Mon Nov 14, 2016 5:46 pm

3.1.10 markdown

Post by mike1974 »

Hi,

Not sure if it's right place - but I was looking for markdown extension/mod and unable to find something working for phpbb.
So I created my own mod based on Parsedown (http://parsedown.org/) and Github mardown CSS (https://github.com/sindresorhus/github-markdown-css) - I had to modify it to override some phpbb styles.

MOD is implementation of 'md' bbcode - to have markdown in your post you just use [md] ... [/md] tags to enclose your markdown text (github style).
e.g.
[md]
# my title
1. list item
2. list item 2
[/md]

I do modify following files:

includes\bbcode.php
includes\functions_content.php
includes\message_parser.php

includes\Parsedown.php
styles\prosilver\theme\github-markdown.css
styles\prosilver\theme\stylesheet.css


Sample:
bbcode.jpg
To apply changes you need to override existing files (making backup is always good idea)

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: 3.1.10 markdown

Post by DavidIQ »

Hello,

No this is not the correct place to post this. If you're looking to develop and release an extension that does not modify core files (file edits are not allowed) then the proper place for extension development and feedback is at: https://www.phpbb.com/community/viewforum.php?f=456
Image

mike1974
Registered User
Posts: 2
Joined: Mon Nov 14, 2016 5:46 pm

Re: 3.1.10 markdown

Post by mike1974 »

DavidIQ wrote: Mon Nov 14, 2016 7:05 pm Hello,

No this is not the correct place to post this. If you're looking to develop and release an extension that does not modify core files (file edits are not allowed) then the proper place for extension development and feedback is at: https://www.phpbb.com/community/viewforum.php?f=456
I don't think that's possible - current phpbb approach to parse text and process it breaks custom formatting (e.g. inserting <br /> tags or urls (magicurl)).
All I wanted to do with current post - is simple solution for those, who looking for markdown support in current version.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: 3.1.10 markdown

Post by DavidIQ »

Pretty sure it's possible to do this with the new text parser in 3.2 without having to edit files.
JoshyPHP wrote:Fact-check
Image

User avatar
3Di
Registered User
Posts: 951
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Contact:

Re: 3.1.10 markdown

Post by 3Di »

I am not quite sure. But I could be wrong.

About the OP, you should - as already said - make of it an extension though. (No MOD fashion) :)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: 3.1.10 markdown

Post by JoshyPHP »

DavidIQ wrote: Mon Nov 14, 2016 9:36 pm Pretty sure it's possible to do this with the new text parser in 3.2 without having to edit files.
You can use an extension to enable the Litedown plugin which provides most of Markdown at the document level. It cannot be constrained to an hypothetical [md] BBCode.

User avatar
mikovchain
Registered User
Posts: 45
Joined: Mon Oct 16, 2006 5:16 am

Re: 3.1.10 markdown

Post by mikovchain »

Hi mike1974, could you please share this mod? It seems a bit difficult for me to find out how to change the PHP code to use this feature.
mike1974 wrote: Mon Nov 14, 2016 6:22 pm Hi,

Not sure if it's right place - but I was looking for markdown extension/mod and unable to find something working for phpbb.
So I created my own mod based on Parsedown (http://parsedown.org/) and Github mardown CSS (https://github.com/sindresorhus/github-markdown-css) - I had to modify it to override some phpbb styles.
PHPBB CHINA For Chinese Users

Post Reply