Horizontal rule tag [hr] without end tag

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Ideas Centre
Locked
DataNalle
Registered User
Posts: 50
Joined: Wed Dec 30, 2009 3:03 pm

Horizontal rule tag [hr] without end tag

Post by DataNalle » Fri Nov 16, 2012 4:05 pm

I haven't been able to find a mod for this (Advanced BBCode is too extensive for my usage) and I've tried to hard code it without success.

I also find it odd that the [hr] tag exists in functions_convert.php.

User avatar
AmigoJack
Registered User
Posts: 5656
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Horizontal rule tag [hr] without end tag

Post by AmigoJack » Fri Nov 16, 2012 5:36 pm

DataNalle wrote:I've tried to hard code it without success
What exactly have you done so far?
DataNalle wrote:the [hr] tag exists in functions_convert.php
Don't ignore the context: the whole file is for converting foreign data to phpBB data. So there's no hidden functionality - once found it will just be replaced by two CRs.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

DataNalle
Registered User
Posts: 50
Joined: Wed Dec 30, 2009 3:03 pm

Re: Horizontal rule tag [hr] without end tag

Post by DataNalle » Sat Nov 17, 2012 10:36 pm

AmigoJack wrote:What exactly have you done so far?
Added the necessary button and other code changes to language files and such. (language/en/posting.php and prosilver/tempalte/posting_buttons.html) I've been pretty much following the trail of the [*] tag and adding similar lines of code for [hr].

The part that I did not get to work is actually inserting the [hr] tag into the message body (prosilver/template/editor.js) with a button press. I tried with bbstyle(-2) since [*] is -1. I didn't find the tag -> HTML code converter either.

User avatar
AmigoJack
Registered User
Posts: 5656
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Horizontal rule tag [hr] without end tag

Post by AmigoJack » Sat Nov 17, 2012 11:15 pm

DataNalle wrote:I tried with bbstyle(-2) since [*] is -1.
bbstyle() is defined in /styles/*/template/editor.js and of course there is no -2 expected there.
I didn't find the tag -> HTML code converter either.
Roughly said you have to augment /includes/bbcode.php and /includes/message_parser.php by projecting the code of existing BBCodes to keep all the functionality (i.e. post settings "Disable BBCode" won't parse [hr] either) - there's no single point of code that handles it all and once.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

User avatar
DionDesigns
Registered User
Posts: 515
Joined: Sun Feb 26, 2012 11:22 pm
Location: Uncertain due to momentum.
Contact:

Re: Horizontal rule tag [hr] without end tag

Post by DionDesigns » Sun Nov 18, 2012 2:02 am

DataNalle wrote:The part that I did not get to work is actually inserting the [hr] tag into the message body (prosilver/template/editor.js) with a button press. I tried with bbstyle(-2) since [*] is -1.
Try insert_text('[hr]') instead.

User avatar
AGC
Registered User
Posts: 292
Joined: Sat Sep 15, 2007 10:26 pm
Contact:

Re: Horizontal rule tag [hr] without end tag

Post by AGC » Tue Nov 20, 2012 11:04 pm

Why not trying this:

code:

[hr][/hr]

html:
<hr />
(phpBB 2.0.x): []Admin Topics List[] MOD. << Description & Download. , []Highlight Author[] MOD.

Donate-paypal
(phpBB 3.0.x)[ver] MODs: [RC1] >Import old *.pak files MOD. + . . .[8] > ACP - Modules Quick Access (MQA) MOD. + . . . [7-PL1] > Multi Smile (actions) MOD

User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: Horizontal rule tag [hr] without end tag

Post by Jessica » Tue Nov 20, 2012 11:23 pm

AGC wrote:Why not trying this:

code:

[hr][/hr]

html:
<hr />
OP wants the code without end tag [/hr] so that you can just put [hr] and make a horizontal line.
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein

User avatar
AGC
Registered User
Posts: 292
Joined: Sat Sep 15, 2007 10:26 pm
Contact:

Re: Horizontal rule tag [hr] without end tag

Post by AGC » Wed Nov 21, 2012 1:20 am

Jessica wrote:
AGC wrote:Why not trying this:

code:

[hr][/hr]

html:
<hr />
OP wants the code without end tag [/hr] so that you can just put [hr] and make a horizontal line.
So I see. But.....
The parser add a end tag to the [*] so trying to find some other way is pointless.
You should consider that.
(phpBB 2.0.x): []Admin Topics List[] MOD. << Description & Download. , []Highlight Author[] MOD.

Donate-paypal
(phpBB 3.0.x)[ver] MODs: [RC1] >Import old *.pak files MOD. + . . .[8] > ACP - Modules Quick Access (MQA) MOD. + . . . [7-PL1] > Multi Smile (actions) MOD

Locked

Return to “[3.0.x] MOD Requests”