PEAK XOOPS - adding a block template to a module in englishin japanese

adding a block template to a module

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2004/3/3 12:50
dreamgear  办霹始   Posts: 11
I posted the following note in the modules forum on the xoops.org site earlier today. But apparently the hard-core modules hackers are either busy or off line today.

Here it is again:

I added a new custom block to the piCal module. Basically it's a clone of the "coming events" block but filtered down to events only in one category.

For starters I had the template for this block set to the existing pical_coming_schedule.html template in xoops_version.php. This all worked great. My block was up and running quickly and doing what I wanted it to. I used the admin/modules/update to get xoops to re-initialize the pical module.

Then, as a 2nd phase of my mod, I wanted to provide a new template for this new block. I cloned the pical_coming_schedule.html, changing its name and making a few other minor modifications. I then updated xoops_version.php to reference the new template.

At this point I got bogged down a little. Doing the admin/modules/update thing to the piCal module did not work. In fact my new block stopped working.

Finally I gave up and deactivated, deleted and reinstalled my modified piCal module. It all works fine now without any modifications to the code or templates whatsoever.

My question is this: Is this expected ? Should I be able to add a template from one version of a module to the next ? If so, how can I accomplish this ?

Thanks...
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/3/4 9:30
GIJOE  黎扦烦菱   Posts: 4110
hi dreamgear.

Perhaps, it's common XOOPS issue.
Once you make a block in xoops_version.php,
changing $modversion['blocks'][]['template'] will be ignored.

If you want to change block's template, change ['file'] or ['showfunc'] also.

Since the block will be recognized as unknown block,
XOOPS do compile the new template.
Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2004/3/5 2:03
dreamgear  办霹始   Posts: 11
Aha... I can test this by installing my modified piCal on another system that has not yet seen this new block.

Thanks..

(ps. eagerly awaiting the next official release of piCal)

Votes:1 Average:10.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!