Thread: database driven user quotes
Hey guys, I'm thinking about making the user quotes on the main website database driven . Two goals behind this would be to allow for a page where we could display all user quotes, and also to allow the quotes on the main page to be randomly generated for each site build, making the front page a little less static. The one tricky part seems to be how best to handle translations. I had a thought to make the database table something simple like quote, tagline, & lang, which would be fine for storing the content, however I'm not sure the best way for extracting it. I was thinking the calls to func_lang could be replaced with a get_quote, and then use $_LANGUAGE for system/handler.php as an argument to get the appropriate quote. I figure this will also mean we need an addition to the admin screens for inputing quotes. Does this sound reasonable? -- Robert Treat Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
Just like we do now with events and news and such. When we build the site from the master, the quote will get pulled from the db and put into the static page. Incidentally, for those concerned, I'll handle translation like we do now with news/events type stuff, that architecture should be fine for what I am doing. Robert Treat On Wednesday 17 August 2005 15:56, Marc G. Fournier wrote: > Ummm, how are you planning on handling the web servers, which are all > static pages generated by the master site? > > On Wed, 17 Aug 2005, Robert Treat wrote: > > Hey guys, > > > > I'm thinking about making the user quotes on the main website database > > driven . Two goals behind this would be to allow for a page where we > > could display all user quotes, and also to allow the quotes on the main > > page to be randomly generated for each site build, making the front page > > a little less static. The one tricky part seems to be how best to handle > > translations. I had a thought to make the database table something simple > > like quote, tagline, & lang, which would be fine for storing the content, > > however I'm not sure the best way for extracting it. I was thinking the > > calls to func_lang could be replaced with a get_quote, and then use > > $_LANGUAGE for > > system/handler.php as an argument to get the appropriate quote. I figure > > this will also mean we need an addition to the admin screens for inputing > > quotes. Does this sound reasonable? > > > > -- > > Robert Treat > > Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 2: Don't 'kill -9' the postmaster > > ---- > Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) > Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664 -- Robert Treat Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
Ummm, how are you planning on handling the web servers, which are all static pages generated by the master site? On Wed, 17 Aug 2005, Robert Treat wrote: > Hey guys, > > I'm thinking about making the user quotes on the main website database > driven . Two goals behind this would be to allow for a page where we could > display all user quotes, and also to allow the quotes on the main page to be > randomly generated for each site build, making the front page a little less > static. The one tricky part seems to be how best to handle translations. I > had a thought to make the database table something simple like quote, > tagline, & lang, which would be fine for storing the content, however I'm not > sure the best way for extracting it. I was thinking the calls to func_lang > could be replaced with a get_quote, and then use $_LANGUAGE for > system/handler.php as an argument to get the appropriate quote. I figure > this will also mean we need an addition to the admin screens for inputing > quotes. Does this sound reasonable? > > -- > Robert Treat > Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664
Could use javascript to fill an array of quotes and randomly pic one. On Aug 17, 2005, at 12:56 PM, Marc G. Fournier wrote: > > Ummm, how are you planning on handling the web servers, which are > all static pages generated by the master site? > > On Wed, 17 Aug 2005, Robert Treat wrote: > > >> Hey guys, >> >> I'm thinking about making the user quotes on the main website >> database >> driven . Two goals behind this would be to allow for a page where >> we could >> display all user quotes, and also to allow the quotes on the main >> page to be >> randomly generated for each site build, making the front page a >> little less >> static. The one tricky part seems to be how best to handle >> translations. I >> had a thought to make the database table something simple like quote, >> tagline, & lang, which would be fine for storing the content, >> however I'm not >> sure the best way for extracting it. I was thinking the calls to >> func_lang >> could be replaced with a get_quote, and then use $_LANGUAGE for >> system/handler.php as an argument to get the appropriate quote. I >> figure >> this will also mean we need an addition to the admin screens for >> inputing >> quotes. Does this sound reasonable? >> >> -- >> Robert Treat >> Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL >> >> ---------------------------(end of >> broadcast)--------------------------- >> TIP 2: Don't 'kill -9' the postmaster >> >> > > ---- > Marc G. Fournier Hub.Org Networking Services (http:// > www.hub.org) > Email: scrappy@hub.org Yahoo!: yscrappy ICQ: > 7615664 > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: explain analyze is your friend > Gavin M. Roy 800 Pound Gorilla gmr@ehpg.net
> Hey guys, > > I'm thinking about making the user quotes on the main website > database driven . Two goals behind this would be to allow > for a page where we could display all user quotes, and also > to allow the quotes on the main page to be randomly generated > for each site build, making the front page a little less > static. The one tricky part seems to be how best to handle > translations. I had a thought to make the database table > something simple like quote, tagline, & lang, which would be > fine for storing the content, however I'm not sure the best > way for extracting it. I was thinking the calls to func_lang > could be replaced with a get_quote, and then use $_LANGUAGE > for system/handler.php as an argument to get the appropriate > quote. I figure this will also mean we need an addition to > the admin screens for inputing quotes. Does this sound reasonable? Seems good to me. If translation is a lot of work, I'd even say skip that. From what I can tell, very little of our content is actually translated. Looking at news items, that's exactly zero items since the start of the db which is back in 2002. So I honestly don't see why we bother. But if it's not too much work, it doesn't hurt :-) //Magnus
On Wed, 17 Aug 2005, Gavin M. Roy wrote: > Could use javascript to fill an array of quotes and randomly pic one. That works ... > > On Aug 17, 2005, at 12:56 PM, Marc G. Fournier wrote: > >> >> Ummm, how are you planning on handling the web servers, which are all >> static pages generated by the master site? >> >> On Wed, 17 Aug 2005, Robert Treat wrote: >> >> >>> Hey guys, >>> >>> I'm thinking about making the user quotes on the main website database >>> driven . Two goals behind this would be to allow for a page where we >>> could >>> display all user quotes, and also to allow the quotes on the main page to >>> be >>> randomly generated for each site build, making the front page a little >>> less >>> static. The one tricky part seems to be how best to handle translations. >>> I >>> had a thought to make the database table something simple like quote, >>> tagline, & lang, which would be fine for storing the content, however I'm >>> not >>> sure the best way for extracting it. I was thinking the calls to >>> func_lang >>> could be replaced with a get_quote, and then use $_LANGUAGE for >>> system/handler.php as an argument to get the appropriate quote. I figure >>> this will also mean we need an addition to the admin screens for inputing >>> quotes. Does this sound reasonable? >>> >>> -- >>> Robert Treat >>> Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL >>> >>> ---------------------------(end of broadcast)--------------------------- >>> TIP 2: Don't 'kill -9' the postmaster >>> >>> >> >> ---- >> Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) >> Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664 >> >> ---------------------------(end of broadcast)--------------------------- >> TIP 6: explain analyze is your friend >> > > Gavin M. Roy > 800 Pound Gorilla > gmr@ehpg.net > > ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664
The other side of that is, there should be a default one incase the user has javascript disabled. Then the javascript would replace the innerHTML of the div that contains it with a random quote. I can provide code if needed. Gavin On Aug 17, 2005, at 7:13 PM, Marc G. Fournier wrote: > On Wed, 17 Aug 2005, Gavin M. Roy wrote: > > >> Could use javascript to fill an array of quotes and randomly pic one. >> > > That works ... > >> >> On Aug 17, 2005, at 12:56 PM, Marc G. Fournier wrote: >> >> >>> Ummm, how are you planning on handling the web servers, which are >>> all static pages generated by the master site? >>> On Wed, 17 Aug 2005, Robert Treat wrote: >>> >>>> Hey guys, >>>> I'm thinking about making the user quotes on the main website >>>> database >>>> driven . Two goals behind this would be to allow for a page >>>> where we could >>>> display all user quotes, and also to allow the quotes on the >>>> main page to be >>>> randomly generated for each site build, making the front page a >>>> little less >>>> static. The one tricky part seems to be how best to handle >>>> translations. I >>>> had a thought to make the database table something simple like >>>> quote, >>>> tagline, & lang, which would be fine for storing the content, >>>> however I'm not >>>> sure the best way for extracting it. I was thinking the calls >>>> to func_lang >>>> could be replaced with a get_quote, and then use $_LANGUAGE for >>>> system/handler.php as an argument to get the appropriate quote. >>>> I figure >>>> this will also mean we need an addition to the admin screens for >>>> inputing >>>> quotes. Does this sound reasonable? >>>> -- >>>> Robert Treat >>>> Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL >>>> ---------------------------(end of >>>> broadcast)--------------------------- >>>> TIP 2: Don't 'kill -9' the postmaster >>>> >>> ---- >>> Marc G. Fournier Hub.Org Networking Services (http:// >>> www.hub.org) >>> Email: scrappy@hub.org Yahoo!: yscrappy >>> ICQ: 7615664 >>> ---------------------------(end of >>> broadcast)--------------------------- >>> TIP 6: explain analyze is your friend >>> >> >> Gavin M. Roy >> 800 Pound Gorilla >> gmr@ehpg.net >> >> >> > > ---- > Marc G. Fournier Hub.Org Networking Services (http:// > www.hub.org) > Email: scrappy@hub.org Yahoo!: yscrappy ICQ: > 7615664 > Gavin M. Roy 800 Pound Gorilla gmr@ehpg.net
Guys, > The other side of that is, there should be a default one incase the > user has javascript disabled. Then the javascript would replace the > innerHTML of the div that contains it with a random quote. I can > provide code if needed. BTW, I'm waiting for permission on a new quote. -- Josh Berkus Aglio Database Solutions San Francisco
Yeah. But none of this is really necessary as long as we can live with the quote being changed only once per hour. Makes things a lot simpler :-) (we're doing this already with the surveys, comments, news etc etc) //Magnus > -----Original Message----- > > The other side of that is, there should be a default one > incase the user has javascript disabled. Then the javascript > would replace the innerHTML of the div that contains it with > a random quote. I can provide code if needed. > > Gavin > > On Aug 17, 2005, at 7:13 PM, Marc G. Fournier wrote: > > > On Wed, 17 Aug 2005, Gavin M. Roy wrote: > > > > > >> Could use javascript to fill an array of quotes and > randomly pic one. > >> > > > > That works ... > > > >> > >> On Aug 17, 2005, at 12:56 PM, Marc G. Fournier wrote: > >> > >> > >>> Ummm, how are you planning on handling the web servers, > which are > >>> all static pages generated by the master site? > >>> On Wed, 17 Aug 2005, Robert Treat wrote: > >>> > >>>> Hey guys, > >>>> I'm thinking about making the user quotes on the main website > >>>> database > >>>> driven . Two goals behind this would be to allow for a page > >>>> where we could > >>>> display all user quotes, and also to allow the quotes on the > >>>> main page to be > >>>> randomly generated for each site build, making the front page a > >>>> little less > >>>> static. The one tricky part seems to be how best to handle > >>>> translations. I > >>>> had a thought to make the database table something simple like > >>>> quote, > >>>> tagline, & lang, which would be fine for storing the content, > >>>> however I'm not > >>>> sure the best way for extracting it. I was thinking the calls > >>>> to func_lang > >>>> could be replaced with a get_quote, and then use $_LANGUAGE for > >>>> system/handler.php as an argument to get the appropriate > quote. > >>>> I figure > >>>> this will also mean we need an addition to the admin > screens for > >>>> inputing > >>>> quotes. Does this sound reasonable?
Guys, While you're working on the quoting program, can we at least put up this new static quote (permission received from one of the authors): "By default, PostgreSQL is probably the most security-aware database available ..." Database Hacker's Handbook http://www.wiley.com/WileyCDA/WileyAncillary/productCd-0764578014.html -- --Josh Josh Berkus Aglio Database Solutions San Francisco