41
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



42
phatjew
template not automatically recompiled
  • 2003/11/18 18:51

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


Hey there,

I am a template newbie, so please tell me if I am doing something wrong.

When I change a template, in my experience it is NOT automatically recompiled. I have to manually update the module via the admin page to see the change. Is this true for everyone?

This is especially important during develoment, because I am constantly making changes and I want to be able to see the result without having to go to the admin=>module page and clicking the "Update" button every single time.

--Rafi



43
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.



44
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



45
phatjew
Re: Restaurant Guide Module Wanted
  • 2003/11/11 13:37

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


Quote:

builderb wrote:
Is anyone out there working on a restaurant guide module? If so, I would gladly help in anyway I could.

-b


Actually, I have been working on a restaurant review module (built on top of lykos_reviews) for a while now. I am almost finished, although I want to convert everything to templates before releasing it. I'll put a message on this thread as soon as I have the prototype up.




46
phatjew
one small step for a man . . .
  • 2003/11/7 19:10

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


I'm trying to get started with using SMARTY templates, and I am having trouble understanding how they work. I'm using the news module as a model, so all the questions below refer to news_index.html and news\index.php.

1. What is $xoopsOption, and what does this line do:

$xoopsOption['template_main'] = 'news_index.html';

I think what it does is tell the php file what SMARTY template to use (although on the smarty site the template files are .tpl, not .html). Is that right?

2. Why is it that $xoopsOption is used for things like:
$xoopsOption['storytopic']
$xoopsOption['storynum']

. . . but $xoopsTpl->assign(...) is used for everything else?

In other words, if 'storytopic' and 'storynum' aren't needed for the template, why not just save them as scalar variables $storytopic and $storynum? Why do you want them as part of the $xoopsOption object? Perhaps knowing the answer to #1 above will help me understand this.


3. At the bottom of the index.php file, there are a bunch of what look like config assignments:

$xoopsTpl->assign('lang_go', _GO);
$xoopsTpl->assign('lang_on', _ON);
$xoopsTpl->assign('lang_printerpage', _NW_PRINTERFRIENDLY);
$xoopsTpl->assign('lang_sendstory', _NW_SENDSTORY);
$xoopsTpl->assign('lang_postedby', _POSTEDBY);
$xoopsTpl->assign('lang_reads', _READS);

Are these required all the time? I can't find where they are used, or how they are used. They don't show up in the template file at all.

Thanks in advance for any help.



47
phatjew
Re: Are templates necessary before posting modules?
  • 2003/11/7 16:11

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


First, thanks for all the great answers. I think I'll go ahead and templatify the display pages at least before making it public.

Quote:

Catzwolf wrote:

I would suggest looking throu the XOOPS core, there are many hidden feature (functions, classes) that could be used within your own module.


Look through throught the core, huh? That's a big task. The most frustrating problem I am having is that I have no idea what the "core" classes are, and what functionality they provide. For example, I started using HTMLSpecialChars() freely, then found the text sanitizer weeks later. I made all my forms, then learned of the existence of the XoopsForms classes (which has a great class diagram in the Wiki, BTW -- nice use of UML).

So, I'm sure that there are cases where I am doing unnecessary coding simply due to ignorance. The API that I found was just an alphabetical laundry list of functions, but not very useful as a real summary of what is available in the core. Does anyone have a list of core classes with description? Even a short description would be helpful, so that I know which classes I should investigate further.

Sorry for being so long-winded.

--Rafi



48
phatjew
Re: Are templates necessary before posting modules?
  • 2003/11/6 21:53

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


Oh, and I also had concerns about speed when using SMARTY templates. Should I be concerned? Is there any speed hit at all, or just a minimal one, or a significant one?

I'm worried about speed overall, especially in graphically-heavy modules like this forum -- the pages load really slow for me. (off-topic: is there a more stripped-down, faster-loading forums module?)




49
phatjew
Re: Are templates necessary before posting modules?
  • 2003/11/6 21:49

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


Quote:

MithyT2 wrote:
To get the future "XOOPS Official Module" certification you'll need to use the core features where it is logical. That means, using SMARTY templates for pages with lots of HTML, using classes/making your own, where it will make the code "nicer". You should also use the Administration Menu features, where applicable.


What do you mean by "Administration Menu" features? I have several admin pages, just like many of the core modules. Is that all you mean?

As far as classes, I do have several files full of families of functions that I could turn into classes without too much trouble. Are basic "script" functions frowned upon even within modules?



50
phatjew
Are templates necessary before posting modules?
  • 2003/11/6 20:45

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


I guess this question could go in the Modules forum, but I thought it was a more general, community-oriented question.

I have a restaurant review module (that can easily be made to work for any kind of reviews), and I think it has a lot of nice features (hierarchical categories, full search on any field (inclusive or exclusive), unlimited number of locations/addresses, etc.). However, I wrote it without templates for (much) easier debugging. Now I'd like to release it to the community, and I want people to be able to use it and change it to meet their own needs.

The question is, should I convert it all to templates before releasing it, thus putting that date off quite a bit, or should I just get it out there for people to start using and testing?

Thanks in advance for any advice.





TopTop
« 1 2 3 4 (5) 6 »



Login

Who's Online

142 user(s) are online (71 user(s) are browsing Support Forums)


Members: 0


Guests: 142


more...

Donat-O-Meter

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

Latest GitHub Commits