Page 1 of 1

Easy "news" script

Posted: Mon Jun 23, 2008 9:22 am
by JKM
Hi there!

I'm looking for a script that does something like this:
- An "admin page" that can add text to index.php like this:

Code: Select all

<div class="page">
<h2>XX1</h2>
<img src="XX2" border="0" alt="XX2" />
<ul>
    <li><p><strong>When:</strong> Todays date</p>
    <li><p><strong>What:</strong> XX3</p></li>
    <li><p><strong>Where:</strong> <a href="XX4" target="_blank">XX5</a></p></li>
    <li><p><strong>Rating:</strong> XX6</p></li>
    <li><p><strong>How:</strong> IF CHOSEN - <a href="XX7" target="_blank">How</a></p></li>
 
In the admin page, it should be input boxes like this:
Title: (where XX1 is)
Image: (where XX2 is)
When: (Todays date)
What: (where XX3 is)
Where: (where XX4 is) - Name: (where XX5 is)
Rating: (where XX6 is)
How: If something is chosen here, show the How-line. If not, don't show the line.

- Sorting options by Rating, When and What.

Re: Easy "news" script

Posted: Mon Jun 23, 2008 9:58 am
by Kieran Huggins
Sounds like you want to collect values for each of these and store them in a database.

I'm sure there are pre-written digg clones out there, but it's not too hard to write something basic yourself.

Re: Easy "news" script

Posted: Mon Jun 23, 2008 12:36 pm
by JKM
Okay, I found out that I could fix most of it myself, but how to fix the if in "How"?

Edit: Maybe like this?

Code: Select all

<td><strong>How:</strong></td>
<td>
<select name="selecthow">
<option value="0" selected="selected">Yes</option>
<option value="1">No</option>
</select>
</td>
<td><input type="text" name="how" /></td>
And if value is "1", post name "how".