21
Antoine
Re: Making Module
  • 2005/1/19 18:32

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Quote:

Dave_L wrote:
That's not necessarily good if you're using caching. It could cause unnecessary database queries or other processing.


Hmmm, really? Never realised that and am pretty interested in knowing why that is. This far I've been going out of my way to postpone sending a header as long as possible in my code.
I am pretty new to XOOPS 2.0 (even went so far as to mod PHPNuke to use Smarty, hehe) but pretty impressed as to it's workings. (Minus a few annoyances.)

As far as I understand it; postponing the invocation of the header file would only cause the page rendering commands to be grouped closer together in the code.

But since it is beyond the scope of this thread to discuss it: maybe you'd be willing to PM me the explanation or direct me to another thread or documentation where this has been done before?

(Speaking of documentation, wouldn't it be nice if phpDocumentor would also support documentation of $_GET and $_POST variables. Sometimes you have to plough through over 4 files of code to find the exact usage of such a parameter)

22
Dave_L
Re: Making Module
  • 2005/1/19 19:48

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Antoine, here's the topic that explains that: Module-wide caching - Important development

23
erzon
Re: Making Module
  • 2005/1/20 1:58

  • erzon

  • Quite a regular

  • Posts: 211

  • Since: 2005/1/1 3


i use one of the montisart theme...but no is working i dont know why. and i dont use cache..

24
Dave_L
Re: Making Module
  • 2005/1/20 2:08

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Does the problem occur with the XOOPS default theme?

25
erzon
Re: Making Module
  • 2005/1/20 9:15

  • erzon

  • Quite a regular

  • Posts: 211

  • Since: 2005/1/1 3


yah even in default theme there is no effect i dont know why..

26
erzon
Re: Making Module
  • 2005/1/21 16:01

  • erzon

  • Quite a regular

  • Posts: 211

  • Since: 2005/1/1 3


any help on this??? i need this really bad

27
Mithrandir
Re: Making Module

Quote:

Antoine wrote:
Well it might help to answer Mithrandirs question about which theme you are using. If the theme doesn't do something like this setting the options won't help a bit:

Quote:
<{if $xoops_showrblock == 1}> <{/if}>


And also as stated before allways set the options BEFORE you include header.php. The header.php starts rendering the site so a good rule of thumb I use is to include it as late as possible. Possibly even right before you let Smarty render your template.

Sorry to not answer the thread question, but I have to get this myth beaten down below the floor:

header.php does NOT render ANYTHING - unless the page is cached, in which case you WANT it to render. header.php should be included as EARLY as possible, so as FEW database queries and code processing have been executed.

What you should do before including the header.php is:
a) Check page-specific permissions (module access perm is checked, but if you want e.g. only registered users or admin users to access it, this is the place to check for that)
b) Set $xoopsOption indexes such as template_main and show_rblocks
c) Nothing more

If you wait with including the header.php, you will have done all the processing and executed all the queries - but if the page is cached, it will just display that one, leaving the processing and query executions useless.

28
Dave_L
Re: Making Module
  • 2005/1/21 16:29

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


You should post a FAQ on this.

Quote:
... I have to get this myth beaten down below the floor ...


But we need myths:

Quote:
Both dreams and myths are important communications from ourselves to ourselves. If we do not understand the language in which they are written, we miss a great deal of what we know and tell ourselves in those hours when we are not busy manipulating the outside world.

Erich Fromm

29
erzon
Re: Making Module
  • 2005/1/22 2:48

  • erzon

  • Quite a regular

  • Posts: 211

  • Since: 2005/1/1 3


so what now??? what should i do now?

30
sgshell
Re: Making Module
  • 2005/1/22 5:13

  • sgshell

  • Just popping in

  • Posts: 94

  • Since: 2004/10/4


Quote:

erzon wrote:
so what now??? what should i do now?


Do you know that you could enable a block when access to a particular modules or disable it in that modules?

That mean you could chose what block to appear in which modules or not....this a nice feature of xoops

It could be done in the block admin as mention earier...

NOTE: goto the block that appear in your right and edit it not to show in yours modules.

Login

Who's Online

318 user(s) are online (270 user(s) are browsing Support Forums)


Members: 0


Guests: 318


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