[geeklog-devel] Constant XHTML

Tom websitemaster at cogeco.net
Thu Mar 29 19:51:54 EDT 2012


I had thought of your 2 solutions as well. 

I only looked at your patch (I did not apply for some reason) so I might
have missed it with the line numbers but after the first functions.php I
assume that is where the XHTML constant is defined before requiring the
language file. I hate to make 2 require calls to functions.php but there is
not much else I can see that we can do about it unless we go with my not so
great idea of adding another theme file that contains just the doc type
information.

I say go with your patch option unless someone else has a better idea.

Tom

-----Original Message-----
From: geeklog-devel-bounces at lists.geeklog.net
[mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Rouslan
Placella
Sent: March-29-12 4:48 PM
To: geeklog-devel at lists.geeklog.net
Subject: Re: [geeklog-devel] Constant XHTML

Another solution seems to be to set $LANG_DIRECTION to 'ltr', then load the
theme file, then load the language file (which may at this point
$LANG_DIRECTION to 'rtl') and finally reload the theme file. Patch attached.
What do you think?

Rouslan

On 29/03/12 21:13, Rouslan Placella wrote:
> Well, the root of the problem here is that there shouldn't be any 
> markup in the *language* files to begin with. Removing all of the 
> occurrences of 'XHTML' in Geeklog core does not seem to be much of a job:
> 
>> grep -o "XHTML" `find -name english.php` | wc -l
>> 18
> 
> Removing all other markup may be a bit of a handful though...
> Plugins will remain unaffected by this issue I guess.
> 
> Thoughts?
> 
> Rouslan
> 
> On 29/03/12 14:32, Tom wrote:
>> That would be it. 
>>
>> So the language file needs to be loaded before the theme so that the 
>> language direction is known but, we need to know what doctype the 
>> theme is before we can set the XHTML constant which is used by the
language files.
>>
>> So to make this all work then we should NOT allow a themes 
>> function.php to set the doctype config value I guess.
>>
>> The question now becomes is how do we know the themes doctype? Here 
>> are a few options I see:
>>
>> 1) The Geeklog Config option "DOCTYPE Declaration" applies to all themes.
>> This means on a multi theme site the Admins need to make sure his 
>> themes comply
>> 2) Create a new theme file that contains the doc type info that can 
>> be loaded before the language files.
>> 3) Both Option 1 and 2
>> 4) ???
>>
>> Any thoughts on this or an idea for a better solution?
>>
>> Tom
>>
>>
>> -----Original Message-----
>> From: geeklog-devel-bounces at lists.geeklog.net
>> [mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Rouslan 
>> Placella
>> Sent: March-28-12 8:11 PM
>> To: geeklog-devel at lists.geeklog.net
>> Subject: Re: [geeklog-devel] Constant XHTML
>>
>> On 28/03/12 21:15, Tom wrote:
>>> I notice while I had error reporting set to E_ALL that the constant 
>>> XHTML is used in the languages files but has yet to be defined when 
>>> the language files are included. XHTML is based on $_CONF['doctype'] 
>>> and is defined after a themes function.php file is set. I assume 
>>> this is done because a theme may want to reset this 
>>> $_CONF['doctype'] value which affects what the XHTML constant is set
for.
>>>
>>> Does anyone see a problem of setting the language files after the 
>>> theme and XHTML are set or was there a reason they are set before? 
>>> (ie does a theme need access to the language files)
>>
>> I recently did a change[0] to the order in which the language and the 
>> theme are loaded. I implmented a new method for supporting RTL 
>> languages in the new theme since the professional_css theme had not 
>> rtl support. The idea is to know which language is loaded before 
>> loading the theme, so that the theme can be aware of the text 
>> direction. Could this be causing the problem that you found?
>>
>> Bye,
>> Rouslan
>>
>> [0]:
>> http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/048e06f37
>> 2c9 _______________________________________________
>> geeklog-devel mailing list
>> geeklog-devel at lists.geeklog.net
>> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
>>
>> _______________________________________________
>> geeklog-devel mailing list
>> geeklog-devel at lists.geeklog.net
>> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
> 
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel





More information about the geeklog-devel mailing list