1
prowler
javascript in theme.html won't work
  • 2006/1/1 16:30

  • prowler

  • Just popping in

  • Posts: 3

  • Since: 2006/1/1 1


XOOPS Version: 2.2.3
Theme you are using: astonthemes.com's obscene v3
Custom template: yes
A full description of the issue:

i'm trying to insert javascript code snippets in the theme.html of my theme. the snippet is a dhtml menu for my navigation. the script works when i put it in a separate html file. there are no errors in the script. but when i insert it in my theme.html, the dhtml menu does not appear.

2
JMorris
Re: javascript in theme.html won't work
  • 2006/1/1 16:34

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


First, welcome to XOOPS!

When you make chages to themes, you must empty all the contents fo the templates_c/ folder so your changes will take effect. The templates_c/ folder is where all theme and template files are cached for faster page generation.

Note: Don't delete the file index.html in the templates_c/ folder. It is there for security reasons.

Hope this helps.

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
prowler
Re: javascript in theme.html wont work
  • 2006/1/2 1:27

  • prowler

  • Just popping in

  • Posts: 3

  • Since: 2006/1/1 1


Thanks for the welcome!

I already tried clearing my templates_c folder but the menu still doesn't appear. Also, when I made changes to my theme before, I didn't have to clear the templates_c folder to implement the changes. I've been working on my XOOPS site since November and this is the first time I encountered a problem that really has me stumped. You guys have any other solution for this? Thanks.

4
Lance_
Re: javascript in theme.html wont work
  • 2006/1/2 1:32

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


You might want to check the URL you use to get to it. Searching on the site I found a reference that the full url must be specified for it to work.
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

5
prowler
Re: javascript in theme.html wont work
  • 2006/1/2 4:49

  • prowler

  • Just popping in

  • Posts: 3

  • Since: 2006/1/1 1


The javascript code is in my theme.html. It's not an external js file.

I tried using it as an external file and it still didn't work. I specified the file's URL.

It's driving me insane!

6
CeBepuH
Re: javascript in theme.html wont work
  • 2006/1/2 5:49

  • CeBepuH

  • Not too shy to talk

  • Posts: 128

  • Since: 2002/6/10


Is it possible that there is some incompatability between the javascript that comes with XOOPS and your code?

To verify this you can try deleting this from the head of your theme:
<script type="text/javascript">
<!--
<{
$xoops_js}>
//-->
</script>


Then clear templates_c/ and check whether your menu works. If it works, you'll need to rewrite your menus script.

After you have finished testing put back in the theme.html the code you deleted.
Humans need fantasy to be humans. To be the place where the fallen angel meets the rising ape.

7
JMorris
Re: javascript in theme.html wont work
  • 2006/1/2 10:30

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


prowler,

Could you either post a link to your theme or post your theme's code here (w/ the javascript you're trying to use) so we can get a better idea of what is going on with your situation?

TIP: If you place your code in
?>
tags, it will make it much easier to read.

Thanks,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

8
plusangel
Re: javascript in theme.html wont work
  • 2006/1/2 11:23

  • plusangel

  • Just popping in

  • Posts: 90

  • Since: 2005/2/2 1


A week ago, I was trying to add a js script (for adding the snow effect) in my theme html.

By placing it inside the <head> tag nothing was happening but once I've inserted into the <body> everything is working fine.

The script exists as a separate file and I'm using the following code in order to include it
<script type="text/javascript" src="<{$xoops_imageurl}>js/snow.js"></script>

Perhaps this will help you...
The official greek support site for xoops

9
orgunozcu
Re: javascript in theme.html wont work
  • 2006/1/2 16:25

  • orgunozcu

  • Not too shy to talk

  • Posts: 136

  • Since: 2005/9/1 5


hehehe

hallo .. i use the same theme.. and i did it...

exalple: www.bozkirhaber.com on the right for reklame..

how did i do=

first open theme.html by front page..

than go the html side..

than select all and cut all..

than go page side and creat two table and

and go again html side the letf side paste all html (before yu cut) and the right side paste your java cod..

than it works...

but be careful it doesnt work by firefork

sorry my bad english

my site: www.bozkirhaber.com

MY THEME HTML KOD

Quote:
<meta http-equiv="Content-Language" content="tr">
<table border="1" cellpadding="0" cellspacing="0" style="border-width:0; border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="100%" style="border-style: none; border-width: medium"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1254" />

<meta http-equiv="content-language" content="tr" />

<meta name="robots" content="<{$xoops_meta_robots}>" />

<meta name="Keywords" content="<{$xoops_meta_keywords}>" />

<meta name="Description" content="<{$xoops_meta_description}>" />

<meta name="rating" content="<{$xoops_meta_rating}>" />

<meta name="author" content="<{$xoops_meta_author}>" />

<meta name="copyright" content="<{$xoops_meta_copyright}>" />

<meta name="generator" content="Microsoft FrontPage 5.0" />

<meta name="ProgId" content="FrontPage.Editor.Document">

<title><{$xoops_sitename}>-<{$xoops_pagetitle}></title>

<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />

<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />

<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_themecss}>" />

<!-- RMV: added module header -->

<{$xoops_module_header}>

<script type="text/javascript">

<!--

<{$xoops_js}>

//-->

</script>

</head>

<body bgcolor="#CADDA6">

<div align="center" id="obCenter" style="width: 654; height: 498">

<div align="right">

<table cellspacing="0" id="obLayout" width="992" height="244" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" align="right">

<tr>

<td rowspan="3" id="obSHL" width="19" height="244" align="right" valign="top" ><img src="<{$xoops_imageurl}>/images/1px.gif" width="17" height="1" alt="" /></td>

<td id="obR1" width="990" height="1" ></td>

<td rowspan="3" id="obSHR" width="19" height="244" ><img src="<{$xoops_imageurl}>/images/1px.gif" width="17" height="1" alt="" /></td>

</tr>

<tr>

<td id="obHead" width="990" height="1" >
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="100%" style="border-style: none; border-width: medium">
<p align="center">
<a href="http://www.bozkirhaber.com/xoportal/">
<img height="120" src="http://www.bozkirhaber.com/logo1.jpg" width="100%" alt="::..BozkirHaber.Com..::..::..İnadına Bozkırlı'yız..::" border="0"></a></td>
</tr>
<tr>
<td width="100%" style="border-left: medium none #111111; border-right: medium none #111111; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium" align="center">
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" width="100%" id="AutoNumber2" height="14">
<tr>
<td width="14%" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top: medium none #111111; border-bottom: medium none #111111" height="12">
<p align="center">
<font size="1">
<a target="_top" href="http://www.bozkirhaber.com/xoportal/">
<img border="0" src="http://www.bozkirhaber.com/xoportal/anasayfa.gif" align="left" width="125" height="24" alt="ANASAYFA' ya GİT !!"></a></font></td>
<td width="76%" align="center" style="border-style: none; border-width: medium" height="12">
<p align="center">
<a target="_top" href="http://www.bozkirhaber.com/xoportal/modules/icontent/index.php?op=explore¤tDir=13">
<img border="0" src="http://www.bozkirhaber.com/xoportal/themes/obscene_v3_3c/esnaflarimiz.gif" width="125" height="24"></a></td>
<td width="14%" align="center" style="border-style: none; border-width: medium" height="12">
<a href="http://www.bozkirhaber.com/xoportal/modules/newbb/" target="_top">
<img border="0" src="http://www.bozkirhaber.com/xoportal/forumlar.gif" align="left" width="120" height="24" alt="FORUMLAR' a GİT!!"></a></td>
<td width="9%" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top: medium none #111111; border-bottom: medium none #111111" height="12">
</td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</table>
</td>

</tr>

<tr>

<td width="990" height="295">
<table id="obMn" cellspacing="0" width="63%" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0">

<tr>
<{if !empty($xoops_lblocks)}>
<td id="leftcolumn" bgcolor="#CADDA6" width="100%" > <!-- Start left blocks loop -->

<{foreach item=block from=$xoops_lblocks}> <{include file="obscene_v3_3c/obblock_l.html"}> <{/foreach}> <br />

<img src="<{$xoops_imageurl}>/images/1px.gif" class="obSpacer" alt="" />

<!-- End left blocks loop --></td>
<{/if}>
<td id="centercolumn" bgcolor="#CADDA6" width="100%" ><{if $xoops_showcblock == 1}>

<table cellspacing="0">

<tr>

<td id="centerCcolumn" colspan="2" width="100%"> <!-- Start center-center blocks loop -->

<{foreach item=block from=$xoops_ccblocks}> <{include file="obscene_v3_3c/obblock_c.html"}> <{/foreach}>

<!-- End center-center blocks loop --> </td>

</tr>

<tr>

<td id="centerLcolumn" width="100%"> <!-- Start center-left blocks loop -->

<{foreach item=block from=$xoops_clblocks}> <{include file="obscene_v3_3c/obblock_c.html"}> <{/foreach}>

<!-- End center-left blocks loop --> </td>

<td id="centerRcolumn" width="100%"> <!-- Start center-right blocks loop -->

<{foreach item=block from=$xoops_crblocks}> <{include file="obscene_v3_3c/obblock_c.html"}> <{/foreach}>

<!-- End center-right blocks loop --> </td>

</tr>

</table>

<{/if}>

<div id="content"> <{$xoops_contents}> </div>

<br />

<br />

<br />

<div align="left">

<table cellspacing="0" align="left" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0">

<tr>

<td id="cmsFooter" width="100%" ><{$xoops_footer}><p><{$xoops_banner}></td>

</tr>

</table>
</div>
</td>

<{if $xoops_showrblock == 1}>

<td id="rightcolumn" bgcolor="#CADDA6" width="100%" ><{foreach item=block from=$xoops_rblocks}> <{include file="obscene_v3_3c/obblock_l.html"}> <{/foreach}><br />

<img src="<{$xoops_imageurl}>/images/1px.gif" class="obSpacer" alt="" /></td>

<{/if}> </tr>

</table></td>

</tr>

</table>

</div>

</div>
</body>

</html></td>
<td width="100%" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top: medium none #111111; border-bottom: medium none #111111" align="right" valign="top"><html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
<title>Yeni Sayfa 1</title>
</head>

<body>
<DIV id=frmfly
style="DISPLAY: none; LEFT: -200px; VISIBILITY: visible; WIDTH: 128px; POSITION: absolute; TOP: 2px"
align=left>
<TABLE height=180 cellSpacing=0 cellPadding=0 width=128 align=right
bgColor=#ffffff border=0>
<FORM name=frmAdSticky>
<TBODY>
<TR>
<TD colSpan=2 height=17><IMG
src="http://www.bozkirhaber.com/xoportal/header.gif" width="115" height="18"></TD></TR>
<TR>
<TD><IMG height=204
src="leftbar.gif" width=6></TD>
<TD vAlign=top align=right height=137>
<CENTER><A
href="http://www.bozkirhaber.com/xoportal/modules/contact/"><!-- -->
<IMG
src="http://www.bozkirhaber.com/xoportal/haber-stc.gif" border=0 width="120" height="200">
</A></CENTER></TD></TR>
<TR>
<TD colSpan=2>
<IMG onclick=FooterClick();
src="http://www.bozkirhaber.com/xoportal/footer.gif" width="115" height="22"> </TD></TR></FORM></TBODY></TABLE></DIV>
<DIV id=fly2
style="DISPLAY: none; LEFT: 1043; VISIBILITY: hidden; WIDTH: 79; POSITION: absolute; TOP: 14; HEIGHT: 30"
align=right><SPAN style="CURSOR: hand" onclick=FooterOpen()>
<IMG
src="http://www.bozkirhaber.com/xoportal/show_ad.gif" width="79" height="26"></SPAN> </DIV>
<SCRIPT language=JScript event=onresize for=window>
srs101();
</SCRIPT>

<SCRIPT language=JScript event=onscroll for=window>
srs101();
</SCRIPT>

<SCRIPT language=javascript>

function FooterOpen() {
srch='on';
frmfly.style.visibility='visible';
frmfly.style.display='inline';
fly2.style.visibility='hidden';
reg('on');
srs101();
}

function FooterClick() {
srch='off';
frmfly.style.visibility='hidden';
fly2.style.top=frmfly.style.posTop;
fly2.style.left=frmfly.style.posLeft;
fly2.style.visibility='visible';
fly2.style.display='block';
reg('off');
}

function gtcc(x){
var ckstr=x+"=";
if(document.cookie.length>0){
ofst=document.cookie.indexOf(ckstr);
if(ofst!=-1){
ofst+=ckstr.length;
trm=document.cookie.indexOf(";",ofst);
if(trm==-1){
trm=document.cookie.length;
}
return unescape(document.cookie.substring(ofst,trm));
}
}
}

function stcc(nm,vl,ex){
// document.cookie=nm+"="+escape(vl)+((ex==null)?"":("; expires="+ex.toGMTString()))
}

function reg(yn) {
//var td=new Date();
var exp=new Date();
exp.setTime(exp.getTime()+(24*60*60*1000))
stcc("srchbg",yn,exp)
frrf=yn;
}

function srs101() {
with(document.body){
//if((srch=="on")&&(frrf=="on")){
if(clientWidth>725){
frmfly.style.left=clientWidth-nOffSet;
frmfly.style.top=scrollTop+2;
}
/*}else if((clientWidth>725)&&(winwide=="off")){
frmfly.style.top=scrollTop+2;
fly2.style.top=scrollTop+2;
frmfly.style.left=clientWidth-nOffSet;
fly2.style.left=clientWidth-nOffSet;
frmfly.style.display='';fly2.style.display='';
setTimeout("var winwide='on';var srch='on';var frrf='on';srs101();",125);
} */
}
}

var msnbcsrchyn=gtcc("srchbg")
if(msnbcsrchyn!=null){frrf=msnbcsrchyn}else{frrf="on";}
var srch="off";
var winwide="on";
var nOffSet = 128;
frmfly.style.posLeft = document.body.clientWidth-nOffSet;
fly2.style.posLeft = document.body.clientWidth-nOffSet;

if(document.body.clientWidth>725){
var srch="on";
setTimeout("frmfly.style.display='';srs101();",500);
}else{
var winwide="off";
}

if(document.body.clientWidth>725){
//if ((srch=="on")&&(frrf=="on")) {
frmfly.style.visibility='visible';
fly2.style.visibility='hidden';
srs101();
/*} else {
frmfly.style.visibility='hidden';
with(fly2.style){
top=frmfly.style.posTop;
left=frmfly.style.posLeft;
visibility='visible';
display='none'
}
srs101();
setTimeout("fly2.style.display='';",100);
}*/
}
</SCRIPT>
</body>

</html></td>
</tr>
</table>
www.cancer-aids.net

www.cinselliksaglik.com

www.konyaninsesi.com
www.psikolojikdanisman.org
www.xoopshocasi.com

Login

Who's Online

218 user(s) are online (149 user(s) are browsing Support Forums)


Members: 0


Guests: 218


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits