Author Topic: Blah and album.pl  (Read 2235 times)

0 Members and 1 Guest are viewing this topic.

Offline ae

  • album.pl User
  • *
  • Posts: 4
  • Karma: +0/-0
  • I forgot to change the default text.
Blah and album.pl
« on: March 04, 2004, 21:11:31 »
I'm incorporating album.pl with my eBlah board, which is YABB-like. I've selected method 3 (YABB auth) for my authentication method, and even changed

my $YaBBusername="blahcookiename";
my $YaBBpassword="blahcookiepass";

The login works, but logout doesn't (even when login into the Blah board first). Plus, i can't seem to get a "logout" link onto the menu anywhere using text style links. The only way to logout is to clear my browser cookies ... not very elegant. Any ideas how to fix this?

Second, how can I hide the "uploads" link to anyone BUT the administrator? Uploads are allowed, but my default_guests=all, hence no one but the admin needs to see the link. Otherwise they try and get ticked off when they cannot.

Thanks

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Blah and album.pl
« Reply #1 on: March 05, 2004, 11:17:09 »
Hi ae,

If you're using type 3 authentication, then you can't log out using album.pl. That would require album.pl to modify or delete eBlah cookies, which is not a good thing. To log out of the album, just log out of eBalh.

You can add a logout link to the templates manually, just have it go to your eBlah logout page...

As for allowing only admins to see the Upload button, try this... Edit album_header.tml, and change:

Code: [Select]
<a href="#\###ALBUMPROG#\###;function=upload"class="optionslink"><img class="button" src="#\###CONFIG=upload_button#\###" alt="" /></a>

to:

Code: [Select]
HTML
            if ($isadmin)
            {
            $menubuild.=<<HTML;
<a href="#\###ALBUMPROG#\###;function=upload"class="optionslink"><img class="button" src="#\###CONFIG=upload_button#\###" alt="" /></a>
HTML
            }
            $menubuild.=<<HTML;

If you're using text menus, you'll have to change the text upload link instead (above this one).

Hope that helps.


Cheers

Offline ae

  • album.pl User
  • *
  • Posts: 4
  • Karma: +0/-0
  • I forgot to change the default text.
Re:Blah and album.pl
« Reply #2 on: March 05, 2004, 11:27:17 »
Thanks, Mike for the uploads button/text tip.

About logging out via eBlah ... it doesn't! Tried that route ... :( It keeps me logged in no matter what and ONLY logs me out by clearing my browser cookies. That's what makes it so annoying ...

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Blah and album.pl
« Reply #3 on: March 05, 2004, 11:40:33 »
Hmmm... In that case, turn on debugging and see what it says... That'll tell you where the password is being read from. Maybe eBlah keeps the username/password in the cookie, and just sets a "logged out" flag or something...

Offline ae

  • album.pl User
  • *
  • Posts: 4
  • Karma: +0/-0
  • I forgot to change the default text.
Re:Blah and album.pl
« Reply #4 on: March 05, 2004, 12:32:47 »
Ok, ran the debug ... this is what it spit out in reference to username/password/cookie stuff: (red items are changed/substituded)

----------------------------------------
8770: Cookie Contents Follow:
8784: [ blahpasscookieinfo ] = [ info deleted ]
8784: [ blahnamecookieinfo ] = [ info deleted ]
8787: END OF COOKIE
.
.
.
2762: Entering subroutine: Authenticate
3366: Entering subroutine: cookieLogin
3451: [ blahpasscookieinfo ] = [ info deleted ]
3382: Found YaBB password info:  info deleted
3384: $mypassword set to  info deleted
3451: [ blahpasscookieinfo ] = [ info deleted ]
3374: Found YaBB username info:  info deleted
3376: $myusername set to  info deleted
3467: Found username:  info deleted and password:  info deleted in cookie. (Maybe #: and name:  too...)
3476: Leaving subroutine: cookieLogin --> return code is 1
2838: Using YaBB Authentication (type 3)

----------------------------
Anything out of the ordinary or double or not suppose to be there that could make the logout impossible?

Offline ae

  • album.pl User
  • *
  • Posts: 4
  • Karma: +0/-0
  • I forgot to change the default text.
Re:Blah and album.pl
« Reply #5 on: March 05, 2004, 12:39:48 »
Hiding the uploads text link was ok with a minor change:

if (isAdmin()) instead of if ($isadmin)

Code: [Select]
HTML

            if (isAdmin())
            {
            $menubuild.=<<HTML;

<a href="#\###ALBUMPROG#\###;function=upload"class="menulink">$::S{248}</a> $::S{98}
HTML
            }

Thanks again! Great script, btw ... just need to find my way around in it better. ;)

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Blah and album.pl
« Reply #6 on: March 05, 2004, 15:09:15 »
Heheh, good catch. $::isadmin might also work, but your way will definitely work...

Looks like you've already found your way around it pretty well. :)


Cheers