1

Topic: Hack for the display of posts/entries?

Hi Rickard, all ...

Ok, I have a new forum set up, however there will be alot of applescript and php code to be displayed in the messages.

As a test, and experiment, I want to display the messages of posts in a text area [form field].

The experiment being that users will be able to display, and easily copy any code in each message.

Rickard, where [or what line number] on viewtopic.php can I alter the code, so that all the messages are wrapped in a textarea field?

I know how to hack it, and if things don't work out this way, I can always change it back.

If you could show me the right function/variable to modify, I'll dance at yer wed'n.  :>)

many thanks!

Re: Hack for the display of posts/entries?

You need to edit line 327 in include/parser.php. The line looks like this:

$message .= '<br><br></span><table style="width: 95%" align="center" cellspacing="4" cellpadding="6"><tr><td class="punquote"><span class="puntext"><b>'.$lang_common['Code'].':</b></span><br><br><pre>'.trim($inside[$i]).'</pre></td></tr></table><span class="puntext"><br>';

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3

Re: Hack for the display of posts/entries?

If you do this could could you please post a link to your board here together with your code.

4

Re: Hack for the display of posts/entries?

Rickard wrote:

You need to edit line 327 in include/parser.php. The line looks like this:

$message .= '<br><br></span><table style="width: 95%" align="center" cellspacing="4" cellpadding="6"><tr><td class="punquote"><span class="puntext"><b>'.$lang_common['Code'].':</b></span><br><br><pre>'.trim($inside[$i]).'</pre></td></tr></table><span class="puntext"><br>';

hokay ...

I tried a couple of things, but unfortunately I wuz terribly unsuccessful. <:(

If I apply a textarea tag, [with the associative html form tags], where do I stick them in your code?

Can you give me an example of where punbb code surrounds the textarea stuff?

signed: dumb&dumber  :>)

Re: Hack for the display of posts/entries?

Something like this:

$message .= '<br><br></span><textarea rows="10" cols="100">'.trim($inside[$i]).'</textarea><span class="puntext"><br>';
"Programming is like sex: one mistake and you have to support it for the rest of your life."

6

Re: Hack for the display of posts/entries?

Thanks Rickard, I'll give this a go.  :>)