xoops forums

cmagana

Not too shy to talk
Posted on: 2003/12/30 20:15
cmagana
cmagana (Show more)
Not too shy to talk
Posts: 131
Since: 2003/11/8
#1

Tutorial about how to do Blocks and Modules???

Hello
I'm looking for a tutorial about how to do blocks and modules, do anybody know where I can find it??

Dave_L

XOOPS is my life!
Posted on: 2003/12/30 23:06
Dave_L
Dave_L (Show more)
XOOPS is my life!
Posts: 2277
Since: 2003/11/7
#2

Re: Tutorial about how to do Blocks and Modules???

Are you asking how to use existing blocks and modules, or how to create new blocks and modules?

cmagana

Not too shy to talk
Posted on: 2003/12/31 0:27
cmagana
cmagana (Show more)
Not too shy to talk
Posts: 131
Since: 2003/11/8
#3

Re: Tutorial about how to do Blocks and Modules???

I want to create new modules and blocks, but not in html, I want to create blocks with php and connection to data base, I have tried but it doesn't works, wich variables or functions must I use??

JackJ

Community Support Member
Posted on: 2003/12/31 0:46
JackJ
JackJ (Show more)
Community Support Member
Posts: 747
Since: 2003/8/31
#4

Re: Tutorial about how to do Blocks and Modules???

Did you try the XOOPS Wiki and the:

XOOPS module developer's guide?
Posted on: 2003/12/31 1:14
CBlue
CBlue (Show more)
Posts: 1244
Since: 2003/6/28
#5

Re: Tutorial about how to do Blocks and Modules???

Cmagana, you may try searching the forums, expecially the usage and modules ones. There have been some people that posted ways to do what you want to do. I know how to do the php blocks, you just leave off the <?php and the ?> at the top and end and then save the block as php. When you save a block as php, you don't need the opening and closing php tags.

As for connecting to the database, I know I saw something about how to do this with a regular php page on the forums. You could take that and use it in a block maybe.

Jakobo

Just popping in
Posted on: 2004/1/6 10:11
Jakobo
Jakobo (Show more)
Just popping in
Posts: 61
Since: 2003/12/18
#6

Re: Tutorial about how to do Blocks and Modules???

As I'm building my first major module, I have to (as a result of the project it is tied to) document everything, comment all code, log all hours, etc. A "Diary of a Developer" if you will. You can see said log here:

http://www.felocity.org/archives/cat_netproject.php

As I get more into the project, the posts will probably become much more detailed. What looks clean and usable I will then port back over here courtesy of my two best friends, copy and paste.

[Edit:] Oh, and the forums are so very much your friend here. A good week of lurking, searching, and reading, and you will find most everything has been discussed to some degree. Everyone is really good about including code examples too.

Mithrandir

XOOPS is my life!
Posted on: 2004/1/6 10:50
Mithrandir
Mithrandir (Show more)
XOOPS is my life!
Posts: 6320
Since: 2003/6/21
#7

Re: Tutorial about how to do Blocks and Modules???

Quote:

CBlue wrote:
Cmagana, you may try searching the forums, expecially the usage and modules ones. There have been some people that posted ways to do what you want to do. I know how to do the php blocks, you just leave off the <?php and the ?> at the top and end and then save the block as php. When you save a block as php, you don't need the opening and closing php tags.

As for connecting to the database, I know I saw something about how to do this with a regular php page on the forums. You could take that and use it in a block maybe.
For once, I think you misunderstood CBlue

This is about creating a module with blocks - not creating custom blocks through the block manager in XOOPS (or am I misunderstanding you?)

CMagana - check out the Module Development guide and existing modules such as News, NewBB and WF-Sections. I've learnt a LOT from those modules about how XOOPS works and how to use it in my modules.