March 5, 2013

Universal Forum Version 3


Version 3 of a php microforum that I wrote, consisting of a single self-referencing script. With just the click of a button the script appends name and comment field data to itself, then refreshes a second later. There are lots of other subtle features, but instead of blathering on about them here I'll let you examine them directly in the complete source code:


<?php
date_default_timezone_set('America/Los_Angeles');
error_reporting (E_ALL ^ E_NOTICE);
echo "<!doctype html><html><head>
<meta http-equiv='content-type' content='text/html; charset=UTF-8'><title>Universal Forum v3</title>
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'>
<style>
body{margin:0%;padding:0%;background-color:white;font-family: 'Source Sans Pro', sans-serif;font-size:20px;}
.form{margin:2%;}
#textarea{font-family: 'Source Sans Pro', sans-serif;font-size:20px;}
#button{
padding-left:1%;padding-right:1%;padding-top:3%;padding-bottom:3%;vertical-align:top;font-family: 'Source Sans Pro', sans-serif;font-size:40px;}
.bar{padding:1%;background-color:black;text-align:center;font-weight:bold;}
.bubble{margin:1%;padding:1%;border:1px solid whitesmoke;border-radius:3px;background-color:ghostwhite;}
</style>
</head><body>
<div class='form'><form action='index.php' method='post'><input type='text' name='x' placeholder='name' id='textarea';'><br><textarea rows='6' cols='30' wrap='virtual' name='y' placeholder='comment' id='textarea';'></textarea><input type='submit' value='✎post' id='button'></form></div>";
$file = "index.php";
$name = fopen($file, 'a') or die("fail");
if ($_POST["y"]=="")
echo "<div class='bar'><font color='yellow'>you must enter something to post</font></div>";
else
{
echo "<div class='bar'><font color='lime'>comment posted!</font></div>";
fwrite($name, $string);
$string = "<div class='bubble'><font color='blue'><b>";
fwrite($name, $string);
$string = strip_tags($_POST["x"]);
fwrite($name, $string);
$string = "</b></font> ";
fwrite($name, $string);
$string = "<font color='silver'>(";
fwrite($name, $string);
$string = date("y.m.d H:i:s", time());
fwrite($name, $string);
$string = ")</font><br>❝";
fwrite($name, $string);
$string = strip_tags($_POST["y"]);
fwrite($name, $string);
$string = "❞</div>";
fwrite($name, $string);
fclose($name);
if ($_POST["y"]=="")
echo "";
else
{
echo('<meta http-equiv="refresh" content="1">');
}
}
?>

August 27, 2011

Second Life Mesh IP Tutorial Answers


Part of the new policy with mesh rollout comes in the form of this ridiculous and patronizing "Intellectual Property" tutorial. Since I was already participating in the mesh beta I was actually forced to take this asinine "tutorial" twice. Unforgivable. And fuck everything about this. Following are the correct answers to all the questions, just select the corresponding radio buttons and you're golden.

Second Life Mesh IP Tutorial

Daniel is a very talented artist. He is also a huge movie fan. Daniel made a 3D model that looks just like a character from his favorite movie and wants to use it as an avatar in Second Life. Can Daniel upload his 3D model as a mesh and use it for his Second Life avatar?

01. NO

Maria has created an avatar that closely resembles her favorite movie star. The avatar is composed of several highly detailed meshes and textures that Maria made by using 3D modeling software and other graphic tools. When is it OK for Maria to upload an avatar like this to Second Life?

02. If Maria is the owner of celebrity's intellectual property rights or is authorized by the rights owner.

Using some 3D modeling software, Cathy created a model of a car. It took her weeks to make the model and now she wants to sell copies of the car in Second Life. Cathy uploaded the car as a mesh to Second Life then listed it for sale on the Second Life Marketplace. The text of Cathy's listing says "looks like a Mercedes." Is this OK?

03. NO

David is an avid sports fan and wants to share his enthusiasm with other Second Life Residents. David uploaded a large mesh helmet with his favorite team's logo on it. David decorated the outside of his Second Life home with the helmet. When is it OK for David to use his favorite team's logo in Second Life?

04. He cannot use the logo in Second Life.

Tom purchased a membership to a website that offers creative works, such as 3D models, to its members. The terms of use on the website state that the 3D models cannot be sold "as is" but they can be re-sold if they are added to an original creation. Can Tom upload the 3D models as meshes to Second Life and then sell them "as is" to other builders on the Second Life Marketplace?

05. NO

Jill is a popular fashion designer in Second Life. She has created a line of mesh purses and shoes and wants to call her new brand "N1ke". Is this OK?

06. NO

Darlene sells full permission mesh pillars, archways, and roof tops for other residents to use in their Second Life buildings. Darlene includes a notecard with the items. The notecard states that the items can only be re-sold as part of an original creation and are not to be re-sold as standalone items. Sally purchased the mesh objects from Darlene and wants to resell them. Sally can...

07. Include the mesh objects in the prefab houses that she creates, then sell the houses.

Using some 3d modeling tools Becky created some cute little teddy bears which she later uploaded as meshes to Second Life. The teddy bears, when clicked, play a selection of well known romantic songs that Becky does not have permission to use. Is this OK?

08. NO

Linden Lab removed Barbara's meshes or other Second Life content but did not remove other similar content. This could be because...

09. Linden Lab has not discovered or been notified by a rights owner about similar content.

When uploading mesh or creating other content for Second Life, which of the following is important to do if you want to respect intellectual property rights like copyrights, trademarks, and celebrity rights?

10. All of the above.

You scored 10 correct out of 10 questions for a score of 100 percent.