Please login or register. Welcome to the Studio, guest!


Quick Links:



Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
great to see you guys still going strong after all this time... i really should visit more... lol

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
Twerque Avatar


:) I'd like one if you don't mind.

torque_the_dork@yahoo.com


sent.... may take a couple of days last time i checked it was roughly 4 days.

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
to be honest.. i've not seen any problems with these glitches.... not heard of any problems with the javelin either. Suppose i'm just lucky lol. But as always they will fix it. I can't wait for them to bring out more stuff for it.

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
nitro04 at googlewave dot com

i have 25 invites going to anyone that wants them.

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
well i've played 15 hours since i've got it (official play time) and i'm rank 39 going on 40. Prestige this time around isn't until 70 (got an extra 15 more levels to rank from MW1 >_<) i don't know if i've be taking prestige just yet... maybe might stay at 70 to scare a few people lol.

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
well it is going for £24.99 in morrisons or £26 in sainsburys... however i'm sure they are both sold out now but they will both be getting deliveries in soon I would imagine :D

that is... obviously if your based in the uk lol

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
Chris Avatar
Last I checked, you can't actually do that with compliant code for all browsers. Basically, you can do that for any browser that supports CSS3, but not every browser supports it, including IE, the most used browser. The way we do it here is that the images are actually rounded themselves. :P It's also the most efficient way to do it and the way I recommend.


only partially right chris... the moz and webkit attributes in css stylesheets is not CSS3 its pseudo css used in HTML5

What i advise and generally do... is make the template look stunning without the rounded corners in IE and then use the moz and webkit rounded corners pseudo to get it to look even better in gecko and webkit based browsers..

For example


-moz-border-radius:5px;
-webkit-border-radius:5px;


There are plugins that internet explorer users can use to get the gecko based functionality which i believe was created by google themselves.

to get the rounded tops only you can do this


-moz-border-radius-topleft:5px;
-moz-border-radius-topright:5px;
-webkit-border-radius-topleft:5px;
-webkit-border-radius-topright:5px;


but as chris rightly mentioned it doesn't work in internet explorer hence why I said make it still look nice in IE first.

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
nsane Avatar
Nirvana - Rape me in my pants...


.... :S


that one is kinda worrying lol...

Rick Astley - Never gonna give you up in my pants




Last Edit: Nov 10, 2009 12:36:09 GMT by Llanilek

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
since #MW2 is the third highest trend on Twitter currently, i suppose its expected with it being release date 10.11.09...

This date has been one of the most anticipated dates for a lot of gamers this year, as activision have finally released the most anticipated game of the year.

A lot of upset was around when COD5 WAW mainly because it failed to meet the expectations of its hype. Hopefully MW2 won't suffer the same fate.

Has anyone played it yet? I'm anticipating a huge response from the MW2 online community to the release and expect the servers to be jam packed this evening and for the next few days.

What are your views on the game thus far, whether you've played it personally or just seen the reviews and previews around on the game.

PS. anyone up for a couple of games (i'm still waiting for it to come in the post) my psn is Llanilek.

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
iphone rules...

lol..

and i agree with luci ... really is bull as even thou it does give off some radio waves .... unless you like mega amplified them and stuck it right next to your head for 3 weeks you ain't gonna die ... lol

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
i've been away for a while... due to for some reason being unable to access the url due to my isp's dns being mashed lol...

but i've already noticed a speed increase in download time (currently the whole optimized js for me downloads in 136 milliseconds.. thats pretty shithott man... lol

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
i've been recently charging for django development £12 which is roughly $20 which i'm just at start out so i believe thats reasonable for my self currently.

putting tags on freelance work has always been a weak point of mine and I know that i'm undercharging but thats just in experience i guess.

where would you guys say a good benchmark is for freelancing?

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
milk inc - never again in my pants

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
hey i have a webhosting company myself... i've got a bit of free space hanging around if your interested send me a pm... i could do with the client base lol

www.streamflame.com

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
[PHP]Simple PM System Part 2

Hey guys this is part two of the Simple Private Messaging System tutorial, if you have yet to do part 1 it can

be found here

I advise doing part 1 first not only because its logical but... Well this part won't make sense if you don't.

Done? good, lets begin...

In part one i spoke of sending pm's and replying to them also making an outbox. Well that is what we will

cover in this section.

Sending A PM

Most the processing of a pm must be done before it hits the database so this is where we will do it. As

standard you must always secure this part of the script otherwise your gonna have trouble.

send.html

this will be the form to collect the information.


<form action="send.php" method="post" name="sendpm">
<table>
  <tr>
     <td>
        To Username
     </td>
     <td>
        <input type="text" name="touser" id="touser" />
     </td>
  </tr>
  <tr>
     <td>
        Subject
     </td>
     <td>
        <input type="text" name="subject" id="subject" />
     </td>
  </tr>
  <tr>
     <td>
        Message
     </td>
     <td>
        <textarea name="message" cols="60" rows="10" id="message"></textarea>
     </td>
  </tr>
  <tr>
   <td colspan="2">
        <input type="submit" value="Send PM" />
     </td>
  </tr>
</table>
</form>


send.php

The above form in send.html is sent to send.php as set in the action of the form. So this is where the

processing will take place.

we will start by again ensuring that the user is logged in and thus has the permissions to send this pm

however i have covered this in the last part so I won't go over it again.

We then will check each post var and "clean" it if you will and to do this i usually write a simple function

that i use on all my post vars.


function cleanPost($str) {

   $str = addslashes($str);
   $str = htmlspecialchars($str);

}


just save's time when processing forms (you can add to this your most used post processing functions).

so we need to get each post var and process it.


$touser = cleanPost($_POST['touser']);
$subject = cleanPost($_POST['subject']);
$msg = cleanPost($_POST['message']);

// preprocessed vars
$fromuser = $_SESSION['username'];
$time = time();

// check to see if the form is valid
# form security would go here

// insert query
$sql = mysql_query("INSERT INTO `pms`

(`id`,`touser`,`fromuser`,`subject`,`message`,`read`,`deleted`,`datesent`) VALUES (NULL, '$touser',

'$fromuser', '$subject', '$msg', '0', '0','$time')");

// redirect away from post page.
header('location: thanks.html');


The above basically checks the vars are clean where the form security is i recommend that you add it here.

basically all you need is a conditional statement to check if the data inputted is not empty and/or conforms

to what data you want, i'm not going to cover that in this tutorial however.

so thats basically the send/reply feature pretty much covered.

Read Feature

now you may add in a little more funtionality into the inbox by adding the read feature. Notice we had the

read column in the first part of the tutorial, well we are going to make a slight modification to the

inbox.php and view.php files.

inbox.php

where we had this piece of code in the inbox file


<table width='95%'>

   <tr><th>From</th><th>Subject</th><th>Date</th></tr>

<?php

while($r = mysql_fetch_object($sql)) {

$r-subject = stripslashes($r->subject);
$r->datesent = gmdate('d/\m/\y g:ia');

echo "<tr><td>$r->fromuser</td><td><a href='view.php?id=$r->id'>$r->subject</a></td><td>$r-

>datesent</td></tr>";


}

?>

</table>


we are adding in a function to show a different type of envelope when the pm is read.

so change it to this.


<table width='95%'>

   <tr><th> </th><th>From</th><th>Subject</th><th>Date</th></tr>

<?php

while($r = mysql_fetch_object($sql)) {

$r-subject = stripslashes($r->subject);
$r->datesent = gmdate('d/\m/\y g:ia');

if($r->read = "0") {
  $read = "path/to/notread.gif";
}
else {
  $read = "path/to/read.gif";
}

echo "<tr><td><img src='".$read."' /></td><td>$r->fromuser</td><td><a href='view.php?id=$r->id'>$r-

>subject</a></td><td>$r->datesent</td></tr>";


}

?>

</table>


now your gonna need to know when the pm is read SO what we will do is check it when we read the pm. This is

done with a little modification of the view.php file

view.php

after this


while($r= mysql_fetch_object($grab_pm)) {


add this


if($r->read == "0") { $update = mysql_query("UPDATE `pms` SET `read` = '1' WHERE `id` = '$r->id' LIMIT 1"); }



that basically updates the read flag if the pm is read and the flag is set to 0.


Outbox


Ok the outbox is probably the most difficult to do although its not that hard it requires some modification of

the original database as we need to add an outbox delete function


to the database add a row outdel with an enum('0','1') with default of 0.


basically the outbox is the reverse of the inbox so we need to check for any pms sent where the fromuser

matches the user that is logged in.




so as before

outbox.php

if(session_is_registered('SESSION_NAME')) {

$fromuser = $_SESSION['username'];

$sql = mysql_query("SELECT * FROM `pms` WHERE `fromuser` = '$fromuser' AND `outdel` = '0' ORDER BY

`datesent` DESC");


?>

<table width='95%'>

   <tr><th>From</th><th>Subject</th><th>Date</th></tr>

<?php

while($r = mysql_fetch_object($sql)) {

$r-subject = stripslashes($r->subject);
$r->datesent = gmdate('d/\m/\y g:ia');

echo "<tr><td>$r->touser</td><td><a href='view.php?id=$r->id'>$r->subject</a></td><td>$r-

>datesent</td></tr>";


}

?>

</table>

<?php
// end if
}



outview.php

the outbox view will be a slight variation of the view.php


if(session_is_registered('SESSION_NAME')) {
$id = @$_GET['id'];
$fromuser = $_SESSION['username'];

if(!isset($id)) {
  header('location: inbox.php');
}
elseif(isset($id)) {

$grab_pm = mysql_query("SELECT * FROM `pms` WHERE `fromuser` = '$fromuser' AND `id` = '$id'");

while($r= mysql_fetch_object($grab_pm)) {

$r->subject = stripslashes($r->subject);
$r->message = stripslashes($r->message);
$r->message = nl2br($r->message);

 
 
  echo "<h2>$r->subject</h2>";
  echo "<p>$r->message</p>";
  echo "<p>From: $r->fromuser On: $r->datesent</p>";


}

}

}



and thats basically it....

oh and to add delete functions you just need to call the id of the pm in the database and update the delete or outdel flag and put it to 1.

hope this tutorial has helped and again i'd love to see any finished results on this.


Last Edit: Feb 25, 2009 21:45:46 GMT by Llanilek