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)

CtrlAltDel 03-09-2005 06:40 PM

problem is your database names are incorrect

you have one database
studi_cafe and then you have another thestudi_cafe

which one is correct, and where is the other one coming from?

If the databases are right, check your config.php for proper table prefix settings

CtrlAltDel 03-09-2005 07:23 PM

Quote:

Originally Posted by venomx
I have this running fine on 3.0.7

Ok I looked at the upgrade to 3.0.7 (now that another is probably about to come out)

You need to run my 5->6 fix, and then fix your templates and make sure they are setup how you want. I ran into an instance of my navbar template being reset.

ncangler 03-09-2005 08:56 PM

I only have one database 'thestudi_cafe'. I have no idea where the other one is showing up from. That was a typo in my original email that I just saw and fixed. To recap...one database (thestudi_cafe) which contains 'vb_quotes' field. Thanks for your help.
Randy

Quote:

Originally Posted by CtrlAltDel
problem is your database names are incorrect

you have one database
studi_cafe and then you have another thestudi_cafe

which one is correct, and where is the other one coming from?

If the databases are right, check your config.php for proper table prefix settings


ncangler 03-09-2005 10:43 PM

I checked the config.php setup and it was all correct. The database prefix was correctly set as 'vb_'. I don't know what the problem could be.

Quote:

Originally Posted by CtrlAltDel
If the databases are right, check your config.php for proper table prefix settings


CtrlAltDel 03-10-2005 04:15 AM

that leads me to believe that you should redownload and install the quotes.php file

ncangler 03-10-2005 09:36 AM

I redownloaded the quotes.php file and replaced in the forum root folder. Same problem, no change.

Quote:

Originally Posted by CtrlAltDel
that leads me to believe that you should redownload and install the quotes.php file


ncangler 03-10-2005 09:43 AM

The problem appears to be that 'quotes' is trying to access a table called 'quotes' in the database 'thestudi_cafe' and there isn't one because the table is called 'vb_quotes', as the 'vb_' prefix is used on all my MySQL tables for the forum. So where in the program is the path information for the tables that be missing the database prefix?

I am a novice at this stuff but I think you can see by my sites that I've figured out how to implement the modifications you guys that are much more experienced and intelligent than I have come up with (for which I am very grateful!). So I don't think I've screwed something in the installation as I've followed the instructions to the 't'.

Thanks for your help in finding this. I really want to get this working for my members.

CtrlAltDel 03-10-2005 08:08 PM

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.

ncangler 03-10-2005 09:31 PM

I just tried that and it still doesn't work. How can I uninstall the whole system? I'm getting database errors from visitors trying to click on the "submit post to the quotes database." Thanks.

kealoha 03-11-2005 06:07 AM

I'm getting the same error as ncangler :(

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


iamboard 03-18-2005 04:47 PM

I have a list of about 250 quotes that I want to put in. Is there a way to do an import if I can put these quotes into some time of importable format?

Thanks

CtrlAltDel 03-19-2005 05:57 AM

Yes the easiest way is to format them as SQL statements and then insert them with phpmyadmin or however you like to run sql commands against your database.

If you would like help writing out a SQL statement (you could just export your current quotes table to see what it would look like) I could help you out.

iamboard 03-19-2005 04:38 PM

Quote:

Originally Posted by CtrlAltDel
Yes the easiest way is to format them as SQL statements and then insert them with phpmyadmin or however you like to run sql commands against your database.

If you would like help writing out a SQL statement (you could just export your current quotes table to see what it would look like) I could help you out.

ctrlaltdel,

The quotes I have right now are all simply individual sentences. I have no experience with sql. I was hoping to put them maybe in a comma delimited format or something like that and import them. However, maybe a cut and paste method would be the easiest since I don't get very deep technically....your thoughts?

Thanks

seangworld 03-22-2005 12:17 AM

OK, ive gone thru some re-installing of my vbulletins a few times cuz i cant seem to decide what domain i really wanna use, and so whatever. lol

but basically, i JUST got around to upgrading my vb to 3.0.7 and re-installing this hack (1.2) and it works just fine. thought i'd let everyone know that.

also, for those that are writing the instructions and getting any upgrades to this hack ready in the future, it'd be nice if the instructions included step 7: edit and save any of the phrases without changing anything and then hit refresh on your forum and everything will be working fine.

ya, that woulda saved me about 15 minutes of looking for the answer to my question, lol, which i found on page 4 in the replies to this thread.

cyaz!

Dark Aura 03-22-2005 05:17 PM

Okay i tried to install this, but I have never run queries before why do I keep getting this error?

An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'http://www.silent-imperfection.net/admincp/install_quoteit.php'

I have installed hacks before just not ones with queries, and they all work fine :confused:

Marco van Herwaarden 03-22-2005 06:50 PM

The line you are showing is not a query, but the path to the install script.

Dolamite 03-27-2005 04:01 AM

anyone seen this one yet?

Quote:

Database error in vBulletin 3.0.7:

Invalid SQL:
CREATE TABLE quotes (
`quoteid` int(10) unsigned NOT NULL auto_increment,
`quote` mediumtext NOT NULL,
`author` mediumtext NOT NULL,
`userid` int(10) unsigned NOT NULL default '0',
`approved` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`quoteid`,`quoteid`),
KEY `approved` (`approved`)
) TYPE=MyISAM AUTO_INCREMENT=1

mysql error: Duplicate column name 'quoteid'

mysql error number: 1060

Marco van Herwaarden 03-27-2005 06:23 AM

You have the column 'quoteid' 2 times in the primary key.

Dolamite 03-27-2005 12:35 PM

heh... marco... this ain't my code man :P i was just following the installation instructions....

it does seem to be there twice though.... not my doing..... but removing that 2nd instance seems to have solved the problem... so thanks for your help

Dolamite 03-27-2005 01:34 PM

well i said it was working.... but none of the admin menus got installed ... i've beening going thru adding some of this stuff manually.....

one thing i can't get is... how to show it on pages other than FORUMHOME.... such as my portal for example....

Dolamite 03-27-2005 03:13 PM

ok... 3 posts in a row (sorry)... but just wanted to give more info.... as i've tried everything i can think of and still no luck....

i use vbadvanced and i edited the navbar where the quotes show up there. They only show up once you are on the FORUMHOME (index.php), but do not show up on my main page (which i use portal.php).... I can get normal text to show up ex: TEST $showrandomquote

TEST will show up on the main page of the portal, and then if you click to the forums page then you see TEST + the quote....

i've looked through phrases + templates etc.... I can't figure out why it simply will not just show up....

any help appreciated...

Dolamite 03-27-2005 05:49 PM

the conversation with myself continues.....

it seems the phrases didn't get installed properly by the install script....

does anyone have a list of the phrases, perhaps i could install them manually....

ok actually maybe they are installed..... but they can't read from .... or soemthing

man this hack needs updated....

Dark Aura 03-27-2005 06:42 PM

I have the same error as you Dolamite, but I don't understand installing hacks very well I am new to this so I need simply instructions to fix it *blush*...

Dolamite 03-27-2005 06:49 PM

what i can't understand is why the phrases aren't being read.... they are there in the hprase manager but anything related to this hack which uses a phrase is just blank....

Dolamite 03-27-2005 08:16 PM

i just ran all the queries listed for upgrading.... just in case... still no luck...

i think i'm going to have to not use this hack..... anyone know of another quote hack that works with 3.0.7?

i could probably get a book on programming php.... read it.... write my own hack..... before this one gets updated :P

j/k but it is rather frustrating.... i've been at this most of an entire day....will soembody please...... save me....

venomx 03-27-2005 08:22 PM

I have it working fine on 3.0.7

Try editing a phrase then saving it. You dont have to make changes.

Dolamite 03-27-2005 08:45 PM

i did that for a few... and does seem that it might work... however searching for some of them has no results....i'm not even sure they are phrases i guess.... a complete list of them all would be nice

$randomquote[author]
$randomquote[quote]

neither of those produced a result when searching for phrases.....

Dolamite 03-27-2005 10:08 PM

did a complete re-install of this hack.... and did the manual editing as you suggested.... and its working.....

i am still having trouble getting $showrandomquote to work inside the navbar template though... if anyone has thoughts on that....

and sorry for .... spammin....this thread to death...

seangworld 03-28-2005 03:11 AM

ok, i waited for something like a week to see if my quoteit will start working and whatnot on my forum, plus i was adding a few quotes of mine into the db via my forum.

problem: the quotes ain't changing everyday, or at all for that matter.

missing a cron job or what? if so, it's not in the zip and i dont know how to write cron jobs. please let me know how to fix this minor problem. :P

Dolamite 03-28-2005 04:27 PM

ok i got it.... for anyone else who might want to do this....

below require_once('./global.php');(in your portal.php, adv_index.php whatever)

add:

[QUOTE] // ### QUOTEIT ################################################## #######
if ($vboptions['showquote'])
{
$result_quote = $DB_site->query("
SELECT * FROM quotes WHERE approved=1 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[approved] = $quote[approved];
}
$DB_site->free_result($result_quote);

eval('$showrandomquote .= "' . fetch_template('randomquote') . '";');

}

eval('$navbar = "' . fetch_template('navbar') . '";');
that last bit is what finally did it for me:

eval('$navbar = "' . fetch_template('navbar') . '";');


All times are GMT. The time now is 04:59 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.01478 seconds
  • Memory Usage 1,842KB
  • 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
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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