I have added a to this addon and given it the ability to have a button in each post that will submit the post to the quote database for approval. What happens is that you see the button in the post, I have a button by the 'edit post' button and the user presses the button. They are then sent to the 'add quote' page with the username/quote text all filled in from the post. The user can then proofread the submission and then hit the submit button. All works great, and you dont have to worry about search bots automatically submitting quotes this way either.
Here is what you'll need to do.
Find this in quotes.php
Add this above it
PHP Code:
if ($_REQUEST['do'] == 'post')
{
$post_quote = $DB_site->query("SELECT username, pagetext FROM post WHERE postid=$postid");
while ($postinfo = $DB_site->fetch_Array($post_quote))
{
$author = $postinfo[username];
$quote = $postinfo[pagetext];
}
eval('print_output("' . fetch_template(quote_addquote) . '");');
}
You now need to make some template changes.
First open quote_addquote
Find
Code:
<input type="text" class="bginput" name="author" size="25" maxlength="75" /></td>
Replace it with
Code:
<input type="text" class="bginput" name="author" size="25" maxlength="75" value="$author" /></td>
Find
Code:
<td class="alt1"><textarea name="quote" rows="10" cols="50"></textarea>
Replace it with
Code:
<td class="alt1"><textarea name="quote" rows="10" cols="50">$quote</textarea>
Now open your postbit or postbit_legacy template, whichever you use. You can choose to put your button/text wherever you would like, but I'll show you where I put mine. My code also has a button that I put in there too, so dont be suprised if you just cut/paste/upload and there is a mysterious redx
I know I should have added a phrase, but I didn't, you can if you would like as well.
Find
Code:
<if condition="$post['editlink']">
Add above it
Code:
<a href="/forum/quotes.php?do=post&postid=$post[postid]"><img src="$stylevar[imgdir_button]/quoteit.gif" alt="Submit post for quote database" align="middle" border="0">
And thats about it, now your users should have the abilty to automatically fill in an 'add quote' request form, straight from a post. A feature that is a huge hit on my website so I thought I'd share it.
Questions/Problems, shoot me a PM.