1
panachepad
Javascript in a block?
  • 2006/10/18 21:21

  • panachepad

  • Just popping in

  • Posts: 3

  • Since: 2006/10/18


Can I put javascript in a block or not? I just downloaded and installed the basic version 2.0.15. I also changed out that form.php file because I read somewhere on here that I should. I tried to find info about blocks, but what I found does not at all correspond with what I have.

I can add a new block, I guess, but I see no opportunity to add a custom block, as was mentioned in the post I found about this issue.

If I can't put javascript in these blocks, I may as well forget XOOPS as a system anyway.

Please advise. Thank you.

2
Quest
Re: Javascript in a block?
  • 2006/10/19 3:29

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


Yes you can add java to a custom block. I believe you have to use HTML as the Content Type before you submit your custom block. Here is a link to the F.A.Q. Section with more information. I would try it with submitting it as HTML content first. If that doesn't work then try the PHP content type.

Be sure to scroll down in this FAQ and read comments. Carnuke tells you that it works but just becareful if you are calling a remote .js to get the path correct.

FAQ: How to Create a Custom Block

To create a custom block go to your XOOPS administration menu/system/blocks
This will take you to your Blocks Administration.
Scroll down and you will see toward the bottom the area to Add a New Block. This is where you add coding etc and then click submit just below it the Add New Block form and it will be created.

HTHs
Quest

3
panachepad
Re: Javascript in a block?
  • 2006/10/19 5:15

  • panachepad

  • Just popping in

  • Posts: 3

  • Since: 2006/10/18


Hi Quest, thanks for your response. I need to put part of my code into the HEAD of the document, and also part of the code into the block itself. Let's say that I will want this block to appear on every page of my XOOPS : so what page is that? Which page is it?

4
Quest
Re: Javascript in a block?
  • 2006/10/20 1:34

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


You should put the part in the theme.html
xoopsroot/themes/yourtheme/theme.html

Then create your block, its position and choose All Pages.

Quest

5
panachepad
Re: Javascript in a block?
  • 2006/10/20 14:45

  • panachepad

  • Just popping in

  • Posts: 3

  • Since: 2006/10/18


Hi Quest! You know what? It just almost worked! The content of the box is fine. What doesn't work is the header of the box, which is an expandable content box from Flooble.
Flooble Expandable Content Box
The script to retract the box does not work.

Now I have noticed another problem. I have not even downloaded or installed the forums module, but if the forums module is just like the one used here, I can't use that. The use of the size, font, italics, etc. ... that is just Way Too Lame. Is there some way to get a forums setup that has a better message tools interface?

Login

Who's Online

345 user(s) are online (269 user(s) are browsing Support Forums)


Members: 0


Guests: 345


more...

Donat-O-Meter

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

Latest GitHub Commits