Hello all,
I had been desperately looking for a block for my partner sites but found nothing. I remember Php-Nuke had this before so I searched google and found "Fading Block".
I would like to know if someone can help me port this block to TP. It would be of a great help :) Attached is the php file and below is the copy of JS.
<!--
//Gradual-Highlight image script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}
function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
//-->
Thank you so much in advance.
[attachment deleted by admin]
Try including this one in a phpbox block type. BTW, I think this javascript effect only works in IE.
[attachment deleted by admin]
Hi IchBin,
Thank you so very much for your kind and quick reply :). It's working perfectly. Hmm, you know what? I found a scrolling one from php-nuke as well.
I know it's too much if I'm to ask you again to port it to TP...but I'd rather risk loosing my head than not to ask you. Would you be so kind to do it for me :-\ I really really appreciate your efforts and time whole heartedly. Please :-*
[attachment deleted by admin]
I think this will do the trick.
[attachment deleted by admin]
BTW, thanks for posting those! :) I'm going to have to use the last one myself.
Oh my how nice of you :). Thank you sooooo much! The last one is a lot better right? And by the way, you don't have to thank me. It is you who made the job.
Quote from: IchBinâââ,¬Å¾Ã,¢ on February 26, 2006, 02:11:19 AM
I think this javascript effect only works in IE.
Yes thats right, IE only.
Quote from: gerrymo on February 26, 2006, 07:58:07 PM
Quote from: IchBinâÃ,„Ã,¢ on February 26, 2006, 02:11:19 AM
I think this javascript effect only works in IE.
Yes thats right, IE only.
so, how will it behave in FF or Opera?
thanks.
Quote from: IchBinâ,,¢ on February 26, 2006, 07:25:45 PM
I think this will do the trick.
Ichbin,
How do you add more than one link to this script. Sorry for the dumb question, but I'm very new to all this.
I have one image, and links to the correct site when you click it. But if I add any more links, it only displays the last one. Any help would be appreciated, as this script is just what I'm after.
You'll see that there are three lines that start with $scroll. Copy one of the lines and make the necessary changes for your own images.
Quote from: IchBinâ,,¢ on November 21, 2007, 01:16:18 AM
You'll see that there are three lines that start with $scroll. Copy one of the lines and make the necessary changes for your own images.
IchBin, thanks very much for the reply.
OK, that was what I did in the first place, except I edited the links already there. Which ever one I edit last is the one that shows up on my page. I can't get the others to display.
I'm pretty thick when it comes to this stuff, so any help on this would be appreciated. Here's a link to my site, so you can see it working. It's in a left block. http://cameracraniums.com
$scroll = "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=72\"><img src=\"tp-images/arpeng.gif\" border=\"0\" title=\"Penguin Life\"alt=\"Go Get It \"></a></center><br>";
$scroll = "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=62\"><img src=\"tp-images/arap.gif\" border=\"0\" title=\"Animal Portraits\"alt=\"Go Get It \"></a></center><br>";
$scroll = "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=11\"><img src=\"tp-images/arlpg.gif\" border=\"0\" title=\"The Lonely Planet Guide\"alt=\"Go Get It \"></a></center><br>";
$scroll = "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=81\"><img src=\"tp-images/arraw.gif\" border=\"0\" title=\"Understanding RAW\"alt=\"Go Get It \"></a></center><br>";
This is how I have my links set up, and as you can see it's only displaying the last one on my site.
Yes, because what you forgot was to put the period before each equal sign. Putting a period appends it to the variable $scroll. Where as if you don't use the period, $scroll will only be set to the last line where it was set. Hence, your problem. Try this:
$scroll .= "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=72\"><img src=\"tp-images/arpeng.gif\" border=\"0\" title=\"Penguin Life\"alt=\"Go Get It \"></a></center><br>";
$scroll .= "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=62\"><img src=\"tp-images/arap.gif\" border=\"0\" title=\"Animal Portraits\"alt=\"Go Get It \"></a></center><br>";
$scroll .= "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=11\"><img src=\"tp-images/arlpg.gif\" border=\"0\" title=\"The Lonely Planet Guide\"alt=\"Go Get It \"></a></center><br>";
$scroll .= "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=81\"><img src=\"tp-images/arraw.gif\" border=\"0\" title=\"Understanding RAW\"alt=\"Go Get It \"></a></center><br>";
Thank you so much, that works perfectly.
Such a simple fix too. Told you I was thick. :idiot2:
IchBin,
As I said all seems to work perfectly, and thanks again. But. I've just checked my error log, and I'm getting this error popping up on a regular basis.
8: Undefined variable: scroll
File: /home/cameracr/public_html/forum/Themes/default/TPortal.template.php (eval?)
Line: 33
Seems to be the slinks block that's causing it, as when I turn the block off, the error no longer occurs.
Any ideas how to fix it? Please. Sorry to be a pain. ;)
$scroll is described in only these lines right?
$scroll .= "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=72\"><img src=\"tp-images/arpeng.gif\" border=\"0\" title=\"Penguin Life\"alt=\"Go Get It \"></a></center><br>";
$scroll .= "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=62\"><img src=\"tp-images/arap.gif\" border=\"0\" title=\"Animal Portraits\"alt=\"Go Get It \"></a></center><br>";
$scroll .= "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=11\"><img src=\"tp-images/arlpg.gif\" border=\"0\" title=\"The Lonely Planet Guide\"alt=\"Go Get It \"></a></center><br>";
$scroll .= "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=81\"><img src=\"tp-images/arraw.gif\" border=\"0\" title=\"Understanding RAW\"alt=\"Go Get It \"></a></center><br>";
if so try this
$scroll = "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=72\"><img src=\"tp-images/arpeng.gif\" border=\"0\" title=\"Penguin Life\"alt=\"Go Get It \"></a></center><br>";
$scroll .= "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=62\"><img src=\"tp-images/arap.gif\" border=\"0\" title=\"Animal Portraits\"alt=\"Go Get It \"></a></center><br>";
$scroll .= "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=11\"><img src=\"tp-images/arlpg.gif\" border=\"0\" title=\"The Lonely Planet Guide\"alt=\"Go Get It \"></a></center><br>";
$scroll .= "<center><a target=\"_blank\" href=\" http://www.andyrouse.co.uk/shop_specific.asp?IDproduct=81\"><img src=\"tp-images/arraw.gif\" border=\"0\" title=\"Understanding RAW\"alt=\"Go Get It \"></a></center><br>";
Thanks Dragooon.
That seems to have fixed it. Cheers. ;)
Thanks to you both, I got there in the end. :)
Glad I could Help :)