View Full Version : Reply box on nonVB page?
Hi everyone. This is my first post here so please be gentle. Also, I'm no coding guru by any stretch ... I run a forum but I'm more of a writer/editor/designer than anything else. VB.org has been an amazing resource, and I'm so grateful to you guys for providing it for free!
A little background. I have a site dedicated to my online writing -- it's an original drama series -- and my readers are mostly web newbies who are less experienced even than myself. They tend to be intimidated by anything that looks relatively complex, and I'm afraid the VB seems to freak 'em out.
While they respond avidly through a mail form placed right on the same page as my episodes, for some reason getting them to click on the link to post on my forum seems to be a sticking point. I've added the Quick Reply hack to my threads (here's a sample (http://www.episodicreview.com/forums/showthread.php?s=&threadid=1676)), which helped a little, but not enough, darnit! :)
What I'd like is some kind of code that I could use on an html page to create a very simple reply box (associated with a pre-existing thread). I already allow unregistered posts, so I don't require login capability (although it'd be nice for those who are registered). This way the readers could post their feedback in the simple box, press "send," and are automatically redirected to the forum thread.
In short, would it be logistically possible to create a hack to allow posting from a Quick Reply box nonVB page? And if so ... would someone do it for a poor PHP-impaired soul like me?
Thank you all very much again!
Logician
04-15-2002, 08:58 AM
I read your message 3 times but still couldnt get the practical usage of your request, sorry! :)
If I am not wrong, your requested HTML page would be a "reply thread" alternative, wouldnt it? And if so your users should click a link while reading a thread, to access that page just like the REPLY button in the original vbulletin code. So what's the difference and point of cancelling the original reply screen and creating an alternative which will do exactly the same feature? :confused:
If your only concern is the "complexity" of the reply screen you can simply make it more simple by disabling vbcode or similes or make a template modification and get yourself the simplest reply screen vbulletin history has ever seen! ;)
Doesnt that work?
Regards,
Logician
Hi, Logician! Thanks for responding.
Sorry I was confusing. The best way I guess is to show you a sample of what I'm looking for. :) Here's what I currently have (http://www.skyfalls.com/episodes/s01/09/nine20.htm) -- it's the final scene of a chapter, and at the very bottom of the page is a feedback form.
So my hope is to exchange the feedback form for a VB reply box, much like the Quick Reply box at the bottom of this thread. No replies would be visible on the page. After filling in the reply and submitting, the reader would be taken to a regular VB thread page.
It's probably not possible, but I'm just hoping that having the VB reply form right on the episode page will spur people to submitting the info. As I mentioned, they fill in these feedback forms all the time -- I'd just like to get them to start posting their comments on the forum, and I think it's that extra clicking that seems to intimidate 'em. If I don't grab my readers the second they finish the episode, they dissipate like salt thrown into the sea. :)
Does that make any more sense? Probably this would be only useful for me, in which case most likely no one would be interested in creating the hack. But just in case, I'm tossing the idea it out here and crossing my fingers!
Thanks again, Logician. :)
Logician
04-15-2002, 02:54 PM
Do you publish your episodes in vbulletin threads (as thread's first message) or in another non-vb page?
If you publish them in vbulletin threads then message quick reply hack already does what you want: Users are able to send feedback without having to click a button. Just write your thought in a box and click send and you're done...
So what you want seems like just hiding the thread's other replies. By using quick reply box hack and displaying only the thread's first message (ie your writing) you'll get what you want.
Or do you publish them in non-vb pages?
They're in nonVB html pages, alas. I figured I could have what I want if I converted the site into VBportal or something similar, but I have (gulp) four years' worth of episodes, and the idea of reformatting all that stuff makes me weak in the knees. ;)
I dunno, I could see this hack as having a practical use for article writers who'd like to have an easy way to invite comments on their work.
Assuming my hypothetical hack notion isn't possible, and I use your idea of posting just the last scene of the episode in a VB thread -- would there be any way to have a layout like this:
1. scene text (aka the first post)
2. Quick Reply box
3. replies (in a different format than the scene text)
The replies would need to look different (maybe in a smallfont size, as opposed to normalfont) so that they don't detract from the scene itself. Not as important but also desirable would be to have the Quick Reply box situated between the scene and the replies.
But ideally my hack will be possible. Call me a dreamer! :)
Logician
04-15-2002, 03:57 PM
ok lets divide the context:
1- YOUR EPISODES ARE IN NON-VB PAGE:
Are you ready to edit your HTML code and insert/update thread id number for all episodes you created or you will create? Your HTML code would require thread id so as to relate replies with a certain thread.
2- EPISODES ARE VB's FIRST MESSAGE:
It seems that having thread's first message different and captivating would do the trick for you. But first decide about the system you want.
1. LOL! I feel like I'm in a Mission Impossible episode.
Yes, I'm definitely ready for that challenge! :)
2. If above doesn't work, I do agree that having the thread's first message will be a good workaround.
I really appreciate your help, Logician. Thanks for your patience!
Logician
04-15-2002, 04:35 PM
ok then, quick reply's HTML should do the trick for you. Insert this code into all your non-vb relevant pages where your episodes reside:
-- cut --
<form enctype="multipart/form-data" action="newreply.php" name="vbform" method="post" onSubmit="return validate(this)">
<input type="hidden" name="s" value="">
<input type="hidden" name="action" value="postreply">
<input type="hidden" name="threadid" value="37446">
<input type="hidden" name="title" value="">
<input type="hidden" name="iconid" value="0">
<input type="hidden" name="parseurl" value="yes">
<input type="hidden" name="email" value="">
<input type="hidden" name="disablesmilies" value="">
<input type="hidden" name="signature" value="yes">
<input type="hidden" name="closethread" value="">
<input type="hidden" name="hiddenreply" value="">
<input type="hidden" name="signature" value="yes">
<input type="hidden" name="rating" value="0">
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#555576" width="100%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr>
<td bgcolor="#8080A6" colspan="2"><font face="verdana, arial, helvetica" size="2" color="#EEEEFF" class="thtcolor"><b>Post Reply</b></font></td>
</tr>
<tr>
<td bgcolor="#DFDFDF" valign="top" nowrap><font face="verdana, arial, helvetica" size="2" ><b>Your Reply:</b></font></td>
<td bgcolor="#DFDFDF">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td><textarea name="message" rows="7" cols="70" wrap="virtual" tabindex="1"></textarea><br>
<font face="verdana,arial,helvetica" size="1" ></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
<br>
<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td align="center"><font face="verdana, arial, helvetica" size="2" >
<input type="submit" class="bginput" name="submit" value="Submit Reply" accesskey="s" tabindex="2">
</font></td>
</tr>
</table>
</form>
-- cut --
Edit the line:
<form enctype="multipart/form-data" action="newreply.php" name="vbform" method="post" onSubmit="return validate(this)">
and enter newreply.php's URL like:
<form enctype="multipart/form-data" action="myboard/newreply.php" name="vbform" method="post" onSubmit="return validate(this)">
Edit the line:
<input type="hidden" name="threadid" value="37446">
in all pages and insert the relevant threadid number here.
I've written this in a hurry so could not test it. Holler if it does not work ;)
Regards,
Logician
Um, you. are. GODlike.
Holy moly, I never thought I'd be able to get a response so quickly, much less a solution! :D
Yes, it did indeed work! I tried it in AOL at first and received a javascript error (but it worked anyway); in IE 5.5 it went through without a glitch.
I have two final (I hope) questions, if you don't mind my pushing you.
First Question: I logged out from my forums and returned to the episode page (going "undercover" as an unregistered or unlogged-in reader). The form was exactly the same -- the simple "Post Reply" textfield, with no name/password fields. Now, this may be how this version of the Quick Reply box works; I use the older version (I don't remember whose, I think it was someone with a Slavic name) that automatically provides fields for the username and password when someone isn't logged in.
I was able to post anyway (which is good) but of course the response was listed under the name "Unregistered."
I'd like to provide the usual login field so unregistered people can leave their names too (erasing the automatic "Unregistered" that appears for them). Is it possible to hardcode this, or to provide it for people who aren't cookied/registered?
I can live with having those "Unregistered" posts (I can always instruct people to include their names in the body of the post) but if you can figure out a way for me to provide a name field, I'd be thrilled.
Second Question: also, just for my own curiosity (and in case I'd like to test out the feasibility of your earlier suggestion) ... would it be possible to create the second scenario you mentioned -- posting a scene as a VB thread in which the first post is formatted differently from the rest?
------------------------
Sorry for the extra questions. I am so very, very grateful for your coming to the rescue! If you need any kind of design or copy editing, I'm your girl. :)
Logician
04-15-2002, 07:37 PM
Originally posted by kira
I'd like to provide the usual login field so unregistered people can leave their names too (erasing the automatic "Unregistered" that appears for them). Is it possible to hardcode this, or to provide it for people who aren't cookied/registered?
Registered users (ones who are cookied) will still be able to post with their user names.
For unregistered guests I can provide you another solution, try this:
First replace your HTML code with that:
-- cut --
<form enctype="multipart/form-data" action="newreply.php" name="vbform" method="post">
<input type="hidden" name="s" value="">
<input type="hidden" name="action" value="postreply">
<input type="hidden" name="threadid" value="37446">
<input type="hidden" name="title" value="">
<input type="hidden" name="iconid" value="0">
<input type="hidden" name="parseurl" value="yes">
<input type="hidden" name="email" value="">
<input type="hidden" name="disablesmilies" value="">
<input type="hidden" name="signature" value="yes">
<input type="hidden" name="closethread" value="">
<input type="hidden" name="hiddenreply" value="">
<input type="hidden" name="signature" value="yes">
<input type="hidden" name="rating" value="0">
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#555576" width="100%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr>
<td bgcolor="#8080A6" colspan="2"><font face="verdana, arial, helvetica" size="2" color="#EEEEFF" class="thtcolor"><b>Post
Reply</b></font></td>
</tr>
<tr>
<td bgcolor="#DFDFDF" valign="top" nowrap><font face="verdana, arial, helvetica" size="2" ><b>Your
Reply:</b></font></td>
<td bgcolor="#DFDFDF">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td>
<textarea name="message" rows="7" cols="70" wrap="virtual" tabindex="1"></textarea>
<br>
<font face="verdana,arial,helvetica" size="1" ></font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#DFDFDF" valign="top" nowrap><font face="verdana, arial, helvetica" size="2" ><b>Your
Name (*):</b></font></td>
<td bgcolor="#DFDFDF">
<input type="text" name="guestname" maxlength="20" size="20">
<br>
<font size="-2" face="Verdana, Arial, Helvetica, sans-serif">*Leave this field
blank, if you are a registered user..</font></td>
</tr>
</table>
</td></tr></table>
<br>
<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td align="center"><font face="verdana, arial, helvetica" size="2" >
<input type="submit" class="bginput" name="submit" value="Submit Reply" accesskey="s" tabindex="2">
</font></td>
</tr>
</table>
</form>
-- cut --
Now edit the file "newreply.php". Find this line:
-- cut --
$postusername = htmlspecialchars($username);
}
} else {
$postusername = $bbuserinfo['username'];
-- cut --
AFTER THAT LINE, add:
-- cut --
if ($guestname) {$postusername=substr(strip_tags($guestname),0,20) ;}
else
{$postusername="A Kira Fan";}
-- cut --
This will add the guest's entry as poster name unless she is a registered user! If she is already registered (and loged in!), her registered name will be the poster name regardless of what she entered in the name field. If she is neither registered nor entered her name, her name would be replaced with "A Kira Fan". :D
I guess this is exactly what you want.. ;)
Second Question: also, just for my own curiosity (and in case I'd like to test out the feasibility of your earlier suggestion) ... would it be possible to create the second scenario you mentioned -- posting a scene as a VB thread in which the first post is formatted differently from the rest?
------------------------
Well possible but requires some time to think and code.. This is why I asked which one you prefer in the first place LOL.. :)
I am so very, very grateful for your coming to the rescue! If you need any kind of design or copy editing, I'm your girl. :)
Never mind.. I like helping people especially if they are asking very kindly :cool:
Hi, Logician! :)
Thanks again for your hard work. Actually, the change wasn't a happy one, unfortunately. While I was in the middle of typing out a test post, I saw that someone had already posted a new msg elsewhere on my forum -- someone who was logged in -- and while the correct username showed up in the thread posting, the "last post by" on the forum homepage was listed as "A Kira Fan"! LOL. Kinda funny, actually.
(I was going to change "A Kira Fan" to something else once I got the thing working ... I'm not THAT egotistical. :D)
So here's a probably silly thought -- can I log out and, using the HTML from a regular new reply page, copy the login fields, adding it to the original version of the form you created? Or is this too simple?
Logician
04-16-2002, 05:50 AM
ok got it:
First delete the change you made in newreply.php (convert it back to original) and use this HTML form in your episode pages:
-- cut --
<form enctype="multipart/form-data" action="/yourforum/newreply.php" name="vbform" method="post">
<input type="hidden" name="s" value="">
<input type="hidden" name="action" value="postreply">
<input type="hidden" name="threadid" value="3">
<input type="hidden" name="title" value="">
<input type="hidden" name="iconid" value="0">
<input type="hidden" name="parseurl" value="yes">
<input type="hidden" name="email" value="">
<input type="hidden" name="disablesmilies" value="">
<input type="hidden" name="signature" value="yes">
<input type="hidden" name="closethread" value="">
<input type="hidden" name="hiddenreply" value="">
<input type="hidden" name="signature" value="yes">
<input type="hidden" name="rating" value="0">
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#555576" width="100%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr>
<td bgcolor="#8080A6" colspan="2"><font face="verdana, arial, helvetica" size="2" color="#EEEEFF" class="thtcolor"><b>Post
Reply</b></font></td>
</tr>
<tr valign="top">
<td bgcolor="#DFDFDF"><font face="verdana, arial, helvetica" size="2" ><b>Your User Name:</b></font></td>
<td bgcolor="#DFDFDF"><font face="verdana, arial, helvetica" size="2" ><input type="text" class="bginput" name="username" value="A Kira Fan" size="25">
</font>
<font face="verdana,arial,helvetica" size="1" ><a href="register.php?action=signup">Want to register?</a>
</font></td>
</tr>
<tr valign="top">
<td bgcolor="#F1F1F1"><font face="verdana, arial, helvetica" size="2" ><b>Your Password:</b></font></td>
<td bgcolor="#F1F1F1"><font face="verdana, arial, helvetica" size="2" ><input type="password" class="bginput" name="password" value="" size="25">
</font>
<font face="verdana,arial,helvetica" size="1" ><a href="member.php?action=lostpw">Forgotten your password?</a>
</font></td>
</tr>
<tr>
<td bgcolor="#DFDFDF" valign="top" nowrap><font face="verdana, arial, helvetica" size="2" ><b>Your
Reply:</b></font></td>
<td bgcolor="#DFDFDF">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td>
<textarea name="message" rows="7" cols="70" wrap="virtual" tabindex="1"></textarea>
<br>
<font face="verdana,arial,helvetica" size="1" ></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
<br>
<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td align="center"><font face="verdana, arial, helvetica" size="2" >
<input type="submit" class="bginput" name="submit" value="Submit Reply" accesskey="s" tabindex="2">
</font></td>
</tr>
</table>
</form>
-- cut --
Now your registered users can post with their usernames and passwords, while unregistered users (who should leave the password field blank!) can post with any name unless this name is already registered! Registered users are not suppose to be a "Kira Fan" any more! ;)
Hope this helps..
Chris M
04-16-2002, 11:09 AM
Wow great stuff Logican...
This was a really good idea...
Satan
Thanks, Satan! (Wow, I never thought I'd be saying that! :D) I hope the idea might come in handy for someone else. Logician's made a pipedream come true. I really didn't think this was gonna be possible.
Logician ... WOW! This is amazing! It works perfectly. :)
Two teensy final questions:
a) I noticed that the "signature" hidden input field is repeated twice. Is that required?
b) Also, I see there's been a change in the FORM action since the original code you created. The original was:
<form enctype="multipart/form-data" action="newreply.php" name="vbform" method="post" onSubmit="return validate(this)">
and now you're recommending simply:
<form enctype="multipart/form-data" action="/yourforum/newreply.php" name="vbform" method="post">
So I just wanted to confirm that this is okay.
All in all, I couldn't be happier with your wonderful help, Logician! If anyone wants to see the final result, you can visit this episode page (http://www.skyfalls.com/episodes/s04/15/041506.htm) and scroll down to see the form. (Please don't submit it, though! :D)
As you'll see, I made a few cosmetic tweaks to match the look of my site and guide their comments a little, and also removed the "want to register" link -- they can register later if they want. :) Finally, I added a touch of javascript to clear the username field if the reader clicks on it (like the search box here on vb.org). Note: This scene is a little sexy (this web series is similar to a nighttime soap) so don't click if you're offended by PG material.
I'm so grateful for all your help, and hope one day I'll be able to return the favor for someone in your honor. :)
Chris M
04-16-2002, 07:51 PM
Hey...
I read your story thingy...
I signed up at your forums earlier, but havent recieved a Confirmation email yet...
And I think they are meant to be repeated...php is like that...
Satan
Cool, I thought that was you! :) Hm, I'm not sure why you didn't get sent the email at your hotmail address. Well, I just sent out your password again, so hopefully this will get to you. Sorry for the inconvenience, and thanks so much for registering!
Logician
04-16-2002, 08:12 PM
Hey there,
Originally posted by kira
a) I noticed that the "signature" hidden input field is repeated twice. Is that required?
nope not required, ignore one pls.
b) Also, I see there's been a change in the FORM action since the original code you created. The original was:
<form enctype="multipart/form-data" action="newreply.php" name="vbform" method="post" onSubmit="return validate(this)">
So I just wanted to confirm that this is okay.
if it's working then it's ok.. j/k :)
In fact I tried to get rid of the java script error you recieved with AOL so removed that part intentionally. I hope it worked?
As you'll see, I made a few cosmetic tweaks to match the look of my site and guide their comments a little, and also removed the "want to register" link -- they can register later if they want. :) Finally, I added a touch of javascript to clear the username field if the reader clicks on it (like the search box here on vb.org).
nice look, nice tweaks.. ;)
I'm so grateful for all your help, and hope one day I'll be able to return the favor for someone in your honor. :)
yw and deal.. :)
Regards,
Logician
Highlander
04-18-2003, 07:37 PM
hi there,
i got a problem like kira..but instead of posts on nonvb pages to an already created thread.. i try the last days to.. create an thread if someone is posting on a review.. or maybe if the review is written..a thread is created to diskuss..
here is a samplke of that PHP-Form that creates an review..but how to create an thread with this replay box if a discussion is being started..so i dont have to create twice..first a thread..than my review.. and the user creates an thread if he is beginning siscussing the review.. maybe got an idea.. but for me the vb code is to high to understand..im really happy that i created this php form :)
Example..for reviews creating:
here is sample of that form:
http://www.spielplanet2.de/forum/gaming/admin_review/adminpanel_user.php
this form creates an review in my database..so is not pretty..but useful.. :) ..
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.