Hejsa.
Jeg har pt. min side under opbygning. Denne side skal primært være kendt for nogle bestemte tiltag deriblandt video, men også en del nyheder. Og derfor vil vi naturligvis gerne have en unik nyhedsvisning! Derfor har vi udset os nogle forskellige sider, men det vil jeg ikke nævne navne på, fordi jeg skal ikke hænges op på kopiering!
Jeg har et udemærket nyhedsystem klar som ser sådan her ud:
<td valign='top' class='main-bg'>
<table width='100%' cellpadding='0' cellspacing='0'><tr><td class='panel-left2'><img src='../themes/Valencia/images/blank.gif' width='6' height='21' alt='' style='display:block'></td><td width='100%' class='panel-main2'>Aktuelle nyheder</td><td class='panel-right2'><img src='../themes/Valencia/images/blank.gif' width='6' height='21' alt='' style='display:block'></td></tr></table><table width='100%' cellpadding='0' cellspacing='0'><tr><td class='border-left2'><img src='../themes/Valencia/images/blank.gif' width='6' height='1' alt='' style='display:block'></td><td class='table-body'>
<form name='selectform' method='post' action='news.php?aid=9c5a920d2d57e829'>
<center>
<select name='news_id' class='textbox' style='width:250px'>
<option value='2'>Jonas Borring: Arek er en mærkelig polak!</option>
<option value='1'>Jonas Borring på vej til Skagen?</option>
</select>
<input type='submit' name='edit' value='Rediger' class='button'>
<input type='submit' name='delete' value='Slet' onclick='return DeleteNews();' class='button'>
</center>
</form>
</td><td class='border-right2'><img src='../themes/Valencia/images/blank.gif' width='6' height='1' alt='' style='display:block'></td></tr><tr><td class='border-bleft2'><img src='../themes/Valencia/images/blank.gif' width='6' height='16' alt='' style='display:block'></td><td class='border-bmain2'><img src='../themes/Valencia/images/blank.gif' width='1' height='16' alt='' style='display:block'></td><td class='border-bright2'><img src='../themes/Valencia/images/blank.gif' width='6' height='16' alt='' style='display:block'></td></tr></table>
<table width='100%' cellspacing='0' cellpadding='0'><tr><td></td></tr></table>
<table width='100%' cellpadding='0' cellspacing='0'><tr><td class='panel-left2'><img src='../themes/Valencia/images/blank.gif' width='6' height='21' alt='' style='display:block'></td><td width='100%' class='panel-main2'>Tilføj nyhed</td><td class='panel-right2'><img src='../themes/Valencia/images/blank.gif' width='6' height='21' alt='' style='display:block'></td></tr></table><table width='100%' cellpadding='0' cellspacing='0'><tr><td class='border-left2'><img src='../themes/Valencia/images/blank.gif' width='6' height='1' alt='' style='display:block'></td><td class='table-body'>
<form name='inputform' method='post' action='news.php?aid=9c5a920d2d57e829' onSubmit='return ValidateForm(this);'>
<table align='center' cellpadding='0' cellspacing='0'>
<tr>
<td width='100' class='tbl'>Overskrift:</td>
<td width='80%' class='tbl'><input type='text' name='news_subject' value='' class='textbox' style='width: 250px'></td>
</tr>
<tr>
<td width='100' class='tbl'>Kategori:</td>
<td width='80%' class='tbl'><select name='news_cat' class='textbox'>
<option value='0'>- Ingen -</option>
<option value='1'>Bugs</option>
<option value='2'>Downloads</option>
<option value='3'>Games</option>
<option value='4'>Graphics</option>
<option value='5'>Hardware</option>
<option value='6'>Journal</option>
<option value='7'>Members</option>
<option value='8'>Mods</option>
<option value='9'>Movies</option>
<option value='10'>Network</option>
<option value='11'>News</option>
<option value='12'>PHP-Fusion</option>
<option value='13'>Security</option>
<option value='14'>Software</option>
<option value='15'>Themes</option>
<option value='16'>Windows</option>
</select>
</td>
</tr>
<tr>
<td valign='top' width='100' class='tbl'>Nyhedstekst:</td>
<td width='80%' class='tbl'><textarea name='body' cols='95' rows='10' class='textbox'></textarea></td>
</tr>
<tr>
<td class='tbl'></td>
<td class='tbl'>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px' onClick="addText('body', '<b>', '</b>');">
<input type='button' value='i' class='button' style='font-style:italic;width:25px' onClick="addText('body', '<i>', '</i>');">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px' onClick="addText('body', '<u>', '</u>');">
<input type='button' value='link' class='button' style='width:35px' onClick="addText('body', '<a href=\\'', '\\' target=\\'_blank\\'>Link</a>');">
<input type='button' value='img' class='button' style='width:35px' onClick="addText('body', '<img src=\\'images/news/', '\\' style=\\'margin:5px\\' align=\\'left\\'>');">
<input type='button' value='center' class='button' style='width:45px' onClick="addText('body', '<center>', '</center>');">
<input type='button' value='small' class='button' style='width:40px' onClick="addText('body', '<span class=\\'small\\'>', '</span>');">
<input type='button' value='small2' class='button' style='width:45px' onClick="addText('body', '<span class=\\'small2\\'>', '</span>');">
<input type='button' value='alt' class='button' style='width:25px' onClick="addText('body', '<span class=\\'alt\\'>', '</span>');"><br>
<select name='setcolor' class='textbox' style='margin-top:5px' onChange="addText('body', '<span style=\\'color:' + this.options[this.selectedIndex].value + '\\'>', '</span>');this.selectedIndex=0;">
<option value=''>- Vælg farve -</option>
<option value='maroon' style='color:maroon'>Maroon</option>
<option value='red' style='color:red'>Red</option>
<option value='orange' style='color:orange'>Orange</option>
<option value='brown' style='color:brown'>Brown</option>
<option value='yellow' style='color:yellow'>Yellow</option>
<option value='green' style='color:green'>Green</option>
<option value='lime' style='color:lime'>Lime</option>
<option value='olive' style='color:olive'>Olive</option>
<option value='cyan' style='color:cyan'>Cyan</option>
<option value='blue' style='color:blue'>Blue</option>
<option value='navy' style='color:navy'>Navy Blue</option>
<option value='purple' style='color:purple'>Purple</option>
<option value='violet' style='color:violet'>Violet</option>
<option value='black' style='color:black'>Black</option>
<option value='gray' style='color:gray'>Gray</option>
<option value='silver' style='color:silver'>Silver</option>
<option value='white' style='color:white'>White</option>
</select>
</td>
</tr>
<tr>
<td valign='top' width='100' class='tbl'>Uddybende tekst:</td>
<td class='tbl'><textarea name='body2' cols='95' rows='10' class='textbox'></textarea></td>
</tr>
<tr>
<td class='tbl'></td>
<td class='tbl'>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px' onClick="addText('body2', '<b>', '</b>');">
<input type='button' value='i' class='button' style='font-style:italic;width:25px' onClick="addText('body2', '<i>', '</i>');">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px' onClick="addText('body2', '<u>', '</u>');">
<input type='button' value='link' class='button' style='width:35px' onClick="addText('body2', '<a href=\\'', '\\' target=\\'_blank\\'>Link</a>');">
<input type='button' value='img' class='button' style='width:35px' onClick="addText('body2', '<img src=\\'images/news/', '\\' style=\\'margin:5px\\' align=\\'left\\'>');">
<input type='button' value='center' class='button' style='width:45px' onClick="addText('body2', '<center>', '</center>');">
<input type='button' value='small' class='button' style='width:40px' onClick="addText('body2', '<span class=\\'small\\'>', '</span>');">
<input type='button' value='small2' class='button' style='width:45px' onClick="addText('body2', '<span class=\\'small2\\'>', '</span>');">
<input type='button' value='alt' class='button' style='width:25px' onClick="addText('body2', '<span class=\\'alt\\'>', '</span>');"><br>
<select name='setcolor' class='textbox' style='margin-top:5px' onChange="addText('body2', '<span style=\\'color:' + this.options[this.selectedIndex].value + '\\'>', '</span>');this.selectedIndex=0;">
<option value=''>- Vælg farve -</option>
<option value='maroon' style='color:maroon'>Maroon</option>
<option value='red' style='color:red'>Red</option>
<option value='orange' style='color:orange'>Orange</option>
<option value='brown' style='color:brown'>Brown</option>
<option value='yellow' style='color:yellow'>Yellow</option>
<option value='green' style='color:green'>Green</option>
<option value='lime' style='color:lime'>Lime</option>
<option value='olive' style='color:olive'>Olive</option>
<option value='cyan' style='color:cyan'>Cyan</option>
<option value='blue' style='color:blue'>Blue</option>
<option value='navy' style='color:navy'>Navy Blue</option>
<option value='purple' style='color:purple'>Purple</option>
<option value='violet' style='color:violet'>Violet</option>
<option value='black' style='color:black'>Black</option>
<option value='gray' style='color:gray'>Gray</option>
<option value='silver' style='color:silver'>Silver</option>
<option value='white' style='color:white'>White</option>
</select>
</td>
</tr>
<tr>
<td class='tbl'>Vis fra:</td>
<td class='tbl'><select name='news_start[mday]' class='textbox'>
<option>--</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
</select>
<select name='news_start[mon]' class='textbox'>
<option>--</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
</select>
<select name='news_start[year]' class='textbox'>
<option>----</option>
<option>2004</option>
<option>2005</option>
<option>2006</option>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
</select> /
<select name='news_start[hours]' class='textbox'>
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
</select> :
<select name='news_start[minutes]' class='textbox'>
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
<option>32</option>
<option>33</option>
<option>34</option>
<option>35</option>
<option>36</option>
<option>37</option>
<option>38</option>
<option>39</option>
<option>40</option>
<option>41</option>
<option>42</option>
<option>43</option>
<option>44</option>
<option>45</option>
<option>46</option>
<option>47</option>
<option>48</option>
<option>49</option>
<option>50</option>
<option>51</option>
<option>52</option>
<option>53</option>
<option>54</option>
<option>55</option>
<option>56</option>
<option>57</option>
<option>58</option>
<option>59</option>
<option>60</option>
</select> : 00 <span class='alt'>(Valgfrit)</span></td>
</tr>
<tr>
<td class='tbl'>Stop visning fra:</td>
<td class='tbl'><select name='news_end[mday]' class='textbox'>
<option>--</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
</select>
<select name='news_end[mon]' class='textbox'>
<option>--</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
</select>
<select name='news_end[year]' class='textbox'>
<option>----</option>
<option>2004</option>
<option>2005</option>
<option>2006</option>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
</select> /
<select name='news_end[hours]' class='textbox'>
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
</select> :
<select name='news_end[minutes]' class='textbox'>
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
<option>32</option>
<option>33</option>
<option>34</option>
<option>35</option>
<option>36</option>
<option>37</option>
<option>38</option>
<option>39</option>
<option>40</option>
<option>41</option>
<option>42</option>
<option>43</option>
<option>44</option>
<option>45</option>
<option>46</option>
<option>47</option>
<option>48</option>
<option>49</option>
<option>50</option>
<option>51</option>
<option>52</option>
<option>53</option>
<option>54</option>
<option>55</option>
<option>56</option>
<option>57</option>
<option>58</option>
<option>59</option>
<option>60</option>
</select> : 00 <span class='alt'>(Valgfrit)</span></td>
</tr>
<tr>
<td class='tbl'>Adgang for:</td>
<td class='tbl'><select name='news_visibility' class='textbox'>
<option value='0' selected>Gæster</option>
<option value='101'>Brugere</option>
<option value='102'>Administratorer</option>
<option value='103'>Super Administrator</option>
</select></td>
</tr>
<tr>
<td class='tbl'></td><td class='tbl'>
<input type='checkbox' name='news_sticky' value='yes'> Fasthold denne nyhed i toppen<br>
<input type='checkbox' name='line_breaks' value='yes' checked> Automatiske linjebrud<br>
<input type='checkbox' name='news_comments' value='yes' onClick='SetRatings();' checked> Slå kommentarer til<br>
<input type='checkbox' name='news_ratings' value='yes' checked> Slå vurdering til</td>
</tr>
<tr>
<td align='center' colspan='2' class='tbl'><br>
<input type='submit' name='preview' value='Se nyhed' class='button'>
<input type='submit' name='save' value='Gem nyhed' class='button'></td>
</tr>
</table>
</form>
</td><td class='border-right2'><img src='../themes/Valencia/images/blank.gif' width='6' height='1' alt='' style='display:block'></td></tr><tr><td class='border-bleft2'><img src='../themes/Valencia/images/blank.gif' width='6' height='16' alt='' style='display:block'></td><td class='border-bmain2'><img src='../themes/Valencia/images/blank.gif' width='1' height='16' alt='' style='display:block'></td><td class='border-bright2'><img src='../themes/Valencia/images/blank.gif' width='6' height='16' alt='' style='display:block'></td></tr></table>
<script type='text/javascript'>
function DeleteNews() {
return confirm('Skal denne nyhed slettes?');
}
function ValidateForm(frm) {
if(frm.news_subject.value=='') {
alert('Du skal angive en overskrift');
return false;
}
}
function SetRatings() {
if (inputform.news_comments.checked == false) {
inputform.news_ratings.checked = false;
inputform.news_ratings.disabled = true;
} else {
inputform.news_ratings.disabled = false;
}
}
</script>
</td>
</tr>
</table>
Jeg ved ikke om det har nogen betydning.
En kort beskrivelse af hvordan jeg gerne vil have nyhedsvisningen til og se ud:
En stor nyhed øverset.
To nedenunder.
Tre nederst.
Hver nyhed skal være krydret med på forsiden; En teaser, samt et billed der skal fungere som én appetivaker for læseren. Der skal være oplysninger ved hver nyhed, om hvem forfatteren er, forfatterens navn skal fungere som et link ind til forfatterens profil. Der skal være vist en datolinje. Der skal også være et sted hvor der står hvor mange kommentare der er til nyheden, de skal også fungere som et link ind i nyheden.
Inde i selve nyheden, skal der også stå et billed ude i højre hjørne, samt hele nyheden i én kolonne.
100 point til den der kan hjælpe. Så ta´ tastaturet og skriv, hvis i kan hjælpe.
EDIT: Det hele er kodet i php.
Brown.