vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   QuoteIt! Quote Management System v1.2 (https://vborg.vbsupport.ru/showthread.php?t=62470)

magnus 03-16-2004 12:37 AM

Quote:

Originally Posted by DrkFusion
Thanks for this hack! Works great on a friends board, I modified it to take quotes from this website which provides RSS feeds of quotes. I developed an importer which takes the feeds and puts them into a database for this hack, I might release it as an addon. Doesn't seem stable as there is no interface for it pure backend.

This hack seems to be working fine, and is an asset since I had this incorporated on the main portal page.

Regards & Nice job!

DrkFusion, I'm glad you like the hack. Thanks! ;)

Also, I've noticed a couple of you have implemented this into your portals. Perhaps a few other people could benefit? If you'd like, you could post the modifications required here as per which portal (vbIndex, vBadvanced, etc..) and I could provide a link to them in the first thread.

Or, you could release them in the Add-On section. I have an upgrade coming out soon, which will include the moderating of posts, list sorting and user options toggle. I've decided to release these now, as their pretty much completed rather than waiting for v2.0.

Instead, v2.0 will have a few more configurations and user/admin-options and from the response so far, categories, lol. ;)

DrkFusion, I like your idea of incorporating RSS feeds. That's a great idea. :D

daFish 03-16-2004 05:48 AM

Quote:

Originally Posted by magnus
Hrm.. I'll consider categories, we'll see.

As for when to display, do you mean it displays 1 quote per day/week/month rather than randomly changing every refresh?

I mean if day is sunday, show only quotes from category X otherwise show from all categories.

magnus 03-16-2004 05:31 PM

v1.1 -> v1.2 UPGRADE INSTRUCTIONS

1. Download quoteit1.2.zip from the first post and uncompress it.

2. Upload quotes.php to your forum ROOT directory, overwriting the existing one.

3. Upload quoteadmin.php to your ADMINCP directory.

4. Run the following SQL queries:
[SQL]
INSERT INTO `setting` (`varname` , `grouptitle` , `value` , `defaultvalue` , `optioncode` , `displayorder` , `advanced` , `volatile` ) VALUES ( 'moderatequotes', 'forumhome', '0', '0', 'yesno', '6', '0', '1');
[/SQL]
[SQL]
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'setting_moderatequotes_title', 'Disable Quote Moderation?', '5000');
[/SQL]
[SQL]
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'setting_moderatequotes_desc', 'Selecting "No" will require all quotes to be approved before being displayed.', '5000' );
[/SQL]
[SQL]
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'quote_x_has_been_approved', 'Quote ({1}) has been approved.', '9000' );
[/SQL]
[SQL]
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'quote_x_has_been_deleted', 'Quote ({1}) has been deleted.', '9000' );
[/SQL]
[SQL]
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'moderate_quotes', 'Moderate Quotes', '9' );
[/SQL]
[SQL]
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'no_quotes_awaiting_moderation', 'No Quotes awaiting moderation', '2' );
[/SQL]

5. Make the following FILE edits:

5a. In INDEX.PHP:

Find:
PHP Code:

    $result_quote $DB_site->query("
        SELECT * FROM quotes ORDER BY rand() LIMIT 1
    "
); 

REPLACE with:
PHP Code:

    $result_quote $DB_site->query("
        SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
    "
); 

5b. In ADMINCP/INDEX.PHP:

Find:
PHP Code:

        construct_nav_group($vbphrase['moderation'], '<hr />'"$df"); 

Add ABOVE:
PHP Code:

        construct_nav_option($vbphrase['moderate_quotes'], "quoteadmin.php?do=moderate"); 

Done !!

You will now have a new option under the "Moderation" category in the AdminCP, titled "Moderate Quotes". Quote moderating can be toggled via vBulletin Options -> Forums Home Page Options -> Disable Quote Moderation?

Sting 03-16-2004 08:04 PM

hey i get this error while trying to do an install
Code:

Parse error: parse error in /home/###/public_html/forum/admincp/install_quoteit.php on line 325

magnus 03-16-2004 08:47 PM

Quote:

Originally Posted by Sting
hey i get this error while trying to do an install
Code:

Parse error: parse error in /home/###/public_html/forum/admincp/install_quoteit.php on line 325

Woops, my fault. Re-download the .ZIP in the first post. ;)

Giveit2u43 03-16-2004 09:02 PM

vbindex integration..

in vbindex.php (or whatever you renamed it to) find:
Code:

'vbindex_customblock_6'
and change it to:
Code:

'vbindex_customblock_6',
'randomquote'

next find:
Code:

// ## USERS IGNORE ##
if (trim($bbuserinfo['ignorelist'])) {
        $ignorelist = 'AND thread.postuserid NOT IN ('.str_replace(' ', ',', $bbuserinfo['ignorelist']).')';
}

and add BENEATH it:
Code:

$result_quote = $DB_site->query("
                        SELECT quotes.*,user.username AS quotename FROM quotes AS quotes
                        LEFT JOIN ".TABLE_PREFIX."user AS user ON (user.userid = quotes.userid)
                        ORDER BY rand() LIMIT 1
                ");
       
                while ($quote = $DB_site->fetch_Array($result_quote)) {
                        $randomquote[quoteid] = $quote[quoteid];
                        $randomquote[quote] = $quote[quote];
                        $randomquote[author] = $quote[author];
                        $randomquote[userid] = $quote[userid];
                        $randomquote[username] = $quote[quotename];
                        $randomquote[approved] = $quote[approved];
                }
                $DB_site->free_result($result_quote);
       
                eval('$showrandomquote .= "' . fetch_template('randomquote') . '";');

Then edit your VBINDEX template and place:
Code:

$showrandomquote
after:
Code:

$home[news]
You can actually place $showrandomquote anywhere you`d like the quotes to show up..

gmarik 03-17-2004 03:17 AM

Nice one, Giveit!
Any ideas about the category option?

magnus 03-17-2004 01:15 PM

Quote:

Originally Posted by gmarik
Nice one, Giveit!
Any ideas about the category option?

Yup, categories are in the works as we speak. ;)

Acido 03-17-2004 06:34 PM

where i can place the query code in vbadvance homepage ?

I'm not sure iditing adv_index.php, can you help me ?

magnus 03-17-2004 07:12 PM

Quote:

Originally Posted by Acido
where i can place the query code in vbadvance homepage ?

I'm not sure iditing adv_index.php, can you help me ?

I'm not too familiar with vBadvanced, however, you should just be able to place the $result_quote call anywhere near the beginning of the main call, and call it with the $showrandomquote in one of the templates.

You'll need to fiddle with it, because like I said, I don't use vBadvanced.


All times are GMT. The time now is 06:01 AM.

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.01918 seconds
  • Memory Usage 1,765KB
  • 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
  • (8)bbcode_code_printable
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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