coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: claude258 on March 16, 2006, 04:05:47 AM

Title: Re: remark on top of intermediate image
Post by: claude258 on March 16, 2006, 04:05:47 AM
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.
Title: Glowing text
Post by: Joachim Müller on March 16, 2006, 08:44:40 AM
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.
Title: Re: remark on top of intermediate image
Post by: claude258 on March 16, 2006, 12:17:49 PM
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).

Title: Re: remark on top of intermediate image
Post by: Joachim Müller on March 16, 2006, 05:14:07 PM
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.
Title: Re: remark on top of intermediate image
Post by: claude258 on March 16, 2006, 06:04:38 PM
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...
Title: Re: remark on top of intermediate image
Post by: Joachim Müller on March 16, 2006, 11:42:57 PM
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.