1
phatjew
what is a "valid XOOPS template set structure"
  • 2003/11/18 18:06

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


Hey all,

I am creating a new module, and I want to "templatify" it to make it easier for others to use and abuse it. I figured out that I need to upload ("register" would be a better word, IMHO) my new templates through the Templates admin page. The line is:

"Choose a template set package to upload
Must be a tar.gz/.tar file with a valid XOOPS template set structure"

However, after looking pretty hard thoughout this site (including Wiki, etc.), I can't tell what makes a template set "valid". When I try to download the default one to take a look at it, I get the message:

"Zlib support must be enabled on your server"

I don't know what that is or how to do it.

In fact, I'm not even sure how to create a .tar or .tar.gz file on the crappy Windows ME laptop that I am currently using (don't ask why). But I'll figure that one out -- what I really need help with is the XOOPS-specific stuff.

Any help would be most appreciated.

--Rafi

2
ackbarr
Re: what is a "valid XOOPS template set structure"

ok - as a module developer, you define your templates in xoops_version.php like so:
$modversion['templates'][1]['file'] = 'mylinks_brokenlink.html';
$modversion['templates'][1]['description'] = '';
$modversion['templates'][2]['file'] = 'mylinks_link.html';
$modversion['templates'][2]['description'] = '';
$modversion['templates'][3]['file'] = 'mylinks_index.html';
$modversion['templates'][3]['description'] = '';

all module template files belong in the /modules//templates/ directory. Now when a user installs your module the templates specified in xoops_version.php will be added to the available site templates.

Quote:

"Choose a template set package to upload
Must be a tar.gz/.tar file with a valid XOOPS template set structure"

All this is trying to say is that the uploaded file needs to be in the same format as one created when clicking on the 'download' link by each template set. This is used to transport a template set from one XOOPS installation to another.

Quote:

"Zlib support must be enabled on your server"

PHP supports many optional modules, one of which is Zlib. Zlib allows you to manipulate zip archives programmatically. On a windows machine this entails opening your server's php.ini file and finding the line:
Quote:

;extension=php_zlib.dll

and removing the ';' from the line. After changing the php.ini file, you may need to restart the web service to see the changes.

3
phatjew
Re: what is a "valid XOOPS template set structure"
  • 2003/11/18 18:48

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


OK,OK, I figured it out.

For future reference:

1. when adding a template to your module, you do NOT have to create a template set at all. You just have to include a line like this in your xoops_version.php file:

// Templates
$modversion['templates'][1]['file'] = 'pjreviews_fullreview.html';
$modversion['templates'][1]['description'] = 'some description';



2. To "register" this with the DB manually (ie. not during module installation), you have to go to admin=>modules and "update" your module.

I could not find these simple steps detailed anywhere. Very frustrating. I think when I am done with this module I am going to volunteer to help with the XOOPS documentation. Damn, we need some documentation.

4
phatjew
Re: what is a "valid XOOPS template set structure"
  • 2003/11/18 18:56

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


ackbarr,

You rock. Thanks for the quick response -- I was posting my second one at the exact same time, so I missed yours. The only thing I would add to your post is the part about having to "Update" your module if you want to see the changes without re-installing.

Thanks for the tip about the php.ini file, too. With very little info you got right to the heart of the problem.

--Rafi

5
Mithrandir
Re: what is a "valid XOOPS template set structure"

Quote:

phatjew wrote:

I could not find these simple steps detailed anywhere. Very frustrating. I think when I am done with this module I am going to volunteer to help with the XOOPS documentation. Damn, we need some documentation.

Yup, we do. The more people making (correct) documentation, the better. Can't remember, who is head of documentation department, but I'm sure he'll welcome your offer

Login

Who's Online

214 user(s) are online (147 user(s) are browsing Support Forums)


Members: 0


Guests: 214


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