• Resolved Doodlebee

    (@doodlebee)


    I had another post earlier today, and this has a bit to do with that one – except circumstances have changed. Iwasn’t sure if it owuld be better to start a whole new thread (they have changed that much) or reply to the other one – so I flipped a coin and “new thread” won.

    So, here’s the situation: I have a *seriously* customized sidebar. The way things are going, it’s getting out of control – my sidebar file is immense. There has to be a better way of doing this.

    I’m using WordPress as a CMS. There are many *many* pages and subpages. Last count was around 50 Pages (this count is including the subs – there’s about 7 parents). Now, the client has requested that all of the links be *images* not text. Okay, I’ve gotten around that – I’ve just been placing images in the titles of the Pages, rather than text. However, because of the serious customization going on, I’ve had to abandon the use of the get_pages() list to call in the sidebar links, and instead, I’ve had to hand-code each link. This is getting to be a real PITA. And if the client ever adds a new page…agh. They’ll never figure out how to put the new link in.

    The reason for the major customization is this (i’m going to list it, trying to be as clear as I can):

    The list is a CSS-based hover list. When you mouseover the links, it’s like a javascript image swap – but it’s total CSS, no javascript needed. The thing I require for this to function – that the get_pages() list doesn’t give me – is that each link has its own ID. This is necessary for the links to work (the way it works is the background for the LI tag is the “on” state for the image. But the “off” state image is placed within the LI tag, hiding the background. Then you set a “display:none” in the stylesheet for the hover of the link, and it looks like an image swap, when in reality it’s just the image disappearing from view and exposing the background. Since each background image is different, each link has to have it’s own ID.)

    Now the kicker is, I also have to have a current page and home page state for each link as well. So this sidebar coding is getting WAY out of control. I’ve been toying with ideas on how to get this to function, but I’m coming up blank – there *has* to be a better way to do this – one that simply allows the client to create a new Page, and the new link just shows up in the sidebar (or delete an old one and the link goes away).

    If only they didn’t want so many hover states and images – argh! Would anyone have any ideas or suggestions on how to get this to work?

    Or, alternatively, if I write a function to place in the wp_meta(), would that work? If I did that, could I save the function as a seperate file and call it in? What would I have to do to get that to work? (OMG, am I talking about writing my first plugin without even knowing it?!?)

    I’d really appreciate any help you all could give. I gotta have this done by Monday morning (not that this is *your* problem, but it’s such a headache!)

Viewing 6 replies - 16 through 21 (of 21 total)
  • 1. If a client is idiot – do you have to do whatever they say?

    2. To be honest I always feel a bit… hmm… <trying to be nice and mild> confused(?) when somebody has a paid job and is asking repeatedly for free support in the forum.

    3. Call me old-fashioned – but that sucks.

    Thread Starter Doodlebee

    (@doodlebee)

    1) no, but I don’t work directly with the client, so I try to do what I can. But as someone once said, if an idea doesn’t seem crazy to begin with, then it’s not an idea worth pursuing in the first place. Maybe it’s dumb, but maybe if I get it figured out, it’ll end up being something that’s actually very useful.

    2) I understand what you’re saying there, but I don’t get paid to learn. Plus, I asked this question here thinking that, if it got answered, it could help someone else down the line. Plus, the questions I ask *usually* (if not always) get implemented and passed around as free information, whereas if someone paid for the information I couldn’t pass it around freely. I ask my questions in the interest of learning – not just to stick some cool stuff on a site that I get paid to do, and only I get to reap the benefits from it. (I make more sites for free than I do for pay – so many times I refer to *anyone* I’m doing a site for as a “client” regardless of whether I get paid or not. I even refer to the people on Install4Free as “clients”.)

    3) If you mean the situation, yeah. If you mean that I’m asking this question here instead of in the pro list, ‘kay. Fine, if that’s what you’d rather me do, then I will. But for the record, most of the questions I ask are *not* for paid jobs – they are for the sake of advancing my knowledge in what WordPress (and other things) can do, and how far I can push it, so I can pass it along later on in various ways. If the client is going to pay to have someone else do this, then I won’t have the privilege (or the fun) of figuring it out and sharing how it’s done so others can benefit from it.

    Call me old fashioned, but *that* sucks. πŸ˜‰

    If someone comes asking for help and a solution can be provided, it shouldn’t matter how it’s implemented or if money exchanged hands with the final recipient, or whatever. I do not recall a member agreement to these support forums requiring information obtained here must be passed on without cost and only used for the betterment of humankind.

    But if we can keep this thread from devolving into yet another personal opinion snipe hunt…

    http://wordpress.org/support/topic/88921#post-452100

    doodlebee, this hints at *a* method for incorporating what you’re after rather than having to edit core files. But a better one may be to rewrite the various Page link functions and slip all of that into a plugin, especially since it would allow far more customization of the output without the additional overhead.

    Thread Starter Doodlebee

    (@doodlebee)

    But a better one may be to rewrite the various Page link functions and slip all of that into a plugin,

    That’s what I thought I would have to do πŸ™‚ I’ve never written a plugin before, but I guess it’s time to learn!

    Thaks for the link – I’ll definitely check it out. And thanks for all the help, everyone – if I *do* get it figured out, I will most deinfitely post what happens back here πŸ™‚

    (I’ll go ahead and mark this “resolved” anyway…you all have given me enough to go on, I think!)

    And by the way…

    information obtained here must be passed on without cost and only used for the betterment of humankind.

    Personally, I *do* look at it that way – but I only hold myself to that standard. But “betterment of humankind”? LOL No, but I don’t like to withhold goodies, ‘specially when there was a lot of help backing me up in figuring things out πŸ™‚

    Thread Starter Doodlebee

    (@doodlebee)

    Okay, I wanted to update – mainly because vkaryl was interested in this thread for possible future uses.

    I got it to work. I *did* have to write a plugin. (Holy crap, I wrote a plugin!) It’s uglier than hell, and I know it – I know it could be cleaned up and some stuff shaved out of it, but by God it works and I don’t care!

    Once I’m finished tweaking, I figure I’ll play with it later on and *try* to clean it up – or maybe someone who’s better at PHP code than I am would like to look at it and give that a shot (it really is a mess) – but to vkaryl (and anyone else who’s interested), I can post it on my site for download or just email it to you if you’d like, for purposes of posterity, if nothing else. It’s waaaaayyy too huge to even think of posting here. Moshu would have my ass on a platter for sure if I did that! πŸ˜‰

    Hiya lady…. posting a link to download is fine, or if you’d rather, you can email it zipped to me at vkaryl *at* bytehaven *dot* com. And yes, I am very interested – because I no sooner got online this morning than the client I mentioned mailed me about a new site…. and I can practically guarantee she’s going to want something very similar.

    So I’m really happy this is working, I never worry about “ugly” plugins as long as they work…. Thanks bunches!

Viewing 6 replies - 16 through 21 (of 21 total)

The topic ‘seriously customized sidebar’ is closed to new replies.