Help with Text Replacement Module

Posted by Steel Rat 
Help with Text Replacement Module
April 24, 2006 01:13PM
I was trying out the Text Replacement module to enhance the posting on my RPG forum, and I noticed that BBCode isn't processed with text replacement.

Example: I entered the text 'ooc' as the text to replace, and [ b ][ i ]OOC:[ /i ][ /b ] (minus the extra spaces, of course) as the replacement text.

The result was the BBcode showed in the post, it did not make the text bold and italicized. Is this intended?

Steel Rat
[infinite-realities.com]



Edited 1 time(s). Last edit at 04/24/2006 01:31PM by Steel Rat.
Re: Help with Text Replacement Module
April 24, 2006 02:36PM
both modules run in the same hook and there is no defined order in which the modules are run. you depend on that the bbcode-module running after the replacement-mod.


Thomas Seifert
Re: Help with Text Replacement Module
April 24, 2006 03:04PM
Sooo, is there a way to make this work?

Steel Rat
[infinite-realities.com]
Re: Help with Text Replacement Module
April 25, 2006 04:42AM
It can be done by creating a mod that uses an early hook to modify the internal datastructure in $PHORUM["hooks"]["format"]. I hacked up such a mod. What it does, is see if the bbcode mod is in the format chain. If it is and if it's not the last on in the chain, it flips the bbcode mod with the mod that is last in the chain. This is of course not a complete hook ordering system, but it might work for what you want to accomplish here.

See the attachment. Just place this file in your Phorum's mods directory and enable the module "BB Code always as last formatter".


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce



Edited 3 time(s). Last edit at 04/25/2006 04:44AM by mmakaay.
Attachments:
open | download - make_bbcode_last_formatter.php (1.6 KB)
Re: Help with Text Replacement Module
April 25, 2006 08:18AM
That worked like a champ! Thanks!

Steel Rat
[infinite-realities.com]
Re: Help with Text Replacement Module
April 25, 2006 10:26PM
@Steel Rat
Sorry. Terribly off topic, but I have to get this off my chest.

Looking at your forum I see the following comments, coming from you, in your request forum:

"I wanted that as well, Rob. I haven't seriously looked into doing it. As usuall, on the support forums for any of these things, the developers always ask "Why would you want that?" Instead of answering the question of whether it can be done."

"More like "We don't care"" about what the Phorum team's general attitude would be.

"DEmentality" in a reply to someone talking about the "Phorum team mentality"

I must say that I am quite grieved regarding your attitude towards the Phorum team on your website. We do not deserve to be pointed at like that.

Of course we want to know why people request certain features, if we do not understand their need. If we understand the need and think it's a cool feature, we will probably build it. We are not here for building every last feature request that our users can come up with, because we simply do not have the time for that.

I can be short about the "Whether it can be done". Anything for which you can think up a logical system (does not even have to be in PHP code) can be done. You only have to write the code for it. What you are looking for though, is how exactly to do things and what to write in the code to make it work. That is almost like writing the software for you. It's in no way our job, nor our responsibility to take care of that.

So I'd appreciate it if you would try to display a little bit more respect for the Phorum development team, which is doing the best they can to deliver a fast and flexible forum package, totally for free, including free support to the users.

If I'd read your forum before today, I would probably not have written the module from this thread for you. You might want to think about that...


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Help with Text Replacement Module
April 25, 2006 10:37PM
I understand your point. Hopefully you can understand mine.

Was I unfair? Probably. But seeing things from my perspective what I do best.

You have to admit that some of the responses have been along the lines of "what use is that?" Well, obviously it has a use or someone wouldn't ask for it.

When someone posts in this forum is it automatically assumed that the Phorum Dev Team is expected to do it, ASAP? I don't think I've given that imrpession. Most of the time I ask if it's feasible, and if I get a response of "what good is that?", then you can imagine how that makes one feel. It DOES go both ways.

I also didn't get the impression that you wrote that mod for ME, but that you had already done so for another purpose.

I apologize if I sounded harsh, I was venting. I've gotten similar, and worse, responses from the phpbb crew, and you took part of the brunt of that. And my requests are usually much more mild than the vast majority.

I would gladly pay for this software. I don't know if you take donations, but I will, if you do. Not in an attempt to make up for what I may have said, or may say in the future, none of us are perfect, But to support further efforts.

I would even go so far as to provide free web space for Phorum development, including the hosting of this and all related sites, if asked.

Believe me, I'm not ungrateful, though it may seem so from your perspective. I will post an apology on my site.

Steel Rat
[infinite-realities.com]
Re: Help with Text Replacement Module
April 25, 2006 10:47PM
Yes, the mod was hand-crafted especially for you (like it says in the header of the file).
Next time, we'll just answer "yes" if you ask if it is feasable ;-)
Case closed.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Help with Text Replacement Module
April 25, 2006 10:49PM
SO an apology wasn't good enough. Oh well.

Steel Rat
[infinite-realities.com]
Re: Help with Text Replacement Module
April 25, 2006 10:54PM
"Case closed" meaning "Good enough, thanks for the apology, now we stop talking about it and go back to the main topic".


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login