Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Evrviglnt, if you’re still having the problem. Contact your host. I had the same issue down to the lines of code referenced in the error message.

    I went through the process of reviewing files, even swapping a few out for clean versions in the event they had been corrupted. That didn’t solve it. The answer was getting the host to check server permissions. They had accidentally screwed something up during a recent upgrade. Took them a few minutes to fix on their end and all was well.

    Thread Starter crazypaws

    (@crazypaws)

    For those encountering this problem in the future – if you recently did server work, or your web host made changes, check that configuration and access permissions weren’t altered during the process.

    My efforts to fix this problem on my own weren’t working. I contacted my hosting provider and found they had accidentally altered some of the access provisions and I was unable to change them myself. A few corrections on their part and all was fixed.

    Have either of you found a solution? I’ve begun having the same issues, in fact, the exact same lines referenced in your error message Evrviglnt and the same problem, december uploads are blocked.

    The common answer is that there is an extra space in the admin-functions.php file after the ?> closing tag. I checked that and found nothing.

    Another theory is that CH Mod permissions someone got out of whack. I haven’t found a problem there either.

    As a workaround, you can manually ftp an image to your server’s uploads folder and then link it but it’s a tedious solution.

    As a side note, who do you use for webhosting? Given we’re having the same problem and I know my webhost did some recent server work, they might have corrupted something. Any one have ideas?

    Thread Starter crazypaws

    (@crazypaws)

    macmanx, thanks for the note. As noted in the post, I read the same faq and tried that. Also, there is no line 1879 in admin-functions.php

    Thanks for posting your solution. I had accidentally replicated the same error and couldnt’ figure out why the preview window was no longer working. Quick change and all fixed. thank you.

    Thread Starter crazypaws

    (@crazypaws)

    the name of the Div ID used could be anything. It is specific to your theme and how it was defined in your CSS (see your style.css file or style.php if your theme works that way).

    If your theme uses headerimg as the term, than you would use that instead. in my theme I have the image component defined as headerimage. that’s all.

    Do note that there are many ways to make your header into a clickable link. The javascript method I used was because of some other stuff i was trying to sort out.

    if you know basic html, you can wrap the call for your header image in an anchor <a href=' link ' /a> kind of thing and it would work without the javascript approach.

    Thread Starter crazypaws

    (@crazypaws)

    Doodlebee – thanks for the follow up. Your comments about mixing the javascript and php make sense. There was a reason I went with that approach (think it’s called desperation 😉 )

    I took your advice . …and even better, thanks no small part to you, think I figured out the problem. It’s simple (i think) but it wasn’t obvious or related to the conditionals approach.

    The short answer is the function array I mentioned in my original post (and then wrote off and forgot about) was causing problems. The slightly long winded explanation, for you if you’re curious, or anyone else who comes along with similar struggles is:

    My theme originally had css entries in my style.php file for #headerimage that set a background image as header.jpg. I changed that CSS early on but didn’t think about the array in function.php which worked with those terms. If I had simply created a new ID like #headpicture and worked off that aka <div id="headpicture"> all would have been fine, I think. Instead, I kept using the same naming conventions (<div id="headerimage">) without a clue they were otherwise engaged.

    I tried all kinds of things from the javascript mess to different conditionals because I assumed it was my coding at fault. Each failure led to a new method to try. Being inexperienced it was easy to doubt my coding (not an area of confidence) or the strategy I was trying. I figured I was an idiot beginner 😉

    I trusted your approach but when that didn’t work either it lit the lightbulb that is my pea sized intellect and made me realize it was something else.

    I started searching for possiblities and breaking things to see what would happen until I found that array again. I commented it out as an experiment and it looks for certain like the issue was there. I’m too tired to put together a solution but I’m pretty confident it won’t be a big deal tomorrow.

    I don’t want to celebrate before I cross the finish line but I’m relieved to have an explanation other than me not being able to add 2+2. That was a frustrating tiresome educational exercise!

    thanks again, so much, for your input.
    cheers.

    Thread Starter crazypaws

    (@crazypaws)

    doodlebee, thank you for taking the time to reply. Going through the learning curve and the kindness of people helping on these forums is a big help.

    I’ve played around with your suggestion but there is a lightbulb that is not going on for me.

    You said don’t put the switch in a javascript, that php does it for you. I don’t understand what you mean.

    The onclick javascript language in the original is there to make the header image link back to home page. My goal is to have that functionality remain but at the same time, let the headerimage itself switch depending on the category being viewed.

    I read up on your alternative idea of using category templates in the codex during my first pass at this. I also spent hours searching and studying the forums.

    the illustration code i put above has only one elseif statement but my site will have lots of parent and child categories planned so conditional structure seems better than writing cat-2.php to cat-19.php files. As for location, adding the call for different files to my headerimage call in my header.php file seemed like the right place to put the magic …

    ….but maybe the throbbing headache i’m getting from fixating on this, and the desperation for help, should tell me I’m over my head with this approach.

    I have a bad feeling I’m making something easy unnecessarily complex.

    Could you kindly clarify a bit more on what you meant, or what I’m misunderstanding? thanks again.

    Thread Starter crazypaws

    (@crazypaws)

    thanks Handy. I looked at that plugin and it may help as a last resort but I’d prefer to try and code it in directly.

    The theory I’ve found in the codex and support forum that seems most fitting, is to add some lines to header.php like:

    class="<?php if (is_home()) echo('headerimage1');
    elseif(is_category('red') ) echo('headerimage2');
    elseif(is_category('sox') )echo('headerimage3'); ?>

    I’d then add entries to style.php for each of the headerimage examples – header2, header3, etc. that specify different pictures by url.

    Red and Sox would be actual category names in the code (might also work with category ID numbers but don’t know).

    In theory, the is_category string could also be set up nested such that 1 image could be applied to a parent category and all its children, or some variation. something like ‘is_category(‘red’, ‘blue’)’. That way one line would allow a single category and all its children to call for 1 headerimage.

    adding to the approach for pages (which is not needed for me but might be for some), you could (again in theory) use elseif(is_page) in place of elseif(is_category) and the call would then allow specific header images for pages too.

    The theory sounds easier and cleaner than the approach of creating tons of custom category.php templates or using a plugin – both of which others have suggested….still so far, with the water theme, i haven’t gotten it to work.

    It may just be that I’ve been working on things too much and I’m missing something easy or making a rookie mistake like putting the code lines in the wrong place. Not sure. For that matter, maybe I’ve got something wrong in the above theory?

    any further help always appreciated. cheers.

    I agree with Sam’s redirect to your other request. It’s great you figured out that problem but not adding the solution to your post leaves a useless page. Kindly add it so the next person searching for something like that doesn’t have to stumble through an even longer list of incomplete help requests before finding an answer to their question.

    As for this question – certainly possible. solution is to look through your theme files and see which ones call for the sidebar (page.php? header.php? etc). You’d then make a similar file that doesn’t call for it and use that in a template for the page you are a creating.

    Specifically, where the sidebar call is depends on what theme your using. different themes may place the sidebar call in different places.

    As an example – if the theme has the sidebar call in the header.php file. One solution to creating a page without the sidebar is to create a second file called header2.php that is identical to header.php except you’ve commented out (or deleted) the sidebar call (Get Sidebar line). Next make a page template that calls header2 instead of header.php and use that page template for creating the page.

    you can also add a few lines of CSS to your stylesheet or style.php to give pages using header2 a different look.

    there’s lots of detail on how to do all of this in the codex.

    might try the wp-table plugin. I’ve been playing with it and it seems like a great plug in creation.

    Believe you’d have to hand code the links into the cells but the plugin will help set up the tabular format and data …so will save a lot of coding if it works for you.

    Thread Starter crazypaws

    (@crazypaws)

    just to clarify/follow up on my earlier request for help –
    I do know that changing <div id="headerimage"> in my header.php file to `<div id=”headerimage” onclick=”location.href='<?php bloginfo(‘url’); ?
    >’;” style=”cursor: pointer;”>` will make my header image clickable. I just want to be sure that any code to change images based on categories doesn’t break that – hence the joined wish list of two things.

    also – the example I linked for a site with header images that change based on category turns out to use a plugin to randomly choose a header pic. It is not coded with a specific pic per category.

    any help anyone can provide would be much appreciated. thanks.

    not sure if you ever found your answer. these posts are kind of old…but if still looking. might try the code from the the themes Water or Water3 in the theme viewer. they have cool top nav drop down buttons in the header.php file.

    you could probably work backwards from that code or get some ideas.

Viewing 13 replies - 1 through 13 (of 13 total)