From langmail at sympatico.ca Wed Jan 1 15:37:31 2003 From: langmail at sympatico.ca (Blaine Lang) Date: Wed, 1 Jan 2003 15:37:31 -0500 Subject: [geeklog-modules] Geeklog plugin API Enhancements References: <20021231112419.18665@smtp.haun-online.de> <20021231130827.M86079@pigstye.net> Message-ID: <007001c2b1d5$9bd9d550$9a0a10ac@xpbl1> There have been a few areas where we have noted ideas for new API's or enhancements to the existing plugin API's. I wanted to start this thread here to review them and get feedback. 1) New API to support a center block I would like to see a Plugin API call in index.php to check to see if any registered plugins have a function for a centerblock. Possibly the lib-plugins.php function would be PLG_TopCenterBlock($topic,$homepage=true); Then the plugin function would be responsible for any security checks and return the formated HTML. Block Developers could easily tap into this as well by releasing the plugin as a basic plugin with possibly just a simple install, uninstall and this block function. Need to support some concept of order when there are several. 2) Usersettings API's to allow plugins to extend the usersettings in the account information. - Need a API called on user (add/edit,delete,display) - Plugins could add there functions as required and keep there user settings in separate tables but linked via UID 3) Story related Link .... - Plugins could be called and be related to a story. - Example: Link at end of story intro - to start a new forum discussion (or view the current disussion) - This may make sense more for the forum plugin but should we make it generic and topic spedific. Maybe some sites may use a particular topic area and want the stories related to a plugin. Blaine From tomw at pigstye.net Thu Jan 2 08:22:54 2003 From: tomw at pigstye.net (Tom Willett) Date: Thu, 2 Jan 2003 13:22:54 +0000 Subject: [geeklog-modules] Geeklog plugin API Enhancements In-Reply-To: <007001c2b1d5$9bd9d550$9a0a10ac@xpbl1> References: <20021231112419.18665@smtp.haun-online.de> <20021231130827.M86079@pigstye.net> <007001c2b1d5$9bd9d550$9a0a10ac@xpbl1> Message-ID: <20030102132254.M44216@pigstye.net> > 1) New API to support a center block > I would like to see a Plugin API call in index.php to check to see if any > registered plugins have a function for a centerblock. > > Possibly the lib-plugins.php function would be > PLG_TopCenterBlock($topic,$homepage=true); > > Then the plugin function would be responsible for any security checks and > return the formated HTML. Block Developers could easily tap into this as > well by releasing the plugin as a basic plugin with possibly just a simple > install, uninstall and this block function. Need to support some concept of > order when there are several. > I like this -- it is a step toward making the stories just another block and turning the center into another block column. The big problem I see here is order. It would be essential to use the block order number and that complicates programming such a beast. You would have to call all the plugins and keep the results in an array until you got ready to display it. Along with this, what if I want to make my block come after the stories or after the main story? and before the rest of the stories? > 2) Usersettings API's to allow plugins to extend the usersettings in the > account information. > > - Need a API called on user (add/edit,delete,display) > - Plugins could add there functions as required and keep there user > settings in separate tables but linked via UID > The problem I see here is collisions -- what if two plugins want the AIM username? You have two problems that could arise here -- a variable name collision and requiring the user to enter the information twice. How about a compromise. Build the extensibility into geeklog and have one master list and one master table that the plugins could use through an api. So we could have three api calls: two for setup: PLG_getUserSettings to return the list of extended user settings. PLG_addUserSetting to add a user setting to the list. one for normal use: PLG_getUserSetting to read an extended user setting or PLG_getUserSettings to read all extended settings (fewer db calls) > 3) Story related Link .... > > - Plugins could be called and be related to a story. > - Example: Link at end of story intro - to start a new forum discussion > (or view the current disussion) > > - This may make sense more for the forum plugin but should we make it > generic and topic specific. Maybe some sites may use a particular topic area > and want the stories related to a plugin. > Good idea. But I see uses well beyond the forum plugin, infact beyond plugins. How about an easy way to add anything to the what's related box. Then you would not have to include hyperlinks in line in text, they could just be entered in the what's related box. Actually this seems to me a geeklog core issue and not one for a plugin api. And now I will bring up another plugin issue. The requirement that the plugin be in a directory that corresponds to its name is a serious deficiency. It causes 3 problems as I see it. 1) What about two plugins, written by different authors with the same name but different purposes? 2) What about name collisions with system directories (I have run into this with my stats plugin). 3) Limitations on a descriptive name for the plugin. The easiest way around this is to add a field to the gl_plugins table that has the directory the plugin resides in. It would then be simple to find the plugin and make it easy to put the plugin in different directory. -- Tom Willett tomw at pigstye.net From tony at tonybibbs.com Thu Jan 2 10:21:17 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Thu, 2 Jan 2003 09:21:17 -0600 (CST) Subject: [geeklog-modules] Geeklog plugin API Enhancements In-Reply-To: <20030102132254.M44216@pigstye.net> Message-ID: You'll be happy to know that GL2 will support threading of anything in any order. Not sure how many of you were in on those discussions but the concept behind GL2 is simple. Everything on the front page is considered an 'item'. An item is just an abstract object that holds some characteristics common to all plugins (uid of owner, gid of group, GL security stuff, date posted, status (i.e. is it a submission or not), etc. So, if you will, imagine a page where you can post an article, then instead of just comments you can attach polls, documents, etc. As for arbitrary user attributes, GL2 may need to consider supporting some sort of registry where modules can register user attributes that other modules may want to use. --Tony On Thu, 2 Jan 2003, Tom Willett wrote: > > 1) New API to support a center block > > I would like to see a Plugin API call in index.php to check to see if any > > registered plugins have a function for a centerblock. > > > > Possibly the lib-plugins.php function would be > > PLG_TopCenterBlock($topic,$homepage=true); > > > > Then the plugin function would be responsible for any security checks and > > return the formated HTML. Block Developers could easily tap into this as > > well by releasing the plugin as a basic plugin with possibly just a simple > > install, uninstall and this block function. Need to support some concept of > > order when there are several. > > > I like this -- it is a step toward making the stories just another block and > turning the center into another block column. The big problem I see here is > order. It would be essential to use the block order number and that > complicates programming such a beast. You would have to call all the > plugins and keep the results in an array until you got ready to display it. > Along with this, what if I want to make my block come after the stories or > after the main story? and before the rest of the stories? > > 2) Usersettings API's to allow plugins to extend the usersettings in the > > account information. > > > > - Need a API called on user (add/edit,delete,display) > > - Plugins could add there functions as required and keep there user > > settings in separate tables but linked via UID > > > The problem I see here is collisions -- what if two plugins want the AIM > username? You have two problems that could arise here -- a variable name > collision and requiring the user to enter the information twice. How about > a compromise. Build the extensibility into geeklog and have one master list > and one master table that the plugins could use through an api. So we could > have three api calls: > > two for setup: > PLG_getUserSettings to return the list of extended user settings. > PLG_addUserSetting to add a user setting to the list. > > one for normal use: > PLG_getUserSetting to read an extended user setting > or > PLG_getUserSettings to read all extended settings (fewer db calls) > > > 3) Story related Link .... > > > > - Plugins could be called and be related to a story. > > - Example: Link at end of story intro - to start a new forum discussion > > (or view the current disussion) > > > > - This may make sense more for the forum plugin but should we make it > > generic and topic specific. Maybe some sites may use a particular topic > area > > and want the stories related to a plugin. > > > > Good idea. But I see uses well beyond the forum plugin, infact beyond > plugins. How about an easy way to add anything to the what's related box. > Then you would not have to include hyperlinks in line in text, they could > just be entered in the what's related box. > > Actually this seems to me a geeklog core issue and not one for a plugin api. > > > And now I will bring up another plugin issue. The requirement that the > plugin be in a directory that corresponds to its name is a serious > deficiency. It causes 3 problems as I see it. 1) What about two plugins, > written by different authors with the same name but different purposes? 2) > What about name collisions with system directories (I have run into this > with my stats plugin). 3) Limitations on a descriptive name for the > plugin. The easiest way around this is to add a field to the gl_plugins > table that has the directory the plugin resides in. It would then be simple > to find the plugin and make it easy to put the plugin in different directory. > > -- > Tom Willett > tomw at pigstye.net > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules > From tomw at pigstye.net Thu Jan 2 11:58:34 2003 From: tomw at pigstye.net (Tom Willett) Date: Thu, 2 Jan 2003 16:58:34 +0000 Subject: [geeklog-modules] Forms Requirements In-Reply-To: References: Message-ID: <20030102165834.M53860@pigstye.net> Ok here are my comments added to Blaine's -- Tom Willett tomw at pigstye.net -------------- next part -------------- A non-text attachment was scrubbed... Name: forms_module_requirements-tw1.doc Type: application/msword Size: 216064 bytes Desc: not available URL: From langmail at sympatico.ca Sat Jan 4 23:35:04 2003 From: langmail at sympatico.ca (Blaine Lang) Date: Sat, 4 Jan 2003 23:35:04 -0500 Subject: [geeklog-modules] Geeklog plugin API Enhancements References: Message-ID: <00bf01c2b473$d1275610$9a0a10ac@xpbl1> Another API is from a note that Tony made sometime ago. GL now has a COM_emailUserTopics() function but as the Plugins advance, we need a way for a user to request a summary of all new site activity. Plugins could have as fine a control for their users as they want .. but the lib-common function needs to make a call to PLG_pluginEmailupdates() Do we need a API call for plugins that is called when users login and logout? Any more ideas? Blaine ----- Original Message ----- From: "Tony Bibbs" To: Sent: Thursday, January 02, 2003 10:21 AM Subject: Re: [geeklog-modules] Geeklog plugin API Enhancements > You'll be happy to know that GL2 will support threading of anything in any > order. Not sure how many of you were in on those discussions but the > concept behind GL2 is simple. Everything on the front page is considered > an 'item'. An item is just an abstract object that holds some > characteristics common to all plugins (uid of owner, gid of group, GL > security stuff, date posted, status (i.e. is it a submission or not), etc. > > So, if you will, imagine a page where you can post an article, then > instead of just comments you can attach polls, documents, etc. > > As for arbitrary user attributes, GL2 may need to consider supporting some > sort of registry where modules can register user attributes that other > modules may want to use. > > --Tony > > On Thu, 2 Jan 2003, Tom Willett wrote: > > > > 1) New API to support a center block > > > I would like to see a Plugin API call in index.php to check to see if any > > > registered plugins have a function for a centerblock. > > > > > > Possibly the lib-plugins.php function would be > > > PLG_TopCenterBlock($topic,$homepage=true); > > > > > > Then the plugin function would be responsible for any security checks and > > > return the formated HTML. Block Developers could easily tap into this as > > > well by releasing the plugin as a basic plugin with possibly just a simple > > > install, uninstall and this block function. Need to support some concept of > > > order when there are several. > > > > > I like this -- it is a step toward making the stories just another block and > > turning the center into another block column. The big problem I see here is > > order. It would be essential to use the block order number and that > > complicates programming such a beast. You would have to call all the > > plugins and keep the results in an array until you got ready to display it. > > Along with this, what if I want to make my block come after the stories or > > after the main story? and before the rest of the stories? > > > 2) Usersettings API's to allow plugins to extend the usersettings in the > > > account information. > > > > > > - Need a API called on user (add/edit,delete,display) > > > - Plugins could add there functions as required and keep there user > > > settings in separate tables but linked via UID > > > > > The problem I see here is collisions -- what if two plugins want the AIM > > username? You have two problems that could arise here -- a variable name > > collision and requiring the user to enter the information twice. How about > > a compromise. Build the extensibility into geeklog and have one master list > > and one master table that the plugins could use through an api. So we could > > have three api calls: > > > > two for setup: > > PLG_getUserSettings to return the list of extended user settings. > > PLG_addUserSetting to add a user setting to the list. > > > > one for normal use: > > PLG_getUserSetting to read an extended user setting > > or > > PLG_getUserSettings to read all extended settings (fewer db calls) > > > > > 3) Story related Link .... > > > > > > - Plugins could be called and be related to a story. > > > - Example: Link at end of story intro - to start a new forum discussion > > > (or view the current disussion) > > > > > > - This may make sense more for the forum plugin but should we make it > > > generic and topic specific. Maybe some sites may use a particular topic > > area > > > and want the stories related to a plugin. > > > > > > > Good idea. But I see uses well beyond the forum plugin, infact beyond > > plugins. How about an easy way to add anything to the what's related box. > > Then you would not have to include hyperlinks in line in text, they could > > just be entered in the what's related box. > > > > Actually this seems to me a geeklog core issue and not one for a plugin api. > > > > > > And now I will bring up another plugin issue. The requirement that the > > plugin be in a directory that corresponds to its name is a serious > > deficiency. It causes 3 problems as I see it. 1) What about two plugins, > > written by different authors with the same name but different purposes? 2) > > What about name collisions with system directories (I have run into this > > with my stats plugin). 3) Limitations on a descriptive name for the > > plugin. The easiest way around this is to add a field to the gl_plugins > > table that has the directory the plugin resides in. It would then be simple > > to find the plugin and make it easy to put the plugin in different directory. > > > > -- > > Tom Willett > > tomw at pigstye.net > > _______________________________________________ > > geeklog-modules mailing list > > geeklog-modules at lists.geeklog.net > > http://lists.geeklog.net/listinfo/geeklog-modules > > > > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules From tony at tonybibbs.com Sun Jan 5 18:21:07 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Sun, 05 Jan 2003 17:21:07 -0600 Subject: [geeklog-modules] Re: Upated Forum Archive - version 0.94 References: <00cb01c2b50e$c10b7b80$9a0a10ac@xpbl1> Message-ID: <3E18BDE3.8020109@tonybibbs.com> Blaine, one thing the user's on my site really want (and me too) is a way to filter anonymous posts from forums. This is a bit complicated. But the idea is: 1) in user settings allow them to filter out anonymous posts. You *could* just use the same filter settings GL uses OR start your own. I don't have much of an opinion on it though separating them would make it more flexible 2) If a user is filtering anonymous posts and a new topic is started by an anonymous post, hide the topic all together. 3) If a user is filtering anonymous posts for a topic, give a count of filtered posts somewhere on the page. Also, give a link to 'show all posts'. --Tony Blaine Lang wrote: > Tony, > > If you have not already installed (or if you have) - you will want to > try this latest version. > > Includes a number of changes: > > - Code now references a forum specific css file in forum folder under > the theme. > - The Main Navbar thtml and Admin header thtml files - now have the code > to specify the stylesheet css file > - These main thtml files also include the reference to read in the > Javascript ... (using an include file) > - Javascript functions are now located under the themes as well.. New > javascript subdirectory > - We had smilies and assorted icons in one folder. Broke these out - new > smilies image directory > > We were getting a Javascript error. It was isolated to the JS in the > main index navbar thtml code. I removed it as I did not really see any > value for it. > > New code to handle how we were tracking new topics posted - more > efficient and will greatly reduce the number of log records. > > Added a new feature to Mark all topics as read. I've added this at the > category level - mainly because it fit better on the page. > Don't see someone using this often anyways. Mostly to sync up and maybe > if one has not visited in a long time. > > I've started to review the indexes that we have defined and have made a > few changes. This will not effect you now .. but I will need to add > these to an upgrade script for existing installs. > Blaine > > > > > From jeff at jeffsthompson.com Mon Jan 6 11:32:06 2003 From: jeff at jeffsthompson.com (Jeff Thompson) Date: Mon, 6 Jan 2003 10:32:06 -0600 (CST) Subject: [geeklog-modules] Forms Requirements In-Reply-To: <20030102165834.M53860@pigstye.net> References: <20030102165834.M53860@pigstye.net> Message-ID: <27729.216.81.144.33.1041870726.squirrel@www.jeffsthompson.com> Here's my comments. Be gentle. Even though I have some experience with these types of "forms", I consider myself a geeklog rookie. (I should probably better temper my opinions then, eh?) I did this from a client-site on one of their computers, so my comments may not identify me correctly. I think they may show up as "Information Technology" jt -- Jeff S. Thompson Information Technology Consultant Email: jeff at jeffsthompson.com Website: http://www.jeffsthompson.com Phone: 515-201-1778 Fax: 917-591-4881 Tom Willett said: > Ok here are my comments added to Blaine's > > > -- > Tom Willett > tomw at pigstye.net -------------- next part -------------- A non-text attachment was scrubbed... Name: forms_module_requirements-jt.doc Type: application/msword Size: 224256 bytes Desc: not available URL: From tony at tonybibbs.com Mon Jan 13 15:30:48 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Mon, 13 Jan 2003 14:30:48 -0600 (CST) Subject: [geeklog-modules] GL2 API Requirements Message-ID: I'll be putting together the Requirements for the GL2 module API tonight and will be emailing them to you all. Because of the importance of this to GL2, I see no fewer than 4 drafts before we have something to start working from. I will be starting it by reverse engineering what has evolve in the 1.3.x code and then adding in some things I see as missing or nice to have. In this case I thing we *have* to swing for the fence and make sure it is functionally complete from the get-go. Along those lines, I'd be interested to have a least a couple volunteers at porting a 1.3.x module to GL2 while we implement the API. Any takers? Finally, keep in mind that *everything* is a module in GL2. That includes stories, links, events, etc. We'll need to start those in addition to what volunteers. I'll take the article modules, any takers for the links, events, blocks, etc? -- ------------------------------------------------------------------------| Tony Bibbs | "I guess you have to remember that those who don't | tony at tonybibbs.com | hunt or fish often see those of us who do as | | harmlessly strange and sort of amusing. When you | | think about it, that might be a fair assessment." | | --Unknown | ------------------------------------------------------------------------| From tony at tonybibbs.com Mon Jan 13 18:36:23 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Mon, 13 Jan 2003 17:36:23 -0600 (CST) Subject: [geeklog-modules] static pages Message-ID: Tom, any update on integrating your SP stuff (security, etc) with GL 1.3.x? -- ------------------------------------------------------------------------| Tony Bibbs | "I guess you have to remember that those who don't | tony at tonybibbs.com | hunt or fish often see those of us who do as | | harmlessly strange and sort of amusing. When you | | think about it, that might be a fair assessment." | | --Unknown | ------------------------------------------------------------------------| From tomw at pigstye.net Mon Jan 13 22:36:16 2003 From: tomw at pigstye.net (Tom Willett) Date: Tue, 14 Jan 2003 03:36:16 +0000 Subject: [geeklog-modules] static pages In-Reply-To: References: Message-ID: <20030114033616.M2044@pigstye.net> Havn't done much yet. On Mon, 13 Jan 2003 17:36:23 -0600 (CST), Tony Bibbs wrote > Tom, any update on integrating your SP stuff (security, etc) with GL > 1.3.x? > > -- > ------------------------------------------------------------------------| > Tony Bibbs | "I guess you have to remember that those who don't | > tony at tonybibbs.com | hunt or fish often see those of us who do as | > | harmlessly strange and sort of amusing. When you | > | think about it, that might be a fair assessment." | > | --Unknown | > ------------------------------------------------------------------------| > > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules -- Tom Willett tomw at pigstye.net From tony at tonybibbs.com Mon Jan 13 23:45:47 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Mon, 13 Jan 2003 22:45:47 -0600 Subject: [geeklog-modules] static pages In-Reply-To: <20030114033616.M2044@pigstye.net> References: <20030114033616.M2044@pigstye.net> Message-ID: <3E2395FB.4010504@tonybibbs.com> K, this would be a nice 1.3.8 addition, IMHO. I'll check with you after I finish search and see where you are. If you don't have time then I may take a crack at it. --Tony Tom Willett wrote: > Havn't done much yet. > > On Mon, 13 Jan 2003 17:36:23 -0600 (CST), Tony Bibbs wrote > >>Tom, any update on integrating your SP stuff (security, etc) with GL >>1.3.x? >> >>-- >>------------------------------------------------------------------------| >>Tony Bibbs | "I guess you have to remember that those who don't | >>tony at tonybibbs.com | hunt or fish often see those of us who do as | >> | harmlessly strange and sort of amusing. When you | >> | think about it, that might be a fair assessment." | >> | --Unknown | >>------------------------------------------------------------------------| >> >>_______________________________________________ >>geeklog-modules mailing list >>geeklog-modules at lists.geeklog.net >>http://lists.geeklog.net/listinfo/geeklog-modules > > > > > -- > Tom Willett > tomw at pigstye.net > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules -- +-------------------+--------------------------------------------------+ |Tony Bibbs |[R]egardless of what you may think of our penal | |tony at tonybibbs.com |system, the fact is that every man in jail is one | | |less potential fisherman to clutter up your | | |favorite pool or pond. --Ed Zern | +-------------------+--------------------------------------------------+ From tony at tonybibbs.com Tue Jan 14 00:13:45 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Mon, 13 Jan 2003 23:13:45 -0600 Subject: [geeklog-modules] Visitor-Stats Message-ID: <3E239C89.2040808@tonybibbs.com> I have version 1.1 and after an install I get this: Warning: arsort() expects parameter 1 to be array, null given in /usr/www/tonybibbs/plugins/stats/functions.inc on line 476 Warning: Invalid argument supplied for foreach() in /usr/www/tonybibbs/plugins/stats/functions.inc on line 477 Upon inspection, my hunch is that this error results because I have not yet had a referral. Or am I missing something? -- +-------------------+--------------------------------------------------+ |Tony Bibbs |[R]egardless of what you may think of our penal | |tony at tonybibbs.com |system, the fact is that every man in jail is one | | |less potential fisherman to clutter up your | | |favorite pool or pond. --Ed Zern | +-------------------+--------------------------------------------------+ From tomw at pigstye.net Tue Jan 14 08:02:59 2003 From: tomw at pigstye.net (Tom Willett) Date: Tue, 14 Jan 2003 13:02:59 +0000 Subject: [geeklog-modules] Visitor-Stats In-Reply-To: <3E239C89.2040808@tonybibbs.com> References: <3E239C89.2040808@tonybibbs.com> Message-ID: <20030114130259.M42186@pigstye.net> Yes, that is a bug, but I do not remember the exact circumstances of its appearing. To fix it I just tested for an array first. Thus replace: -------------------- arsort($ref); foreach ($ref as $key => $value) { $retval .= '' . $key . ' - ' . $value . '
'; } ---------------- with: -------------- if (is_array($ref)) { arsort($ref); foreach ($ref as $key => $value) { $retval .= '' . $key . ' - ' . $value . '
'; } } -------------- Or you can just grab the latest functions.inc from cvs at gplugs. Tom On Mon, 13 Jan 2003 23:13:45 -0600, Tony Bibbs wrote > I have version 1.1 and after an install I get this: > > Warning: arsort() expects parameter 1 to be array, null given in > /usr/www/tonybibbs/plugins/stats/functions.inc on line 476 > > Warning: Invalid argument supplied for foreach() in > /usr/www/tonybibbs/plugins/stats/functions.inc on line 477 > > Upon inspection, my hunch is that this error results because I have not > yet had a referral. Or am I missing something? > > -- > +-------------------+--------------------------------------------------+ > |Tony Bibbs |[R]egardless of what you may think of our penal | > |tony at tonybibbs.com |system, the fact is that every man in jail is one | > | |less potential fisherman to clutter up your | > | |favorite pool or pond. --Ed Zern | > > +-------------------+--------------------------------------------------+ > > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules -- Tom Willett tomw at pigstye.net From tony at tonybibbs.com Tue Jan 14 12:20:11 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Tue, 14 Jan 2003 11:20:11 -0600 (CST) Subject: [geeklog-modules] Visitor-Stats In-Reply-To: <20030114130259.M42186@pigstye.net> Message-ID: Already did that ;-) On Tue, 14 Jan 2003, Tom Willett wrote: > Yes, that is a bug, but I do not remember the exact circumstances of its > appearing. To fix it I just tested for an array first. Thus replace: > > -------------------- > arsort($ref); > foreach ($ref as $key => $value) { > $retval .= '' . $key . ' - ' . > $value . '
'; > } > ---------------- > with: > -------------- > if (is_array($ref)) { > arsort($ref); > foreach ($ref as $key => $value) { > $retval .= '' . $key . ' - > ' . $value . '
'; > } > } > -------------- > > Or you can just grab the latest functions.inc from cvs at gplugs. > > Tom > On Mon, 13 Jan 2003 23:13:45 -0600, Tony Bibbs wrote > > I have version 1.1 and after an install I get this: > > > > Warning: arsort() expects parameter 1 to be array, null given in > > /usr/www/tonybibbs/plugins/stats/functions.inc on line 476 > > > > Warning: Invalid argument supplied for foreach() in > > /usr/www/tonybibbs/plugins/stats/functions.inc on line 477 > > > > Upon inspection, my hunch is that this error results because I have not > > yet had a referral. Or am I missing something? > > > > -- > > +-------------------+--------------------------------------------------+ > > |Tony Bibbs |[R]egardless of what you may think of our penal | > > |tony at tonybibbs.com |system, the fact is that every man in jail is one | > > | |less potential fisherman to clutter up your | > > | |favorite pool or pond. --Ed Zern | > > > > +-------------------+--------------------------------------------------+ > > > > _______________________________________________ > > geeklog-modules mailing list > > geeklog-modules at lists.geeklog.net > > http://lists.geeklog.net/listinfo/geeklog-modules > > > > -- > Tom Willett > tomw at pigstye.net > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules > -- ------------------------------------------------------------------------| Tony Bibbs | "I guess you have to remember that those who don't | tony at tonybibbs.com | hunt or fish often see those of us who do as | | harmlessly strange and sort of amusing. When you | | think about it, that might be a fair assessment." | | --Unknown | ------------------------------------------------------------------------| From tony at tonybibbs.com Wed Jan 15 12:47:16 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Wed, 15 Jan 2003 11:47:16 -0600 (CST) Subject: [geeklog-modules] Re: Forum Opinion Requested In-Reply-To: <000401c2bc6e$5946ecc0$6e00a8c0@matts> Message-ID: First, be sure to send these kind of request to geeklog-modules at lists.geeklog.net so we have a running history. Well, I my opinions is GL-native modules like this should count on GL to provide the glue for integrating process flow down to the plugins. For example, GL should provide a user control panel interface that centralizes all module-specifc stuff into a common UI. As a visual, imaging clicking on a link named "My Account" where the first page you see will be core GL settings and then there could be tabs for each installed modules that the user could navigate to to set module-specific setting. Also, after much thought, I think GL needs a system for private messages. This is already designed into GL-2 but there is a good argument for integrating this into the 1.3.x. There are already a couple of non-GL hacks that use a PM system and, IMHO, this is best managed by GL. That way all modules have a common way to do PM. Just a thought, work with dhaun on assessing the value and assigning a priority for completion as it relates to 1.3.x Notifications can be looked on similar to PM's. GL2 will support 'watches' where a user can watch a user, or any 'item' supported by a plug-in. GL2 should manage watches for the plugins. --Tony On Wed, 15 Jan 2003, Matthew DeWyer wrote: > Hey guys, > > Blaine and I were discussing our opinions of having a user control panel > for the forums. > We could not come to any great decision by ourselves, so I would like to > know what your opinion(s) are on this subject. > > Here is just a little background on our discussions: > > Some of the pros to having a User CP for the forum would be that it > would centralize the user forum stats, the private messages, > notifications, and user specific settings, all in one area. Also, many > forums have a User CP, so people would be more familiar with using one. > > Some of the cons to having a User CP is that this forum is not a stand > alone forum. So there may not be a need for such a place. Also, using a > CP may break the Geeklog integration feeling by having some settings > available for change in the forum, instead of straight through Geeklog. > > Both of us agree that we should have a link under the User Menu to point > to the forum settings. Where the settings reside we have not decided on > yet. > > To get an idea of what the User CP would be like, you can go to: > http://www.cweb.ws/forum/cp.php. It is not finished yet, but should give > you an idea of what it would be like. > > So, the questions are: > What is your thought about having a User CP for the forum? > If so, what should be in it? > If not, where should the user specific settings go? > > Plus any other suggestions / opinions you may have. > > Thank you for your time and aid in helping us come to a decision. > > Matthew & Blaine > > -- ------------------------------------------------------------------------| Tony Bibbs | "I guess you have to remember that those who don't | tony at tonybibbs.com | hunt or fish often see those of us who do as | | harmlessly strange and sort of amusing. When you | | think about it, that might be a fair assessment." | | --Unknown | ------------------------------------------------------------------------| From langmail at sympatico.ca Wed Jan 15 15:03:44 2003 From: langmail at sympatico.ca (Blaine Lang) Date: Wed, 15 Jan 2003 15:03:44 -0500 Subject: [geeklog-modules] Re: Forum Opinion Requested References: Message-ID: <01a601c2bcd1$35475810$9a0a10ac@xpbl1> Tony, Well, we are designing and will be for sometime for GL 1.3.x so we still need to keep our focus. Albeit, we need more discussion on GL 2 - agreed. We are adding user preferences to the Forum for a few user definable features but can see the list of user options growing and as a good plugin, these options should be able to be edited online. The forum also has a number of other user specific features that Matthew outlined - Notifications, Stats and yes - a hook into the PM feature that Chatterblock. The question was two fold: 1) Whats the better UI option 2) GL Plugin / Forum best method Currenty, if the user is signed in - the Top NAVBAR has the user options to Notifications and PM etc .. We now want to add the user settings admin screen (program) .. and were discussing 1) Rolling those other user features and the user admin into a Forum User Control Panel (CP) 2) Leave the NAVBar as it is and use the Plugin API to add the UserSetting Admin to the User Block Matthew has an example of the Forum Control Panel written and setup on his site - if your logged in to see. The question is what is your opinion on these two approaches. Blaine ----- Original Message ----- From: "Tony Bibbs" To: Sent: Wednesday, January 15, 2003 12:47 PM Subject: [geeklog-modules] Re: Forum Opinion Requested > First, be sure to send these kind of request to > geeklog-modules at lists.geeklog.net so we have a running history. > > Well, I my opinions is GL-native modules like this should count on GL to > provide the glue for integrating process flow down to the plugins. For > example, GL should provide a user control panel interface that centralizes > all module-specifc stuff into a common UI. As a visual, imaging clicking > on a link named "My Account" where the first page you see will be core GL > settings and then there could be tabs for each installed modules that the > user could navigate to to set module-specific setting. > > Also, after much thought, I think GL needs a system for private messages. > This is already designed into GL-2 but there is a good argument for > integrating this into the 1.3.x. There are already a couple of non-GL > hacks that use a PM system and, IMHO, this is best managed by GL. That > way all modules have a common way to do PM. Just a thought, work with > dhaun on assessing the value and assigning a priority for completion as it > relates to 1.3.x > > Notifications can be looked on similar to PM's. GL2 will support > 'watches' where a user can watch a user, or any 'item' supported by a > plug-in. GL2 should manage watches for the plugins. > > --Tony > > On Wed, 15 Jan > 2003, Matthew DeWyer wrote: > > > Hey guys, > > > > Blaine and I were discussing our opinions of having a user control panel > > for the forums. > > We could not come to any great decision by ourselves, so I would like to > > know what your opinion(s) are on this subject. > > > > Here is just a little background on our discussions: > > > > Some of the pros to having a User CP for the forum would be that it > > would centralize the user forum stats, the private messages, > > notifications, and user specific settings, all in one area. Also, many > > forums have a User CP, so people would be more familiar with using one. > > > > Some of the cons to having a User CP is that this forum is not a stand > > alone forum. So there may not be a need for such a place. Also, using a > > CP may break the Geeklog integration feeling by having some settings > > available for change in the forum, instead of straight through Geeklog. > > > > Both of us agree that we should have a link under the User Menu to point > > to the forum settings. Where the settings reside we have not decided on > > yet. > > > > To get an idea of what the User CP would be like, you can go to: > > http://www.cweb.ws/forum/cp.php. It is not finished yet, but should give > > you an idea of what it would be like. > > > > So, the questions are: > > What is your thought about having a User CP for the forum? > > If so, what should be in it? > > If not, where should the user specific settings go? > > > > Plus any other suggestions / opinions you may have. > > > > Thank you for your time and aid in helping us come to a decision. > > > > Matthew & Blaine > > > > > > -- > ------------------------------------------------------------------------| > Tony Bibbs | "I guess you have to remember that those who don't | > tony at tonybibbs.com | hunt or fish often see those of us who do as | > | harmlessly strange and sort of amusing. When you | > | think about it, that might be a fair assessment." | > | --Unknown | > ------------------------------------------------------------------------| > > > > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules > From tony at tonybibbs.com Wed Jan 15 21:09:38 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Wed, 15 Jan 2003 20:09:38 -0600 Subject: [geeklog-modules] stats break emailgeelkogstories Message-ID: <3E261462.5010401@tonybibbs.com> If you use emailgeeklogstories script and have stats plugin, it will complain when ST_addStats is called. Specifically, the call to gethostbyaddr() can't handle being called outside a browser. Just an FYI, -- +-------------------+--------------------------------------------------+ |Tony Bibbs |[R]egardless of what you may think of our penal | |tony at tonybibbs.com |system, the fact is that every man in jail is one | | |less potential fisherman to clutter up your | | |favorite pool or pond. --Ed Zern | +-------------------+--------------------------------------------------+ From tomw at pigstye.net Wed Jan 15 23:05:32 2003 From: tomw at pigstye.net (Tom Willett) Date: Thu, 16 Jan 2003 04:05:32 +0000 Subject: [geeklog-modules] stats break emailgeelkogstories In-Reply-To: <3E261462.5010401@tonybibbs.com> References: <3E261462.5010401@tonybibbs.com> Message-ID: <20030116040532.M22449@pigstye.net> Never thought about that eventuality -- I will look into a fix. Tomorrow when my head is clear. Tom On Wed, 15 Jan 2003 20:09:38 -0600, Tony Bibbs wrote > If you use emailgeeklogstories script and have stats plugin, it will > complain when ST_addStats is called. Specifically, the call to > gethostbyaddr() can't handle being called outside a browser. > > Just an FYI, > > -- > +-------------------+--------------------------------------------------+ > |Tony Bibbs |[R]egardless of what you may think of our penal | > |tony at tonybibbs.com |system, the fact is that every man in jail is one | > | |less potential fisherman to clutter up your | > | |favorite pool or pond. --Ed Zern | > > +-------------------+--------------------------------------------------+ > > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules -- Tom Willett tomw at pigstye.net From tomw at pigstye.net Thu Jan 16 08:46:58 2003 From: tomw at pigstye.net (Tom Willett) Date: Thu, 16 Jan 2003 13:46:58 +0000 Subject: [geeklog-modules] stats break emailgeelkogstories In-Reply-To: <3E261462.5010401@tonybibbs.com> References: <3E261462.5010401@tonybibbs.com> Message-ID: <20030116134658.M2592@pigstye.net> Tony, I added a check at the start of ST_addStats that should fix this issue. As the first line of code, after the global declarations put this line. if (!isset($REQUEST_METHOD)) { return; }; Works for me. Tom On Wed, 15 Jan 2003 20:09:38 -0600, Tony Bibbs wrote > If you use emailgeeklogstories script and have stats plugin, it will > complain when ST_addStats is called. Specifically, the call to > gethostbyaddr() can't handle being called outside a browser. > > Just an FYI, > > -- > +-------------------+--------------------------------------------------+ > |Tony Bibbs |[R]egardless of what you may think of our penal | > |tony at tonybibbs.com |system, the fact is that every man in jail is one | > | |less potential fisherman to clutter up your | > | |favorite pool or pond. --Ed Zern | > > +-------------------+--------------------------------------------------+ > > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules -- Tom Willett tomw at pigstye.net From tony at tonybibbs.com Fri Jan 17 21:53:37 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Fri, 17 Jan 2003 20:53:37 -0600 Subject: [geeklog-modules] Geeklog plugin API Enhancements In-Reply-To: <00bf01c2b473$d1275610$9a0a10ac@xpbl1> References: <00bf01c2b473$d1275610$9a0a10ac@xpbl1> Message-ID: <3E28C1B1.80404@tonybibbs.com> Ok, so there are a few new API methods: 1) API to support center blocks. 2) UserSettings API: Tom brought up a good point here on user attributes. My opinion for 1.3.x is this, we need to make sure that plugin developers *do not* add attributes to the core user table. If they insist on adding an attribute (which is ok) do so in it's on user table that ties to the core table, obviously, by user id. This way in the event Dirk does get around to adding more user attributes the upgrade for plugin users will still work. Also, I'd like to see the preferences page have a tabbed look. On the first table you will see any Gl-core perference setting. Then each plugin (through this API) can have it's tab show up with it's specialized perferences. This requires a near rewrite of usersetting.php but it would make things much cleaner an usable. 3) getRelated(). Maybe this needs to be a function that plugins can call to have Geeklog search for related stories and return them back to a plugin for inclusion. Similarly this should work in the reverse where Geeklog can have plugins report related data on a story. The algorithm used to do the match would be interesting. 4) COM_emailUserTopics(). yes, other plugins may want to format their stuff and send it in an email too. The only issue here is how can users filter? For stories this is tied into the Display Preferences...how would this work for plugins? Is the answer another API in display preferences to get that stuff on a per plugin basis? Tom to address your issue about dependencies on plugin names and directories, I understand. I think this is entrenched enough in GL 1.3.x to leave it as is and, instead, address this in GL2. Seem reasonable? Man, with all this coming out, the GL2 module API is already 70% done ;-) --Tony Blaine Lang wrote: > Another API is from a note that Tony made sometime ago. GL now has a > COM_emailUserTopics() function but as the Plugins advance, we need a way for > a user to request a summary of all new site activity. > > Plugins could have as fine a control for their users as they want .. but the > lib-common function needs to make a call to PLG_pluginEmailupdates() > > Do we need a API call for plugins that is called when users login and > logout? > > Any more ideas? > > Blaine > > ----- Original Message ----- > From: "Tony Bibbs" > To: > Sent: Thursday, January 02, 2003 10:21 AM > Subject: Re: [geeklog-modules] Geeklog plugin API Enhancements > > > >>You'll be happy to know that GL2 will support threading of anything in any >>order. Not sure how many of you were in on those discussions but the >>concept behind GL2 is simple. Everything on the front page is considered >>an 'item'. An item is just an abstract object that holds some >>characteristics common to all plugins (uid of owner, gid of group, GL >>security stuff, date posted, status (i.e. is it a submission or not), etc. >> >>So, if you will, imagine a page where you can post an article, then >>instead of just comments you can attach polls, documents, etc. >> >>As for arbitrary user attributes, GL2 may need to consider supporting some >>sort of registry where modules can register user attributes that other >>modules may want to use. >> >>--Tony >> >>On Thu, 2 Jan 2003, Tom Willett wrote: >> >> >>>>1) New API to support a center block >>>>I would like to see a Plugin API call in index.php to check to see if > > any > >>>>registered plugins have a function for a centerblock. >>>> >>>>Possibly the lib-plugins.php function would be >>>>PLG_TopCenterBlock($topic,$homepage=true); >>>> >>>>Then the plugin function would be responsible for any security checks > > and > >>>>return the formated HTML. Block Developers could easily tap into this > > as > >>>>well by releasing the plugin as a basic plugin with possibly just a > > simple > >>>>install, uninstall and this block function. Need to support some > > concept of > >>>>order when there are several. >>>> >>> >>>I like this -- it is a step toward making the stories just another block > > and > >>>turning the center into another block column. The big problem I see > > here is > >>>order. It would be essential to use the block order number and that >>>complicates programming such a beast. You would have to call all the >>>plugins and keep the results in an array until you got ready to display > > it. > >>>Along with this, what if I want to make my block come after the stories > > or > >>>after the main story? and before the rest of the stories? >>> >>>>2) Usersettings API's to allow plugins to extend the usersettings in > > the > >>>>account information. >>>> >>>> - Need a API called on user (add/edit,delete,display) >>>> - Plugins could add there functions as required and keep there user >>>>settings in separate tables but linked via UID >>>> >>> >>>The problem I see here is collisions -- what if two plugins want the AIM >>>username? You have two problems that could arise here -- a variable > > name > >>>collision and requiring the user to enter the information twice. How > > about > >>>a compromise. Build the extensibility into geeklog and have one master > > list > >>>and one master table that the plugins could use through an api. So we > > could > >>>have three api calls: >>> >>>two for setup: >>>PLG_getUserSettings to return the list of extended user > > settings. > >>>PLG_addUserSetting to add a user setting to the list. >>> >>>one for normal use: >>>PLG_getUserSetting to read an extended user setting >>>or >>>PLG_getUserSettings to read all extended settings (fewer db > > calls) > >>>>3) Story related Link .... >>>> >>>> - Plugins could be called and be related to a story. >>>> - Example: Link at end of story intro - to start a new forum > > discussion > >>>>(or view the current disussion) >>>> >>>> - This may make sense more for the forum plugin but should we make > > it > >>>>generic and topic specific. Maybe some sites may use a particular > > topic > >>>area >>> >>>>and want the stories related to a plugin. >>>> >>> >>>Good idea. But I see uses well beyond the forum plugin, infact beyond >>>plugins. How about an easy way to add anything to the what's related > > box. > >>>Then you would not have to include hyperlinks in line in text, they > > could > >>>just be entered in the what's related box. >>> >>>Actually this seems to me a geeklog core issue and not one for a plugin > > api. > >>> >>>And now I will bring up another plugin issue. The requirement that the >>>plugin be in a directory that corresponds to its name is a serious >>>deficiency. It causes 3 problems as I see it. 1) What about two > > plugins, > >>>written by different authors with the same name but different purposes? > > 2) > >>>What about name collisions with system directories (I have run into > > this > >>>with my stats plugin). 3) Limitations on a descriptive name for the >>>plugin. The easiest way around this is to add a field to the gl_plugins >>>table that has the directory the plugin resides in. It would then be > > simple > >>>to find the plugin and make it easy to put the plugin in different > > directory. > >>>-- >>>Tom Willett >>>tomw at pigstye.net >>>_______________________________________________ >>>geeklog-modules mailing list >>>geeklog-modules at lists.geeklog.net >>>http://lists.geeklog.net/listinfo/geeklog-modules >>> >> >>_______________________________________________ >>geeklog-modules mailing list >>geeklog-modules at lists.geeklog.net >>http://lists.geeklog.net/listinfo/geeklog-modules > > > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules -- +-------------------+--------------------------------------------------+ |Tony Bibbs |[R]egardless of what you may think of our penal | |tony at tonybibbs.com |system, the fact is that every man in jail is one | | |less potential fisherman to clutter up your | | |favorite pool or pond. --Ed Zern | +-------------------+--------------------------------------------------+ From tomw at pigstye.net Sat Jan 18 09:56:23 2003 From: tomw at pigstye.net (Tom Willett) Date: Sat, 18 Jan 2003 14:56:23 +0000 Subject: [geeklog-modules] Geeklog plugin API Enhancements In-Reply-To: <3E28C1B1.80404@tonybibbs.com> References: <00bf01c2b473$d1275610$9a0a10ac@xpbl1> <3E28C1B1.80404@tonybibbs.com> Message-ID: <20030118145623.M82242@pigstye.net> On Fri, 17 Jan 2003 20:53:37 -0600, Tony Bibbs wrote > Ok, so there are a few new API methods: > > 1) API to support center blocks. So is this for 1.3.x only, right? GL2 will not distinguish between columns. > 2) UserSettings API: Tom brought up a good point here on user > attributes. My opinion for 1.3.x is this, we need to make sure that > plugin developers *do not* add attributes to the core user table. If > they insist on adding an attribute (which is ok) do so in it's on user > table that ties to the core table, obviously, by user id. This way in > the event Dirk does get around to adding more user attributes the > upgrade for plugin users will still work. > > Also, I'd like to see the preferences page have a tabbed look. On the > first table you will see any Gl-core perference setting. Then each > plugin (through this API) can have it's tab show up with it's > specialized perferences. This requires a near rewrite of > usersetting.php but it would make things much cleaner an usable. > Optional unless the plugin had user specific settings? So the API would specify that the plugin return an independent block of html that can be placed anywhere on a page. Do you then need a new template similiar to a block or would you want to use the block template for this? Could this same template be used by the plugin to display this information elsewhere? (Blaine's user control panel). Do you need a variable that specifies what tab you are on so that it returns to that tab or do you want to always return to the first tab. In the API specify that all the plugins variables used on this tab have a unique prefix to avoid naming collisions. Do you want one big form consisting of all tabs or seperate forms for each tab? > 3) getRelated(). Maybe this needs to be a function that plugins can > call to have Geeklog search for related stories and return them back to > a plugin for inclusion. Similarly this should work in the reverse where > Geeklog can have plugins report related data on a story. The algorithm > used to do the match would be interesting. > Optional? So the call to getRelated() would return both GL and Plugin related data. Does the instance where the caller and returner are the same need to be handled differently? I think it necessary that the related data be cached like it is now, but it would also be nice if there was an easy way to refresh the Related Data at a later date. > 4) COM_emailUserTopics(). yes, other plugins may want to format their > stuff and send it in an email too. The only issue here is how can users > filter? For stories this is tied into the Display Preferences...how > would this work for plugins? Is the answer another API in display > preferences to get that stuff on a per plugin basis? > Optional. Just make it a mandatory part of the usersettings API defaulted to off so that the user could turn it on if wanted. > Tom to address your issue about dependencies on plugin names and > directories, I understand. I think this is entrenched enough in GL > 1.3.x to leave it as is and, instead, address this in GL2. Seem reasonable? > Yes, I never imagined that this issue would be addressed in 1.3.x. It would break everything. Have you thought about the transition to GL2? Will you provide a backward compatible API so that existing plugins will work with little or no modification or make the clean break? > > Do we need a API call for plugins that is called when users login and > logout? > Optional. The more I think about this the more I like it -- it opens up posibilites for notification and changing the UI per user. -- Tom Willett tomw at pigstye.net From tony at tonybibbs.com Mon Jan 20 19:25:12 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Mon, 20 Jan 2003 18:25:12 -0600 Subject: [geeklog-modules] Geeklog plugin API Enhancements In-Reply-To: <20030118145623.M82242@pigstye.net> References: <00bf01c2b473$d1275610$9a0a10ac@xpbl1> <3E28C1B1.80404@tonybibbs.com> <20030118145623.M82242@pigstye.net> Message-ID: <3E2C9368.5070106@tonybibbs.com> Tom Willett wrote: > On Fri, 17 Jan 2003 20:53:37 -0600, Tony Bibbs wrote > > So is this for 1.3.x only, right? GL2 will not distinguish between columns. > Right, I'm talking all 1.3.x for now. The GL2 requirements for the plugin API will be drafted this week. > >2) UserSettings API: Tom brought up a good point here on user... > > Optional unless the plugin had user specific settings? Right, this would be optional > > So the API would specify that the plugin return an independent block of html > that can be placed anywhere on a page. Do you then need a new template > similiar to a block or would you want to use the block template for this? > Could this same template be used by the plugin to display this information > elsewhere? (Blaine's user control panel). Good questions. I think the block should be configurable sorta like blocks. With blocks you can override the template defaults by specifiying it in the function file in the layout. > > Do you need a variable that specifies what tab you are on so that it returns > to that tab or do you want to always return to the first tab. This should make the user experience as intuitive as possible. > > In the API specify that all the plugins variables used on this tab have a > unique prefix to avoid naming collisions. Good idea. > > Do you want one big form consisting of all tabs or seperate forms for each > tab? The tabbed interface should be pretty simple. When on the main user settings page you would be on the GL form. When you click something like the static pages tab, this would be caught in a GET variable and then GL would call the user settings API function for that plugin. > > >3) getRelated(). Maybe this needs to be a function that plugins can... > > Optional? > > So the call to getRelated() would return both GL and Plugin related data. > Does the instance where the caller and returner are the same need to be > handled differently? I think it necessary that the related data be cached > like it is now, but it would also be nice if there was an easy way to > refresh the Related Data at a later date. This needs more thought. I like this concept but we'd have to touch a lot of code. I'm wondering if this shouldn't be a GL2 thing only. >4) COM_emailUserTopics(). yes, other plugins may want to format their... > > Optional. > > Just make it a mandatory part of the usersettings API defaulted to off so > that the user could turn it on if wanted. Makes sense. > Have you thought about the transition to GL2? Will you provide a backward > compatible API so that existing plugins will work with little or no > modification or make the clean break? I think that making GL 1.3.x functions backward compatible will be impossible. A big part of this will be that I my plan is that all plugins will inherit from a base plugin object that will set the API so that testing of the API can be done before a plugin is release. That may not make sense now but it will when I get you all the first draft of the GL API. -- +-------------------+--------------------------------------------------+ |Tony Bibbs |[R]egardless of what you may think of our penal | |tony at tonybibbs.com |system, the fact is that every man in jail is one | | |less potential fisherman to clutter up your | | |favorite pool or pond. --Ed Zern | +-------------------+--------------------------------------------------+ From tony at tonybibbs.com Tue Jan 21 18:23:19 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Tue, 21 Jan 2003 17:23:19 -0600 (CST) Subject: [geeklog-modules] items on gplugs site Message-ID: First, good site (though current theme loads slow). On the URL rewriting stuff, I'd be itnerested if you guys found a way that would work on both windows and *nix. That is the crux of the problem when I started looking into it. If you look closely at the static page modules (the one shipping with GL by default) it can use a form of URL rewriting...I just don't know if the bug in php.exe has been fixed for the windows users. i"m not saying the exact code I wrote should be used but that general method could be. I just hate seeing something being tackled that we may need to handle in GL2 too without considering all the options. I'll check to see if the php.exe bug got fixed and if it does I'd encourage you all to use that method. Or am I way off base? -- ------------------------------------------------------------------------| Tony Bibbs | "I guess you have to remember that those who don't | tony at tonybibbs.com | hunt or fish often see those of us who do as | | harmlessly strange and sort of amusing. When you | | think about it, that might be a fair assessment." | | --Unknown | ------------------------------------------------------------------------| From tomw at pigstye.net Tue Jan 21 21:08:47 2003 From: tomw at pigstye.net (Tom Willett) Date: Wed, 22 Jan 2003 02:08:47 +0000 Subject: [geeklog-modules] items on gplugs site In-Reply-To: References: Message-ID: <20030122020847.M98677@pigstye.net> The url rewriting that we have been playing with on the gplugs site uses a combination of your static pages rewrite code and apache rewrite rules. It will only work on apache using a htdoc file currently. The good thing about the rewrite and the index is that google has picked them both up and has begun making direct links to the stories rather than just the index pages. The rewrite links however are intended mostly for the other search engines. Last time I looked they have not spidered us yet so we do not know how they will handle it. I am wondering if the lack of unique descriptive text for each link will hurt there. We will just have to wait and see. I figure it will take at least two months to have a good trial. At that time Vinny and I were planning on putting a combined package together. The index is so simple I would recommend that it become a part of geeklog, because it works and addresses a common complaint. TomW Yeah the theme is a little slow but free and distinctive. On Tue, 21 Jan 2003 17:23:19 -0600 (CST), Tony Bibbs wrote > First, good site (though current theme loads slow). On the URL rewriting > stuff, I'd be itnerested if you guys found a way that would work on both > windows and *nix. That is the crux of the problem when I started looking > into it. If you look closely at the static page modules (the one shipping > with GL by default) it can use a form of URL rewriting...I just don't know > if the bug in php.exe has been fixed for the windows users. i"m not > saying the exact code I wrote should be used but that general method could > be. > > I just hate seeing something being tackled that we may need to handle in > GL2 too without considering all the options. I'll check to see if the > php.exe bug got fixed and if it does I'd encourage you all to use that > method. > > Or am I way off base? > > -- > ------------------------------------------------------------------------| > Tony Bibbs | "I guess you have to remember that those who don't | > tony at tonybibbs.com | hunt or fish often see those of us who do as | > | harmlessly strange and sort of amusing. When you | > | think about it, that might be a fair assessment." | > | --Unknown | > ------------------------------------------------------------------------| > > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules -- Tom Willett tomw at pigstye.net From langmail at sympatico.ca Tue Jan 28 20:57:11 2003 From: langmail at sympatico.ca (Blaine Lang) Date: Tue, 28 Jan 2003 20:57:11 -0500 Subject: [geeklog-modules] Using the GL upload.class library with multiple images References: <20030122020847.M98677@pigstye.net> Message-ID: <026201c2c739$bce7b400$9a0a10ac@xpbl1> Tony, I'm trying to use your upload class with a form that has multiple file type input fields. I have logging in the class and am getting the following output. I am testing with small files ERRORS File, Array, is bigger than the 20480 byte limit Mime type, Array, not in list of allowed mime types Since HTTP_POST_FILES is now an array of arrays - using $curfile = current($HTTP_POST_FILES) - will return an array, so I have tried some tests of referencing element 0 which from my debug output is the real file name. $pos = strrpos($curfile['name'][0],'.') + 1; $fextension = substr($curfile['name'][0], $pos); $filename = $_USER['username'] . '.' . $fextension; $upload->setFileNames($filename); $upload->setPerms('0644'); $upload->setMaxFileSize(20480); //20KB reset($HTTP_POST_FILES); $upload->uploadFiles(); Any tips? Blaine From tony at tonybibbs.com Tue Jan 28 21:45:22 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Tue, 28 Jan 2003 20:45:22 -0600 Subject: [geeklog-modules] Re: Using the GL upload.class library with multiple images In-Reply-To: <026201c2c739$bce7b400$9a0a10ac@xpbl1> References: <20030122020847.M98677@pigstye.net> <026201c2c739$bce7b400$9a0a10ac@xpbl1> Message-ID: <3E374042.2090707@tonybibbs.com> Sounds like you are implying that the class no longer works with the current version of PHP, right? If so, I don't get it because I'm running 4.3 on the server for iowaoutdoors.org and it seems to be working fine. Confused... --Tony Blaine Lang wrote: > Tony, > > I'm trying to use your upload class with a form that has multiple file type > input fields. I have logging in the class and am getting the following > output. I am testing with small files > > ERRORS > File, Array, is bigger than the 20480 byte limit > Mime type, Array, not in list of allowed mime types > > Since HTTP_POST_FILES is now an array of arrays > - using $curfile = current($HTTP_POST_FILES) - will return an array, so I > have tried some tests of referencing element 0 which from my debug output is > the real file name. > > $pos = strrpos($curfile['name'][0],'.') + 1; > $fextension = substr($curfile['name'][0], $pos); > $filename = $_USER['username'] . '.' . $fextension; > $upload->setFileNames($filename); > $upload->setPerms('0644'); > $upload->setMaxFileSize(20480); //20KB > reset($HTTP_POST_FILES); > $upload->uploadFiles(); > > Any tips? > > Blaine -- +-------------------+--------------------------------------------------+ |Tony Bibbs |[R]egardless of what you may think of our penal | |tony at tonybibbs.com |system, the fact is that every man in jail is one | | |less potential fisherman to clutter up your | | |favorite pool or pond. --Ed Zern | +-------------------+--------------------------------------------------+ From langmail at sympatico.ca Tue Jan 28 22:30:03 2003 From: langmail at sympatico.ca (Blaine Lang) Date: Tue, 28 Jan 2003 22:30:03 -0500 Subject: [geeklog-modules] Re: Using the GL upload.class library with multiple images References: <20030122020847.M98677@pigstye.net> <026201c2c739$bce7b400$9a0a10ac@xpbl1> <3E374042.2090707@tonybibbs.com> Message-ID: <027601c2c746$b64616c0$9a0a10ac@xpbl1> Sorry Tony, no that was not what I was implying. Its a new piece of code I'm working on.. After you pointed me to the example in admin/submit where you can upload 5 images - I got myself straightened out. I had forgotten about that example was there. My problem was that how I was creating $filename $upload->setFileNames($filename); I was not creating an array of filenames. Once I did that my code worked. So far - it works great and has a lot of control. Thanks, Blaine ----- Original Message ----- From: "Tony Bibbs" To: "Blaine Lang" ; "geeklog-modules" Sent: Tuesday, January 28, 2003 9:45 PM Subject: [geeklog-modules] Re: Using the GL upload.class library with multiple images > Sounds like you are implying that the class no longer works with the > current version of PHP, right? If so, I don't get it because I'm > running 4.3 on the server for iowaoutdoors.org and it seems to be > working fine. > > Confused... > > --Tony > > Blaine Lang wrote: > > Tony, > > > > I'm trying to use your upload class with a form that has multiple file type > > input fields. I have logging in the class and am getting the following > > output. I am testing with small files > > > > ERRORS > > File, Array, is bigger than the 20480 byte limit > > Mime type, Array, not in list of allowed mime types > > > > Since HTTP_POST_FILES is now an array of arrays > > - using $curfile = current($HTTP_POST_FILES) - will return an array, so I > > have tried some tests of referencing element 0 which from my debug output is > > the real file name. > > > > $pos = strrpos($curfile['name'][0],'.') + 1; > > $fextension = substr($curfile['name'][0], $pos); > > $filename = $_USER['username'] . '.' . $fextension; > > $upload->setFileNames($filename); > > $upload->setPerms('0644'); > > $upload->setMaxFileSize(20480); //20KB > > reset($HTTP_POST_FILES); > > $upload->uploadFiles(); > > > > Any tips? > > > > Blaine > > > -- > +-------------------+--------------------------------------------------+ > |Tony Bibbs |[R]egardless of what you may think of our penal | > |tony at tonybibbs.com |system, the fact is that every man in jail is one | > | |less potential fisherman to clutter up your | > | |favorite pool or pond. --Ed Zern | > > +-------------------+--------------------------------------------------+ > > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules From langmail at sympatico.ca Wed Jan 29 00:47:35 2003 From: langmail at sympatico.ca (Blaine Lang) Date: Wed, 29 Jan 2003 00:47:35 -0500 Subject: [geeklog-modules] Re: Using the GL upload.class library with multiple images References: <20030122020847.M98677@pigstye.net> <026201c2c739$bce7b400$9a0a10ac@xpbl1> <3E374042.2090707@tonybibbs.com> Message-ID: <02a001c2c759$ec76f170$9a0a10ac@xpbl1> Tony, I have another update ... working on code to handle the error recovery if one of 5 files is rejected for error. so using; $upload->setContinueOnError(true); There is an error in that class function and I was going to correct it in CVS. You are setting : $this->_continueOnError to $true or $false Needs to be true or false - remove the $ ---- Ok - so I changed that and it continues but in the uploadFiles function, before the actual copy is done you are doing these last system checks: if ($this->checkMimeType() AND $this->_imageSizeOK() AND !$this->areErrors()) { $this->areErrors() will now always return a false since one of the uploads has failed. Thus the code continues but no additional files are uploaded. Hense my problem. Blaine From tony at tonybibbs.com Wed Jan 29 20:48:31 2003 From: tony at tonybibbs.com (Tony Bibbs) Date: Wed, 29 Jan 2003 19:48:31 -0600 Subject: [geeklog-modules] Re: Using the GL upload.class library with multiple images In-Reply-To: <02a001c2c759$ec76f170$9a0a10ac@xpbl1> References: <20030122020847.M98677@pigstye.net> <026201c2c739$bce7b400$9a0a10ac@xpbl1> <3E374042.2090707@tonybibbs.com> <02a001c2c759$ec76f170$9a0a10ac@xpbl1> Message-ID: <3E38846F.3060807@tonybibbs.com> Good catch! --Tony Blaine Lang wrote: > Tony, > > I have another update ... working on code to handle the error recovery if > one of 5 files is rejected for error. > so using; $upload->setContinueOnError(true); > > There is an error in that class function and I was going to correct it in > CVS. > You are setting : > > $this->_continueOnError to $true or $false > Needs to be true or false - remove the $ > > ---- > Ok - so I changed that and it continues but in the uploadFiles function, > before the actual copy is done you are doing these last system checks: > > if ($this->checkMimeType() AND $this->_imageSizeOK() AND > !$this->areErrors()) { > > $this->areErrors() will now always return a false since one of the uploads > has failed. Thus the code continues but no additional files are uploaded. > > Hense my problem. > > Blaine > > > _______________________________________________ > geeklog-modules mailing list > geeklog-modules at lists.geeklog.net > http://lists.geeklog.net/listinfo/geeklog-modules -- +-------------------+--------------------------------------------------+ |Tony Bibbs |[R]egardless of what you may think of our penal | |tony at tonybibbs.com |system, the fact is that every man in jail is one | | |less potential fisherman to clutter up your | | |favorite pool or pond. --Ed Zern | +-------------------+--------------------------------------------------+