Jump to content

bnickles1961

Members
  • Posts

    11
  • Joined

  • Last visited

bnickles1961's Achievements

Member

Member (2/5)

0

Reputation

  1. Yes that is exactally what is happening when I do a search with the search box How would I implement the 2 options you were talking about? I have no expeirence in this kind of coding.
  2. Will be back later have things to do I will explain more when I return
  3. The way it is now, if you type a letter in the search box, it returns everything that contains the letter you typed in but the character search: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z what ever letter you click returns Only artists from the letter you click, I want the search box to do the same so I just want to convert the search box into the characterletter so it will work the same if it is possible??
  4. <div id="search"> <form method="get" action="playlist.php" name="character"> Search: <?php InputText('search', $search, '',20); ?> <<input type="submit" value="search" name="B1"/> < Display <?php InputCombo('limit', $limit, 25, '5,10,25,50,100', "", "document.forms.searchParameters.submit();"); ?> results I want to modify the above code to work like this code: <table> <tbody> <tr> <td> <input type="submit" name="character" class="characterButton" value="All" onclick="document.forms.searchParameters.search.value=''"/> </td> <td> <input <?php echo "0 - 9" == $character? "id='activeCharacter'" : "";?> type="submit" name="character" class="characerButton"value='0 - 9'/> </td> <?php for($charVal = ord('A');$charVal <= ord('Z'); $charVal++) { $c = chr($charVal); echo "<td>"; echo "<input ".($character == $c? "id='activeCharacter'" : "")." type='submit' name='character' class='characterButton' value='$c' onclick='document.forms.searchParameters.search.value=\"\"' />"; echo "</td>"; } ?> </tr> </tbody> </table> The bottom code is a search by characterbutton I want the top code (searchbox) to work like the characterbutton search where if you type in an artist that starts with "A" it only returns artists that start with the letter "A" type in the letter "B" it olnly returns artists that start with "B" etc.
  5. Sorry guys, this is a re-post just realized I posted the same thing previously, my apologies
  6. Hi, I am gonna try and explain this as clear and as best I can relating to what I want to do. I run an internet radio station (Legal) I use SAM Broadcaster. It has (2) search functions a search box where you type in text to search for an artist and the other uses character search letters A-Z. What I want to do is this. The first option (search box) if you type in a single letter....A, B, C etc the search returns everything based on the letter you type into the search box, but the character letters return a search of ONLY the letter you type in, if you click the letter A it returns ONLY artists that begin with A type in B and it returns ONLY artists that start with B , etc. Below is the code for the search box option: <div id="search"> <form method="get" action="playlist.php" name="searchParameters"> <!--Search: <?php InputText('search', $search, '',20); ?>--> <!--<input type="submit" value="Go" name="B1"/>--> <!-- Display <?php InputCombo('limit', $limit, 25, '5,10,25,50,100', "", "document.forms.searchParameters.submit();"); ?> results--> What I want to do is either convert the above code to work like the character button search: <table> <tbody> <tr> <td> <input type="submit" name="character" class="characterButton" value="All" onclick="document.forms.searchParameters.search.value=''"/> </td> <td> <input <?php echo "0 - 9" == $character? "id='activeCharacter'" : "";?> type="submit" name="character" class="characerButton"value='0 - 9'/> </td> <?php for($charVal = ord('A');$charVal <= ord('Z'); $charVal++) { $c = chr($charVal); echo "<td>"; echo "<input ".($character == $c? "id='activeCharacter'" : "")." type='submit' name='character' class='characterButton' value='$c' onclick='document.forms.searchParameters.search.value=\"\"' />"; echo "</td>"; } ?> </tr> </tbody> </table> I would like to have it where in search box, if you type in A it returns ONLY artists that start with A and if you type in B it returns ONLY aretist that start with B. Or simply edit the search character letters code (2nd code I listed) to work as a search box. Hope I explained it clear lol and sorry if I did not input the codes correctly, I am not really sure about code tags on suppor forums. Thanks in advance
  7. Thanks for your reply but I know nothing about php coding or ajax
  8. Hi all, I need some help from you experts! I have an internet radio station. On my playlist page I would like to have it where if a listener requests a song, that when they type in a letter example: if they type in the letter " A " it will display all the artists that start with " A" or if they type in " B " it displays all artist that starts with " B " etc. below is the code I need to make this happen and I have no clue where or what in the code I need to change to make this work. <?php require_once('display.header.php'); ?> <!-- BEGIN:SEARCH --> <div id="search"> <form method="get" action="playlist.php" name="searchParameters"> Search: <?php InputText('search', $search, '',20); ?> <input type="submit" value="Go" name="B1" /> Display <?php InputCombo('limit', $limit, 25, '5,10,25,50,100', "", "document.forms.searchParameters.submit();"); ?> results <hr/> Search by Artist:<br /> <table> <tbody> <tr> <td> <input type="submit" name="character" class="characterButton" value="All" onclick="document.forms.searchParameters.search.value=''"/> </td> <td> <input <?php echo "0 - 9" == $character? "id='activeCharacter'" : "";?> type="submit" name="character" class="characterButton"value='0 - 9'/> </td> <?php for($charVal = ord('A');$charVal <= ord('Z'); $charVal++) { $c = chr($charVal); echo "<td>"; echo "<input ".($character == $c? "id='activeCharacter'" : "")." type='submit' name='character' class='characterButton' value='$c' onclick='document.forms.searchParameters.search.value=\"\"' />"; echo "</td>"; } ?> </tr> </tbody> </table> </form> <br /> </div> <!-- END:SEARCH --> <!-- BEGIN:PLAYLIST --> <div id="playlist"> <div id="playlist_wrapper"> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th colspan="3" align="left"> Playlist results </th> <th class="links" align="center"> Links </th> <th align="left"> Album </th> <th align="right"> Time </th> </tr> </thead> <tbody> <tr> <td colspan="6" id="td-playlist-paging"> <?php if(is_array($playlistSongs) && (count($playlistSongs)>0)) { ?> <?php if($start > 0) {echo $prevlnk; } ?> [ Showing <?php echo "$first to $last of $cnt"; ?> ] <?php if(($start+$limit) < $cnt) { echo $nextlnk; } ?> <?php } ?> </td> </tr> <?php if(is_array($playlistSongs) || (count($playlistSongs)>0)) foreach ($playlistSongs as $key => $playlistSong): ?> <tr> <td> <?php echo $key+1; ?> </td> <td> <?php if(!empty($playlistSong->picture)) : ?> <a href="<?php echo $playlistSong->buycd; ?>" target="_blank"> <img id="rpPicture<?php echo $key; ?>" style="display: none;" onload="showPicture(this, <?php echo SHOW_PICTURES; ?>)" width="60" height="60" src="<?php echo $playlistSong->picture; ?>" alt="Buy CD!" title="Click to view CD info" /> </a> <?php endif; ?> </td> <td> <?php echo $playlistSong->artist_title; ?> <?php if ($playlistSong->isRequested): ?> ~requested~ <?php endif; ?> </td> <td align="center"> <?php if (ALLOW_REQUESTS) : ?> <a href="javascript:request(<?php echo $playlistSong->ID; ?>);"> <img src="images/request.png" alt="Request this track now!" title="Request this track now!"/> </a> <?php endif; ?> <a href="<?php echo $playlistSong->buycd; ?>" target="_blank"> <img src="images/buy.png" alt="Buy this CD or Track now!" title="Buy this CD or Track now!"/> </a> <a href="<?php echo $playlistSong->website; ?>" target="_blank"> <img src="images/home.png" alt="Artist homepage" title="Artist homepage" /> </a> <a href="javascript:songinfo(<?php echo $playlistSong->ID; ?>)"> <img src="images/info.png" alt="Track information" title="Track information" /> </a> </td> <td> <?php echo $playlistSong->album; ?> </td> <td align="right"> <?php echo $playlistSong->durationDisplay; ?> </td> </tr> <?php endforeach; ?> <tr> <td colspan="6" id="td-playlist-paging"> <?php if(!is_array($playlistSongs) || (count($playlistSongs)==0)) { ?> No matches found. Please try another search. <?php } else { ?> <?php if($start > 0) {echo $prevlnk; } ?> [ Showing <?php echo "$first to $last of $cnt"; ?> ] <?php if(($start+$limit) < $cnt) { echo $nextlnk; } ?> <?php } ?> </td> </tr> </tbody> </table> </div> </div> <!-- END:PLAYLIST --> <?php require_once('display.footer.php'); ?> </div> <!-- END:PAGE --> <!-- JQuery to round corners some of the HTML items on the page --> <script type="text/javascript"> //<![CDATA[ // Make sure the DOM is ready $(document).ready(function() { // Rounding of corners (Cross-browser compatible) // See http://jquery.malsup.com/corner/ for different Styles. // Rounds the page corners $('#page').corner(); // Rounds the Navigation Menu Corners $('#navigation dl').corner(); // Rounds the Coming Up Corners $('#coming-up dl').corner(); // Round the Dedication Corners $('#dedication dl').corner('tl tr').corner(); // Round the Top Request Corners $('#top_requests dl').corner(); // Rounds the Playlist and search boxes $('#playlist_wrapper, #search').corner(); // Style odd and even rows in Playlist Table (Cross-browser compatible) $('#playlist table tbody tr:nth-child(odd)').addClass('playlist_odd'); $('#playlist table tbody tr:nth-child(even)').addClass('playlist_even'); }); //]]> </script> </body> </html> Thank in advance for any help!
  9. Hi guys, I'm new to this forum and hope this is the right place to post this question. I run an internet radio station using SAM Broadcaster. I am trying to display the duration of the song on my main page without the front zero (see enclosed picture): I want the duration to display like this: example (5:47) instead of with the front zero (05:47) Here is a snipet of the code I think it needs to be changed in here somewhere: <td><?php echo preg_replace("/[^!<>@&\/\sA-Za-z0-9_]/","", $row['title']); ?><br><a href="javascript:void(0);" class="album"><strong><?php echo preg_replace("/[^!<>@&\/\sA-Za-z0-9_]/","", $row['artist']); ?></strong></a> (<?php echo date('i:s',$row['duration'] / 1000); echo $duration[0] === '0' ? substr($duration, 1) : $duration; ?>)<div class="albuminfo"> <?php if(!$row['album']) { echo "No Album Specified"; } else { ?><strong>From album:</strong> <?php echo $row['album']; ?><?php } ?></div></td> <td align="right"> <?php if ($first) { $first = false; ?><font color="red"><strong>ON-AIR NOW</strong></font><?php } else { ?><strong><?php echo date('h:ia', strtotime($row['date_played'])); ?> EST</strong><? } ?> <?php if(!$row['code'] == "200") { // if there is no request } else { ?> <br> Requested By: <strong><?php if(!$row['name']) { echo "An Oldies Lover"; }else{ echo $row['name']; } ?></strong><br> <?php if(!$row['msg']) { }else{ echo '<em>"'.$row['msg'].'"</em>'; } ?> <?php } ?> </td> Any help would be appreciated
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.