Author Topic: Add comment or rating with Yabb auth. in 6.5 ?!  (Read 4679 times)

0 Members and 1 Guest are viewing this topic.

Offline htilly

  • album.pl Tester
  • **
  • Posts: 23
  • Karma: +0/-0
  • I forgot to change the default text
Add comment or rating with Yabb auth. in 6.5 ?!
« on: September 20, 2004, 10:04:01 »
Hi !

First off..  Lovely to see a new release of this great script.. Even better to see that you are working on a PHP version !!!
Now, anyhow.. I do have a strange problem.

If Im not logged in and I try to add a rating it will tell me:
"Must be loggen in to add rating"..  Sure.. fine..

BUT if I log in as admin, and try the same thign (using MySQL Yabb auth.)
It tells me:
"Guesst can not add ratings"  ???
So.. two questions:

1:
How do I enable guest to add ratings.

2:
Why can´t I add rating when logged in as admin ?!

Once again... thansk for a great script !!

BR
Tilly

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: Add comment or rating with Yabb auth. in 6.5 ?!
« Reply #1 on: September 20, 2004, 13:49:28 »
Are you running one of the  two latest releases? Ver. 6.5 Release 11 or Release 12? I remember we had a bug like that before 11.
I've tested mine with flatfile, YaBB, MySQL database, and my modified AccountMananger authentication methods, and the only way I can get the error message you list is if my admin name is also included in the default_guests list.

J.J.

Offline htilly

  • album.pl Tester
  • **
  • Posts: 23
  • Karma: +0/-0
  • I forgot to change the default text
Re: Add comment or rating with Yabb auth. in 6.5 ?!
« Reply #2 on: September 20, 2004, 16:02:17 »
Version 6.5 (Frister [12] Release) written by Mike Bobbitt.
With modifications by J.J. Frister

But I found the problem...  Don’t know why, but for some reason the config field: db_displaynamefield, was left empty. To be honest, I think is always has been empty  :D

Anyhow..  I can now reproduce the problem. If the field is left empty I can login etc. but are unable to add ratings.

Everything is back on track  ;D

Oho.. btw..  THANKS Frister for all new improvements and help you have given Mike and this project !!   :D ;D
+applaud

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: Add comment or rating with Yabb auth. in 6.5 ?!
« Reply #3 on: September 20, 2004, 19:57:49 »
Glad you found it. Thanks for the tip about displaynamefield.  And thanks for the applause, glad you like the changes. Just a bunch of stuff I wanted to use and thought others might also.

J.J.

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: Add comment or rating with Yabb auth. in 6.5 ?!
« Reply #4 on: September 21, 2004, 05:57:46 »
Mike, here's the fix for the problem Tilly found in my code:
Code: [Select]
# Fetch Rows
while(@row=$sth->fetchrow_array)
{
$storedpass=$row[0];
debug("\$row[0]=$storedpass",2,__LINE__);

$maybedisplayname=$row[1];
debug("\$row[1]=$maybedisplayname",2,__LINE__);

if ($maybedisplayname)
{
$::displayname=$maybedisplayname;
}
$::mem_level=2;
}
I had set $::memlevel only if the displayname was found, instead of just finding the member.
J.J.

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: Add comment or rating with Yabb auth. in 6.5 ?!
« Reply #5 on: September 21, 2004, 20:11:42 »
Awesome. Updated the zip file. :)

Offline htilly

  • album.pl Tester
  • **
  • Posts: 23
  • Karma: +0/-0
  • I forgot to change the default text
Re: Add comment or rating with Yabb auth. in 6.5 ?!
« Reply #6 on: September 22, 2004, 09:15:20 »
Final question on this topic:

How can I enable guest to add Comments  ???

BR
Tilly

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: Add comment or rating with Yabb auth. in 6.5 ?!
« Reply #7 on: September 22, 2004, 10:49:28 »
Comment out or delete these lines from album.pl:
Code: [Select]
elsif (isGuest() && $::authentication_type)
{
require $::display_module;
display(javaAlert("Guests can not add ratings!"));
$::function="";
}
User must still log in.
J.J.

Offline htilly

  • album.pl Tester
  • **
  • Posts: 23
  • Karma: +0/-0
  • I forgot to change the default text
Re: Add comment or rating with Yabb auth. in 6.5 ?!
« Reply #8 on: October 26, 2004, 06:07:03 »
I don´t get it  :'(

If I comment out theese lines, the user still must be logged in ?

Is there anyway to let visiting users just hit the Rating button and submit a comment...  Without login at all, the way it worked in the previous version ?

BR
Tilly

Comment out or delete these lines from album.pl:
Code: [Select]
elsif (isGuest() && $::authentication_type)
{
require $::display_module;
display(javaAlert("Guests can not add ratings!"));
$::function="";
}
User must still log in.
J.J.

Offline htilly

  • album.pl Tester
  • **
  • Posts: 23
  • Karma: +0/-0
  • I forgot to change the default text
Re: Add comment or rating with Yabb auth. in 6.5 ?!
« Reply #9 on: October 26, 2004, 06:15:03 »
Hmm..  maybe I figure it out... Seems to work with this settings:

        my $temp=$form->param('rating_file_loc');
#               if(!$::loggedin && $::authentication_type)
#               {
#                       require $::display_module;
#                       display(javaAlert("Must be logged in to add ratings!"));
#                       $::function="";
#               }
#               elsif (isGuest() && $::authentication_type)
#               {
#                       require $::display_module;
#                       display(javaAlert("Guests can not add ratings!"));
#                       $::function="";
#               }
#               else
#               {
                        openDescfile("$::album_dir/$temp/");
                        getDescription($form->param('object'));
                        $::shortdesc="$::S{229} ".$::shortdesc;
                        require $::display_module;
                        display(buildTemplate());
                        exit(0);
#               }
        }


Feature request:
Add this as a config item: Enable Guest to add comments ?!

BR
Tilly



I don´t get it  :'(

If I comment out theese lines, the user still must be logged in ?

Is there anyway to let visiting users just hit the Rating button and submit a comment...  Without login at all, the way it worked in the previous version ?

BR
Tilly




Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: Add comment or rating with Yabb auth. in 6.5 ?!
« Reply #10 on: October 26, 2004, 11:10:49 »
Good work! Those look like exactly the right lines to comment out.  :D

J.J.