vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   QuoteIt! - Quote Database (https://vborg.vbsupport.ru/showthread.php?t=97585)

samu2 12-19-2005 10:14 AM

OK Finally I got it to work :) is there any way I can get it to show up on all pages? great mod Thank you :)

dieselpowered 12-19-2005 03:24 PM

After moderating, I am receiving this error:

"Could not find phrase 'quote_x_has_been_approved"

It is odd as looking within the phrase manager does have it existing? :ermm:

Also, is there a way to make a confirmation page so that people know that the quote will not display until approved?

Cap'n Steve 12-20-2005 04:44 AM

Quote:

Originally Posted by xtremeoff-road
No my friend, I am looking for the code to add to my CMPS moderation module so that I do not have to go into the admincp every time to check if new quotes have ben submitted.

I know, it's in that post I linked along with instructions for adding the Random Quote block.

To add a message for after a quote is submitted, create a template called quote_message (just base it off of quote_addquote and delete the text boxes) then, in quotes.php find

PHP Code:

elseif ($_REQUEST['do'] == 'add') {

    if (!
$vbulletin->userinfo['userid']) {
        
print_no_permission();
        exit;
    }

    if (empty(
$_POST['author']) OR empty($_POST['quote'])) {
        eval(
standard_error(fetch_error('requiredfields')));
    }
    
$approved 0;
    if (
$settings[3] == 0) {
        
$approved 1;
    }
    if (
$settings[5] == 1) {
        
$context $db->escape_string(htmlspecialchars_uni(trim($_POST['context'])));
    }
    
$author $db->escape_string(htmlspecialchars_uni(trim($_POST['author'])));
    
$quote $db->escape_string(nl2br(htmlspecialchars_uni(trim($_POST['quote']))));
    
$db->query_write('
        INSERT INTO ' 
TABLE_PREFIX 'quotes
        (quote, author, userid, approved, context) VALUES
        ("' 
$quote '", "' $author '", ' $vbulletin->userinfo['userid'] . ', ' $approved ', "' $context '")
    '
);

    
header('Location: ' $vbulletin->options['forumhome'] . '.php?' $vbulletin->session->vars['sessionurl']);



and replace that with

PHP Code:

elseif ($_REQUEST['do'] == 'add') {

    if (!
$vbulletin->userinfo['userid']) {
        
print_no_permission();
        exit;
    }

    if (empty(
$_POST['author']) OR empty($_POST['quote'])) {
        eval(
standard_error(fetch_error('requiredfields')));
    }
    
$approved 0;
    if (
$settings[3] == 0) {
        
$approved 1;
    }
    if (
$settings[5] == 1) {
        
$context $db->escape_string(htmlspecialchars_uni(trim($_POST['context'])));
    }
    
$author $db->escape_string(htmlspecialchars_uni(trim($_POST['author'])));
    
$quote $db->escape_string(nl2br(htmlspecialchars_uni(trim($_POST['quote']))));
    
$db->query_write('
        INSERT INTO ' 
TABLE_PREFIX 'quotes
        (quote, author, userid, approved, context) VALUES
        ("' 
$quote '", "' $author '", ' $vbulletin->userinfo['userid'] . ', ' $approved ', "' $context '")
    '
);

    eval(
'print_output("' fetch_template('quote_message') . '");');



I know about the missing phrase, I've yet to figure out what group to put it in. :ermm:

Quote:

Originally Posted by samu2
is there any way I can get it to show up on all pages?

Instructions are in this post.

thisgeek 12-20-2005 07:13 AM

Is there any way to get the quotes to parse vbcode and smilies?

DefenceTalk 12-20-2005 05:49 PM

FYI:

If you have Photopost installed, this mod's who is online process will cause issues with Photopost's Who is online not working correctly with vB.

Cap'n Steve 12-21-2005 12:18 AM

Quote:

Originally Posted by thisgeek
Is there any way to get the quotes to parse vbcode and smilies?

Not yet.

Quote:

Originally Posted by DefenceTalk
FYI:

If you have Photopost installed, this mod's who is online process will cause issues with Photopost's Who is online not working correctly with vB.

I'll take a look at that.

CtrlAltDel 12-21-2005 02:05 AM

nice work steve, thought i'd slap a post in here ;)

thisgeek 12-21-2005 01:39 PM

How can I integrate QuoteIt with vbShout (v2)? - I want to add a 'Submit to Quotes' link on the archives page - any simple way of doing this?

Robbed 12-21-2005 10:33 PM

Quote:

Originally Posted by xtremeoff-road
After moderating, I am receiving this error:

"Could not find phrase 'quote_x_has_been_approved"

It is odd as looking within the phrase manager does have it existing? :ermm:

Same problem, any fixes?

also the title of the page is Array[bbtitle]

Cap'n Steve 12-22-2005 03:54 AM

Quote:

Originally Posted by Robbed
Same problem, any fixes?

also the title of the page is Array[bbtitle]


Just ignore the phrase for now, it's harmless.

To fix the title, change $vbulletin->options to $vboptions in the templates.

Quote:

Originally Posted by thisgeek
How can I integrate QuoteIt with vbShout (v2)?

I'm not sure how the vbShout database is structured, but you could probably just copy the submit post code and adapt it to their table. They'd probably be able to give you more help than me.

thisgeek 12-22-2005 11:32 AM

Ok ta :)

docvader 12-23-2005 04:07 AM

Quote:

Originally Posted by Cap'n Steve
docvader - run these queries to make sure the quote settings get reset:

Code:

DELETE FROM $TPsetting WHERE varname IN ("showquote", "ratequote", "averagethreshold", "totalthreshold")
Code:

DELETE FROM $TPdatastore WHERE title = "quote_settings"
Just replace the $TP with your table prefix first.

Hi Capn
Running these queries allowed me to install the Quoteit on my 3.52 board, but, the hack is not "finding" all the the quotes that were previously in the database (from my 3.07 board running the older Quoteit). Is there another step or query that I have to run to enable the new hack to show the old quotes in the database?

Thanks!
rich

Cap'n Steve 12-23-2005 04:24 AM

So it shows some but not all of your quotes? You must either have some quotes still awaiting moderation or have a minimum rating threshold set.

docvader 12-23-2005 01:01 PM

Well, according to my database in my test board now, it lost all of my quotes. It's accepting new ones, and appears to be functioning correctly, but, my "quotes" and "quoterating" databases are empty (except for the new test quotes I put in.

At this point, is it as simple as exporting those two databases from my original board, and importing them back into the test board? Got any suggestions for upgrading the original board so that I don't lose the two "quote" databases?

Exporting the quotes and quotesratings sql files from my original board is no problem using phpmyadmin, but, I'm uncertain as to how to succesfully reimport them back into my test board, to get the original quotes to show up. "Uploading" the files didn't work.... (I'm not exactly a whiz when it comes to mysql).

Thanks!
rich

docvader 12-23-2005 03:09 PM

Quote:

Originally Posted by docvader
Well, according to my database in my test board now, it lost all of my quotes. It's accepting new ones, and appears to be functioning correctly, but, my "quotes" and "quoterating" databases are empty (except for the new test quotes I put in.

At this point, is it as simple as exporting those two databases from my original board, and importing them back into the test board? Got any suggestions for upgrading the original board so that I don't lose the two "quote" databases?

Exporting the quotes and quotesratings sql files from my original board is no problem using phpmyadmin, but, I'm uncertain as to how to succesfully reimport them back into my test board, to get the original quotes to show up. "Uploading" the files didn't work.... (I'm not exactly a whiz when it comes to mysql).

Thanks!
rich

OK, that was easy, lol.

You have to drop the old database before you can install the new one. Just figured that out. Got it all working on my test board.

I guess dropping the old tables first, installing the hack fresh, and reuploading the backup sql databases is the easiest way to do this.

Thanks Capn, I'm learning all the time. Appreciate the help.

rich

Cap'n Steve 12-23-2005 09:31 PM

It shouldn't mess with your quotes or ratings unless you uninstall it, in which case it will drop both tables. But as long as you've got it working, I guess everything's peachy. :nervous:

docvader 12-24-2005 04:48 AM

My mistake. I did uninstall it, because I had lost my index page. I'll try those queries on my main board and install the hack fresh.

Robbed 12-24-2005 01:01 PM

-quote_addquote is uncached
-Would it be possible to have another sort item, have it sort by random.
-Is there a way to make it parse smilies, bold, quotes etc.

Cap'n Steve 12-25-2005 01:53 AM

Quote:

Originally Posted by Robbed
-quote_addquote is uncached
-Would it be possible to have another sort item, have it sort by random.
-Is there a way to make it parse smilies, bold, quotes etc.

Good ideas, they're on the list to be included in the next version.

loonytune15 01-03-2006 12:59 PM

Great hack installed easily.

Just wondering how I can make it so this hack fits in with the rest of my forumhome? Currently it sticks out like a sore thumb :)

http://www.monster-designs.com/forums

Thanks for any help you can provide..

CtrlAltDel 01-03-2006 06:08 PM

i just strip out the bit that gets displayed on forumhome to be just the quote and author, check my site in my sig, just simple template editing...

Borgs8472 01-03-2006 06:37 PM

Hey Cap'n Steve, what do I have to do to allow smileys to get parsed in the quotes?

Cap'n Steve 01-03-2006 10:19 PM

looneytune15 - just edit the quote_randomquote template. It should be fairly obvious which variables hold the quote information.

Borgs8472 - you can't right now, it's being added for the next version.

loonytune15 01-04-2006 04:11 PM

any idea on how long till the new version will be released?

Also can it be made more like the vb shoutbox where all the template additions are made automatically and fits into the style as well?

Cap'n Steve 01-05-2006 03:27 AM

Do you meant you want it to edit the FORUMHOME template automatically when you install it? That's really not a good idea.

It'll probably be a while before the next version. I have a long list of things that need to be added.

ChurchMedia 01-05-2006 03:29 AM

Thanks for the upgrade. I've been using the hack for a long time with v3.0.

My "Submit to Quotes" isn't working. It goes to the submit quote page, but the boxes are blank. Any ideas?

Great work!

ChurchMedia 01-05-2006 04:18 AM

Quote:

Originally Posted by ChurchMedia
Thanks for the upgrade. I've been using the hack for a long time with v3.0.

My "Submit to Quotes" isn't working. It goes to the submit quote page, but the boxes are blank. Any ideas?

Great work!

I reverted my templates for this hack and now it works! :):):)

Robbed 01-05-2006 10:12 PM

How do you make it display the newest quotes by default?

tarot 01-06-2006 03:22 PM

I have what may be a stupid question. I only want the quoter on certain areas/forums on my board. How would I go about doing this?

CtrlAltDel 01-06-2006 06:58 PM

Quote:

Originally Posted by Robbed
How do you make it display the newest quotes by default?

change the sql query to reflect what you want...tada

Quote:

Originally Posted by tarot
I have what may be a stupid question. I only want the quoter on certain areas/forums on my board. How would I go about doing this?

move the $showrandomquote variable from where it is now and put it in the template you want it to be in...tada

Robbed 01-06-2006 11:09 PM

Quote:

Originally Posted by CtrlAltDel
change the sql query to reflect what you want...tada

Which line would that be.

Cap'n Steve 01-07-2006 05:42 AM

Quote:

Originally Posted by Robbed
How do you make it display the newest quotes by default?

You can't yet. :nervous:

Quote:

Originally Posted by tarot
I have what may be a stupid question. I only want the quoter on certain areas/forums on my board. How would I go about doing this?

You'll need a template conditional for specific forums, something like this:
HTML Code:

<if condition="$_REQUEST['f']==forum_id_goes_here">$showrandomquote</if>
You'll also need to move the Random Quote plugin to the global hook and add this at the end of the plugin:
PHP Code:

$threshold ''


GamerJunk.net 01-07-2006 06:14 AM

Is there a way to used a vbphrase to post a random quote? like

[ quote51 ] or [ randomquote ]

Cap'n Steve 01-07-2006 09:09 PM

Do you mean you want to use a bbcode so it shows up in the post? It's not possible yet, but it's an interesting idea.

Warrior 01-08-2006 03:04 AM

I love watching great hacks evolve... ;)

jaks 01-09-2006 04:43 PM

Great hack,

I didn't want to have the large quote block at the top of every page and the Vbadvanced module you posted was a complete mess. No offence. It might be the diff between 3.5.2 and 3.5.3 but I started with a fresh 3.5.3 board yesterday and it simple destroyed the pages.

Anyway long story short, I disassemble the large block and created a sideblock module. It's not the prettiest thing and the code is messy but it works for me.

Using quote_randomquote and if anyone wants to do this here is how I broke it down:

PHP Code:

<tr colspan="2" ><td class="alt1">
<
a href="$vboptions[bburl]/quotes.php?do=addquote">$vbphrase[add_a_quote]</a><br />
<
a href="$vboptions[bburl]/quotes.php?do=list">$vbphrase[view_all_quotes]</a>
</
td></tr>
<
tr><td class="alt1">
<
a style="float:$stylevar[left];" href="$vboptions[bburl]/quotes.php?do=view&quoteid=$randomquote[quoteid]">#$randomquote[quoteid]</a> : $randomquote[author] <p>&quot;$randomquote[quote]&quot;</p>
        
<p style="font-weight:bold;margin-left:25%;">- <if condition="$randomquote[context]"> ($randomquote[context])</if></p>

<if 
condition="$vbulletin->options[ratequote]==3">
    
    
$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]
<
br />    
</if>
<if 
condition="$vbulletin->options[ratequote]==1">
<
br /> <style="float:$stylevar[left];">$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]</style>
    <
br />$vbphrase[rate_this_quote]: 
    <
form name="rateplus" action="$vboptions[bburl]/quotes.php">
    <
input type="hidden" name="do" id="do" value="rate" />
    <
input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]/>
    <
input type="hidden" name="vote" id="vote" value="plus" />
    <
input type="submit" value="+" class="vote" />
    </
form>
    &
nbsp;
    <
form name="rateminus" action="$vboptions[bburl]/quotes.php">
    <
input type="hidden" name="do" id="do" value="rate" />
    <
input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]/>
    <
input type="hidden" name="vote" id="vote" value="minus" />
    <
input type="submit" value="-" class="vote" /></form>
<
br />
</if>
<if 
condition="$vbulletin->options[ratequote]==2">
    <
br />
    
$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]
    <
br />$vbphrase[rate_this_quote]:</style>
    <
form name="voting" id="voting" action="$vboptions[bburl]/quotes.php">
    <
input type="hidden" name="do" id="do" value="rate" />
    <
input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]/>
    <
select name="vote" id="vote" onchange="document.voting.submit();">
    <
option value=""></option>
    <
option value="1">&nbsp;&nbsp;1&nbsp;&nbsp;</option>
    <
option value="2">&nbsp;&nbsp;2&nbsp;&nbsp;</option>
    <
option value="3">&nbsp;&nbsp;3&nbsp;&nbsp;</option>
    <
option value="4">&nbsp;&nbsp;4&nbsp;&nbsp;</option>
    <
option value="5">&nbsp;&nbsp;5&nbsp;&nbsp;</option>
    </
select>
    </
form>
    </
td></tr>
</if>
<if 
condition="$vbulletin->userinfo['permissions']['adminpermissions']">
<
tr><td  class="alt1">
<
a href="$vboptions[bburl]/quotes.php?do=delquote&quoteid=$randomquote[quoteid]">$vbphrase[delete_this_quote]</a
<
br />
<
a href="$vboptions[bburl]/quotes.php?do=editquote&quoteid=$randomquote[quoteid]">$vbphrase[edit_this_quote]</a>
</
td></tr>
</if> 

That is the whole template minus a bunch of tds. The if statements are all intact and I switch the Phrases to suit my purpose as you will see in the attached screen shot. I moved the author to the top beside the Quote # and will use it as a title. I'll use the context as author or a link. Still have some touchups to do.

Cheers Jaks

jaks 01-09-2006 06:36 PM

Found an error in 3 templates

If you goto any Quoteit page you will see the page title is messed up.

PHP Code:

$vbulletin->options[bbtitle

should be
PHP Code:

$vboptions[bbtitle

It shows as Array[bbcode] in the browser because the tag use I believe is the ones used in VB 3.0.xx


These 3 templates need to be editted ( same edit in each one in the same place.)
quote_delquote
quote_addquote
quote_listquote

Find (right near the very top of each template)
PHP Code:

<title>$vbulletin->options[bbtitle

replace with
PHP Code:

<title>$vboptions[bbtitle

Now i need some help. I want to parse bbcode in context field output. I can't for the life of me remember how to do that.

Great hack I'd click install twice it I could :D
Jaks

tarot 01-10-2006 12:36 AM

Quote:

Originally Posted by Cap'n Steve
You can't yet. :nervous:



You'll need a template conditional for specific forums, something like this:
HTML Code:

<if condition="$_REQUEST['f']==forum_id_goes_here">$showrandomquote</if>
You'll also need to move the Random Quote plugin to the global hook and add this at the end of the plugin:
PHP Code:

$threshold ''


Sorry to be so dumb but I'm really new to this thing. Which template do I put the template conditional in the Forumdisplay or somewhere else?

And the Random Quote plugin to global hook where does that go and do I remove it from where it is now or copy it to the new location? Where is it now?

jaks 01-10-2006 01:49 AM

That conditional statement goes in the forumdisplay template not to sure about the other.

Cap'n Steve 01-10-2006 03:51 AM

tarot - I think it is the Forumdisplay template. As for the second step, go to your Plugin Manager, edit the plugin called "Random Quote", change the hook to "global_start" and add that piece of code at the end.

jaks - Parsing bbcode would require you to modify the code, and I can't really help you since I haven't gotten around to learning how to do it myself.


All times are GMT. The time now is 04:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01825 seconds
  • Memory Usage 1,930KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (9)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete