Jump to content

Hollows

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

About Hollows

  • Birthday 08/31/1984

Contact Methods

  • AIM
    hollowmandnb
  • MSN
    hollowmandnb@live.co.uk
  • Website URL
    http://www.shedbass.com

Profile Information

  • Gender
    Male
  • Location
    Southampton, Uk

Hollows's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You could create a new style sheet with the fixes you need, then just use <!--[if IE 6]> <link rel="stylesheet" href="http://YOUR WEBSITE URL/CSS FOLDER/ie6_only.css" type="text/css" media="screen" /> <![endif]--> AFTER your global style sheet, that way IE7+ and other browsers will read the original and IE6 will go on the ie6 sheet Hope that helps
  2. Hi all What I'd like todo is setup a webpage that allows access if the client's ip matches the ip currently connected to my shoutcast server, the overall goal is to upgrade our Dj Control panel so the currently on air Dj can access the stream controls and anyone else simple gets an error message saying something along the lines of ' I'm sorry - another dj is connected at the moment - please try again when you are live ' I'm guessing I need to look into php authentication and also using ip's to authenticate a user - I've been using if and else statements at the moment to authenticate users based on a user group id but want to take it a little further and add into that a new step Can anyone suggest tutorials or material that can help this goal? Or does anyone have an idea how to go about this? Much respect
  3. LOL yeah that is something that needs dragging up to date Thanks for taking a look
  4. You've actually solved it for me right there thank you I've essentially set my ajax script to be triggered by calling <a href="update.php?id=<?php echo $row['id']; ?>">read</a> and then using $id = $_GET['id']; in my update script + UPDATE shoutbox SET class = 'read' WHERE id = '$id' in the query, works an absolute treat thank you
  5. Hi Thank you for the reply, If I'm honest you've lost me abit, if I could explain the overall concept I'm working on, I have a form that listeners to our internet station can fill in with a name, a message and then a drop down box to choose if this is a request for a song or a message to be read out on air, the script I've written then populates the db with all the info, then a page inside radio control panel fetches the results and displays them. The original drop down box choice is then used to choose a css class for that specific result, so more important messages appear with a red border or something. This all works perfect but would I'd like to do is once the current radio host had read a message or played a song, they click a link generated within the message that updates the row originally populated by the drop down box with something such as "read" or "expired". That way I can also have a css class for this, so when the ajax refresh is triggered, old messages then change colour and new ones stand out again.. Does this sound like something that is relativley straight forward to achieve? Again, thank you for your reply
  6. seems it was typo later on in the script - works all good now
  7. Ok, what I want to happen is, if if($_POST['select'] == 'choose'){ is submitted, the script to display an error and not proccess anything after with the die(); message displayed to the user, but it's not showing the message, and infact when if($_POST['select'] is submitted as another array (I'm sorry, is that the correct term?) it still kills the whole script. I've check in my db an nothing is updating the tables so I guess die is working to an degree. I've tried it without the die commands an it works as it should so I know the info does get sent without the die Here is my code so far - <?php /************************** database info ****************************/ $host = "***"; $user = "***"; $pass = "***"; $db = "***"; /**************************** define variables ****************************/ $name = $_POST['name']; $message = $_POST['message']; mysql_connect($host, $user, $pass) OR die ("Could not connect to the server."); mysql_select_db($db) OR die("Could not connect to the database."); // connect to server or die ?> <?php if(isset($_POST['submit'])) { if($_POST['select'] == 'choose'){ die("please select a shout or request from the drop down");// if no drop down is selected, kill the script and explain why } else if($_POST['select'] == 'shouts'){ // begin shouts $message = htmlspecialchars($message); $message = nl2br($message); $message = mysql_real_escape_string($message); $name = htmlspecialchars($name); $name = mysql_real_escape_string($name); $class = "shout"; // assigns the css class to be used when the results are called { mysql_query("INSERT INTO shoutbox (name, message, class) VALUES ('$name', '$message', $class)"); }} // begin request ?> <link href="css/vip_sheet.css" rel="stylesheet" type="text/css" /> <div id="shout-container"> <div id="shouts"> <?php $result = mysql_query("SELECT * FROM shoutbox ORDER BY id DESC LIMIT 0,10"); while ($row = mysql_fetch_array($result)) { ?> <div class="<?php echo $row['class']; ?>"> <b><?php echo $row['name']; ?></b><br /> <?php echo $row['message']; ?></div> <?php }} ?> </div> </div> thank you
  8. thank you very much We've had a few issues the last few days with the connection at the data center, our stream is moving server to a new host today, may explain the buffer you had Thanks for the feedback
  9. Just re read my post and it may not be quite clear, I know I need you use something like if $_POST['shout'] == 'Yes') to trigger what happens if they shout is ticked, but it's actually telling the script to add the css to the db info :-\
  10. Hollows

    Wordpress

    Just posted here to remind myself to check this when I get home, I'm pretty sure I can help so will post again when @ my machine
  11. Hay all, I've recently redesigned the website for an internet station I co-run, it's a custom wordpress theme I built myself and the wordpress backend has been manipulated to serve us as a radio station - link is @ www.shedbass.com I've tried to keep the theme of the site through out so the forums and chatroom follow the same design Any feedback is more then welcome
  12. Thought I should introduce myself - Haiii!!!! Look forward to learning a lot from these forums and hopefully helping out with the little that I do know
  13. Hi - first time on this forum but I've been lurking for some time and am more then impressed with the knowledge I see, I've learnt so much just reading topics...anyway... What I have here is some code to take form info and populate my db, then grab that info and display it, much the same as a shoutbox / guestbook script, except the end message / shout is not displayed to the sender as it shall be used to send shoutouts and tune requests into a broadcast panel used on our internet station. What I'd like to know is, how can I have the displayed messages on the end script use a CSS style that is selected on the original form? I guess I need to some how wrap the message output in CSS styling when it is sent into the db, but am lost how to select the wrap based on the tickbox being checked or not... please see the code below... This is the form part - <FORM METHOD=POST ACTION="shouts.php"> <TABLE> <TR> <TD>Name :</TD> <TD><INPUT TYPE="text" NAME="author"></TD> </TR> <TR> <TD>Email :</TD> <TD><INPUT TYPE="text" NAME="eml"></TD> </TR> <TR> <TD>Message :</TD> <TD><INPUT TYPE="text" NAME="message"></TD> </TR> <TR> <TD>shout - </TD> <TD><input name="shout" type="checkbox" class="shout" id="shout" value="Yes" /></TD> </TR> <TR> <TD>request - </TD> <TD> <input name="request" type="checkbox" class="request" id="request" value="Yes" /></TD> </TR> <TR> <TD></TD> <TD><INPUT TYPE="submit" name="submit" value="post"></TD> </TR> </TABLE> </FORM> I if the user selects the shout tick box I'd like the message to have a <div id="shout"></div> wrap and if they select request then a request wrap This is the php part of the script - <?php // You just need to configure these 4 variables to match your server. $db_host = "localhost"; // mySQL database host $db_user = "*****"; // mySQL database user $db_password = "*****"; // mySQL database password $db_name = "*****"; // the name of your mySQL database // If a user has submitted a post, we want to : // 1. Validate it // 2. Strip unwanted html // 3. Make sure messages and names aren't too long // 4. Add it to our database. if ( isset($_POST["submit"])) { // 1. Validate it, by checking all the form inputs were filled in if(!$_POST['author']) { echo 'Error ! : No name entered'; die; } if(!$_POST['eml']) { echo 'Error ! : No email entered'; die; } if(!$_POST['message']) { echo 'Error ! : No message entered'; die; } // 2. Strip unwanted HTML $message = strip_tags($_POST['message'], ''); $eml = strip_tags($_POST['eml'], ''); $author = strip_tags($_POST['author'], ''); // 3. Make sure messages and names aren't too long // We will use the strlen() function to count the length. $message_length = strlen($message); $author_length = strlen($author); if($message_length > 150) { echo "Error ! : Your message was too long, messages must be less than 150 chars"; die; } if($author_length > 150) { echo "Error ! : Your name was too long, names must be less than 150 chars"; die; } // 4. Add it to our database. // If the script hasn't died yet due to an error in the inputted data // we need to add the data to the database // Lets connect to our database. mysql_connect($db_host,$db_user,$db_password) or die(mysql_error()); // Select the database. mysql_select_db($db_name) or die(mysql_error()); // Lets define the date format we want to enter to our database // go here for more details // http://www.php.net/manual/en/function.date.php $date = date("h:i A dS M"); // This will produce 11:02 25th Aug // Set the query as $query $query = "INSERT INTO shoutbox (message, author, eml, date, ip) VALUES ('$message','$author','$eml','$date','$_SERVER[REMOTE_ADDR]')"; mysql_query($query); mysql_close(); // Show thanks message and take them back to the main shoutbox echo "Thanks for your post<BR>"; // If they haven't submitted a post, we want to : // 1. Show the latest shouts // 2. Show the shout post form } else { // 1. Show the latest shouts // Lets connect to our database. mysql_connect($db_host,$db_user,$db_password) or die(mysql_error()); // Select the database. mysql_select_db($db_name) or die(mysql_error()); // Set the query as $query, and get the last 10 posts. $query = "SELECT message, author, eml, date, ip FROM shoutbox order by id DESC LIMIT 10"; $result = mysql_query($query); echo "<TABLE>"; while($r=mysql_fetch_array($result)) { // To modify the appearance, edit this : echo "<TR> <TD><font size='1'> Posted $r[date] by <A HREF='mailto:$r[eml]'> $r[author]</A></font></TD> </TR> <TR> <TD><font size='1'>$r[message]</font></TD> </TR> <TR> <TD><HR></TD> </TR>"; } echo "</TABLE>"; } ?> Can anyone help Or if anyone can suggest a better way todo this I would be so very grateful Essential as well, I'd like to off the user of the broadcast panel the option to delete specific messages once read, or change the css id so they can score through already read out messages..
×
×
  • 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.