I'm trying to code a module that sets the theme for a class of users by (1) using HTTP BASIC AUTH, and (2) changing the theme according to what BASIC AUTH user they log in as; this is used in a two tier login system. This is a 4.6 site, and I'm trying to do what og.module did in 4.6 time: set the global $custom_theme to the name of the theme I want. I'm doing this in my menu handler in the uncached section of the handler. The first time someone calls a theming function, init_theme() gets called, and init_theme is seeing the right value for $custom_theme. But if I select anything but the current default theme, the page renders in a very weird fashion: {head} {styles} {_BLOCK_.header.logo} {_BLOCK_.header.site_name} {secondary_links} {primary_links} {_BLOCK_.header.blocks} {_BLOCK_.header.title} {submitted} {content} {_BLOCK_.footer.message} Obviously, something isn't set up right. I've seen this happen before, but not with my own code. Does anyone know what's going on here? Thanks, Rob
{head} {styles} {_BLOCK_.header.logo} {_BLOCK_.header.site_name} {secondary_links} {primary_links}
{_BLOCK_.header.blocks} {_BLOCK_.header.title} {submitted} {content}
{_BLOCK_.footer.message}
Obviously, something isn't set up right. I've seen this happen before, but not with my own code. Does anyone know what's going on here?
The generic answer to this is: [21:39] <Morbus> xtemplate? [21:39] <Druplicon> You're attempting to use the xtemplate theme engine with PHP 5. This will never work - please see http://drupal.org/node/42080 for more information. -- Morbus Iff ( putting the sanity back in sanity ) Technical: http://www.oreillynet.com/pub/au/779 Culture: http://www.disobey.com/ and http://www.gamegrene.com/ icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
Morbus Iff wrote:
The generic answer to this is:
[21:39] <Morbus> xtemplate? [21:39] <Druplicon> You're attempting to use the xtemplate theme engine with PHP 5. This will never work - please see http://drupal.org/node/42080 for more information.
OK, that appears to be the problem. Thanks to both you and Khalid. Rob
Download and install the phptemplate for 4.6 instead of using xtemplate. On 9/5/06, Rob Thorne <rob@torenware.com> wrote:
I'm trying to code a module that sets the theme for a class of users by (1) using HTTP BASIC AUTH, and (2) changing the theme according to what BASIC AUTH user they log in as; this is used in a two tier login system.
This is a 4.6 site, and I'm trying to do what og.module did in 4.6 time: set the global $custom_theme to the name of the theme I want. I'm doing this in my menu handler in the uncached section of the handler.
The first time someone calls a theming function, init_theme() gets called, and init_theme is seeing the right value for $custom_theme. But if I select anything but the current default theme, the page renders in a very weird fashion:
{head} {styles} {_BLOCK_.header.logo} {_BLOCK_.header.site_name} {secondary_links} {primary_links}
{_BLOCK_.header.blocks} {_BLOCK_.header.title} {submitted} {content}
{_BLOCK_.footer.message}
Obviously, something isn't set up right. I've seen this happen before, but not with my own code. Does anyone know what's going on here?
Thanks, Rob
Hello, Op woensdag 6 september 2006 03:43, schreef Khalid B:
Download and install the phptemplate for 4.6 instead of using xtemplate.
We should try to avoid such answers at all costs. They are tipical for OSS lists and they clutter the discussion. Khalid has no idea why someone wants to use xtemplate, nor can he know if the choice was made intentional in the first place! Please answer the question, or else ask if an alternative may be appropriate. Off course pointing at better alternatives is a good thing (awareness) but it should never ever be presented as the (only) solution. <ber> I am having issues with konqueror and digg.com, the javascript at digg is so badly written that it eats 100% CPU for over 60 seconds to load a page. Is this a konqueror issue? or more specific to digg? <ber> I'd love to do some debugging, if it is a konq issue. Does anyone know the issue # for this, if exists? <someone> Use firefox, it has much nicer features and it renders digg fast enough. <ber> sigh. did anyone hear me ask what browser I should use for digg? <someone_else> heh. ber: it is a problem with both. Konqueror has problems with heavy JS, in konq/kde4 it will be fixed. And off course the digg JS is absolutely FuBAR Hope this helps us work towards an even better support system :) Bèr
UhOh!
We should try to avoid such answers at all costs. They are tipical for OSS lists and they clutter the discussion. Khalid has no idea why someone wants to use xtemplate, nor can he know if the choice was made intentional in the first place!
I did not aim this at Khalid, I realised too late that people could read it as such! Not at all. I just see such types of answers Drupal.org and the ML quite often. I tried to address this "in general". Sorry if people read it as a personal attack to Khalid. It was not meant to be that. Bèr
No offense taken at all. After all, I've "known" you for some time on this list. And you are from Europe too ;-) On 9/6/06, Bèr Kessels <ber@webschuur.com> wrote:
I did not aim this at Khalid, I realised too late that people could read it as such! Not at all. I just see such types of answers Drupal.org and the ML quite often. I tried to address this "in general". Sorry if people read it as a personal attack to Khalid. It was not meant to be that.
Ber, Here did not specify that xtemplate is a requirement. He is running two things that are incompatible: xtemplate and PHP5. The easiest way out of this is to use phptemplate. Perhaps he did not know it existed, because he is using 4.6. Just pointing him to what is out there. So, this is unlike "Use FireFox if Konq does not work". Having said that, I realize that you have a point and a valid one in most cases. On 9/6/06, Bèr Kessels <ber@webschuur.com> wrote:
Hello,
Op woensdag 6 september 2006 03:43, schreef Khalid B:
Download and install the phptemplate for 4.6 instead of using xtemplate.
We should try to avoid such answers at all costs. They are tipical for OSS lists and they clutter the discussion. Khalid has no idea why someone wants to use xtemplate, nor can he know if the choice was made intentional in the first place!
Please answer the question, or else ask if an alternative may be appropriate. Off course pointing at better alternatives is a good thing (awareness) but it should never ever be presented as the (only) solution.
<ber> I am having issues with konqueror and digg.com, the javascript at digg is so badly written that it eats 100% CPU for over 60 seconds to load a page. Is this a konqueror issue? or more specific to digg? <ber> I'd love to do some debugging, if it is a konq issue. Does anyone know the issue # for this, if exists? <someone> Use firefox, it has much nicer features and it renders digg fast enough. <ber> sigh. did anyone hear me ask what browser I should use for digg? <someone_else> heh. ber: it is a problem with both. Konqueror has problems with heavy JS, in konq/kde4 it will be fixed. And off course the digg JS is absolutely FuBAR
Hope this helps us work towards an even better support system :)
Bèr
participants (4)
-
Bèr Kessels -
Khalid B -
Morbus Iff -
Rob Thorne