81
tripmon
Re: Could we make a smarty or php(CSS), to link from anywhere; to the head?
  • 2006/5/18 22:00

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


Here's the deal (as I see it)...
2.0 & 2.2 both share this issue...

In the calling PHP page, if you assign:
Quote:

$myTemplate->assign('xoops_module_header', $xoops_module_header);

to the template (I assign the value in my module specific header), that value will be passed to the .html template without you needing to do anything. The value will appear in the head section of the generated .html file.

That part is great. Straight forward and simple.
Now the icky part.

Cache....

If you enable module wide cache, the information which was being passed via $xoops_module_header no longer gets passed (automagically).

By including:
Quote:
<{$xoops_module_header}>

in the html template, the value will be passed, but WILL NOT appear in the header.

In 2.2 a custom smarty post-filter (example below) can be used to write to the head, but this will not work under 2.0.

function (above call to XOOPS header.php)
function add_header($tpl_source, &$myTemplate)
{
    return "<?php echo $xoops_module_header?>n".$tpl_source;
}
$xoopsTpl->register_postfilter('add_header');



Hope that helps.



82
tripmon
Re: $xoops_module_header cache issues
  • 2006/5/15 16:02

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


thanks wizanda, I don't want the users having to edit their theme files though.

Apparently 2.2 invokes a global $xoopsTpl (at least it seems to behave as though this is the case) which allows one to assign vars to the template ($xoopsTpl) before including header.php.

Does anyone know a workaround for 2.0.x that could be either used for both 2.0 & 2.2 or conditionally called?



83
tripmon
Re: Xoops Module Development Tutorial
  • 2006/5/15 14:22

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


there are a couple of 'module builder' modules (haven't messed around with them yet)...
go HERE and make sure to ck. out the kickstart it links to...

and HERE



84
tripmon
$xoops_module_header cache issues
  • 2006/5/15 13:43

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


2.0.x & 2.2.X
I'm trying to assign module css and application/rss+xml via $xoops_module_header and running into what seems like a goofy issue.

1st, in non cached mode the module is valid xhtml, in cached mode.... well....

When assigning $xoops_module_header in my php file and not putting any reference to it in the .html template (which is listed in xoops_version.php & working fine) I get a properly inserted (in head) stylesheet. When running w/o cache enabled, this culminates in a lovely valid page.

Once I enable module wide cache, my style dissapears (due to the $xoops_module_header template assignment being called after header.php).

Of course this can be easily remedied by including
<{$xoops_module_header}>
in the .html template, but wait!

Now the (working, but misplaced) style sheet link appears in the body (not the head)and the page will of course not validate that way. In addition, inline notification checkboxes also turn xhtml uncompliant....but the page caches like a champ and displays properly.

Tried using a smarty postfilter which works in 2.2, but it seems to have a 2.0.X incompatibility.

Almost forgot, when NOT cached, With $xoops_module_header in the .html (smarty) template, the style sheet, and the rss feed link both load 2x (not a shocker, but just more info).

Seems like I'm missing something basic, but I can't figure out what...

If someone knows of a method to include a linked stylesheet and avoid the "cache OR compliant" issue, across webservers, please enlighten me.

Is there a correct way to have my cache and eat my xhtml too?

Thanks,
Trip



85
tripmon
Re: Directory module (moved )
  • 2006/5/15 11:34

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


Answered via PM, RC1 release should be out in the next day or two.



86
tripmon
Re: why my website email to users always go into their antispam folder?
  • 2006/4/29 19:12

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


Whatever the case, XOOPS is not the culprit... There are may reasons this could be happening depending on what type of spam protection your users have.

There is a chance that your e-mail server is acting as an open relay... if this is the case (not using some type of Auth, &/or no SPF (sender policy framework) ) your server can be listed in one of the many 'blacklists' that commercial entities use to control spam. You can start by checking to see if your server is listed in orbs by following the link below...

Check your server at ORBS

read up on ORBS at the link above, & look at your email server settings.



87
tripmon
Re: Yellow pages module that allows listings to be in multiple categories
  • 2006/4/24 19:29

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


MX-Directory RC-1 will be out within a week if you can hold out.



88
tripmon
Re: MX Directory file size error
  • 2006/4/19 3:20

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


see if setting it to 0 helps.

ftp or upload it to /modules/xdirectory/images/shots/ otherwise and choose in the list.

(replace xdirectory above with the module folder name if diff.)

I'm almost done with a Most major revision, If I get a chance I'll take a look, but 1 of the above should work in the meantime.



89
tripmon
Re: My site isnt sending email
  • 2006/4/4 8:47

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


You may also want to check to see if your host implemented SPF (Sender Policy Framework) for your e-mail server recently. If so, changing your SPF policy may solve your problems (this happened to me last week).

Many hosts are implementing SPF in order to keep from being listed in ORBS and other spam dB's.



90
tripmon
Re: xoops 2.2x,, 2.3, 4..more info needed
  • 2006/4/4 1:04

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


Sry, No real help here, but,

Alpha is out, but no date for stable has been announced.

I would direct you to another location with more info, but it appears that all of the effort is being dedicated to the code and none to updates or status reports (most likley until it hits a Beta release).

The one thing I can say is that the development is not idle... I think we will hear something Official by May.




TopTop
« 1 ... 6 7 8 (9) 10 11 12 ... 44 »



Login

Who's Online

204 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 204


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