From: Greg M. <drk...@co...> - 2006-02-28 06:00:55
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Through the magix of find; grep; vim regex tricks; and sort -u; a list of fallout default theme selectors has been created. http://phpwebsite-comm.sourceforge.net/wiki/index.php?title=En_default What is the best way to get my arms around what each one is designed to do? Some selectors like toggle1 and toggle2 produce documentation hits in various files. Other selectors produce nothing. Moreover, what shall I make out of the theme.ini file? [theme_variables] 0 = LAYOUT_HEADER 1 = LAYOUT_FOOTER 2 = BOTTOM 3 = USERS_LOGIN_BOX 4 = NOTES_REMINDER 5 = CATEGORIES_ADMIN_MENU 6 = SEARCH_SEARCH_BOX [persistant_style_sheet] file = style.css [default_style_sheet] file = default.css title = Default Delite [alternate_style_sheet_1] file = blue.css title = Blue Greg -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFEA+cQxyxe5L6mr7IRAq58AJ47yMwkM6SZZdI6LKFd883kE5pfagCfS4v3 WVkyeU30nDx4im2Cqn5suE8= =Ex6U -----END PGP SIGNATURE----- |
From: Matthew M. <ma...@tu...> - 2006-02-28 13:35:35
|
On Mon, 2006-02-27 at 23:00 -0700, Greg Morgan wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Through the magix of find; grep; vim regex tricks; and sort -u; a list > of fallout default theme selectors has been created. > http://phpwebsite-comm.sourceforge.net/wiki/index.php?title=En_default First of all, nice work. This list will let us decide of what the core set of styles consist. Here is a quick definition list. align-(center, left, right) : a shortcut class to prevent inline styles and align="left" bgcolor1-3 : I figured these would be the replacements for bg_light and such. Setting these three background colors set the colors for the site bigger & smaller : makes the font bigger and smaller. again an attempt at preventing inline styles box, box-title, box-content : since box template files have been removed, I use these to style the content containers. module styles : specific styles associated with a module. These could use a review. img.float-left/right : again, to prevent inline styles no-bullet : used in a ul to prevent bullets phpws_form : id of any generic form made with the form class spoiler : used in bb code. Hides text until moused over. Used in comments Ask about any others. By the way, when I wrote the alternate style sheet blue, I was testing it against the default. As a result, once I was sure it worked, I stopped changing over the values. That is why blue still has some brown in it. > Moreover, what shall I make out of the theme.ini file? > > [theme_variables] > 0 = LAYOUT_HEADER > 1 = LAYOUT_FOOTER > 2 = BOTTOM > 3 = USERS_LOGIN_BOX > 4 = NOTES_REMINDER > 5 = CATEGORIES_ADMIN_MENU > 6 = SEARCH_SEARCH_BOX These values tell Layout what extra content sections you have in your theme. Each theme MUST have BODY and DEFAULT. Beyond that, you can create a content section just by adding it to the numeric list. If these are not put in, you cannot move content around the page and content will not anchor properly. BOTTOM is just a generic content area. The others are module specific. In phpwebsite 0.10.x you use the $GLOBALS['content_var'] variable. In Fallout, you just call a Layout function: Layout::add('Some content'); If called like so, the content is appended to the BODY area. If however you do this: Layout::add('Some content', 'search', 'search_box'); it lets Layout know you want to have a movable element. The theme variables that are prefixes by module names are anchors. The first time the above content was created, layout checks to see if it has an anchor, if it doesn't, it checks the theme.ini file for a module_name + content variable name. If it finds that variable, it places the content in that space. If it doesn't, it plops it into the DEFAULT theme variable. This allows people to choose a theme and just have it work without having to move boxes afterward. It also gives the theme developer more room to style certain components (the menu for example). > [persistant_style_sheet] > file = style.css > > [default_style_sheet] > file = default.css > title = Default Delite > > [alternate_style_sheet_1] > file = blue.css > title = Blue A persistent style sheet is always loaded. (yes I realize I misspelled it now) The default style sheet is then loaded. The alternate style sheets are loaded should the user want a different view. Firefox allows you to do this but if you want the change to "stick" you may have to download an extension. For now, I put positioning, font sizes, padding widths, etc. in the persistent style sheet. Color choices go into the default and alternate. You are not required to use this format, you could just use ONE style sheet if you wish. Default uses alternates as an example. Thanks Greg, Matt -- Matthew McNaney Electronic Student Services Appalachian State University http://phpwebsite.appstate.edu |
From: Shaun M. <sh...@ae...> - 2006-02-28 14:57:31
|
On 28 Feb 2006, at 13:19, Matthew McNaney wrote: > > box, box-title, box-content : since box template files have been > removed, I use these to style the content containers. I've done that in the past myself with box styles although I tend to use descendent selectors instead of additional classes, just to add in some semantic structure, and it makes the CSS nicer too. The boxes are usually then just... <div class="box"> <h3>{title}</h3> {content} </div> I do the same for modules too, just adding eg. <div class="announce">...</div> around a template. It'd actually be useful if those were there by default in fallout for me anyway. Saves adding a load of box styles usually. The other thing that might be useful is adding insertion of a class for a category into the top of a template so you could have different css depending on the category. At the moment I don't think you can return the category name without it being a link in 0.10.x. I'd also like to see some standard classes defined for menus (first, last, selected, enabled, disabled etc) although perhaps those should be in menuman and then overridden? And for elements such as dates and bylines which are common across many modules. aegis design - http://www.aegisdesign.co.uk aegis hosting - http://www.aegishosting.co.uk |
From: Matthew M. <ma...@tu...> - 2006-02-28 15:35:15
|
On Tue, 2006-02-28 at 14:57 +0000, Shaun Murray wrote: > The boxes are usually then just... > > <div class="box"> > <h3>{title}</h3> > {content} > </div> Originally I did that, however I had problems because the content might contain the same tags. For example, the css would say div.box h3 {} and that would work fine for the title. However if the {content} had a h3 in it as well, I may not want it to use the same style. Also with div.box-title I could put background-color, background-image, etc. in the div. Headings don't work that well with those type of stylings. The same goes for the content area. I may want to color it and styling on the <p> would cause goofiness. > I do the same for modules too, just adding eg. <div > class="announce">...</div> around a template. It'd actually be useful > if those were there by default in fallout for me anyway. Good point. I was doing that, then I started slacking off :P I think it should be a standard. I'll try to get back in the habit. > The other thing that might be useful is adding insertion of a class > for a category into the top of a template so you could have different > css depending on the category. At the moment I don't think you can > return the category name without it being a link in 0.10.x. On category listings? Not sure if I get what you are saying. > I'd also like to see some standard classes defined for menus (first, > last, selected, enabled, disabled etc) although perhaps those should > be in menuman and then overridden? And for elements such as dates and > bylines which are common across many modules. Good plan. Indicate where it is needed in code and I can implement. -- Matthew McNaney Electronic Student Services Appalachian State University http://phpwebsite.appstate.edu |
From: Shaun M. <sh...@ae...> - 2006-02-28 18:36:30
|
On 28 Feb 2006, at 15:22, Matthew McNaney wrote: > > Originally I did that, however I had problems because the content > might > contain the same tags. For example, the css would say > div.box h3 {} > > and that would work fine for the title. However if the {content} had a > h3 in it as well, I may not want it to use the same style. > Also with div.box-title I could put background-color, background- > image, > etc. in the div. Headings don't work that well with those type of > stylings. > > The same goes for the content area. I may want to color it and styling > on the <p> would cause goofiness. > Ah, I see. I guess I'm just more minimalist in my stylings. > >> The other thing that might be useful is adding insertion of a class >> for a category into the top of a template so you could have different >> css depending on the category. At the moment I don't think you can >> return the category name without it being a link in 0.10.x. > > On category listings? Not sure if I get what you are saying. > No, I was thinking it would be useful in say pagemaster or announce. If you could <div class="{category}">...</div> around the content then you'd possibly be able to style the page/announcement to fit in with the category and provide a bit of diversity. > >> I'd also like to see some standard classes defined for menus (first, >> last, selected, enabled, disabled etc) although perhaps those should >> be in menuman and then overridden? And for elements such as dates and >> bylines which are common across many modules. > > Good plan. Indicate where it is needed in code and I can implement. I'll dig out where I use them but certainly in Announce and Article for bylines and almost everywhere a date is it tends to be smalltext. Shaun aegis design - http://www.aegisdesign.co.uk aegis hosting - http://www.aegishosting.co.uk |
From: Greg M. <drk...@co...> - 2006-03-01 07:07:49
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Matthew McNaney wrote: > On Mon, 2006-02-27 at 23:00 -0700, Greg Morgan wrote: > > Here is a quick definition list. > > align-(center, left, right) : > > bgcolor1-3 : > > bigger & smaller : > > box, box-title, box-content : > module styles : > > img.float-left/right : > no-bullet : > phpws_form : > spoiler : > Please see below. >>[theme_variables] >>0 = LAYOUT_HEADER >>1 = LAYOUT_FOOTER >>2 = BOTTOM >>3 = USERS_LOGIN_BOX >>4 = NOTES_REMINDER >>5 = CATEGORIES_ADMIN_MENU >>6 = SEARCH_SEARCH_BOX 7 = BODY 8 = DEFAULT Will adding these required variables here in the [theme_variables] section confuse the layout system? > > These values tell Layout what extra content sections you have in your > theme. > Each theme MUST have BODY and DEFAULT. Beyond that, you can create a > content section just by adding it to the numeric list. If these are not Is the numeric order in the [theme_variables] section significant? > put in, you cannot move content around the page and content will not > anchor properly. > > The theme variables that are prefixes by module names are anchors. The > first time the above content was created, layout checks to see if it has > an anchor, if it doesn't, it checks the theme.ini file for a module_name > + content variable name. If it finds that variable, it places the > content in that space. If it doesn't, it plops it into the DEFAULT theme > variable. > http://phpwebsite-comm.sourceforge.net/wiki/index.php?title=En_Layout Ok so I revised and dumped layout.txt and parts of this discussion into the page above. The selector catalog is still located here http://phpwebsite-comm.sourceforge.net/wiki/index.php?title=En_default . I dumped my regex's from vim here http://phpwebsite-comm.sourceforge.net/wiki/index.php?title=En_blueballs . The main_page has also been redesigned http://phpwebsite-comm.sourceforge.net/wiki/index.php?title=Main_Page . Interesting: as I was updating .txt files for the next 0.10.3 release critical mass was achieved for the 0.9.x theming system. As noted in the email that started this thread I started to grep for all the selectors and "touch" points for module development and theming in fallout. At present combining all the roles in the http://phpwebsite-comm.sourceforge.net/wiki/index.php?title=En_Layout page is a good thing so that the parts can be seen functioning as a whole. Here's what I sense so far then. A catalog of each of the modules available theme variables must be defined. It sounds like each module page requires a section covering these variables for theme designers. So based on these emails * LAYOUT module has two * * HEADER (LAYOUT_HEADER) * * FOOTER (LAYOUT_FOOTER) * USERS module has one * * LOGIN_BOX (USERS_LOGIN_BOX) * NOTES module has one * * REMINDER (NOTES_REMINDER) * CATEGORIES module has one * * ADMIN_MENU (CATEGORIES_ADMIN_MENU) * SEARCH module has one * * SEARCH_BOX (SEARCH_SEARCH_BOX) * BOTTOM is just there so that phpWebSite has something to hold...well never mind. I might grep on 'Layout::add' to locate and catalog the variables? Likewise, the selector variables, bgcolor1-3, need to be cataloged so that designers know where to add their color, structure, and fonts to a theme whereas the the theme variables would allow them to position the content in the theme. > This allows people to choose a theme and just have it work without > having to move boxes afterward. It also gives the theme developer more > room to style certain components (the menu for example). > > > >>[persistant_style_sheet] >>file = style.css >> >>[default_style_sheet] >>file = default.css >>title = Default Delite >> >>[alternate_style_sheet_1] >>file = blue.css >>title = Blue > > > A persistent style sheet is always loaded. (yes I realize I misspelled > it now) > The default style sheet is then loaded. > The alternate style sheets are loaded should the user want a different > view. Firefox allows you to do this but if you want the change to > "stick" you may have to download an extension. "stick" as in http://www.stickdeath.com/frameset.htm ? ;-) I am not familiar with firefox "sticks". I heard tell that they are breaking IE's bones. > > For now, I put positioning, font sizes, padding widths, etc. in the > persistent style sheet. Color choices go into the default and alternate. > You are not required to use this format, you could just use ONE style > sheet if you wish. Default uses alternates as an example. Greg -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFEBUg+xyxe5L6mr7IRAo+wAJ9fpbQ51WXdrfNVs94nt5Q7tNKa2ACfeHI9 LntrOHzsp62ty51njqBCQsc= =zhby -----END PGP SIGNATURE----- |
From: Verdon V. <ve...@ve...> - 2006-03-08 15:42:27
|
Hi List, I'm trying to take a few tentative steps towards converting/re-writing my phpwsBusinesses mod for phpws 1.x. I'd really like to have it ready in time for the next milestone release. I can't find too much info to go on, but /docs/Converting_Modules.txt has provided a few pointers. No luck yet, but a starting point :) I guess my question is, is there any other documentation other than what's in the /fallout/docs directory, and which module would you recommend for analysing as an example of how to re-write my own? My module would like to take advantage of the item class as well as they key class and image class. I've taken a quick look through some of the included modules and see a somewhat diverse approach. Any idea which would be a 'best practices' example. thanks, verdon |
From: Matthew M. <ma...@tu...> - 2006-03-08 16:05:26
|
On Wed, 2006-03-08 at 10:42 -0500, Verdon Vaillancourt wrote: > which module would you > recommend for analysing as an example of how to re-write my own? I would look at the Blog module as an example of 'from scratch'. I tend to use it to test features. As for upgrading an old module, the only one I have done is Photoalbum, which is what the Converting doc covers. I would glad to offer advice via email or in the chat room. -- Matthew McNaney Electronic Student Services Appalachian State University http://phpwebsite.appstate.edu |
From: Verdon V. <ve...@ve...> - 2006-03-08 16:12:45
|
Thanks Matt, I'll poke around Blog, and I'm sure I'll be back in touch ;) verdon On 8-Mar-06, at 10:53 AM, Matthew McNaney wrote: > On Wed, 2006-03-08 at 10:42 -0500, Verdon Vaillancourt wrote: > >> which module would you >> recommend for analysing as an example of how to re-write my own? > > I would look at the Blog module as an example of 'from scratch'. I tend > to use it to test features. > > As for upgrading an old module, the only one I have done is Photoalbum, > which is what the Converting doc covers. > > I would glad to offer advice via email or in the chat room. > > -- > Matthew McNaney > Electronic Student Services > Appalachian State University > http://phpwebsite.appstate.edu > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > |
From: Verdon V. <ve...@ve...> - 2006-03-09 16:50:32
|
I've noticed that none of the modules in fallout CVS use the PHPWS_Item or PHPWS_Manager classes. Is there a reason for this? Are they only there for backwards compatibility now? I've written modules with classes that extend these and modules that don't, depending on my need. If I am re-writing (moreso than converting) one of my mods for fallout, should I move away from taking advantage of these core classes? verdon On 8-Mar-06, at 11:13 AM, Verdon Vaillancourt wrote: > Thanks Matt, > > I'll poke around Blog, and I'm sure I'll be back in touch ;) > verdon > > > On 8-Mar-06, at 10:53 AM, Matthew McNaney wrote: > >> On Wed, 2006-03-08 at 10:42 -0500, Verdon Vaillancourt wrote: >> >>> which module would you >>> recommend for analysing as an example of how to re-write my own? >> >> I would look at the Blog module as an example of 'from scratch'. I >> tend >> to use it to test features. >> >> As for upgrading an old module, the only one I have done is >> Photoalbum, >> which is what the Converting doc covers. >> >> I would glad to offer advice via email or in the chat room. >> >> -- Matthew McNaney >> Electronic Student Services >> Appalachian State University >> http://phpwebsite.appstate.edu >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting >> language >> that extends applications into web and mobile media. Attend the live >> webcast >> and join the prime developer group breaking into this new coding >> territory! >> http://sel.as-us.falkag.net/sel? >> cmd=lnk&kid=110944&bid=241720&dat=121642 >> _______________________________________________ >> Phpwebsite-developers mailing list >> Php...@li... >> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers >> >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > |
From: Matthew M. <ma...@tu...> - 2006-03-09 17:53:26
|
I never used Item. Many times it was overkill for what I needed. With PHPWS_DB::saveObject and PHPWS_DB::loadObject, I stopped even considering it. I also prefer to use DBPager over Manager. It is more flexible and it uses database limits instead of loading the entire table and then divvying out the results. They will remain for some backward compatibility but I don't plan on updating them. On Thu, 2006-03-09 at 11:51 -0500, Verdon Vaillancourt wrote: > I've noticed that none of the modules in fallout CVS use the PHPWS_Item > or PHPWS_Manager classes. Is there a reason for this? Are they only > there for backwards compatibility now? I've written modules with > classes that extend these and modules that don't, depending on my need. > If I am re-writing (moreso than converting) one of my mods for fallout, > should I move away from taking advantage of these core classes? > > verdon > > > On 8-Mar-06, at 11:13 AM, Verdon Vaillancourt wrote: > > > Thanks Matt, > > > > I'll poke around Blog, and I'm sure I'll be back in touch ;) > > verdon > > > > > > On 8-Mar-06, at 10:53 AM, Matthew McNaney wrote: > > > >> On Wed, 2006-03-08 at 10:42 -0500, Verdon Vaillancourt wrote: > >> > >>> which module would you > >>> recommend for analysing as an example of how to re-write my own? > >> > >> I would look at the Blog module as an example of 'from scratch'. I > >> tend > >> to use it to test features. > >> > >> As for upgrading an old module, the only one I have done is > >> Photoalbum, > >> which is what the Converting doc covers. > >> > >> I would glad to offer advice via email or in the chat room. > >> > >> -- Matthew McNaney > >> Electronic Student Services > >> Appalachian State University > >> http://phpwebsite.appstate.edu > >> > >> > >> > >> ------------------------------------------------------- > >> This SF.Net email is sponsored by xPML, a groundbreaking scripting > >> language > >> that extends applications into web and mobile media. Attend the live > >> webcast > >> and join the prime developer group breaking into this new coding > >> territory! > >> http://sel.as-us.falkag.net/sel? > >> cmd=lnk&kid=110944&bid=241720&dat=121642 > >> _______________________________________________ > >> Phpwebsite-developers mailing list > >> Php...@li... > >> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > >> > >> > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > > that extends applications into web and mobile media. Attend the live > > webcast > > and join the prime developer group breaking into this new coding > > territory! > > http://sel.as-us.falkag.net/sel? > > cmd=lnk&kid=110944&bid=241720&dat=121642 > > _______________________________________________ > > Phpwebsite-developers mailing list > > Php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers -- Matthew McNaney Electronic Student Services Appalachian State University http://phpwebsite.appstate.edu |
From: Verdon V. <ve...@ve...> - 2006-03-09 18:09:44
|
Thanks, Sounds like exploration time :) On 9-Mar-06, at 12:13 PM, Matthew McNaney wrote: > I never used Item. Many times it was overkill for what I needed. > With PHPWS_DB::saveObject and PHPWS_DB::loadObject, I stopped even > considering it. > > I also prefer to use DBPager over Manager. It is more flexible and it > uses database limits instead of loading the entire table and then > divvying out the results. > > They will remain for some backward compatibility but I don't plan on > updating them. > > On Thu, 2006-03-09 at 11:51 -0500, Verdon Vaillancourt wrote: >> I've noticed that none of the modules in fallout CVS use the >> PHPWS_Item >> or PHPWS_Manager classes. Is there a reason for this? Are they only >> there for backwards compatibility now? I've written modules with >> classes that extend these and modules that don't, depending on my >> need. >> If I am re-writing (moreso than converting) one of my mods for >> fallout, >> should I move away from taking advantage of these core classes? >> >> verdon >> >> >> On 8-Mar-06, at 11:13 AM, Verdon Vaillancourt wrote: >> >>> Thanks Matt, >>> >>> I'll poke around Blog, and I'm sure I'll be back in touch ;) >>> verdon >>> >>> >>> On 8-Mar-06, at 10:53 AM, Matthew McNaney wrote: >>> >>>> On Wed, 2006-03-08 at 10:42 -0500, Verdon Vaillancourt wrote: >>>> >>>>> which module would you >>>>> recommend for analysing as an example of how to re-write my own? >>>> >>>> I would look at the Blog module as an example of 'from scratch'. I >>>> tend >>>> to use it to test features. >>>> >>>> As for upgrading an old module, the only one I have done is >>>> Photoalbum, >>>> which is what the Converting doc covers. >>>> >>>> I would glad to offer advice via email or in the chat room. >>>> >>>> -- Matthew McNaney >>>> Electronic Student Services >>>> Appalachian State University >>>> http://phpwebsite.appstate.edu >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by xPML, a groundbreaking scripting >>>> language >>>> that extends applications into web and mobile media. Attend the live >>>> webcast >>>> and join the prime developer group breaking into this new coding >>>> territory! >>>> http://sel.as-us.falkag.net/sel? >>>> cmd=lnk&kid=110944&bid=241720&dat=121642 >>>> _______________________________________________ >>>> Phpwebsite-developers mailing list >>>> Php...@li... >>>> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers >>>> >>>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by xPML, a groundbreaking scripting >>> language >>> that extends applications into web and mobile media. Attend the live >>> webcast >>> and join the prime developer group breaking into this new coding >>> territory! >>> http://sel.as-us.falkag.net/sel? >>> cmd=lnk&kid=110944&bid=241720&dat=121642 >>> _______________________________________________ >>> Phpwebsite-developers mailing list >>> Php...@li... >>> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers >>> >>> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting >> language >> that extends applications into web and mobile media. Attend the live >> webcast >> and join the prime developer group breaking into this new coding >> territory! >> http://sel.as-us.falkag.net/sel? >> cmd=lnk&kid=110944&bid=241720&dat=121642 >> _______________________________________________ >> Phpwebsite-developers mailing list >> Php...@li... >> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > -- > Matthew McNaney > Electronic Student Services > Appalachian State University > http://phpwebsite.appstate.edu > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > |
From: Verdon V. <ve...@ve...> - 2006-03-09 20:24:17
|
You're right... this is cool :) On 9-Mar-06, at 12:13 PM, Matthew McNaney wrote: > I also prefer to use DBPager over Manager. It is more flexible and it > uses database limits instead of loading the entire table and then > divvying out the results. |
From: Verdon V. <ve...@ve...> - 2006-03-09 22:53:46
|
Hi, I've been noticing while reading through some of the fallout and modules code the frequent use of references / var references (&). By this I mean things like the following examples... 1) $search = & new Search($this->key_id); 2) function &cpanel() { do something; } 3) function _loadCategory(&$cat_item, &$blog, $version=NULL) { do something; } Doing a little reading at php.net explains that these (&) are references to the original (think hard link) and may be used for a couple reasons. I don't really have a grip on this yet, but I'll try to explain what I think I understand, and then ask a question. Reason 1 ========== $a = 5; $b = $a; $b = $b -1; In this case, b is a copy of a and the final result is $b is equal to 4 and $a is equal to 5. $a = 5; $b = &$a; $b = $b -1; In this case, b is a reference to a and the final result is $b is equal to 4 and $a is equal to 4. Reason 2 ========== Apparently it can speed up / optimize some internal functions of the php compiler to have operations done to one object in memory instead of on one or more copies of it. So, with that little bit of knowledge, I think I understand what is going on in example 3, but I'm not quite sure about example 1 or 2. Is there anybody who can shed a little light on this for me and when I should be using the same style? Thanks, verdon |
From: Matthew M. <ma...@tu...> - 2006-03-10 13:00:46
|
On Thu, 2006-03-09 at 17:54 -0500, Verdon Vaillancourt wrote: > 1) > $search = & new Search($this->key_id); Been so long doing this I forgot why I did it. I believe it is because you just want a reference pointing to the class and not a copy. > 2) > function &cpanel() > { > do something; > } This means you are returning a reference point. function &getit() { $a = 1; return $a; } $b = getit(); So instead of creating a new variable ($b) with new memory addresses I just point to the result of the function. > 3) > function _loadCategory(&$cat_item, &$blog, $version=NULL) > { > do something; > } This one is very useful. I can send in a variable, work on it in the function and then return something different. For example, I could parse cat_item, alter the variable, and return TRUE. Also in the example above, I could alter cat_item and blog at the same time. -- Matthew McNaney Electronic Student Services Appalachian State University http://phpwebsite.appstate.edu |
From: Verdon V. <ve...@ve...> - 2006-03-10 13:39:59
|
Thanks :) Clear and succinct answer. vedon On 10-Mar-06, at 7:56 AM, Matthew McNaney wrote: > On Thu, 2006-03-09 at 17:54 -0500, Verdon Vaillancourt wrote: >> 1) >> $search = & new Search($this->key_id); > > Been so long doing this I forgot why I did it. I believe it is because > you just want a reference pointing to the class and not a copy. > >> 2) >> function &cpanel() >> { >> do something; >> } > > This means you are returning a reference point. > function &getit() > { > $a = 1; > return $a; > } > > $b = getit(); > > So instead of creating a new variable ($b) with new memory addresses I > just point to the result of the function. > >> 3) >> function _loadCategory(&$cat_item, &$blog, $version=NULL) >> { >> do something; >> } > > This one is very useful. I can send in a variable, work on it in the > function and then return something different. For example, I could > parse > cat_item, alter the variable, and return TRUE. Also in the example > above, I could alter cat_item and blog at the same time. > > > -- > Matthew McNaney > Electronic Student Services > Appalachian State University > http://phpwebsite.appstate.edu > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > |
From: Verdon V. <ve...@ve...> - 2006-03-11 21:29:56
|
Discovering lots of gems the more I read and poke around fallout stuff. For instance, Settings_class ... now that's handy :) |
From: Eloi G. <el...@re...> - 2006-03-10 06:48:18
|
Hi all! I'd stopped using the phpws cache a couple years ago because of the extraordinary amount of disk accesses generated. Even with GLOBAL_CACHE on, server load was still higher than without the cache. It was only recently when I started exploring file-based caching for Article Manager that I found out why. What PHPWS_Template::processTemplate does is load the cached completed template for that particular set of data *AFTER* that data was already read and prepared by the script! This is essentially 2 reads on the same data, which is opposite to what the cache is intended to do. Furthermore, if a single variable in the data is different, a new INSERT is sent to the db server. All this for a small .tpl file that only wants to be read once and stored in memory for the rest of the pageview! I think the solution to this would be to use GLOBAL_CACHE exclusively for this, and to index only the template name, not a md5 hash of the entire record. GLOBAL_CACHE should be for items that don't need to be cached past the pageview, like repetitively-used templates. As such, it should be a separate caching call (PHPWS_Cache::set_global) so that these items don't clutter up the normal caching space. For all other items, the regular caching calls (PHPWS_Cache::set) should let you choose between file- or database- based caching. The reason for this is that database-based caching is only better if you have premium hardware acting as a dedicated db server, or if you have one database backend and multiple webserver frontends. This is the opposite of the hardware that 98% of phpws installs are running on. So what I'd like to do is introduce an option for file-based caching. Most likely using the PEAR Cache_Lite class (http://pear.php.net/manual/en/package.caching.cache-lite.intro.php) or phpCache (http://0x00.org/php/phpCache/). So, before I start coding, I'd like to hear what you guys think -- good/bad idea? Any suggestions for a better way to handle caching? Questions? -Eloi- |
From: Shaun M. <sh...@ae...> - 2006-03-10 09:22:09
|
The cache has been OFF by default since 0.10.1 I think Eloi. Fallout uses Cache_Lite. See http://res.stddev.appstate.edu/cvs/ fallout/core/class/Cache.php?rev=HEAD&content-type=text/vnd.viewcvs- markup Memcache might be an idea also. http://uk2.php.net/memcache Shaun aegis design - http://www.aegisdesign.co.uk aegis hosting - http://www.aegishosting.co.uk |
From: Eloi G. <el...@re...> - 2006-03-10 20:44:52
|
Shaun Murray wrote: > The cache has been OFF by default since 0.10.1 I think Eloi. Yeah, because it was slowing down the average phpws installation. I just wanted to see if we could fix that. However, you guys were already miles ahead of me on that! I *really* need to spend more time with Fallout! <grin> > Memcache might be an idea also. http://uk2.php.net/memcache Wow. Dedicated caching servers? That is so cool! I love PHP more each day! Although its a separate PHP Extension, I think it would be great for phpws to support it if installed. Of course I say this without doing much research. <smile> I'll read up more over the next few days while I'm working on topic & message paging. -Eloi- |
From: Verdon V. <ve...@ve...> - 2006-03-11 22:13:42
|
Hi, Maybe I'm missing something obvious, but I can't figure out how to register a module with the users my_page tab like comments is? TIA, verdon |
From: Verdon V. <ve...@ve...> - 2006-03-11 22:49:27
|
Actually, I think I've found the example I needed in the users module's boost directory. I was looking for examples of a register file in comments or layout. I'm still not sure how they got registered, but I think I might be on the right track now :) On 11-Mar-06, at 5:14 PM, Verdon Vaillancourt wrote: > Hi, > > Maybe I'm missing something obvious, but I can't figure out how to > register a module with the users my_page tab like comments is? > > TIA, > verdon > |
From: Verdon V. <ve...@ve...> - 2006-03-12 19:58:33
|
Hi, I really like the ability to add tabs to fallout's my_page tab. Especially once I realized it was as easy as including a file /mod/mymod/inc/my_page.php :) One thing I thought I should point out though... /mod/mymod/inc/my_page.php gets included in the cp even if mymod isn't installed. BTW, is there a dedicated bug-tracker for fallout where I should submit stuff like this, or should I use the general phpws one at sourceforge? Regards, verdon |
From: Matthew M. <ma...@tu...> - 2006-03-13 13:03:28
|
On Sun, 2006-03-12 at 14:59 -0500, Verdon Vaillancourt wrote: > BTW, is there a dedicated bug-tracker for fallout where I should submit > stuff like this, or should I use the general phpws one at sourceforge? For now, just email me. I think we should decide on how to set-up sourceforge for Fallout. Should (can?) we create new bug, patch, and feature request areas or would we have to register a new project? Any ideas on this? I suspect Fallout will need a separate area to get up to full workable status. -- Matthew McNaney Electronic Student Services Appalachian State University http://phpwebsite.appstate.edu |
From: Verdon V. <ve...@ve...> - 2006-03-13 13:46:50
|
On 13-Mar-06, at 8:01 AM, Matthew McNaney wrote: > On Sun, 2006-03-12 at 14:59 -0500, Verdon Vaillancourt wrote: >> BTW, is there a dedicated bug-tracker for fallout where I should >> submit >> stuff like this, or should I use the general phpws one at sourceforge? > > For now, just email me. I think we should decide on how to set-up > sourceforge for Fallout. OK. I'm doing a fair bit of poking around in my spare time over the next couple weeks and will let you know what I discover. > > Should (can?) we create new bug, patch, and feature request areas or > would we have to register a new project? Any ideas on this? I suspect > Fallout will need a separate area to get up to full workable status. A completely new project would be a nice clean start, but do you want to lose the activity history and such from the existing phpws project? That said, I agree that fallout should have a clean and dedicated area for bugs/patches. > > -- > Matthew McNaney > Electronic Student Services > Appalachian State University > http://phpwebsite.appstate.edu > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > |