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)

ncangler 03-11-2005 03:51 PM

Based on the error message:
Database error in vBulletin 3.0.6:
Invalid SQL:
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
mysql error: Table 'thestudi_cafe.quotes' doesn't exist
mysql error number: 1146


I wonder if the coding is pulling the 'database name' instead of the 'database prefix' (vb_). I'd really like to get this fixed but right now I'm just getting database errors. So I need to uninstall the hack. What files or database additions are made by the install program?

Thanks.

Quote:

Originally Posted by CtrlAltDel
this script doesn't explicitly define the table prefix in the code. it reads the prefix from your config file. Best bet is to go replace all the 'TABLE_PREFIX' with what your table prefix really is. Not sure how else to help you on the table prefix error.


Marco van Herwaarden 03-11-2005 03:59 PM

Edit your index.php.
find:
PHP Code:

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

change to:
PHP Code:

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

That's the only place i could find where the coder missed a table prefix, for the rest all looked nice coded.

Marco van Herwaarden 03-11-2005 03:59 PM

PS I have feeling that if you would read this thread from teh beginning, that this solution would already be there somewhere.

ncangler 03-11-2005 06:53 PM

That didn't do it.

BTW I have read this thread start to finish. But I took your advice and went through them all again. I came across one post about earlier MySQL versions with an attached code fix to work on the earlier versions. After making that change everything worked! Apparently all of us that are/were having the 'databasename'.quotes doesn't exist error just have earlier versions of MySQL.

Thanks to all for your help.

Quote:

Originally Posted by MarcoH64
PS I have feeling that if you would read this thread from teh beginning, that this solution would already be there somewhere.


Marco van Herwaarden 03-11-2005 07:09 PM

Well i'll leave it to magnus then, but i think this is what should have fixed it

ncangler 03-11-2005 09:19 PM

Marco, I reloaded clean files, went through the install again, made your suggested change, all with the same result. Then it all started working about five minutes ago. Bizarre! Only a couple of minor quirks to fix but it seems to be working. It apparently was the earlier version of MySQL fix.

Quote:

Originally Posted by MarcoH64
Well i'll leave it to magnus then, but i think this is what should have fixed it


ncangler 03-11-2005 09:23 PM

Does anyone else have the Add A Quote entry screen layout that mine is showing in the attached image? Seems like the first entry box should be located beside the "Quote Author" item.

ncangler 03-12-2005 12:02 AM

I went into the addquote template and changed the code to clean this up. It now looks like the window below.

Quote:

Originally Posted by ncangler
Does anyone else have the Add A Quote entry screen layout that mine is showing in the attached image? Seems like the first entry box should be located beside the "Quote Author" item.


iamboard 03-17-2005 04:40 PM

Magnus,

I saw this on someone's site that uses vBadvanced and it looks very interesting. Is it easy for someone to add their own quotes and have those pull automatically and change daily? or do they pull randomly?

Thanks
J

ncangler 03-17-2005 10:00 PM

It is setup for registered members and admins to add quotes. Quotes that members add go into a moderation que and are not posted to confirmed by the admin, although you can turn the moderation feature off if you desire. The quotes are setup to randomly change with page refreshes.

Quote:

Originally Posted by iamboard
Magnus, I saw this on someone's site that uses vBadvanced and it looks very interesting. Is it easy for someone to add their own quotes and have those pull automatically and change daily? or do they pull randomly?

Thanks
J



All times are GMT. The time now is 04:09 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.01352 seconds
  • Memory Usage 1,752KB
  • 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_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