● Bug Fix for Forum News Module

Wed Feb 10, 2021 6:28 pm
Clan Leader
Top Dog
Nuke Dev / Coder
3022 Posts
Currently Offline

Most Played:
This week: 21.4hrs.
Total Played: 2,320hrs.

Taking a break from work!
Reputation: 7342
votes: 7
Here is a small fix for those of you like me using the Forums News module. If you haven't noticed, the font size was removed from the bbcode, which I think this was just an oversight, but this is not to fix that, but to fix the issue with the Forums news module that does not display the bbcode the way it should if you happen to use the bbcode for font size.

If you didn't know, [size=36]Your Text[/size] still does work, you just need to manually type it and change the value on how big you want it.

Well, when I was writing up a new article for this site last night, I realized that it was not working on our site, so I went in and did a quick fix for it. Without getting too deep into everything, all I did was change the Reg Expression and that is it. So, to fix this, you can do one of two things, re-download the version of the Forums News module that you have and open up to the following file and replace yours on your site at the same path, or just do the 1 line edit your self. You will find the file to replace at the path I give below to edit.



PHP:  [ Select all ]

$hometext preg_replace("/\[size=([1-2]?[0-9]):$bbcode_uid\]/si"$bbcode_tpl['size_open'], $hometext); 

Replace with:

PHP:  [ Select all ]

$hometext preg_replace("/\[size=(\d{1,3}):$bbcode_uid\]/si"$bbcode_tpl['size_open'], $hometext); 


That's it, just a simple line change and that will work properly now on your home page, (if you're using this module that is).

Forums ©