Re: random .inc files pulled and placed

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 46528
interpreted = N
texte = If you have a known number of include files, do a random number to the max number of files and then just select one based on that.This way you would only have to change 1 number to add more adds. You could even put that value in an include and create a webpage to manage it as well as create your new, additional include files.Or better yet, have a process that runs say every hour/day/week that checks all of the files in this directory and gets the max number and adjusts the max random number then. And you could also enforce the numbering with such a system. Make sure for example the numbers are always 2 or 3 digits long (01, 02, or 001, 002) for expansion.You would need to load all the include files into a temp database to do your checking and comparisons. And at some point you may just want to stick everything in a database if you are trying to track clicks or impressions, but for a simple, no tracking system your includes would work, just need to add some administrative stuff to it.I would also have a 'house ad' that you use in case you need to remove an add from rotation. Have an admin tool copy the code of your house add to any 'missing' numbers.Good luckDaleOn Sunday, December 29, 2002, at 03:36 AM, Lester Emo wrote:> I was hoping I could avoid maintaining another .db > . . . but that's the way that's working best so far. > > Thanks > > > >> Put the file names into a db and then search with a random sort &max=1 >> >> >> On Sunday, December 29, 2002, at 01:18 PM, Lester Emo wrote: >> >>> As I continue to try this in a number of ways, I thought I'd ask . . >>> . . >>> >>> If I have a folder full of various ads, each of which is actually an >>> include file >>> ad1.inc >>> ad2.inc >>> ad3.inc >>> >>> etc. >>> >>> Can I yank one of these many inc. files and place them in an include >>> context? >>> >>> So that a page has random ads (which are these tiny include files) >>> appearing on it when a user visits a particular page in the site . . >>> . >>> >>> I'm wondering if I can do this with listfiles, but so far no go . . . >>> >>> Or might there be a better way? >>> The info will not be in a database, although I suppose I could have >>> a database of the .inc filenames if thats an easier way to do this . >>> . . >>> >>> thanks ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: random .inc files pulled and placed (Dale's Stuff 2002)
  2. Re: random .inc files pulled and placed (Alain Russell 2002)
  3. Re: random .inc files pulled and placed (Lester Emo 2002)
  4. Re: random .inc files pulled and placed (Stuart Tremain 2002)
  5. random .inc files pulled and placed (Lester Emo 2002)
If you have a known number of include files, do a random number to the max number of files and then just select one based on that.This way you would only have to change 1 number to add more adds. You could even put that value in an include and create a webpage to manage it as well as create your new, additional include files.Or better yet, have a process that runs say every hour/day/week that checks all of the files in this directory and gets the max number and adjusts the max random number then. And you could also enforce the numbering with such a system. Make sure for example the numbers are always 2 or 3 digits long (01, 02, or 001, 002) for expansion.You would need to load all the include files into a temp database to do your checking and comparisons. And at some point you may just want to stick everything in a database if you are trying to track clicks or impressions, but for a simple, no tracking system your includes would work, just need to add some administrative stuff to it.I would also have a 'house ad' that you use in case you need to remove an add from rotation. Have an admin tool copy the code of your house add to any 'missing' numbers.Good luckDaleOn Sunday, December 29, 2002, at 03:36 AM, Lester Emo wrote:> I was hoping I could avoid maintaining another .db > . . . but that's the way that's working best so far. > > Thanks > > > >> Put the file names into a db and then search with a random sort &max=1 >> >> >> On Sunday, December 29, 2002, at 01:18 PM, Lester Emo wrote: >> >>> As I continue to try this in a number of ways, I thought I'd ask . . >>> . . >>> >>> If I have a folder full of various ads, each of which is actually an >>> include file >>> ad1.inc >>> ad2.inc >>> ad3.inc >>> >>> etc. >>> >>> Can I yank one of these many inc. files and place them in an include >>> context? >>> >>> So that a page has random ads (which are these tiny include files) >>> appearing on it when a user visits a particular page in the site . . >>> . >>> >>> I'm wondering if I can do this with listfiles, but so far no go . . . >>> >>> Or might there be a better way? >>> The info will not be in a database, although I suppose I could have >>> a database of the .inc filenames if thats an easier way to do this . >>> . . >>> >>> thanks ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Dale's Stuff

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Closing Databases (1998) Frames and WebCat (1997) emailer and other smtp (1998) WC2b15 - [HTMLx]...[/HTMLx] problems SOLVED! (1997) time format (2005) Adding Multiple Items to Shopping Cart from a Resultspage (1997) TCPConnect/TCPSend/FTP syntax (2000) WebCat2: Master Counter snippet (1997) For those of you not on the WebCatalog Beta... (1997) WebCat2b13MacPlugIn - syntax to convert date (1997) WebCatalog Q & A pages (1997) quantity minimum problem (1997) WebMerchant? (1998) No spaces allowed in text variable names ... ? (2002) RE: [WebDNA] [BULK] The WebDAV Server Module / web services (2012) Re:quit command on NT (1997) [WriteFile] problems (1997) Maximum characters in header? (1999) WCS Newbie question (1997) Problems with [Applescript] (1997)