Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512

The dailyquote plugin for geeklog is ready for testing. It is fully functional though not all the features that I intend to add have been added yet. Included are 50 quotes to use for testing. The documentation isn't done. like I say, it is for testing.

Let me know what you think and any bugs that you find etc. Let me know if you think it is useful or not. It serves my purpose anyway.

find it here. This file will be replaced by version 1.0 after I've received a bit of feedback. thanks.

Status: offline

newblogger

Forum User
Regular Poster
Registered: 08/22/04
Posts: 107
run trying to run the install.php i get this error

Fatal error: Cannot redeclare random_quote() (previously declared in C:Inetpubwwwrootwmwdiarynewblogsystemlib-custom.php:363) in C:Inetpubwwwrootwmwdiarynewblogpluginsdailyquotefunctions.inc on line 619
Got Hot wheels? http://www.dcmotoring.com

Status: offline

hidden

Forum User
Chatty
Registered: 11/13/03
Posts: 51
Quote by newblogger: run trying to run the install.php i get this error

Fatal error: Cannot redeclare random_quote() (previously declared in C:Inetpubwwwrootwmwdiarynewblogsystemlib-custom.php:363) in C:Inetpubwwwrootwmwdiarynewblogpluginsdailyquotefunctions.inc on line 619


seems you have two functions named random_quote.
we are just shadows of our hidden identities

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
[QUOTE}
seems you have two functions named random_quote.[/QUOTE]
yes, yes... you'll have to check your lib-custom.php for a function named random_quote().

however, newblogger, you make a point. my functions should all be prefixed somehow with "dq" or something of that nature to prevent this type of problem from occuring. thank you and I will fix that.

Status: offline

newblogger

Forum User
Regular Poster
Registered: 08/22/04
Posts: 107
OK I have installed the plugin and have added a few quotes manually one at a time, they seem to be working fine. My next question is, what do i have to do to be able to get the quote to show-up in a php-block on the side of my page rather than the centerblock?
Got Hot wheels? http://www.dcmotoring.com

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
you will need to create a new block -- a php block rather than a normal or portal block. The function that you will use is contained in the functions.inc file, and as Blaine suggested earlier, there is no need to move it to your lib-custom.php file. It is called "phpblock_random_quote()." enter that name, without the parentheses, into the PHP Block Options box. It is able to function at the same time as your centerblock and will display the same quote if one is cached, otherwise it will be random, obviously.
this will be covered in the documentation once i write it. thanks.

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
First: I've decided not to make use of the moderation functions developed for the plugin API. Rather, moderation will be accessible from the dailyquote "manage quotes" screen. Any Comments?

Second: Any comments yet? What do you think of the plugin's orginization, screens, options, usefulness, etc.?

Status: offline

newblogger

Forum User
Regular Poster
Registered: 08/22/04
Posts: 107
thank you, works like a charm. the plug-in works great for me, this is exactly what i've been looking for. it is actually more than i need. great work. you can see it working
here
Got Hot wheels? http://www.dcmotoring.com

Status: offline

ppmnt

Forum User
Chatty
Registered: 06/09/04
Posts: 53
Hi there,

Just getting started with it, installed it and tried a couple of things.

I'm logged in as admin and can add single quotes fine, but when I click on Batch Add I get:

Access Denied
Only Authorized Users have Access to this Page. Your user name and IP have been recorded.

When I set "allow members to batch add" it works fine. I should add that my user is not the user "admin", but actually a new user that is a member of the Root group (and all other groups). Could it be that you're checking to see if i'm the actual admin user, instead of a admin user?

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
the way the prerelease is set up, only the root user, UID 2, can access that page if the batch add is turned off for members. If batch add is turned on for members, then all but anonymous users should be able to access that page.

This has been changed, however, in CVS... I've always wanted to say that. Access is now not limited to the one original root user, but to any belonging to the group dailyquote.edit, which root users are members of by default. This allows all root users, as far as I know so far, access, as well as those who have been added to a group granted the dailyquote.edit priveledge.

I've also done the moderation page and a few other things, bug fixes included.

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
scratch everything i just said. i was confused and was talking about a different page.

what you described is exactly how it is supposed to work. only the root user can batch add unless batch add is turned on for members. I can change this to group. no problem.

Status: offline

ppmnt

Forum User
Chatty
Registered: 06/09/04
Posts: 53
Cool... Yeah, I think it would be good to use the group for all security checks to avoid confusion. The root group has all dailyquote rights, so a member of the root group should be able to do everything, including batch add.

I'm sure I'm not the only one who doesn't sue the 'admin' user for everything, but instead gave their own user admin rights. That way posts and news are form me, not from 'admin'.

Status: offline

ppmnt

Forum User
Chatty
Registered: 06/09/04
Posts: 53
Alright, I've got it all set up now, and it looks great! Check it out here: - discobug.com - (the block is on the lower right)

You can see that I changed some minor things: I'm using text links because your images didn't really match my site's colors. One suggestion might be to have that be an option in the administration screen. That way you wouldn't need to provide more images, and others could choose to make their own or just use text links.

Also, I added the "add" link to the block. One of the things I wanted to do is allow all visitors to submit quotes, which brings me to this:

Quote by machinari:
I've decided not to make use of the moderation functions developed for the plugin API. Rather, moderation will be accessible from the dailyquote "manage quotes" screen. Any Comments?


I assume by that you mean submitted quotes wouldn't go through the "Submissions" lifecycle, allowing an admin or privilged user to approve them before they show up on the site? While this may be OK if you don't allow anonymous users to add quotes, but doing so would be too risky due to automated sex posts and the like. How hard would it be to have it go through submissions like news stories and links? If that as possible, I'd probably use the centerblock on the home page.

You asked for comments on layout and functionality -- I think it turned out great! It's organized well and formatted nicely. Functionality is great, the only things I'd like to see are above.

Great work!

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by ppmnt:I'm using text links because your images didn't really match my site's colors.
Yes, I've decided that would be a better idea as well, in order to make the plugin more readily portable. If the user wishes to use images, as you suggest, they can make them to suit their site.
Quote by ppmnt:Also, I added the "add" link to the block.
Looks very nice.
Quote by ppmnt:I assume by that you mean submitted quotes wouldn't go through the "Submissions" lifecycle, allowing an admin or privilged user to approve them before they show up on the site?
Actually, all that I meant was that I wouldn't use the GL api's to accomplish moderation. Moderation would still occur, however. I have it all set up and it works well with the option to turn on or off the queue. the moderation link will appear in the link row at the top for those having edit rights, and on the manage page.

This weekend I'll upload a newer version with many fixes and the new stuff. I've found some database bugs that I'm surprised you all haven't found yet. Hmmm... I guess I should write an update script because I've added to the database a bit.

and hey, ppmnt, thanks for the feedback.

I don't think a preview screen is necessary, do you?

Status: offline

ppmnt

Forum User
Chatty
Registered: 06/09/04
Posts: 53
Quote by machinari: Actually, all that I meant was that I wouldn't use the GL api's to accomplish moderation. Moderation would still occur, however. I have it all set up and it works well with the option to turn on or off the queue. the moderation link will appear in the link row at the top for those having edit rights, and on the manage page.


Oh, I see, I'm sorry I posted before testing submitting a quote as an anonymous user. I just tried it and saw the message that it was in the queue.

However, how do I approve the quote now? I went to the manage screen and don't see it there. I tried searching for it, but can't find it. I also tried logging in as 'admin' instead of my admin user, no luck. And since it's not under Submissions, I'm not sure where else to look. What am I missing?

Quote by machinari: I don't think a preview screen is necessary, do you?


Nah, I don't think so. Users are submitting mostly one-liners that they probably pasted form somewhere else, so I would hope they wouldn't need to preview it. ;-)

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by ppmnt:how do I approve the quote now?

ah yes... i threw a bit about that in the incredibly limited documentation (i think). the submission process was set up to be moderated before the moderation page was complete. your queued quotes are in the db, they're just waiting on the moderation page to view them... sorry.

i'm teaching thru thursday afternoon..after that i'll get the updated package online by thurs night/fri morning.

Status: offline

ppmnt

Forum User
Chatty
Registered: 06/09/04
Posts: 53
Aaah, I see it now. I take it status=1 is approved, status=0 is the queue. I just updated it in mysql to status 1 and it's showing up great!

However, I found a little bug that way: When an anonymous user submits a quote (UID=1 in gl_dailyquote_quotes) the "Submitted by:" field is empty.

It's just a test quote, but I left it up to show you: _my quote index_, just search for the word "test".

Quote by machinari: ah yes... i threw a bit about that in the incredibly limited documentation (i think)

Documentation? My docs directory was empty... (Although I didn't expect documentation yet)

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by ppmnt:When an anonymous user submits a quote... the "Submitted by:" field is empty.
Yes, I noticed that as well. I overlooked it in the language file--oops. The updated version properly supplies "Anonymous" as the contributor.

Status: offline

ppmnt

Forum User
Chatty
Registered: 06/09/04
Posts: 53
I've got one more for you. This is what I get in error.log when trying to delete a quote:


Wed Sep 29 13:34:40 2004 - 1064: You have an error in your SQL syntax near 'gl_dailyquote_quotes, gl_dailyquote_lookup FROM gl_dailyquote_quotes, gl_dailyqu' at line 1. SQL in question: DELETE gl_dailyquote_quotes, gl_dailyquote_lookup FROM gl_dailyquote_quotes, gl_dailyquote_lookup WHERE gl_dailyquote_quotes.ID=11 AND 11=gl_dailyquote_lookup.QID


Looks like you're listing the table names twice...

Status: offline

ppmnt

Forum User
Chatty
Registered: 06/09/04
Posts: 53
Just thought I'd let you know that I'm using it as my centerblock now, the first thing you see on my homepage! I know you're still working on it, but for now I have it tweaked the way I want it, and I'll just have to manually updates quotes added instead of using the manage screen.

Looks really nice, _check _it_out_

Page navigation