Topic: Add blocks to module
runekinn
avatar
Freshman
Freshman
Posts: 3

Posted:
11.Apr 2007 - 16:09

Where do I write which blocks I want a module to have?

Edit: I have come a bit further, the block is there but it says "Unknown blocktype", how do i change this?



edited by: runekinn, Apr 11, 2007 - 12:36 PM

--
Runekinn
videokid
avatar
Professional
Professional
Posts: 924

Posted:
11.Apr 2007 - 16:42

Admin --> Xanthia --> Edit Theme --> Block Control

- Igor

--
Have a nice day
zikulapro.be is currently running
Zikula 1.0.2
runekinn
avatar
Freshman
Freshman
Posts: 3

Posted:
11.Apr 2007 - 16:54

I can't see Edit theme anywhere in Xanthia Admin menu

--
Runekinn
videokid
avatar
Professional
Professional
Posts: 924

Posted:
11.Apr 2007 - 18:22

Sorry,

Xanthia --> View Themes --> Your Theme:active:Edit Theme --> Block Control

- Igor

--
Have a nice day
zikulapro.be is currently running
Zikula 1.0.2
nestormateo
avatar
Team Member
Team Member
Posts: 1587

Posted:
11.Apr 2007 - 22:00

Block control configure the blocks to display in each modules
at the admin like, but the message "Unknown blocktype"
means to me that there is a little error in the block code...

This block is yours?
or is a Core Block?

--
- Mateo T. -
Mis principios... son mis fines
runekinn
avatar
Freshman
Freshman
Posts: 3

Posted:
12.Apr 2007 - 15:37

Yes, it's my own block and my own module. I'm trying to learn PostNuke so that I can change a module called pnTresMailer into something I need for a project. So I thought writing my own module would be a good start, but I'm having trouble finding the information I need. It's a shame Introduction to Module Writing in the Wiki is just an empty page.

EDIT: I don't know if I should post these questions in another thread, but until someone tells me otherwise I'll stick to this(it's related). I'm looking at the pnlogin block in the pnRender module and on line 45 it says "function pnRender_pnloginblock_display($row)", where does the variable $row come from?



edited by: runekinn, Apr 12, 2007 - 12:57 PM

--
Runekinn
videokid
avatar
Professional
Professional
Posts: 924

Posted:
12.Apr 2007 - 18:39

oops, I completely misunderstood this one... I thought you were looking for certain blocks to show up in a module.
Sorry about that.

BTW, I think pnTresMailer isn't a good start, I think that module is not API compliant.

- Igor

--
Have a nice day
zikulapro.be is currently running
Zikula 1.0.2
nestormateo
avatar
Team Member
Team Member
Posts: 1587

Posted:
12.Apr 2007 - 21:03

About your edited question
I'm not sure
but it can be an API argument with the block info
when it calls to blocks($side) in pnBlocks.php

See te code, and you will find in pnBlockShow function in /includes/pnBlocks.php
this: return $displayfunc($blockinfo);
and in your case displayfunc of the block is: pnRender_pnloginblock_display
and blockinfo is &blockinfo[title], &blockinfo[content], &blockinfo[bid], etc.

--
- Mateo T. -
Mis principios... son mis fines