Script (or ?) to change site content

Posted on 2002-06-14
Last Modified: 2013-12-25
We are trying to set up a web site that includes a list of about 25 members. We want a `featured member section' and have the site feature a different member each day so it rotates between the different members.
Any suggestions how to accomplish this?
The member list may grow so we hope there is someway it will accomodate growth in the member list.

TIA for your help
Question by:emery_k
  • 2
  • 2
  • 2
  • +2
LVL 53

Expert Comment

ID: 7079391
What you need depends on what you mean by feature them.  A vanity page? A bio on the main page
just their name?

Are you using a database to store member information.  What scripting capabilities do you have server side?

A little more detail about what you are trying to do would help.

LVL 10

Expert Comment

ID: 7079650
This would almost certainly need to be a database solution.  Maybe include a "HasBeenShown" field which would be added to each time that person has been shown.  Then you just order the database request by this field and show the top one.  Whenever someone new is added they would automatically be added.  The down side to this is they would be shown continously until they reach the same number as the next lowest.

In which case you could also add a "DateLastShown" field and make sure that date is at least a certain amount prior to the current date.  Maybe even the size of the database (rowcount) less 1.  You may even be able to use this field alone and just order by that and take the top value.

Author Comment

ID: 7080465
They haven't even chosen a hosting company yet so we have options there. I was considering as the host. That would give us MySql. In terms of new members they would just join the list and come up in turn. OR have the `featured member' change on every access of the page. If there were 25 members and 25 visitors in one day each member would be `featured' once that day. We want all members to get essentially equal exposure but it doesn't have to be perfect. A new member just joins the pool and gets their share of exposure after that. I was hoping for something a simpler than using a database.
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

LVL 53

Expert Comment

ID: 7080498
Well something has to keep track of who's turn it is, whether is a daily change or every page access.  There is no way to do that client side so it either has to done manually by changing the page every day, or you need a script on the server.  

The isp you listed indicates support for cgi and php.  Either of those can do the job, but it information has to be somewhere on the server.  You need at least a file to keep track of which member to feature.  The information about the members must also be stored.

The member information could be stored in a databse, or you could have a page for each member.  If you only have a small amount of information that has to be supplied about the members, it could be kept in an array on the main page, or if you need to support IE only you could use XML data islands on the client.

If you use a database, then the main page could be a php page, the executes a query and populates a div or table cell with the member information.  If you use member pages then an Iframe would be ideal and the source for the iframe could be a small cgi or php script that returns the page for the currently featured member.

LVL 10

Expert Comment

ID: 7080613
You may want to consider banner code.  There are a multitude of them around and although it may not be an ad the process would be identical I am sure.  But, as both Cd& and I am saying, you will need a database of some description.
LVL 12

Expert Comment

ID: 7081425
perl or asp or something else?

whatever language be it, there will be a function called rand() or srand() or something else, which will generate a random number between 0 and n,

and then with the random number you can write a good select statement that suits your needs.

to accomodate growth in the member list is pretty easy, infact all that has to be done is to create a member table in you sql based database and then keep on using the insert command as and when required.

please specify which programming language you are using inorder to explain to you in more detail. i can help with perl.
LVL 18

Accepted Solution

bruno earned 100 total points
ID: 7123534
emery, i saw you post in another Q referencing this about an update here???

Author Comment

ID: 7124637

Comment appreciated.

link to similar question is 

The solution mentioned there seems like the way to go. The links to specific examples help.

Create an image for each member and rotate between them. This can be done without getting into a database. The membershiplist is not apt to change much.



Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
remove border from element 5 77
get multiple images to align right 5 57
what are list of ebay api errors 1 16
CSS: Making responsive table look nicer 7 23
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now