Solved

Script (or ?) to change site content

Posted on 2002-06-14
8
141 Views
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
0
Comment
Question by:emery_k
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
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.

Cd&
0
 
LVL 10

Expert Comment

by:dij8
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.
0
 
LVL 1

Author Comment

by:emery_k
ID: 7080465
They haven't even chosen a hosting company yet so we have options there. I was considering www.ipowerweb.com 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.
0
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 
LVL 53

Expert Comment

by:COBOLdinosaur
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.

Cd&
0
 
LVL 10

Expert Comment

by:dij8
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.
0
 
LVL 12

Expert Comment

by:lexxwern
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.
0
 
LVL 18

Accepted Solution

by:
bruno earned 100 total points
ID: 7123534
emery, i saw you post in another Q referencing this one...how about an update here???
0
 
LVL 1

Author Comment

by:emery_k
ID: 7124637
Bruno

Comment appreciated.

link to similar question is http://www.experts-exchange.com/webauthor/Q_20312368.html 

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.


Thanks

0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

623 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