dan.tee
Forum Replies Created
-
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickAnd finally, the solution. A friend came up with this, and it works. He suggested adding this to the img tag, straight after the rotate.php
?<?php echo rand(0,999); ?>
Works a treat! Thanks for all your help and suggestions Esmi and jeFFF – much appreciated!
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickPhew. Thank goodness for back up, that’s all I can say. Not sure what went wrong there Esmi, but there was definitely a major problem with that code! ??
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickNope, doesn’t work on my site. The server seems to get stuck in a loop and gives up, getting no further than a blank white page.
And unfortunately, now I’ve removed the offending code and uploaded the original page, the site is still down. Whoops. ??
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickOK, I’ll give it a try!
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickThanks Esmi, but that script, unless I’m mistaken, will only run once on load. Then the chosen image will just sit there until the user leaves the site. They will see a new image next time the sidebar loads.
I want the side bar to load EACH time a page link in the main nav is clicked.
The really elegant thing about Matt’s script is that it doesn’t care how many images are in the folder, not what they’re called. This makes things much simpler for clients!
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickOf course this is difficult, because the links are created from the names of the pages on the database, not from any hardwired
<a>
tag. I think I’m going to give up. ??Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickFor example could something be added to the a tags in the header.php nav bar so that when they’re clicked, the sidebar also refreshes? I’m sure this isn’t a complicated thing to do (but then I know you developers hear that all the time!)
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickThat’s what I’ve been trying to find, but nothing seems to work. On his own page where I found this script, Mat Mullenweg just has it showing an image in a post. I think the issue is not so much where the image appears, but getting the side bar to refresh when the nav bar links are clicked. Is there something that could be added to the header.php to make this happen?
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickgot all excited there for a second jeFFF, when I finally saw your actual code snippet here on the forum – you’d used double quotes, not single quotes as I assumed they would be when all I could see was the garbage that showed up in the forum email that I received. So I copied and pasted with the single quotes but no joy.
Anyone else?
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickahh, that explains it then. Have you got any ideas how to fix my refresh problem? ??
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickThe forum at least is working properly now! Any other ideas as to how I can solve my refresh problem?
I put the code snippet into rotate.php – is that where you meant me to put it?
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickThanks for the code snippet – I’ve put it in, and it’s made no difference for me, on my browser: Safari 5.0.3, OS X 10.6.4 My client is also using the same computer type and set up and it hasn’t been working for him either.
The other slightly odd thing is that I’m only seeing your replies in my email, not on the forum itself – what’s that about? ??
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickCurrently the images are in [theme]/images/sidebar. The code I’m using is Matt Mullenweg’s image rotator. It consists of an php file called ‘rotate.php’ that lives in the sidebar images folder. To use it, you just add rotate.php to the img src tag.
The rotate works just fine – when the sidebar loads for the first time, it chooses an image and loads it in the side bar. But when you subsequently click on, say, ‘showreel’ it doesn’t refresh the image. That’s what I’m after.
Forum: Hacks
In reply to: Forcing the sidebar to refresh on each 'static' page link clickHi JeFFF
Thanks for having a look. I’ve searched for plugins that do this job and couldn’t find anything suitable. I think the real issue is that whatever is in the sidebar that swaps images needs to know when the page links are clicked and then perform a reload and thus a new image. That seems to be the problem.
Thankfully adding the content is the client’s job! At least I can show him a working site now. ‘Sir’ was merely a recognition of greater talent than mine – I much prefer drawing things than code!
Thanks again.