1
erzon
Modules
  • 2005/3/2 12:13

  • erzon

  • Quite a regular

  • Posts: 211

  • Since: 2005/1/1 3


I would like to make a module block..how can i do that?

is there any step by step tutorial on how to create a module with block option?

2
Mithrandir
Re: Modules

It's not that difficult, so I'm sure you can get the hang of it by looking at an existing module.

You'll want:
a) A file in the "blocks" subdirectory to your module folder (see the Dev Wiki for structure)
b) A reference in your xoops_version.php to this block (see the Dev Wiki for syntax)
c) A template for the block to use - placed in modules/examplename/templates/blocks

3
erzon
Re: Modules
  • 2005/3/2 17:12

  • erzon

  • Quite a regular

  • Posts: 211

  • Since: 2005/1/1 3


all files that my block needed should be in modules/examplename/templates/blocks directory? is that correct?

4
Mithrandir
Re: Modules

No

a) A file in the "blocks" subdirectory to your module folder

means that you should have a subdirectory in your module's folder called "blocks" which should hold the .php file for your block. This is the function file that is referenced in the module's xoops_version.php

The template for defining the block layout should be in templates/blocks

5
erzon
Re: Modules
  • 2005/3/3 5:48

  • erzon

  • Quite a regular

  • Posts: 211

  • Since: 2005/1/1 3


oh..
in templates/blocks..
is there any format i can used? or i just put the any html i want..and call the .php file in my modules/blocks directory

6
JasonMR
Re: Modules
  • 2005/3/3 6:01

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


The logic/functionality of your block is stored in .php files, which should be located at

XOOPS_ROOT/modules/YOUR_BLOCK_MOD/blocks/block_logicOfYourBlockMod.php

The files related to the presentation (output presented to users/viewers), are your template files, which are .html files, and should be stored at

XOOPS_ROOT/modules/YOUR_BLOCK_MOD/templates/blocks/block_templateOfYourBlockMod.html


Though, not sure I understood your question completely, so I do hope this is what you had been inquiering about....

7
erzon
Re: Modules
  • 2005/3/3 11:53

  • erzon

  • Quite a regular

  • Posts: 211

  • Since: 2005/1/1 3


yah i get it but i want to ask is the output in html?

is there any code example for that? or just put any html on that templates/blocks/myhtml.html

8
erzon
Re: Modules
  • 2005/3/5 2:46

  • erzon

  • Quite a regular

  • Posts: 211

  • Since: 2005/1/1 3


anyone can suggest how can i make module blocks?

Login

Who's Online

158 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

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

Latest GitHub Commits