UBB.Dev
Is it possible to add a pre formatted text file to be included in all posts to a specific forum? For instance I want to open a private forum on my board where members could post items for sale and items they are looking for.

Could I add a disclaimer to the bottom of each post, like a second signature automatically? Does anyone have any ideas? Is this at all possible? I know that the version 5 mods are fading quickly. Is there anyone that could write a hack like this? Please let me know. Thanks
this is one way to realize it:
Code
code:

backup postings.cgi before modifying!
joking-down,

Thank you so much for your help. I kept getting 500 errors at first with the mod. After checking the
Code
code:
I realized that the ( " ) were missing. I added them to look like this:
Code
code:
and it worked like a charm.

Thanks again!

Greg
joking-down,

Is there a way to include this disclaimer when a new topic is created to that same specific forum as well. The disclaimer mod works great on the topic replies, but doesn't work at all when a new topic is created. Any idea's? Thanks
reload,
Did you add the code in both locations? Above it says:

"find in sub DoPostTheReply and DoPostTheTopic"

Did you add the code in BOTh subs? I haven't tried this so I gotta ask. smile
Vipermad & joking-down,

My mistake, thanks. I see where I screwed things up.

In postings.cgi I only found one occurrence of:

Code
code:

And I added the mod afterwards. This was DoTheReply. I found out where I messed up (After reading things over again) and that was on the DoThePost subroutine. What I had to look for was different. Instead of finding two occurrences of this:

Code
code:

I found only one, and the other should have been this:

Code
code:

I added the code below those occurrences respectively, as outlined above.

Code
code:

And...

Code
code:

Now that I have added that second part everything works in both posting new topics and replies.

Thanks again to joking for supplying the code and to you Vipermad for pointing out my mistake.
I just noticed something when a member edited their post. The disclaimer doesn't get removed from the text box when editing, and when the edited text is posted, the HTML of the disclaimer that is in postings.cgi now gets posted as text. Meaning the < becomes & lt; and the > becomes & gt;.

This doesn't happen when someone posts a new topic or replies to a topic, only on an edit. I have solved this temporarily by enabling HTML in that particular forum. I wanted to know if there is a permanent solution to this? Any ideas?

[ 11-07-2001: Message edited by: reloadbench ]
reload....
Look in ub_library.pl for sub EditUBBConvert and there should be several examples of what you need to do so you can TURN OFF html and still have your disclaimer appear correctly. Have a look and let us know if you need help. smile
© UBB.Developers