From: Jon P. <jo...@cr...> - 2007-10-30 06:07:01
|
Ah man, I forgot about this...I'd love to get this code into the main trunk for anonymous users...its something openclipart.org wants badly...I wonder how badly bitrotten this code is...I have the patches on my drive..........anyone interested? Jon On Tue, 2007-02-13 at 23:18 -0800, Victor Stone wrote: > On 2/13/07, Asheesh Laroia <as...@as...> wrote: > > > 3. Create an account called 'anonymous' and note the user_id (probably > > > '2' on a brand new install) > > > > 6, 'cause the install is not fresh. > > > > In cc-config-db.php I added: > > > > define('ANON_USER_ID', 6); // based on a DB query > > that's cool for a one-time hack, to generalize we'll need to add a > field to the global config called 'anon_user_id' so it's available > from $CC_GLOBALS anytime, then a checkbox toggle for 'allow anon > reviews' > > > > > > 4. In ccextras/cc-reviews.php function is _can_review(). just put > > > return true; > > > right at the top; > > > > Hah! Done. Patch at http://freemusic.freeculture.org/patches/1 (just so > > you can sanity-check it if you want to). > > again, this is a hack (which again, is cool for now); this is where > the check for allow_anon_reviews, etc. would take place. > > > Question for you: Is this better than just modifying CCUser::CurrentUser? > > ah! don't mod CurrentUser() > > > I'd rather just call e.g. CCUser::CurrentUserOrAnonymous() instead since I > > aaaahhhh, yes, that's cool. We'll also want a ::IsAnonymous() > > > Line 236 of ccextras/cc-reviews.php was the only reference to > > CCUser::CurrentUser in ccextras/cc-reviews* . > > http://freemusic.freeculture.org/patches/3 has that small patch. > > yea, but it's the submit you want to watch for, looks like around 131 > in ccextras/cc-review-forms.inc is another one. We'll want another > check for allow_anon_reviews there too btw. > > You'll have to do the whole thing over again for 'Reply' stuff to. I > promise, at some point you will land in cc-topics.* ;) and there we > have to get really careful because that's code reused by several > different modules (w/plans for lots more) > > > > code. The code is weird. > > > > By "The code is weird", do you mean what people generate, or what you've > > already written? (-; > > I mean 100% what I've written. > > > > > I did all this, but when I go to > > http://freemusic.freeculture.org/media/files/paulproteus/4 I'm not offered > > a chance to rate the song. I'm going to go to bed and look at this more > > in the morning/afternoon. It's confusing because even when I log in as > > user anonymous I still am not offered a chance to do the rating. > > Ratings is *whole* other ball of goo. > > VS > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Cctools-cchost mailing list > Cct...@li... > https://lists.sourceforge.net/lists/listinfo/cctools-cchost > -- Jon Phillips jo...@cr... cell: +1.510.499.0894 (80% time) desk: +1.415.369.8486 (20% time) Business + Community Manager Creative Commons www.creativecommons.org Please note: the contents of this email are not intended to be legal advice nor should they be relied upon as or represented to be legal advice. Creative Commons cannot and does not give legal advice. You need to assess the suitability of Creative Commons' tools for your particular situation, which may include obtaining appropriate legal advice from a licensed attorney. |