Wednesday 2 November 2011

PHP Wall

What is a wall?
A wall is basically like a message board where member's of the site can post serqenally post comments in order of time. Also referred to as 1,2 and 3 sites that utilize this feature are generally a richer experience for users. It's also fair to comment that this is a web2.0 feature.

Pros
  • Adds functionality to the site
  • Richer social experience for users

Cons
  • Can be abused (bullying and 'trolling*') 
  • We will have to use script to remove any html tags such as iframes so users cannot damage the site's appearance
  • Swearing on some forums and message boards is strictly forbidden. We will decide if we want to include such a feature
  • Spamming
  • Double posting (accidental)

How we will use ours
As you can see from our mockups, it's our intentional to have a module style wall on the right hand side of the page. This will hopefully give the impression of a site that has a strong social element. A site where you can look up your family and friends details and post quick messages that everyone in that group can see. Each user's post will also have their avatar next to it so members can see each other.

We could also include a emoticon  feature that lets users use 'smilies' on the wall. This would mean we would have to have a data bank of emoticon's and script that scanned and replace something like :) with the small picture file.

We will stop anyone from using html tags such as iframes from threatening the integrity of the page. We will also look into rules governing how often people can post to the wall. To stop spamming and doubles posting.

Quick Code example
Using a worked example from http://www.nairaland.com/nigeria/topic-214623.0.html we were able to learn the basics about walls through php.
<?php
$text="<hr align='left'>".date("m:i:s ").$_REQUEST['text'];
$handle = fopen("wall.txt", "a");
fwrite($handle,$text);
fclose($handle);
echo $text;
?> 

 We then use simple script on the html page with functions that can call previous posts form a .txt file then post to the text file. We will also incorporate an avatar. We will create a new table with user IDs and a url to the photo that they uploaded. 



*Troll definition
"Forum trolls are users that repeatedly and deliberately breach the netiquette of an established online community, posting inflammatory, extraneous, or off-topic messages to bait or excite users into responding or to test the forum rules and policies, and with that the patience of the forum staff. Their provocative behavior may potentially start flame wars (see below) or other disturbances. Responding to a troll's provocations is commonly known as 'feeding the troll' and is generally discouraged, as it can encourage their disruptive behavior."