From: Mark W. <ma...@rw...> - 2011-03-15 16:53:56
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> body onload="..." template tag fixed and committed. Clock on/off javascript functionality now works again<br> <br> Mark<br> <pre class="moz-signature" cols="72">_____________________________________________ Mob: 07725 695178 Email: <a class="moz-txt-link-abbreviated" href="mailto:ma...@rw...">ma...@rw...</a></pre> <br> On 15/03/2011 16:07, Scott Miller wrote: <blockquote cite="mid:AANLkTi=Sg8Tz7zonNN-RjcLLzLSjhB==L_4ov81cz=Z+...@ma..." type="cite">2.0 Monthly page and error stuff fixed up and checked into subversion.<br> <br> -Scott<br> <br> <div class="gmail_quote">On Mon, Mar 14, 2011 at 10:58 PM, Mark Wrightson <span dir="ltr"><<a moz-do-not-send="true" href="mailto:ma...@rw...">ma...@rw...</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div bgcolor="#ffffff" text="#000000"> There is a nice and easy way to achieve this:<br> <br> In error.php add the following lines of code:<br> <br> PageElements::addFile('tsx_banner','themes/'.PageElements::getTheme().'/error-banner.inc');<br> Site::getCommandMenu()->add(new TextCommand("Back", true, <a moz-do-not-send="true">"javascript:back()"</a>));<br> <br> This will give the desired effect you are looking for. The addFile() command checks if tsx_banner already exists as a FileTag. if it does, it then just replaces the filename. If it finds a tag that is of a different type, then it throws an error. <div class="im"><br> <br> Mark<br> <pre cols="72">_____________________________________________ Mob: <a moz-do-not-send="true" href="tel:07725%20695178" target="_blank">07725 695178</a> Email: <a moz-do-not-send="true" href="mailto:ma...@rw..." target="_blank">ma...@rw...</a></pre> <br> </div> <div> <div class="h5"> On 14/03/2011 20:05, Scott Miller wrote: <blockquote type="cite">Yes, I was talking about those sections of code that either do something the new OO way or the old way, I've begun to remove that stuff as I come across them.<br> <br> Ok, yet another related topic, I've modified the error.php file, but the template it is using includes the entire menu. In the original version, a very limited menu consisting of a link to go back to the previous page was displayed. Can we, and more to the point, how do we load a different template for this error.php file?<br> <br> I'll check this stuff in here within the hour (provided I remember in time before I have to jet out to get the kids)<br> <br> -Scott<br> <br> <div class="gmail_quote">On Mon, Mar 14, 2011 at 6:47 PM, Mark Wrightson <span dir="ltr"><<a moz-do-not-send="true" href="mailto:ma...@rw..." target="_blank">ma...@rw...</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div bgcolor="#ffffff" text="#000000"> Erm depends.<br> <br> If it is something along the lines of:<br> <br> if(!class_exists('Site'))die('Restricted Access');<br> <br> then it would be best to leave it in. There isn't a great deal of error handling in the tsng files. The above will just stop any form of rogue user actions should the file be attempted to be loaded outside the core framework.<br> <br> There are plenty of scenarios where this can be removed:<br> <br> i.e. authentication manager:<br> <br> //create the instance so its availiable by just including this file<br> if(!class_exists('Site')) {<br> $authenticationManager = new AuthenticationManager();<br> $authenticationManager->getLDAPcfgInfo();<br> }<br> <br> authentication manager will never ever be loaded ever again outside the core framework. many of the class exists checks were there during the conversion process. <br> <br> Saying that, there are still some pages that haven't been converted to the new OO system. i.e. supervisor_action.php I think all unconverted files have:<br> <br> die('NOT CONVERTED TO OO YET');<br> <br> as the first line of the file. :) <div><br> <br> Mark<br> <br> <br> <pre cols="72">_____________________________________________ Mob: <a moz-do-not-send="true" href="tel:07725%20695178" target="_blank">07725 695178</a> Email: <a moz-do-not-send="true" href="mailto:ma...@rw..." target="_blank">ma...@rw...</a></pre> <br> </div> <div> <div> On 14/03/2011 17:55, Scott Miller wrote: <blockquote type="cite">Excellent, I think that will point me to what I needed.<br> <br> Another question: Are we at a place where we can start removing the "if(!class_exists('Site')){" stuff for the content files (those under tsx for instance)?<br> <br> -Scott<br> <br> <div class="gmail_quote">On Mon, Mar 14, 2011 at 5:19 PM, Mark Wrightson <span dir="ltr"><<a moz-do-not-send="true" href="mailto:ma...@rw..." target="_blank">ma...@rw...</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div bgcolor="#ffffff" text="#000000"> Hi Scott, <br> <br> There are a few files to look at:<br> <br> 1. themes/txsheet/config.php<br> This file maps the required files i.e. banner.inc to {tsx_banner}<br> Having this in a config file means that if a different theme is used, then a different set of required files can be loaded.<br> <br> 2. the templateparser.datastructure.class.php stores all the information about the what tags need to be loaded.<br> <br> 3. The tags folder contain the three different types of tags that can be used:<br> <br> a) filetag - loads a physical file.<br> b)functiontag - executes a function (either global, static, or object instance)<br> c) stringtag - just a simple string<br> <br> 4. (Finally) There are some tags defined in site.class.php (line 145++). These are defined here as they should be independent of the currently used theme.<br> <br> 1 and 4 are where the tags are created. tags can also be added inside other files i.e. monthly.php if needed. The only thing i should point out is that there isn't yet anyway to control the order in which the tags are parsed - (the order is in the order they were added/created ish).<br> <br> There is two priority levels that is:<br> 1. FileTags are parsed before FunctionTags. and FunctionTags are parsed before StringTags<br> 2. The content tag is always parsed first.<br> <br> Finally, enable the Debug::$templateTags flag it will spit out a load of debug information that will help to show the inner workings of the templating. <br> <br> N.B. Debug::$sendToScreen = 1 should be set and Debug::$hideDebugData = 0 should also be cleared to ensure the output appears onscreen.<br> <br> If you would like to find the exact location the debug statements are being printed:<br> set Debug::$pprTrace =1.<br> <br> I realise this email isn't all that clear but hopefully, just enabling the debug output will allow you to see exactly what is happening. <br> <br> I've also just realised that the Debug::$sendToConsole isn't functioning yet. But Debug::$sendToScreen works just fine.<br> <br> Regards<br> Mark<br> <pre cols="72">_____________________________________________ Mob: <a moz-do-not-send="true" href="tel:07725%20695178" target="_blank">07725 695178</a> Email: <a moz-do-not-send="true" href="mailto:ma...@rw..." target="_blank">ma...@rw...</a></pre> <div> <div> <br> On 14/03/2011 15:14, Scott Miller wrote: <blockquote type="cite">Hey Mark,<br> <br> I want to start working on actually using the language stuff, but I thought it might be important to understand how the template stuff works. I found where things get converted from tags into other output (include/templateparser/templateparser.class.php and include/templateparser/tags/*), but I've thus far this morning been unable to discover where and how the tags are defined. I think there is some magic going on in the template.datastructure.class.php, but I'm unable to tie that stuff to anything concrete.<br> <br> -Scott<br> <br> <div class="gmail_quote">On Fri, Mar 11, 2011 at 9:53 PM, Scott Miller <span dir="ltr"><<a moz-do-not-send="true" href="mailto:sco...@gm..." target="_blank">sco...@gm...</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> Hi all,<br> <br> The language stuff is now loaded by the site class. I've also made several minor layout (ie. style) changes to several of the class files, but made no material changes to most of them.<br> <br> test-language-stuff is still the only page using the language stuff at this point.<br> <font color="#888888"> <br> -Scott</font> <div> <div><br> <br> <div class="gmail_quote">On Thu, Mar 10, 2011 at 8:37 PM, Scott Miller <span dir="ltr"><<a moz-do-not-send="true" href="mailto:sco...@gm..." target="_blank">sco...@gm...</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> I'm unfamiliar with the term "config points". I am certainly championing the change to a more fluid (ie changable) configuration table within the database such that it is much easier to add new configuration items. If that style of storing configuration data is called "config points", then yes I am :-)<br> <font color="#888888"> <br> -Scott</font> <div> <div><br> <br> <div class="gmail_quote">On Thu, Mar 10, 2011 at 4:46 PM, David Thompson <span dir="ltr"><<a moz-do-not-send="true" href="mailto:tom...@us..." target="_blank">tom...@us...</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div> Yes, Scott using setlocale solves most date/time representation issues (though I am not sure about the comma instead of point one though...).<br> <br> And Isabelle, I would love to see the config points that you mention (lang, holidays, working times, etc.) - even if they are not used in 2.0, we could add them as a guide for the future. Scott, you're adding config points right now, aren't you?<br> <br> Isabelle, if you would like commit access, just tell me your <a moz-do-not-send="true" href="http://sourceforge.net" target="_blank">sourceforge.net</a> id, and I will add you.<br> <br> Cheers<br> <br> <hr> Date: Thu, 10 Mar 2011 15:19:45 +0100<br> From: <a moz-do-not-send="true" href="mailto:ver...@fr..." target="_blank">ver...@fr...</a><br> To: <a moz-do-not-send="true" href="mailto:tsh...@li..." target="_blank">tsh...@li...</a>; <a moz-do-not-send="true" href="mailto:sco...@gm..." target="_blank">sco...@gm...</a>; <a moz-do-not-send="true" href="mailto:ma...@rw..." target="_blank">ma...@rw...</a>; <a moz-do-not-send="true" href="mailto:tom...@us..." target="_blank">tom...@us...</a><br> Subject: Re: language and jclasses discussion <div> <div><br> <br> <div style="font-family: Arial; color: rgb(0, 0, 0); font-size: 10pt;">Hello,<br> <br> For internationalization of dates, I don't think that routines are necessary<br> as the language files like"/language/en-GB/en -GB.ini" allow to specify<br> the values of the months, of the days of the week and of the date formats<br> (eg DATE_FORMAT_LC).<br> <br> In France, we often also use the week number for our schedules. I added<br> this number on relevant pages in "my timesheet 1.5.2". As the parameter<br> "%V" of the strftime function didn't work on my computer, I used the function<br> "week_isonumber" posted by Anonymous 12-Oct-2010 07:04 here:<br> <a moz-do-not-send="true" href="http://php.net/manual/fr/function.strftime.php" target="_blank">http://php.net/manual/fr/function.strftime.php</a><br> <br> For the time format in French, just replace the occurrences of colon as<br> in this example:<br> - English: 10:30:56<br> - French: 10h 30m 56s<br> <br> As I said earlier, to have the correct dates in French, you must specify<br> the language 'fra' for the locale: setlocale(LC_ALL,'fr_FR','fra');<br> <br> For numbers in French, the decimal separator is a comma instead of the<br> point. This is important for excel export.<br> <br> For billing and currency:<br> The euro is the official currency of the Eurozone in the European Union.<br> The html entity for the euro sign is &euro;<br> <br> For the translation of the different status for projects and for tasks<br> as well as of the different types of users, would it be possible to add<br> the values in the language files if it's allow to not modify "enum" in<br> the database?<br> <br> Do you want me to contribute at this stage to the project by making an<br> fr-FR.ini file for translation of the current en-GB.ini file in <br> "/branches/txsheet-2.0-demo/"?<br> If yes, how to join the project?<br> <br> I was also thinking about that: on the configuration page of the future<br> Timesheet 2.0, would it be possible to define the following data <br> depending on each country:<br> - dates of the days being public holidays<br> - the legal duration of work per day and/or per week<br> - the legal number of days for holidays per year<br> <br> Sincerely.<br> <br> Isabelle.<br> <br> ----- Mail Original -----<br> De: "Scott Miller" <<a moz-do-not-send="true" href="mailto:sco...@gm..." target="_blank">sco...@gm...</a>><br> À: "tsheetx" <<a moz-do-not-send="true" href="mailto:tsh...@li..." target="_blank">tsh...@li...</a>>, "Mark Wrightson" <<a moz-do-not-send="true" href="mailto:ma...@rw..." target="_blank">ma...@rw...</a>>, "David Thompson" <<a moz-do-not-send="true" href="mailto:tom...@us..." target="_blank">tom...@us...</a>>, "Isabelle Vergely" <<a moz-do-not-send="true" href="mailto:ver...@fr..." target="_blank">ver...@fr...</a>><br> Envoyé: Mercredi 9 Mars 2011 00:16:34 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne<br> Objet: language and jclasses discussion<br> <br> Hi all,<br> <br> I've checked in a few more changes, mainly focused on further trimming down of un-needed stuff from the various classes, and the removal of un-needed classes.<br> <br> I'm still waiting for a discussion on whether we want to continue using J* class names (JLanguage, JText, JFile, JFolder, etc) or if we want to use something different, and if so, what.<br> <br> Also still waiting to hear about how the error classes work, and how to replace the commented out error stuff in the jclasses with error stuff that will actually work for us.<br> <br> I'm beginning to think about how to go about integrating the JLanguage stuff into our existing classes. Should the JLanguage stuff be part of the master site class? I'm currently thinking it should.<br> <br> Isabelle, I think it will be useful to have language specific routines that deal with how to correctly format times, dates, and numbers in general. Can you point us in the right direction as to how to go about doing this?<br> <br> -Scott<br> </div> </div> </div> </div> </blockquote> </div> <br> </div> </div> </blockquote> </div> <br> </div> </div> </blockquote> </div> <br> </blockquote> </div> </div> </div> </blockquote> </div> <br> </blockquote> </div> </div> </div> </blockquote> </div> <br> </blockquote> </div> </div> </div> </blockquote> </div> <br> <pre wrap=""> <fieldset class="mimeAttachmentHeader"></fieldset> ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. <a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/internap-sfd2d">http://p.sf.net/sfu/internap-sfd2d</a></pre> <pre wrap=""> <fieldset class="mimeAttachmentHeader"></fieldset> _______________________________________________ Tsheetx-developers mailing list <a class="moz-txt-link-abbreviated" href="mailto:Tsh...@li...">Tsh...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/tsheetx-developers">https://lists.sourceforge.net/lists/listinfo/tsheetx-developers</a> </pre> </blockquote> </body> </html> |