Author Topic: fristersoft.mine.nu (custom features)  (Read 16896 times)

0 Members and 1 Guest are viewing this topic.

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: fristersoft.mine.nu (custom features)
« Reply #15 on: April 21, 2004, 23:23:54 »
Thanks!  :D I'm glad to share.

Don't intend to overwhelm you, but there's more  :-\ all in the same zip file.

* Chopped into multiple modules along the idea of album_admin.pm
* Added module path configuration variable
* Fixed a bug with cookie login and AMLite authentication when exiting from upload form

BTW, when I set $::strip_comments=1, I get a java script error and the debugger wants to come up.

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: fristersoft.mine.nu (custom features)
« Reply #16 on: April 22, 2004, 05:51:22 »
Heheh, I can't keep up! :)

But you're the man, thanks for these excellent changes!

So just to be clear... It looks like the AMLite authentication is optional, by using authentication_type = 5 right? And it looks like regular photos will still be handled normally, while jp2 photos will use the special handler. So again, this won't affect existing album.pl users...

I like the optional stuff. ;)

I think the only thing I may change is that you can only upload jp2 files in your version...


Thanks for the awesome work!!

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: fristersoft.mine.nu (custom features)
« Reply #17 on: April 22, 2004, 06:14:20 »
I'm starting to merge the code in - but before I do, I want to make sure we're not working against each other... :)

For example, I've added the following code:

Code: [Select]
# Adjust Perl Include Path
if (!-e $::module_path)
{
$::module_path=$::cwd."/modules";
}
unshift(@INC, $::module_path);

And now the require statements will work without specifying $::module_path. It's also less likely you'll get a software error if module_path is wrong in the config. (Which is going to be a common problem for new installs...)

I won't go any further until you're done though, in case I end up having to merge more featrures in! :)

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: fristersoft.mine.nu (custom features)
« Reply #18 on: April 22, 2004, 06:21:37 »
We also need a "require $::display_module;" near line 400 of show_upload.pm. :)

Looking good, you've done some great stuff with the code!

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: fristersoft.mine.nu (custom features)
« Reply #19 on: April 22, 2004, 06:23:30 »
I like what you've done with the error calls, adding in line # and module. A great idea!

I'll need to add the right handlers into the error subroutine for that as well.

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: fristersoft.mine.nu (custom features)
« Reply #20 on: April 22, 2004, 07:49:24 »
Just noticed error_sub and debug_sub in the display module... Are they there with the intent to move those functions out permanently? (Just curious why they're named differently...)

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: fristersoft.mine.nu (custom features)
« Reply #21 on: April 22, 2004, 07:50:40 »
Oh, I forgot to answer your strip_comments question... that's because some of the JS code is in an HTML comment, and therefore gets stripped out when you turn that feature on...

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: fristersoft.mine.nu (custom features)
« Reply #22 on: April 22, 2004, 09:58:11 »
 8) Wow! You, as always on the ball too.

In response:
* AMLite is optional (authentication type = 5)
* jp2 is optional . You can upload any format. I just store them as jp2 upon resizing -- forcing resize conversion to jp2 is not in the zip file.
* Thanks for the module include code improvement. I'd never seen perl code before I started looking at album.pl. I'll use your code instead.
* Thanks for the missing require.
* I put error_sub() and debug_sub() in the display module so that I could still call error() and debug() in album.pl and conditionally apply the require statements there.

No need to wait for me on code changes; it's your lead, after all. In any case, you won't read much from me for a while. It's time for me to put daylight hours back into my dayjob and the nightime hours into chores and sleep ;D What hobby time's left will go iinto the to-do list at the start of the conversation.

I like what you did with the user contribution album to store and display zip files. Does it accept other file types? (tar, gz, exe)


Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: fristersoft.mine.nu (custom features)
« Reply #23 on: April 22, 2004, 18:28:57 »
* Thanks for the module include code improvement. I'd never seen perl code before I started looking at album.pl. I'll use your code instead.

You've got to be kidding!! Based on the coding you did, I was sure I had an old Perl guru on my hands! Now it's even more impressive! :)

Ok, I'll see what I can do about merging your changes into the code stream... Thanks for all the hard work to date!

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: fristersoft.mine.nu (custom features)
« Reply #24 on: April 22, 2004, 18:39:36 »
Forgot to answer your question about the contrib album... Yeah, I just added .zip to the @movieexts config item, and you can host any file, pdf, doc, exe, etc...

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: fristersoft.mine.nu (custom features)
« Reply #25 on: April 22, 2004, 19:59:39 »
Looking good... I found a couple glitches that I've worked out... The only one I have left now is that when you view through FireFox, the photos are mis-aligned... (I.E. skewed to the right, not centred...)

Still trying to figure that one out...!

Thanks

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: fristersoft.mine.nu (custom features)
« Reply #26 on: April 22, 2004, 20:07:08 »
P.S. I just updated the test album with your merged code (first cut).

Hack away, try to find some bugs! :)

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: fristersoft.mine.nu (custom features)
« Reply #27 on: April 25, 2004, 22:07:44 »
Neat!

Just a few quibbles:
    missing auto-size button (One of the reason's I've been using text menus)
    Upload form displayed my forum user number, not my user name.
    When I tried to upload using the predisplayed user number and encrypted password, the upload seemed to fail, but didn't. It just never displayed the success box. Bottom of the screen gave unknown function UpdateDesc error. Then I noticed it created a user album called 949.
    If I type in frister and password, the upload does worrk too.

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: fristersoft.mine.nu (custom features)
« Reply #28 on: April 26, 2004, 08:38:05 »
Ahhh, thanks. I'd created a new "auto" button, but forgot to set the right permissions on it. It's now set correctly.

The upload form shows usernumber (not name) because we're using SMF here, which is keyed on usernumber. (So that's what's stored in the cookie.)

I'll have to check out the updatedesc failure, thanks for finding that. :)

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: fristersoft.mine.nu (custom features)
« Reply #29 on: April 26, 2004, 09:00:31 »
Ok, found and fixed the updatedesc problem... Just needed an extra require... :)

Thanks!