3.1.10 markdown

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.2/Rhea followed by 3.3.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.1. If you need support for phpBB 3.1 please visit the 3.1.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 » 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.

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: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: 3.1.10 markdown

Post by DavidIQ » 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
Image

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

Re: 3.1.10 markdown

Post by mike1974 » Mon Nov 14, 2016 9:30 pm

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: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: 3.1.10 markdown

Post by DavidIQ » 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.
JoshyPHP wrote:Fact-check
Image

User avatar
3Di
Registered User
Posts: 694
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: 3.1.10 markdown

Post by 3Di » Mon Nov 14, 2016 11:11 pm

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) :)
Want to compensate me for my interest? Don't ask me, just do it
I'm available for custom phpBB jobs, you can PM me the details.
New: my Live Board, Extensions and Tools for phpBB - Men at works.

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

Re: 3.1.10 markdown

Post by JoshyPHP » Tue Nov 15, 2016 12:17 am

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.

Post Reply