Author Topic: Make menu stuff independent of Album.pl?  (Read 4369 times)

0 Members and 1 Guest are viewing this topic.

Offline matt_rogers

  • album.pl Hacker
  • ****
  • Posts: 117
  • Karma: +2/-0
  • Currently sitting in front of a computer.
    • Three Steps To A Reef Aquarium
Make menu stuff independent of Album.pl?
« on: January 20, 2003, 15:23:01 »
Well, I spent some hours on mine this weekend, overall I think it is amazing Mike.

Minor rant,

I found myself having to add CSS classes to code in album.pl. Specifically for edit/move/delete, ratings  and the admin menu, etc..

This is kinda disturbing, because I like to stay on top of the upgrades which pretty much means replacing the album.pl file right?

Just finding what I did will be kinda hard, much less replacing it a lot.

I guess I am saying it would be nice if that stuff was more accessible in the templates.

Hope this makes sense.

matt

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Make menu stuff independent of Album.pl?
« Reply #1 on: January 20, 2003, 20:10:49 »
Hi Matt,

Code changes *are* bad, for just the reasons you gave... I've tried to minimize that through the use of the templates, string files, and the style sheet. But if there's more, please let me know!

Can you be more specific about what changes you had to make? If I can rip them out and put them somewhere else, that would be great...

Cheers

Offline matt_rogers

  • album.pl Hacker
  • ****
  • Posts: 117
  • Karma: +2/-0
  • Currently sitting in front of a computer.
    • Three Steps To A Reef Aquarium
Re:Make menu stuff independent of Album.pl?
« Reply #2 on: January 20, 2003, 20:24:55 »
Sure, basically any links that show up on the templates I would like to have control over without going into album.pl.

For example, the admin menu that shows up everywhere uses those orange buttons. I wanted to use text links, so I had to spend a lot of time going through album.pl to find that stuff and add classes to the hyperlink and remove the image tags.

I had to do the same for edit|move|delete links, email to a friend, add comments... er 'rate it' and view recent uploads.

Hey this is easy compared to what you did, but down the road it will be a pain doing it over and over with upgrades.

matt

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Make menu stuff independent of Album.pl?
« Reply #3 on: January 20, 2003, 21:26:58 »
Yeah, it is a pain... Ok, I've added an item to the to do list to make the buttons optional...

A few people have asked about this... (Of course, that's the way it *used* to be, but a few people asked for buttons... ;D)

Cheers

Offline matt_rogers

  • album.pl Hacker
  • ****
  • Posts: 117
  • Karma: +2/-0
  • Currently sitting in front of a computer.
    • Three Steps To A Reef Aquarium
Re:Make menu stuff independent of Album.pl?
« Reply #4 on: January 20, 2003, 21:37:16 »
Go figure. That's funny. :D

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Make menu stuff independent of Album.pl?
« Reply #5 on: January 21, 2003, 10:00:38 »
Yeah, teach me to change things without leaving the old option in place! ;)

Anyway, I'm part way through it now, so it'll be done in the next couple of days... (Nag if you don't hear from me...)

Cheers

Offline matt_rogers

  • album.pl Hacker
  • ****
  • Posts: 117
  • Karma: +2/-0
  • Currently sitting in front of a computer.
    • Three Steps To A Reef Aquarium
Re:Make menu stuff independent of Album.pl?
« Reply #6 on: January 21, 2003, 13:57:02 »
Wow. Cool. Just to clarify, my main beef is with having to go into album.pl to throw CLASS tags on hyperlinks. And removing the images manually.

The only other real beef is that you have put some breaks within hyperlinks - BR tags before the closing anchor tags and the like.

This causes weird things to happen in browsers. For example when I had all my thumbs going vertical in the center, I could go to the right side of the page parallel to the short description link and still change the cursor to a pointer. The hyperlink in effect is going all the way across the page with the line break. This is in IE. Before I had width set on dynwidth.

In either IE or Netscape - I can't remember - this causes a dash (minus sign) to show up under an image that has a hyperlink around it with the closing anchor on a separate line.

The best thing to do is put the hyperlink around the image with the closing anchor tag right after the image. Then print the hyperlink again around the short description with a closing anchor right after it.

You can put the short description or thumbnail name right under the image by putting it in it's own DIV or putting a BR after the image closing anchor tag.

That's all I got. :)
« Last Edit: January 21, 2003, 13:57:57 by matt_rogers »

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Make menu stuff independent of Album.pl?
« Reply #7 on: January 21, 2003, 16:11:42 »
Ok, I think I've got it. But for hyperlink classes, can't you just use the "a:hover" etc classes? Or did you want some links to look different than other ones? I'll have to see if I can fix up the
 inside link problem as well... I knew I was doing it, but didn't think it would cause a problem...

Offline matt_rogers

  • album.pl Hacker
  • ****
  • Posts: 117
  • Karma: +2/-0
  • Currently sitting in front of a computer.
    • Three Steps To A Reef Aquarium
Re:Make menu stuff independent of Album.pl?
« Reply #8 on: January 21, 2003, 16:38:07 »
Ok, I think I've got it. But for hyperlink classes, can't you just use the "a:hover" etc classes? Or did you want some links to look different than other ones?

Yep. That's it. A:hover changes them all.

If you set up the object like I said above, then you won't have the bugs and you could control the hover on the image as well as the link.

But the BR thing is mainly about avoiding bugs and keeping things clean.

matt


Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Make menu stuff independent of Album.pl?
« Reply #9 on: January 22, 2003, 09:17:08 »
Ok, cool.

So would you like to see 2 individual classes for "text" links and for "image" links (buttons, thumbnails, etc)?

I want to make sure that if I do this, I do it right.  ;)

Offline matt_rogers

  • album.pl Hacker
  • ****
  • Posts: 117
  • Karma: +2/-0
  • Currently sitting in front of a computer.
    • Three Steps To A Reef Aquarium
Re:Make menu stuff independent of Album.pl?
« Reply #10 on: January 22, 2003, 13:33:56 »
Yep. That's the idea.

And the more you have, the more control you will have. For example, if you made all the hyperlinks have a class=menu, this gives you less than if you broke it down.

What I mean is having options be class=options, admin menu have class=admin, etc..

Stating the obvious, for the record. :)

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Make menu stuff independent of Album.pl?
« Reply #11 on: January 22, 2003, 20:49:49 »
Ok, I've "done" it. (There were 56 "href's" in the code... :() I've added these new classes to the style sheet, though they're yet undefined:

Code: [Select]
/* Admin menu links */   
a.adminlink   { }

/* User option links */   
a.optionslink   { }

/* Navigation footer links */   
a.navlink   { }

/* Breadcrumbs links */   
a.breadlink   { }

/* Full size photo links */   
a.photolink   { }

/* Pages links */   
a.pageslink   { }

/* Image thimbnail links */   
a.imagethumb   { }

/* Movie thimbnail links */   
a.moviethumb   { }

/* Album thimbnail links */   
a.albumthumb   { }

The zip file has been updated with the new link classes.

I've also changed the code to stop putting a break in the thumbnail URLs, so let me know if that looks OK when you get a chance.

Cheers

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Make menu stuff independent of Album.pl?
« Reply #12 on: January 22, 2003, 22:10:30 »
Ok, I've also just finished the text menu thing. Whew!!

So the catch with this is that it doesn't automatically update the templates. So anything generated from album.pl will turn into text, but things like the "home" button, which are in album_header.tml will have to be switched over manually. Not a big deal, but when you set textmenu=1 it'll look a little goofy until you fix that.

Cheers