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)

Logician 09-07-2004 09:37 AM

Magnus thx for sharing the hack. It is a big hit which is always requested. :)

I have a technical suggestion though: Using
PHP Code:

ORDER BY rand() LIMIT 1 

in a SQL query is not the perfect way of getting a single quote (altough simplest). It may run fine in many instances but if your board has a heavy traffic (ie the query runs a lot) and your quote list is also long, it creates a big load on the server as rand() function attempts to create a copy of entire quote table on DB everytime it runs. Kurafire's vb2 version had the same problem and IMO it may be better if you implement a different algorithm to grab the quotes evertime it is called. My 2 cents.

calvin.krause 09-09-2004 03:39 PM

I have modified this hack under vB 3.0.3 to allow administrators to edit a quote that is already in the database directly from the ForumHome.

I did it for my own forum, which uses a modified version of QuoteIt to post random lyrics in my forum, which is a discussion about Bob Dylan, so I would have to undo some changes to post it here. If you really really want it, PM me and I will post the intructions on how to add EDIT capability to this hack.

integra99 09-14-2004 07:49 PM

Quote:

Originally Posted by venomx
Seems vB3.0.3 is different.. mine is

print_cells_row(array(
$vbphrase['new_posts_today'], vb_number_format($newposts['count']),
$vbphrase['new_threads_today'], vb_number_format($newthreads['count']),
$vbphrase['unique_registered_visitors_today'], vb_number_format($users['count']),
), 0, 0, -4, 'top', 1, 1);

That's fine, still add
Code:

print_cells_row(array(
                "", "",
                "Quotes Awaiting Moderation" . construct_link_code($vbphrase['view'], "http://www.kydsm.com/admincp/quoteadmin.php?do=moderate"), vb_number_format($quotecount['total']),
        ), 0, 0, -4, 'top', 1);

After that.

alzibub 09-15-2004 10:05 AM

I had the same issue as bitg - did the edit any phrase - save - then it was all there..

Awesome hack - thanks much to the creator :)

Warlord 09-15-2004 04:50 PM

Looks like a good hack.. wasn't there a similiar one for vb 2 at one time?

I'll likely install this when I get home tonight.

Neutral Singh 09-16-2004 04:16 AM

""
( | | ) -

I am getting this blank screen... :disappointed: and there seems to no option to edit or save. Is this version of hack incompatible with vB 3.0.3 ?

Warlord 09-18-2004 07:46 PM

<font size="7">Magnus please update your instructions</font>.............

And let people that are too lazy to search the thread know they have to manually go in, select the phrases and save it for the hack to work. I've seen numerous people post about how the hack doesn't work for them and I've seen the answer posted again and again.

venomx 09-24-2004 01:42 AM

Any Mod like this one
https://vborg.vbsupport.ru/showthread.php?t=66265 for this?

venomx 09-24-2004 02:45 AM

Quote:

Originally Posted by nineball
Here is a module you can upload to your modules directory to add a quote block to the latest version of vbadvanced

Still new to adding Mods to CMPS, can you tell me what else Ill need to add this please?

nineball 09-24-2004 04:12 AM

This is good as a center block. Just go into add a module, call it quote

use quote.php as the file

use randomquote as the template used

Neutral Singh 09-24-2004 12:48 PM

it works gr8 !!! thanks

Tessa 09-25-2004 12:12 AM

I finished the intructions but I don't see it anywhere on my homepage or forum...?
using vb version 3.0.3

Tessa 09-25-2004 02:12 AM

Quote:

Originally Posted by Tessa
I finished the intructions but I don't see it anywhere on my homepage or forum...?
using vb version 3.0.3


Clearifying a little, I don't see any thing where a user can add a quote anywhere. Nor any type of box where the quote would be shown.

And for the record, I went through all 12 pages of this thread to see if there already was an answer to my problem, I`m blind now but at least I`m not repeating anything.

KW802 09-27-2004 06:37 PM

To allow your administrator group to bypass being moderated (assuming that you have quotes moderation turned on in your ACP) make the following changes to quotes.php......

Find....
Code:

if (empty($author) OR empty($quote))
{
eval (print_standard_error('error_requiredfields'));
}

And below it add:
Code:

if (!$bbuserinfo['permissions']['adminpermissions'])
{ // Use the moderation option set in the ACP
        $moderate_quote = $vboptions[moderatequotes];
}
else
{ // Do not moderate administrator quotes
        $moderate_quote = 1;
}

Right below that you should see....
Code:

$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "quotes (quote, author, userid, approved) VALUES ('" . addslashes($quote) . "', '" . addslashes($author) . "', $bbuserinfo[userid], $vboptions[moderatequotes])
");

Change the word "$vboptions[moderatequotes]" to "$moderate_quote" and try it out.

58sniper 09-27-2004 08:10 PM

Quote:

Originally Posted by KW802
To allow your administrator group to bypass being moderated (assuming that you have quotes moderation turned on in your ACP) make the following changes to quotes.php......

Find....
Code:

if (empty($author) OR empty($quote))
{
eval (print_standard_error('error_requiredfields'));
}

And below it add:
Code:

if ($bbuserinfo['usergroupid'] == 6)
{ // Do not moderate administrator quotes
$moderate_quote = 1;
}
else
{ // Use the moderation option set in the ACP
$moderate_quote = $vboptions[moderatequotes];
}

Right below that you should see....
Code:

$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "quotes (quote, author, userid, approved) VALUES ('" . addslashes($quote) . "', '" . addslashes($author) . "', $bbuserinfo[userid], $vboptions[moderatequotes])
");

Change the word "$vboptions[moderatequotes]" to "$moderate_quote" and try it out.


Hmmm... that didn't seem to do it for me. No noticeable change. Entries by the admin (me) still are stuck in the moderate queue.

I haven't looked into this much, but.....

BTW - My account is a member of the administrators group, but that's NOT my primary usergroup. Dunno if that matters.

KW802 09-27-2004 08:38 PM

Quote:

Originally Posted by 58sniper
BTW - My account is a member of the administrators group, but that's NOT my primary usergroup. Dunno if that matters.

I haven't played around with the user being in multiple groups yet; when I get home tonight I'll check it out to see if there's a quick fix.

Edit: OK, I changed my first post above. I wasn't thinking abstract enough..... going by the explicit usergroup is too literal.... if you have permissions to moderate the quotes then there is no point in having your own submissions sent to moderation. Try the revised code above. :o

58sniper 09-27-2004 09:50 PM

Okay, that didn't work either. But what did work was changing
PHP Code:

if ($bbuserinfo['usergroupid'] == 6

to this
PHP Code:

if ($bbuserinfo['usergroupid'] == || $bbuserinfo['usergroupid'] == 9

Since 9 is the one that is the primary usergroup for my account.

KW802 09-27-2004 10:59 PM

Quote:

Originally Posted by 58sniper
Okay, that didn't work either. But what did work was changing
PHP Code:

if ($bbuserinfo['usergroupid'] == 6

to this
PHP Code:

if ($bbuserinfo['usergroupid'] == || $bbuserinfo['usergroupid'] == 9

Since 9 is the one that is the primary usergroup for my account.

HHmm.... if that didn't work, have you tried deleting any quotes yet? ;) That command is the same command used in the rest of the script to determine if the person has access to moderate quotes or not. Did you change the entire block or just the first line?

58sniper 09-27-2004 11:08 PM

Quote:

Originally Posted by KW802
HHmm.... if that didn't work, have you tried deleting any quotes yet? ;) That command is the same command used in the rest of the script to determine if the person has access to moderate quotes or not. Did you change the entire block or just the first line?


Just the first line. I can moderate, delete, etc with that same account. No problem.

KW802 09-27-2004 11:58 PM

Quote:

Originally Posted by 58sniper
Just the first line.....

I should've specified "copy, paste, & replace all of the lines otherwise the logic will be backwards, anybody who has moderation privileges would be controlled through the ACP and everybody else would've been un-moderated." :p

58sniper 09-28-2004 01:50 AM

Quote:

Originally Posted by KW802
I should've specified "copy, paste, & replace all of the lines otherwise the logic will be backwards, anybody who has moderation privileges would be controlled through the ACP and everybody else would've been un-moderated." :p

Ah - what I mean was that was the only line that *I* changed that made it work. I did replace the code per your instructions. When THAT didn't work, I changed the one line I mentioned. Sorry I wasn't clear.

58sniper 09-29-2004 02:38 AM

Okay, I seem to have hit a snag. Seems that the quotes aren't very random for me. I get the same quote each time. If I delete that quote, I'll get a new quote, but then that same new quote each time.

Anyone seen this?

KW802 09-29-2004 05:36 PM

Quote:

Originally Posted by 58sniper
Okay, I seem to have hit a snag. Seems that the quotes aren't very random for me. I get the same quote each time. If I delete that quote, I'll get a new quote, but then that same new quote each time.

Anyone seen this?

How many quotes have you entered so far? Might be just a low base number scenario.

58sniper 09-29-2004 10:51 PM

I have about 35 entered so far.

KW802 09-29-2004 11:06 PM

Quote:

Originally Posted by 58sniper
I have about 35 entered so far.

OK, so much for my theory. :p Is there a URL to check it out?

Borgs8472 09-30-2004 11:42 PM

I've got about 300 now.

I would like this system a little better if there wasn't a "Random Quote" bar, and the whole business took up less space. It's nice, but it's pushing my forum lists downwards. :(

58sniper 10-01-2004 12:57 AM

Quote:

Originally Posted by wordforge.net
I've got about 300 now.

I would like this system a little better if there wasn't a "Random Quote" bar, and the whole business took up less space. It's nice, but it's pushing my forum lists downwards. :(

You can always edit the template to display it however you want it. The first thing I did was rip out the table in the middle of the template and move things around a little. But the fact that it's in a template make modifying its appearance easy.

kizzmet 10-06-2004 10:48 PM

Quote:

Originally Posted by KW802
To allow your administrator group to bypass being moderated (assuming that you have quotes moderation turned on in your ACP) make the following changes to quotes.php......

Find....
Code:

if (empty($author) OR empty($quote))
{
eval (print_standard_error('error_requiredfields'));
}

And below it add:
Code:

if (!$bbuserinfo['permissions']['adminpermissions'])
{ // Use the moderation option set in the ACP
        $moderate_quote = $vboptions[moderatequotes];
}
else
{ // Do not moderate administrator quotes
        $moderate_quote = 1;
}

Right below that you should see....
Code:

$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "quotes (quote, author, userid, approved) VALUES ('" . addslashes($quote) . "', '" . addslashes($author) . "', $bbuserinfo[userid], $vboptions[moderatequotes])
");

Change the word "$vboptions[moderatequotes]" to "$moderate_quote" and try it out.


This worked for me, thank you!

kizzmet 10-06-2004 10:54 PM

Quote:

Originally Posted by KW802
For anybody else in the same position as above, the steps I took/had to take on a VB 3.0.3 & vBadvanced CMPS 1.0.0 configuration were....
  • Do Step #1 from the installation instructions
  • Do Step #2 from the installation instructions
  • Do Step #3 from the installation instructions
  • Do Step #4b from the installation instructions
  • Do Step #6 from the installation instructions
  • Upload the PHP file from Nineball
  • Do the phrase manager trick by Platinumgamer
  • Modified the randomquote template to the look & feel of the rest of my generic vBa CMPS modules (essentially give it the outside border but not on the inside cells; accomplished by doing an inner table)....
    Code:

    <table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
    <thead>
            <tr>
            <td class="tcat" colspan="2">
                    <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_randomquote')">
                    <img id="collapseimg_forumhome_randomquote" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomquote].gif" alt="" border="0" />
                    </a>
                    $vbphrase[random_quote]
            </td>
            </tr>
    </thead>
    <tbody id="collapseobj_forumhome_randomquote" style="$vbcollapse[collapseobj_forumhome_randomquote]">
            <tr>
            <td class="alt1">
                    <table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" width="100%">
                    <tr>
                            <td class="alt1" align="left" colspan="2">
                            <i>"$randomquote

           
    Quote:

           
           
                   
           
           

                           

                           
                                    "</i>
                            </td>
                    </tr>
                    <tr>
                            <td class="alt1 smallfont" align="left">
                            <if condition="$bbuserinfo['userid']">(<a href=$vboptions[bburl]/quotes.php?do=addquote>$vbphrase[add_a_quote]</a><if condition="$bbuserinfo['permissions']['adminpermissions']"> | <a href="$vboptions[bburl]/quotes.php?do=delquote&quoteid=$randomquote[quoteid]">$vbphrase[delete_this_quote]</a></if> | <a href="$vboptions[bburl]/quotes.php?do=list">$vbphrase[view_all_quotes]</a>)</if>
                            </td>
                    <td class="alt1" align="right">
                            - <b>$randomquote[author]</b>
                            </td>
                    </tr>
                    </table>
            </td>
            </tr>
    </tbody>
    </table>
    <br />
                           
                           

                   


Quote:

I need to tweak the rest of the templates yet but that's minor. The above should only take about 10-15 minutes to get you up & running with vBa CMPS.


I am running CMPS and I followed this yet it still does not appear on the VB Homepage. I also added the module and designated ramdonquote for the template. Any help please?

xug 10-11-2004 02:46 AM

I'm not sure if it's already mentioned, but when you set '$perpage = 10' or whatever number you want it should show that number per page, but it doesn't, it even skips some quotes to be projected while they are there in the database!!!

any solution for this?

Spookysalem 10-19-2004 11:19 AM

i have installed this and it only works on one of my styles

i have edited the templates....i have the welcome panel installed too.

please help.

Spookysalem 10-29-2004 03:12 PM

I need some help please..i sorted out my last post and all worked fine.

However i had some problems today on my forum and now it does not show at all. there is no option to turn it on in the admin panel options part. According to phpmyadmin all the tables are there....

please can anyone help me get it back...

thanks

pixelpunk 11-03-2004 08:14 PM

Is there any chance of modifying this so when you are authenticating quotes it shows them in a editable box? Maybe I'm just a perfectionist but I hate it when a quote has words spelled wrong or has double quotations.

Spyke 11-04-2004 12:47 AM

Hi, nice mod :)

Though, i'm having alittle trouble and i think it's with the phrases. I did all the edits and uploaded all the files but it's not displaying any text on the forum home page (http://eternal-realm.net/vb/ to see) and the option Moderate Quotes doesn't work. It's an empty slot and directs to an empty page.

Any Idea's?

thanks.

urmyantichrist 11-11-2004 05:46 PM

Quote:

Originally Posted by Spyke
Hi, nice mod :)

Though, i'm having alittle trouble and i think it's with the phrases. I did all the edits and uploaded all the files but it's not displaying any text on the forum home page (http://eternal-realm.net/vb/ to see) and the option Moderate Quotes doesn't work. It's an empty slot and directs to an empty page.

Any Idea's?

thanks.

I'm having this same problem... I went to your site and noticed you got it working, mind telling me how? Thanks!

venomx 11-11-2004 09:31 PM

Try opening any phrases to edit it and then just save it. This worked for me when I had a few that wouldnt show.

Thanatos 11-22-2004 05:09 AM

I needed Quotes added to my vBadvanced Moderation module and since I couldn't find it anywhere, I kinda hacked one together.

I'm not a coder..and don't really 'get' php too well...but it worked for me, so here ya go.

trackpads 11-22-2004 10:05 AM

Excellent Hack! Installed

trackpads 11-22-2004 10:37 AM

Quick question, is there a way to give users points for Ushop with this? I am unsure as to what the code would be to add +1 to the uttpoints column in the user table.

Thanks again,

-Jason

urmyantichrist 11-22-2004 08:46 PM

[QUOTE=Giveit2u43]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') . '";');
                       
                       

               


                       
                       

               


Quote:

Quote:


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..
I can't get this to work... No errors, just not getting ANYthing! Any tips?


All times are GMT. The time now is 10:19 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.01994 seconds
  • Memory Usage 1,878KB
  • 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
  • (17)bbcode_code_printable
  • (5)bbcode_php_printable
  • (21)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