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">

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 tag nothing was happening but once I've inserted into the 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: http://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: http://www.bozkirhaber.com

MY THEME HTML KOD

Quote:
































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









<{$xoops_module_header}>














































::..BozkirHaber.Com..::..::..İnadına Bozkırlı'yız..::








<{if !empty($xoops_lblocks)}>

<{/if}>


<{if $xoops_showrblock == 1}>



<{/if}>



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




<{if $xoops_showcblock == 1}>



















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



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



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



<{/if}>

<{$xoops_contents}>





















<{$xoops_footer}>

<{$xoops_banner}>



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















Yeni Sayfa 1



style="DISPLAY: none; LEFT: -200px; VISIBILITY: visible; WIDTH: 128px; POSITION: absolute; TOP: 2px"
align=left>
bgColor=#ffffff border=0>








src="http://www.bozkirhaber.com/xoportal/header.gif" width="115" height="18">
src="leftbar.gif" width=6>
href="http://www.bozkirhaber.com/xoportal/modules/contact/">
src="http://www.bozkirhaber.com/xoportal/haber-stc.gif" border=0 width="120" height="200">

src="http://www.bozkirhaber.com/xoportal/footer.gif" width="115" height="22">

style="DISPLAY: none; LEFT: 1043; VISIBILITY: hidden; WIDTH: 79; POSITION: absolute; TOP: 14; HEIGHT: 30"
align=right>
src="http://www.bozkirhaber.com/xoportal/show_ad.gif" width="79" height="26">









Login

Who's Online

307 user(s) are online (63 user(s) are browsing Support Forums)


Members: 0


Guests: 307


more...

Donat-O-Meter

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

Latest GitHub Commits