How to edit existing default BB Code?

Discussion forum for MOD Writers regarding MOD Development.
Locked
User avatar
Matrix Leader
Registered User
Posts: 160
Joined: Sun Oct 09, 2011 9:19 am
Location: Dubai, U.A.E.
Name: Matrix Leader
Contact:

How to edit existing default BB Code?

Post by Matrix Leader » Wed Oct 26, 2011 7:51 pm

When I go to the BB Code in the ACP I only see the ones I added, But how to edit the values ot the built in ones?

I want to play around with the existing URL BB Code rather than adding a new BB Code for the URL the way I want it to be
BlackBerry Matrix Website (For all your BlackBerry OS updates, apps, etc)
BlackBerry Matrix Forums

User avatar
canonknipser
Registered User
Posts: 2024
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: How to edit existing default BB Code?

Post by canonknipser » Wed Oct 26, 2011 7:54 pm

you have to edit the bbcode-parsing php-file named includes/bbcode.php

Good luck :geek:
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: How to edit existing default BB Code?

Post by Pony99CA » Wed Oct 26, 2011 8:36 pm

See the [RFC] BBCode permissions and moving to all custom topic at Area 51 for a requirement to make built-in BBCodes more like custom BBCodes (and adding permssions to BBCodes).

If you do edit the built-in BBCodes, see the Links Opening New Windows Knowledge Base article for some of the issues you may face.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: How to edit existing default BB Code?

Post by Pony99CA » Wed Oct 26, 2011 9:06 pm

If this is about your URL request that was locked, it may not be in bbcode.php at all. I believe that's where BBCodes are processed, but inserting BBCodes into the editor is probably done in posting.php (or an include). The actual insertion is probably done by editor.js in the template, but I'm not sure on how the interaction works.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
3Di
Former Team Member
Posts: 13921
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: How to edit existing default BB Code?

Post by 3Di » Wed Oct 26, 2011 9:19 pm

canonknipser wrote:you have to edit the bbcode-parsing php-file named includes/bbcode.php

Good luck :geek:
yup
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
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
Matrix Leader
Registered User
Posts: 160
Joined: Sun Oct 09, 2011 9:19 am
Location: Dubai, U.A.E.
Name: Matrix Leader
Contact:

Re: How to edit existing default BB Code?

Post by Matrix Leader » Wed Oct 26, 2011 9:32 pm

What I found in the bbcode.php file is this:

Code: Select all

				case 3:
					$this->bbcode_cache[$bbcode_id] = array(
						'preg' => array(
							'#\[url:$uid\]((.*?))\[/url:$uid\]#s'			=> $this->bbcode_tpl('url', $bbcode_id),
							'#\[url=([^\[]+?):$uid\](.*?)\[/url:$uid\]#s'	=> $this->bbcode_tpl('url', $bbcode_id),
						)
So I just added the EQUAL SIGN before: '#\[url=:$uid\] in the first one but that didn't do the trick

When I press the URL button on the forums it still only gives [URL]

What must I change?
BlackBerry Matrix Website (For all your BlackBerry OS updates, apps, etc)
BlackBerry Matrix Forums

User avatar
Sajaki
Registered User
Posts: 1354
Joined: Mon Mar 02, 2009 1:41 pm
Name: Andreas
Contact:

Re: How to edit existing default BB Code?

Post by Sajaki » Wed Oct 26, 2011 9:37 pm

canonknipser wrote:you have to edit the bbcode-parsing php-file named includes/bbcode.php

Good luck :geek:
Not necessarily. you can write your own parser. :ugeek: See bbTips for an example custom bbcode mod.
the UMIL installer autoinstalls the bbcode in this function.
This topic should be moved to mod writing.
Last edited by Sajaki on Wed Oct 26, 2011 9:57 pm, edited 2 times in total.

User avatar
Matrix Leader
Registered User
Posts: 160
Joined: Sun Oct 09, 2011 9:19 am
Location: Dubai, U.A.E.
Name: Matrix Leader
Contact:

Re: How to edit existing default BB Code?

Post by Matrix Leader » Wed Oct 26, 2011 9:46 pm

Adding an equal sign seems like inventing the wheel! :shock:

All the members are complaining about this because if you enter a URL that you want to have diff. text appear, you need to enter the = sign! :roll:
BlackBerry Matrix Website (For all your BlackBerry OS updates, apps, etc)
BlackBerry Matrix Forums

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51785
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: How to edit existing default BB Code?

Post by Brf » Wed Oct 26, 2011 10:23 pm

The code you get when you push the button has nothing at all to do with the code in bbcode.php.
The insert code is right there in the posting_buttons.html template:

Code: Select all

	var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','[img]','[/img]','','','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);[/code]

Just put the = in there.

User avatar
Matrix Leader
Registered User
Posts: 160
Joined: Sun Oct 09, 2011 9:19 am
Location: Dubai, U.A.E.
Name: Matrix Leader
Contact:

Re: How to edit existing default BB Code?

Post by Matrix Leader » Wed Oct 26, 2011 10:48 pm

Brf wrote:The code you get when you push the button has nothing at all to do with the code in bbcode.php.
The insert code is right there in the posting_buttons.html template:

Code: Select all

	var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','[img]','[/img]','','','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);[/code]

Just put the = in there.
Wow!!

That was so easy!! Thank you sir!!
BlackBerry Matrix Website (For all your BlackBerry OS updates, apps, etc)
BlackBerry Matrix Forums

boolee
Registered User
Posts: 10
Joined: Wed Mar 13, 2013 12:19 pm

Re: How to edit existing default BB Code?

Post by boolee » Fri Mar 15, 2013 1:46 pm

if anyone can help. I changed the last code in subSilver theme everything was ok. But when I did it in artodia: deluxe file posting_buttons then we did not want to work the opening theme or submit post, board jammed

google translate :(
Brf wrote:The code you get when you push the button has nothing at all to do with the code in bbcode.php.
The insert code is right there in the posting_buttons.html template:

Code: Select all

	var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','[img]','[/img]','','','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);[/code]

Just put the = in there.

Locked

Return to “[3.0.x] MOD Writers Discussion”