I have a question that no one seems to answer at phpbb and I was wondering if you could help me. I want to make a change to the posting.php(attached) or viewtopic.php(attached, right now it replaces all words that I have in my db and I want to exclude a forum, maybe by fid. the script/module uses preg_replace().
can this be done and if how???
Thanks
Mikehere is the viewtopic.phpNot too familiar with phpBB's code but you could probably use a simple if statement. If the forum ID is "fid" then do something like this:
if ($fid == '2') { //replace 2 with the correct fid
$user_sig = "";
}
else { $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', '<\2>', $user_sig); }
Good Luck,
Pauldo you mean that in this forum it doesn't use the preg_replace?
so what you are trying to get at is you have this forum that it will be the only one you can typ ehtml in and stuff like that?acutally I have a trash forum that I allow cursing or obscene language in and some of the members are slipping and going to other forums and I want to put word replacements in but I do not want it to affect the trash forum, Does that make since?welll for the 2 files you posted I don't believe it will work like you want. sure you can add that stuff so that specific forum will not be effected, but I have a few questions.
in vB you can already do this, so I noticed that your files are dated 2 years ago so why don't you just update and see if the new version does it?
I have added this to this posting file. search for $fid != '2' so you can make teh 2 to what ever forum id is the one you don't want it to effect.
I also beleive ther eare more file sto this as those don't have any inserts or post posting.
but try it and let me knowI really appreciate your time for looking at this and I do believe that there are more files involved. PHPBB never had that function, just like they dont have sub forums, but I added that. I asked over there once about this and no one would answered me, but I will try again!!
Thanks,
I will try your tweak and let you know. Again I appreciate it
Mike
can this be done and if how???
Thanks
Mikehere is the viewtopic.phpNot too familiar with phpBB's code but you could probably use a simple if statement. If the forum ID is "fid" then do something like this:
if ($fid == '2') { //replace 2 with the correct fid
$user_sig = "";
}
else { $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', '<\2>', $user_sig); }
Good Luck,
Pauldo you mean that in this forum it doesn't use the preg_replace?
so what you are trying to get at is you have this forum that it will be the only one you can typ ehtml in and stuff like that?acutally I have a trash forum that I allow cursing or obscene language in and some of the members are slipping and going to other forums and I want to put word replacements in but I do not want it to affect the trash forum, Does that make since?welll for the 2 files you posted I don't believe it will work like you want. sure you can add that stuff so that specific forum will not be effected, but I have a few questions.
in vB you can already do this, so I noticed that your files are dated 2 years ago so why don't you just update and see if the new version does it?
I have added this to this posting file. search for $fid != '2' so you can make teh 2 to what ever forum id is the one you don't want it to effect.
I also beleive ther eare more file sto this as those don't have any inserts or post posting.
but try it and let me knowI really appreciate your time for looking at this and I do believe that there are more files involved. PHPBB never had that function, just like they dont have sub forums, but I added that. I asked over there once about this and no one would answered me, but I will try again!!
Thanks,
I will try your tweak and let you know. Again I appreciate it
Mike