Removing [img] BBCode From Forum (SOLVED)

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Selective
Registered User
Posts: 213
Joined: Sat Apr 19, 2014 10:30 am

Re: Removing [img] BBCode From Forum

Post by Selective » Tue Jan 16, 2018 8:11 pm

Deleted more code...

In
/includes/ucp/ucp_profile.php

Code: Select all

$config['allow_sig_img'],

Code: Select all

'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],

Code: Select all

'S_BBCODE_IMG' => ($config['allow_sig_img']) ? true : false,
/includes/ucp/ucp_pm_compose.php

Code: Select all

$img_status = ($config['auth_img_pm'] && $auth->acl_get('u_pm_img')) ? true : false;

Code: Select all

$img_status, 

Code: Select all

'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],

Code: Select all

'S_BBCODE_IMG' => $img_status,

I'm still missing something...

I tested it again, and the replacement img BBCode isn't working yet, old img script is still interfering. I tried editing
/adm/style/acp_posting_buttons.html
/template/posting_buttons.html
again, and that still causes the BBCodes to become displaced and replacement img BBCode still isn't working. So I still can't remove

Code: Select all

'[img]','[/img]',
from those two pages yet.

I already started combing through every page one at a time, doing the process of elimination to make it easier to see what is left to work with. I'm running out of places to look though! Could it be something in the DataBase? I couldn't find any of the preset BBCodes in the DataBase, so I figured they were all script, and I'm sure I removed the script already.

???

Still searching...

Selective
Registered User
Posts: 213
Joined: Sat Apr 19, 2014 10:30 am

Re: Removing [img] BBCode From Forum

Post by Selective » Tue Jan 16, 2018 9:33 pm

Alright.......... So I pretty much went through just about every file, and I think this is what might be causing the problem. I didn't touch this script yet, other than removing

Code: Select all

define('BBCODE_ID_IMG', 4);
so this is as it appears, with only this one line missing.

This needs to be edited still... RIGHT?

/includes/constants.php

Code: Select all

// BBCode UID length
define('BBCODE_UID_LEN', 8);

// Number of core BBCodes
define('NUM_CORE_BBCODES', 12);
define('NUM_PREDEFINED_BBCODES', 22);

// BBCode IDs
define('BBCODE_ID_QUOTE', 0);
define('BBCODE_ID_B', 1);
define('BBCODE_ID_I', 2);
define('BBCODE_ID_URL', 3);

define('BBCODE_ID_SIZE', 5);
define('BBCODE_ID_COLOR', 6);
define('BBCODE_ID_U', 7);
define('BBCODE_ID_CODE', 8);
define('BBCODE_ID_LIST', 9);
define('BBCODE_ID_EMAIL', 10);
define('BBCODE_ID_FLASH', 11);
define('BBCODE_ID_ATTACH', 12);

// BBCode hard limit
define('BBCODE_LIMIT', 1511);

???

UPDATE: Without editing the above, I just noticed that the new img BBCode is working and has been! Just it wasn't working on older forum posts, only new forum posts! ??? Not sure exactly why that would be or how to fix that, but it works on all new forum posts!

UPDATE: Still didn't do anything, no more changes or edits, and new img BBCode now works on all forum posts, even old forum posts!

IT WORKS!!!

:D

User avatar
Lumpy Burgertushie
Registered User
Posts: 64692
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Removing [img] BBCode From Forum (SOLVED)

Post by Lumpy Burgertushie » Wed Jan 17, 2018 12:39 am

congrats. sounds like you had a really good time.
now, what are you going to do when it is time for the next update? are you going to go back through all those files and find the new code again?


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

Selective
Registered User
Posts: 213
Joined: Sat Apr 19, 2014 10:30 am

Re: Removing [img] BBCode From Forum (SOLVED)

Post by Selective » Wed Jan 17, 2018 3:35 am

Lumpy Burgertushie wrote:
Wed Jan 17, 2018 12:39 am
now, what are you going to do when it is time for the next update? are you going to go back through all those files and find the new code again?
phpBB is open source, that means it belongs to the people and it is up to the people to create it, and it is from people that hack away at the code to change it, that creates the very updates you worship and admire so much. Same with Extensions!

Just because you fear code, scripting and programming so much, doesn't mean it is a bad thing. If we all lived in fear like you want us to, then we would never have any updates, because then we would all be too afraid to try.

User avatar
Lumpy Burgertushie
Registered User
Posts: 64692
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Removing [img] BBCode From Forum (SOLVED)

Post by Lumpy Burgertushie » Wed Jan 17, 2018 4:13 am

wow, where did that come from. I never said anything about fearing code/programming etc. I never said anything about you shouldn't do what you have done. hey, tear the whole thing apart and put it back to gether if you want.

I too spends hours and hours digging through the code for what I want. the difference is that I rarely see the need to reinvent the wheel.

bottom line is that you could have accomplished what you wanted without doing any of that , but you apparently enjoy doing it just for the heck of it.
that is fine, like you said, if there weren't any people tearing up the code for the heck of it, we might not even have phpbb.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: No registered users and 1 guest