PDA

View Full Version : More intuitive "Thank you for posting" message


bob_pitbull
Sun 23rd Sep '01, 5:43am
Would it be possible for the message that appears on posting a new message to be a little more.. umm.. intelligent?

The message that appears is below.. Wouldn't it be possible to detect a few of these things before creating the message? So.. if the forum is moderated, post a message saying something like "this forum is moderated, you message will not appear immediately" or similar.. And if a poll is posted, just say "please now enter your poll options"...

Or better yet, if it's a poll, offer some way of editing the poll options on the main message page.. although it's easy enough to use now, the first time each of my users posts a poll, they don't have a clue how it works.. to rectify this, I'll have to add a help page explaining how a poll works... the way the poll system is currently set up, it looks like it was added at the last moment as a second thought.. (sorry).

And of course, if the forum isn't moderated, and no poll option is ticked, then a simple "Thank you for posting!" would suffice.


Thank you for posting! You will now be taken to your post. If the administrator has selected to moderate all posts in this forum, you will be taken back to the forum and your post will be displayed presently. If you opted to post a poll, you will now be allowed to do so.

FWC
Sun 23rd Sep '01, 5:51am
If you edit the redirect_postthanks template you can have it say whatever you want.

bob_pitbull
Sun 23rd Sep '01, 5:59am
is it able to detect the current settings, ie. whether or not "Post a poll" was tagged, and whether or not the forum is moderated?

If it is possible to detect these things with the current vBulletin, then I'd have to question why the default postreply template doesn't already do this? Since the majority of users probably don't edit the template..

Also, if it is possible to detect these settings, can you let me know how to use them to display different messages?

I still think it would be a good idea for the bare-bones, unmodified version of vBulletin to be a little more user-friendly..

Chen
Sun 23rd Sep '01, 7:00am
For newreply.php:
Replace this:
if ($visible) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
With this:
if ($visible) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
eval("standardredirect(\"".gettemplate("redirect_postthanks_moderated")."\",\"$goto\");");
}

For newthread.php:
Replace this:
if ($postpoll) {
$goto="poll.php?s=$session[sessionhash]&threadid=$threadid&polloptions=".intval($polloptions);
} elseif ($visible) {
$goto="showthread.php?s=$session[sessionhash]&threadid=$threadid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$forumid";
}
eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
With this:
if ($postpoll) {
$goto="poll.php?s=$session[sessionhash]&threadid=$threadid&polloptions=".intval($polloptions);
eval("standardredirect(\"".gettemplate("redirect_postthanks_poll")."\",\"$goto\");");
} elseif ($visible) {
$goto="showthread.php?s=$session[sessionhash]&threadid=$threadid";
eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$forumid";
eval("standardredirect(\"".gettemplate("redirect_postthanks_moderated")."\",\"$goto\");");
}
Now create the new templates and you should be fine.

bob_pitbull
Sun 23rd Sep '01, 9:12am
That's exactly what I wanted :-).

Any chance that this could be implemented into the default version of vBulletin, without requiring hacks?

bob_pitbull
Sun 23rd Sep '01, 10:01am
There were 2 similar occurrences of each in newreply.php and newthread.php, did both need to be edited? I just added the eval() line to each occurence...

There's also some lines in poll.php, which i tried changing to the following:-


if ($threadinfo[visible]) {
$goto="showthread.php?s=$session[sessionhash]&threadid=$threadinfo[threadid]";
eval("standardredirect(\"".gettemplate("redirect_postthanks_new")."\",\"$goto\");");
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
eval("standardredirect(\"".gettemplate("redirect_postthanks_mod")."\",\"$goto\");");
}


but... the message "this forum is moderated" popped up, even though the forum i posted to -isn't- moderated.. did i do something wrong, or...?

Chen
Sun 23rd Sep '01, 10:30am
The 2 similar occurrences in the files could be edited, but no actual need.
These are only used if the user has posted an exact same message, meaning he clicked the Submit button two times in a row.
Since this is not likely to happen very often, I didn't do that part.

About poll.php, you need to replace this:
// redirect
if ($threadinfo[visible]) {
$goto="showthread.php?s=$session[sessionhash]&threadid=$threadinfo[threadid]";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}

eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
with this:
// redirect
if ($threadinfo[visible]) {
$goto="showthread.php?s=$session[sessionhash]&threadid=$threadinfo[threadid]";
eval("standardredirect(\"".gettemplate("redirect_postthanks_poll")."\",\"$goto\");");
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
eval("standardredirect(\"".gettemplate("redirect_postthanks_moderated")."\",\"$goto\");");
}
I know this is what you did, but maybe you forgot to remove that line or something.

By the way, you can delete a few lines and instead of $goto put what's in that variable.

bob_pitbull
Sun 23rd Sep '01, 10:59am
Sorry about this... that doesn't seem to work for poll.php :-(...

My exact lines are as follows...


// redirect
if ($threadinfo[visible]) {
$goto="showthread.php?s=$session[sessionhash]&threadid=$threadinfo[threadid]";
eval("standardredirect(\"".gettemplate("redirect_postthanks_new")."\",\"$goto\");");
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
eval("standardredirect(\"".gettemplate("redirect_postthanks_mod")."\",\"$goto\");");
}


redirect_postthanks_new is just my standard "thanks for posting a message" - what I would want to appear when you submit a message to an unmoderated forum...

redirect_postthanks_mod is the modertated one "thanks for posting, your post will be reviewed by a moderator", etc...

With the code above, in an unmoderated forum, I actually get the 2nd message :-(..

Chen
Sun 23rd Sep '01, 11:20am
Ok, and when you post a poll in an unmoderated forum, are you sent to the forum, or the thread?
If you're sent to the thread, check the template - it's probably wrong.