Re: remark on top of intermediate image Re: remark on top of intermediate image
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Re: remark on top of intermediate image

Started by claude258, March 16, 2006, 04:05:47 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

claude258

Ok, now I would like to make it a little more fancy... 8)
I would like to make the text glow or something like it...

I tried to add this in the head section of template.html:

<style>
<!--
#glowtext{
filter:glow(color=FFFF00,strength=3);
width:100%;
}
-->
</style>

<script language="JavaScript1.2">

function glowit(which){
if (document.all.glowtext[which].filters[0].strength==3)
document.all.glowtext[which].filters[0].strength=2
else
document.all.glowtext[which].filters[0].strength=3
}

function glowit2(which){
if (document.all.glowtext.filters[0].strength==3)
document.all.glowtext.filters[0].strength=2
else
document.all.glowtext.filters[0].strength=3
}

function startglowing(){
if (document.all.glowtext&&glowtext.length){
for (i=0;i<glowtext.length;i++)
eval('setInterval("glowit('+i+')",150)')
}
else if (glowtext)
setInterval("glowit2(0)",150)
}

if (document.all)
window.onload=startglowing
</script>


then added the following in theme's theme.php (text over the intermediate image):
<span id="glowtext">This is a glowing text</span>

but it is not working. The text is not glowing...

Am I doing something wrong?

Thanks.

Joachim Müller

one issue per thread, I split this posting from http://forum.coppermine-gallery.net/index.php?topic=29003.0, changing the subject from Re: remark on top of intermediate image to Glowing text
Post a link to your page where you have your custom code applied.

claude258

http://claudebriere.net/coppermine/displayimage.php?album=47&pos=0

This link shows the text without the script for glowing. I will come back later with the script applied (but it will appeared the same way on the screen).


Joachim Müller

not sure what your JavaScript is suppossed to do or why there is a browser switch in it that won't do anything, as the glow filter is proprietary MS IE only.

claude258

In fact, the script I want to add is this one:
http://www.dynamicdrive.com/dynamicindex10/glowtext.htm

I am not sure where to add those codes...

Joachim Müller

1) This is an IE only script. In FF (or any other browser), it won't do anything
2) Don't break the license of Dynamic Drive - don't drop their copyright disclaimer, it's mandatory to keep it. Would have been helpful if you would have kept it intact in the first place, as I would have been able to take a look at the original in the first place
3) Add the style definition to themes/yourtheme/style.css, add the JavaScript section to themes/yourtheme/template.html or script.js. As I don't know which section you want glowing, I can't recommend what part of the code to edit to add the id attribute to. Keep in mind that IDs need to be unique.
4) The JavaScript bit actually does little to nothing, the actual code is the proprietary css filter.