Subject: DailyQuote Plugin

Posted on: 24/11/05 03:42am
By: Anonymous

I've installed all of the files to the correct directories, and I'm seeing the option to install this plugin under the plugin admin. When I click install, it reverts me back to the front page of the site and does not install.
The link to my site is here:
http://www.warhammeroffline.com/

Any idea what I may have done wrong?
Appreciate any help~
Thank you


DailyQuote Plugin

Posted on: 24/11/05 04:24am
By: machinari

this install script has yet to be upgraded to work with register globals off.
in your admin/plugins/dailyquote/install.php find
if ($action == 'install') {

and change to
if ($_POST['action'] == 'install') {


Do the same for the uninstall line just a few lines below that one.
all should be well.

DailyQuote Plugin

Posted on: 24/11/05 11:01am
By: Anonymous

Hmm I made the change and its giving me the same result:
A kick back to the front page of the site and it doesn't install.
There's no error, nothing.

DailyQuote Plugin

Posted on: 24/11/05 12:03pm
By: machinari

OH!
make the same changes as above, but use $_GET instead of $_POST.

DailyQuote Plugin

Posted on: 24/11/05 12:25pm
By: Anonymous

I changed it to:
if ($_GET['action'] == 'install') {


Still, same result. I wonder what I did wrong.

DailyQuote Plugin

Posted on: 24/11/05 12:31pm
By: machinari

try refreshing your cache.. what version of Gl are you running?

DailyQuote Plugin

Posted on: 24/11/05 12:38pm
By: Anonymous

Um, its 1.3.11 and my register globals are on. Didn't they have to be before version 1.4?

DailyQuote Plugin

Posted on: 24/11/05 01:15pm
By: machinari

Is the install page is in the proper directory?--double check.
Have you checked your error log?
You must be a member of the group Root to access the install script.

After that, who knows. The script works.

DailyQuote Plugin

Posted on: 19/01/06 08:39am
By: Anonymous

Hi!

I also can't install the dailyquote plugin at geeklog version 1.3.4rc1, error.log entry shows that:

Don 19 Jan 2006 14:20:20 CET - Inserting default data into dailyquote_phpblock table
Don 19 Jan 2006 14:20:20 CET - 1136: Column count doesn't match value count at row 1. SQL in question:
Don 19 Jan 2006 14:20:20 CET - Error inserting default data into dailyquote_phpblock table

I think i have to change /public_html/admin/plugins/dailyquote/install.php where the dailyquote_block table is created and the default data is inserted, but how?

$DEFVALUES['dailyquote_phpblock'] = "INSERT INTO {$_TABLES['blocks']} VALUES ('', 0, 'dailyquote', 'phpblock', 'Quote of the Day', 'all', 255, '', '', '', 0, 'phpblock_random_quote', '', 4, 2, 3, 3, 2, 2)";

Thank you for hints to solve the problem, i also know that this plugin has to be updated for geeeklog 1.3.4 completely.

DailyQuote Plugin

Posted on: 19/01/06 12:24pm
By: machinari

geeklog 1.4 has made changes to the blocks table. because this plugin has yet to be updated for gl 1.4, it does not take into account the extra columns.

the solution is to edit your admin/plugins/dailyquote/install.php file, which I don't have time to do just yet. maybe on the weekend if I find time.

I am updating the plugin slowly in order to be compatible with gl 1.4 and to take advantage of its many enhancements to the plugin API. but I'm quite busy just now.

DailyQuote Plugin

Posted on: 27/01/06 03:43pm
By: Anonymous

[QUOTE BY= erZwo] Hi!

I also can't install the dailyquote plugin at geeklog version 1.3.4rc1, error.log entry shows that:

Don 19 Jan 2006 14:20:20 CET - Inserting default data into dailyquote_phpblock table
Don 19 Jan 2006 14:20:20 CET - 1136: Column count doesn't match value count at row 1. SQL in question:
Don 19 Jan 2006 14:20:20 CET - Error inserting default data into dailyquote_phpblock table

I think i have to change /public_html/admin/plugins/dailyquote/install.php where the dailyquote_block table is created and the default data is inserted, but how?

$DEFVALUES['dailyquote_phpblock'] = "INSERT INTO {$_TABLES['blocks']} VALUES ('', 0, 'dailyquote', 'phpblock', 'Quote of the Day', 'all', 255, '', '', '', 0, 'phpblock_random_quote', '', 4, 2, 3, 3, 2, 2)";


Thank you for hints to solve the problem, i also know that this plugin has to be updated for geeeklog 1.3.4 completely.[/QUOTE]

What changes did you have to make to this update statement to make it execute properly?

-Nax

DailyQuote Plugin

Posted on: 27/01/06 04:05pm
By: machinari

this should work
$DEFVALUES['dailyquote_phpblock'] = "INSERT INTO {$_TABLES['blocks']} SET is_enabled='0', name='dailyquote', type='phpblock', title='Quote of the Day', tid='all', blockorder='255', phpblockfn='phpblock_random_quote'";
$DEFVALUES['dqmenu_phpblock'] = "INSERT INTO {$_TABLES['blocks']} SET is_enabled='0', name='dqmenu', type='phpblock', name='DailyQuote', blockorder='10', onleft='1', phpblockfn='phpblock_dqmenu'";


DailyQuote Plugin

Posted on: 27/01/06 04:31pm
By: Anonymous

Thanks!

had to change name='DailyQuote' to title='DailyQuote' on the 2nd line but that worked great! Thanks for the assist!

-Nax

DailyQuote Plugin

Posted on: 28/01/06 08:22am
By: Anonymous

works now yet again, thanks!

DailyQuote Plugin

Posted on: 04/06/06 11:49pm
By: ranma

okay, i spreaded the files out correctly, changed the code as discussed above and am getting the following error:

Parse error: syntax error, unexpected T_STRING in /home/mmocore/public_html/darthranma/admin/plugins/dailyquote/install.php on line 56

how do i find line 56 and how do i fix the syntax error? thanks for the help
-ranma

DailyQuote Plugin

Posted on: 05/06/06 12:58am
By: machinari

open the install.php file and count to the 55th line. Most text editors will number the lines for you.
Then show your lines 55 and 56 here and I'll tell you what went wrong...

DailyQuote Plugin

Posted on: 06/06/06 02:55pm
By: ranma

okay, i was doing the editing in notepad, which probally was my first mistake. lines going everywhere without real seperation, very messy. so, i found a freeware text editor that does do the numbering and will compare two files and point out the differences.

first off i've got lines 55-57 from an untouched, freshly unzipped install.php file


(55) $DEFVALUES['dailyquote_settings'] = "INSERT INTO {$DQ_TABLES['dailyquote_settings']} VALUES (10, 50, 1, 0, 1, 1, 1, 0, 0, 2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, '', 0, '', 0)";
(56) $DEFVALUES['dailyquote_phpblock'] = "INSERT INTO {$_TABLES['blocks']} VALUES ('', 0, 'dailyquote', 'phpblock', 'Quote of the Day', 'all', 255, '', '', '', 0, 'phpblock_random_quote', '', 4, 2, 3, 3, 2, 2)";
(57) $DEFVALUES['dqmenu_phpblock'] = "INSERT INTO {$_TABLES['blocks']} VALUES ('', 0, 'dqmenu', 'phpblock', 'DailyQuote', '', 10, '', '', '', 1, 'phpblock_dqmenu', '', 4, 2, 3, 2, 2, 2)";


and this is how i butchered it


(55) $DEFVALUES['dailyquote_settings'] = "INSERT INTO {$DQ_TABLES['dailyquote_settings']} VALUES (10, 50, 1, 0, 1, 1, 1, 0, 0, 2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, '', 0, '', 0)";
(56) $DEFVALUES['dailyquote_phpblock'] = "INSERT INTO {$_TABLES['blocks']} SET is_enabled='0', name='dailyquote', type='phpblock', title='Quote of the Day', tid='all', blockorder='255', phpblockfn='phpblock_random_quote'";', 'all', 255, '', '', '', 0, 'phpblock_random_quote', '', 4, 2, 3, 3, 2, 2)";$DEFVALUES['dqmenu_phpblock'] = "INSERT INTO {$_TABLES['blocks']} SET is_enabled='0', name='dqmenu', type='phpblock', name='DailyQuote', blockorder='10', onleft='1', phpblockfn='phpblock_dqmenu'" '', 4, 2, 3, 2, 2, 2)";
(57)


it looks to my untrained eye that line 57 somehow joined line 56... your thoughts?

hmm.. i think these quote boxes are all messed up due to my use of firefox, sorry about that...

DailyQuote Plugin

Posted on: 06/06/06 03:12pm
By: machinari

replace 56 and 57 with the following:
$DEFVALUES['dailyquote_phpblock'] = "INSERT INTO {$_TABLES['blocks']} SET is_enabled='0', name='dailyquote', type='phpblock', title='Quote of the Day', tid='all', blockorder='255', phpblockfn='phpblock_random_quote'";
$DEFVALUES['dqmenu_phpblock'] = "INSERT INTO {$_TABLES['blocks']} SET is_enabled='0', name='dqmenu', type='phpblock', title='DailyQuote', blockorder='10', onleft='1', phpblockfn='phpblock_dqmenu'";

DailyQuote Plugin

Posted on: 07/06/06 12:28pm
By: ranma

problem solved, thanks for your patience. now if only i could get it to work with my default layout... maybe its out of date, willhave to look into that...

DailyQuote Plugin

Posted on: 08/06/06 02:48pm
By: ranma

okay, the themes works with it now, it shows up in the homepage, but i cant seem to add a quote to it and if i try to add the same quote twice it says "That quotation already exists in our database. Please try again." when doing a new quote it says "Your quotation has been successfully added to our database. Add another?" but i dont see the quote anywhere, be it in the listings nor the search quotes nor do i see any text showing up anywhere even though i enabled all the blocks...

DailyQuote Plugin

Posted on: 08/06/06 03:24pm
By: machinari

Ensure that the category to which you added the quote is enabled. Categories are disabled by default when they are created while adding a quote.

DailyQuote Plugin

Posted on: 09/06/06 04:57am
By: Anonymous

Okay...I've read thru all of this so far and came across this in the log...any ideas?

06/09/06 04:50:51 - Success - Created table
06/09/06 04:50:51 - Inserting default data into dailyquote_settings table
06/09/06 04:50:51 - Success - inserting data into dailyquote_settings table
06/09/06 04:50:51 - Inserting default data into dailyquote_phpblock table
06/09/06 04:50:51 - Success - inserting data into dailyquote_phpblock table
06/09/06 04:50:51 - Inserting default data into dqmenu_phpblock table
06/09/06 04:50:51 - Success - inserting data into dqmenu_phpblock table
06/09/06 04:50:51 - Attempting to create dailyquote admin group
06/09/06 04:50:51 - 1062: Duplicate entry 'dailyquote Admin' for key 2. SQL in question:
06/09/06 04:50:51 - Attempting to unregister the Daily Quote plugin from Geeklog

DailyQuote Plugin

Posted on: 09/06/06 02:17pm
By: machinari

I assume that you don't have the plugin installed... and that upon installation you received the "plugin not installed" message.. Is that right?

My guess is that you've previously attempted to install the plugin, it failed, and was not given a chance to back out properly, which left a rogue entry in the db.

See the last post in this thread for a possible solution. It deals with a different plugin, but the idea is the same, ie, that you need to manually clean the db of the relevant plugin data.

DailyQuote Plugin

Posted on: 09/06/06 03:35pm
By: Anonymous

Okay great...it worked. I found an entry in the gl_groups table that was not deleted when the plugin backed out. Went in there and blew it out and it installed perfectly after the previously needed adjustments to the install script. BTW, I am using 1.40sr3 with the Register_Globals=off. So with these minor changes, I think it could be set for the latest GL vers.

DailyQuote Plugin

Posted on: 09/06/06 11:17pm
By: ranma

my thing worked too, thanks for the input and the plugin

DailyQuote Plugin

Posted on: 12/06/06 08:05am
By: Anonymous

I've made all the changes as discussed above, however when another user adds a quote and I select the moderate option to approve their entry I'm getting the following error in my error.log

Mon 12 Jun 2006 06:57:27 CDT - 1052: Column 'Status' in where clause is ambiguous. SQL in question: SELECT ID, Quotes, Quoted, Title, Source, Sourcedate, Date, q.UID, username FROM gl_dailyquote_quotes q, gl_users gl WHERE (Status='0' AND q.UID=gl.uid)


DailyQuote Plugin

Posted on: 15/06/06 01:43am
By: Anonymous

I fixed this one a while back in another thread, but I'm in Alaska at the moment and don't have time to find it.. be back next week.

DailyQuote Plugin

Posted on: 18/06/06 08:25pm
By: machinari

GL 1.4x has introduced a status column in the users table thus the ambiguity.

Find the following at about lines 56-58 or so in public_html/dailyquote/moderate.php:
    $sql = "SELECT ID, Quotes, Quoted, Title, Source, Sourcedate, Date, q.UID, username";
    $sql .= " FROM {$DQ_TABLES['dailyquote_quotes']} q, {$_TABLES['users']} gl";
    $sql .= " WHERE (Status='0' AND q.UID=gl.uid)";



and replace it with the following:
    $sql = "SELECT ID, Quotes, Quoted, Title, Source, Sourcedate, Date, q.UID, username";
    $sql .= " FROM {$DQ_TABLES['dailyquote_quotes']} q, {$_TABLES['users']} gl";
    $sql .= " WHERE (q.Status='0' AND q.UID=gl.uid)";


Note the change in the where clause.

DailyQuote Plugin

Posted on: 01/08/06 12:45am
By: 5jays217

Hi, I've read this string and tried (i think) all of the possible resolutions but, I'm still getting this error when trying to install the dailyquotes plugin:


Mon 31 Jul 2006 23:41:54 CDT - Inserting default data into dailyquote_phpblock table
Mon 31 Jul 2006 23:41:54 CDT - 1136: Column count doesn't match value count at row 1. SQL in question:
Mon 31 Jul 2006 23:41:54 CDT - Error inserting default data into dailyquote_phpblock table
Mon 31 Jul 2006 23:41:54 CDT - Attempting to unregister the Daily Quote plugin from Geeklog




Am I missing something from a prior reply?

DailyQuote Plugin

Posted on: 01/08/06 02:15am
By: machinari

[QUOTE BY= 5jays217]
Am I missing something from a prior reply?[/QUOTE]replace 56 and 57 of install.php with the following:
$DEFVALUES['dailyquote_phpblock'] = "INSERT INTO {$_TABLES['blocks']} SET is_enabled='0', name='dailyquote', type='phpblock', title='Quote of the Day', tid='all', blockorder='255', phpblockfn='phpblock_random_quote'";
$DEFVALUES['dqmenu_phpblock'] = "INSERT INTO {$_TABLES['blocks']} SET is_enabled='0', name='dqmenu', type='phpblock', title='DailyQuote', blockorder='10', onleft='1', phpblockfn='phpblock_dqmenu'";


DailyQuote Plugin

Posted on: 01/08/06 04:29pm
By: 5jays217

mach, thanks

I tried again just now with the same error.

I checked my db files dont see anything resembling a remnent DQ table. all folders and pages are writable. the unpacked .tar file was moved according to install instructions.....

I just keep hitting this stupid wall...
and now my head kinda hurts...

DailyQuote Plugin

Posted on: 01/08/06 05:06pm
By: machinari

Give this one a try. The edits are made for you.

DailyQuote Plugin

Posted on: 01/08/06 05:22pm
By: 5jays217

Trying it now

I'll let ya know in a few minutes...

Thanks, mach

DailyQuote Plugin

Posted on: 01/08/06 05:37pm
By: 5jays217

Mach, you rock...

I don't know what you did but first try it installed.

Thanks

DailyQuote Plugin

Posted on: 30/09/06 01:07am
By: hopeace

Hi- The plug in would not install without error, until I modified the lines 56&57 as I found in a previous post. I changed it to:
$DEFVALUES['dailyquote_phpblock'] = "INSERT INTO {$_TABLES['blocks']} SET is_enabled='0', name='dailyquote', type='phpblock', title='Quote of the Day', tid='all', blockorder='255', phpblockfn='phpblock_random_quote'";
$DEFVALUES['dqmenu_phpblock'] = "INSERT INTO {$_TABLES['blocks']} SET is_enabled='0', name='dqmenu', type='phpblock', title='DailyQuote', blockorder='10', onleft='1', phpblockfn='phpblock_dqmenu'";


Then the install worked, however when I clicked on the daily quote link on the menu I received a SQL error of: 1064: 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 '' at line 1. SQL in question: SELECT DISTINCT q.ID, Quotes, Quoted, Title, Source, Sourcedate, Date, q.UID FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l WHERE q.Status='1' AND l.Status='1' AND l.QID=q.ID ORDER BY Date DESC LIMIT 0,

Im using geeklog 1.4.0sr3

Any suggestions??

thanks!

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=60408