PDA

View Full Version : If no subject entered in post, default to "Re: Last subject entered"


007
02-13-2003, 07:20 AM
I have my forum set up to automatically use

"Re: title of thread"

for the subject of each post entered after the original post. i am trying to make it so it defaults to

"Re: last subject entered"

So if the thread was titled

"Thread Title"

then the reply subject would default to

"Re: Thread Title"

but I want to make it so if someone puts in their own subject, then it would default to

"Re: Last subject"

Does that make sense? I also am wondering if it possible to show the subject of posts on the profile under last post, instead of the thread title where the post was made... Any suggestions? :)

007
02-23-2003, 08:20 AM
OOHHHHH!!! Somebody please at least point me in the right direction. :(

Please??????? :ermm:

007
03-06-2003, 06:36 AM
So, does anybody know if this is possible? Is it hard? HELP! :)

:banana:

Boofo
03-06-2003, 07:27 AM
Try this:

In newreply.php, find:

$threadratingoption = '';

and add this ABOVE it:

if ($postinfo[title]!="") {
$title="Re: ".unhtmlspecialchars($postinfo[title]);
} else {
$title="Re: ".unhtmlspecialchars($thread[title]);
}
$title = str_replace("Re: Re: ", "Re: ", $title);

Let me know if this is what you wanted. ;)

Boofo
03-06-2003, 07:33 AM
By the way, if you default to the last subject entered, that won't always work. You might be replying to a message at the beginning of a thread instead of the message with the last subject entered. Then it might not make sense. ;)

007
03-06-2003, 12:15 PM
That's sort of what I am trying to do.

Right now I have the newreply template with this in the title field:
<normalfont><input type="text" class="bginput" onFocus="this.value='';"
onBlur="if (this.value=='') {this.value='Re: $thread[title]';}" type="text"
name="title" value="Re: $thread[title]" size="40" maxlength="85" tabindex="1"></normalfont>

The way I really want this to work is probably more than you are willing to do, but just to give you an example, I want this to work is as follows:

Someone starts a thread called "test"

Someone posts a reply to it and titles it "yeah"

Somewhere in the postbit there would be a small link to "reply" to the individual thread.

when clicking this, it would automatically default the title of your thread to "Re: test" or "Re: yeah" depending on which one you clicked on.

Then if somebody just used the normal reply button at the botton of the page, it would simply be titled "Re: yeah" since that was the last title of the last post.

Then of course if someone typed in their own title in any of these occations, their own title would take priority over the default titles.

As you can see in the code I entered above, that automatically prepopulates the title with the main title of the thread. I would like for this to prepopulate based on the factors that I mentioned here.

If you, or anyone else wants to make this hack, I'd really appreciate it. If not then I'll understand. It does seem a little hard but you tell me. Thanks.

:)