The Programmers, Web designers Thread
#21
Posted 31 July 2008 - 08:44 PM
ChotooMotoo said:
#22
Posted 31 July 2008 - 10:03 PM
Nahnu jundullaahi dawman darbunaa darbul-ubaa
#23
Posted 01 August 2008 - 12:11 PM
Spice said:
Biologist + Computer Scientist = Uber nerd
Get is right!
http://winacamper.fatface.com/safiyyah
#24
Posted 02 August 2008 - 01:04 AM
Non-Web gui designing is so much easier...
Wassalaam
Attached File(s)
-
textbox.jpg (6.94K)
Number of downloads: 17
He Dispelled Darkness By His Beauty
Beauteous Are All His Qualities
Benediction Be Upon Him And His Family
#25
Posted 02 August 2008 - 04:03 AM
Rida said:
Non-Web gui designing is so much easier...
heres one possible way of doing it:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sample Code</title>
<style type="text/css">
<!--
wrapper {
clear:both;
}
.label1 {
margin: 4px 10px 0px 0px;
float: left;
font: bold 12px tahoma, sans-serif;
}
form {
margin:0px;
padding:0px;
}
.item {
margin: 0px 4px 0px 0px;
float: left;
font: normal 9px arial, sans-serif;
}
-->
</style>
</head>
<body>
<div class="wrapper">
<form action="">
<div class="label1">Name</div>
<div class="item"><input type="text" name="firstname" /><br/>First</div>
<div class="item"><input type="text" name="lastname" /><br/>Last</div>
</form>
</div>
</body>
</html>the implementation may vary depending on your layout (fluid vs. non-fluid, absolutely vs. relatively positioned, etc.).
#26
Posted 02 August 2008 - 10:33 AM
Is there any way to do it without out the line break tag as well?
Wassalaam
He Dispelled Darkness By His Beauty
Beauteous Are All His Qualities
Benediction Be Upon Him And His Family
#27
Posted 02 August 2008 - 05:57 PM
#28
Posted 02 August 2008 - 11:57 PM
Rida said:
Is there any way to do it without out the line break tag as well?
again, there are different ways to do it, but here's one:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sample Code</title>
<style type="text/css">
<!--
wrapper {
clear:both;
}
.label1 {
margin: 4px 10px 0px 0px;
float: left;
font: bold 12px tahoma, sans-serif;
}
form {
margin:0px;
padding:0px;
}
.item {
margin: 0px 4px 0px 0px;
float: left;
font: normal 9px arial, sans-serif;
}
.item span {
display: block;
}
.textbox {
display: block;
}
-->
</style>
</head>
<body>
<div class="wrapper">
<form action="">
<div class="label1">Name</div>
<div class="item"><input type="text" name="firstname" class="textbox" /><span>First</span></div>
<div class="item"><input type="text" name="lastname" class="textbox" /><span>Last</span></div>
</form>
</div>
</body>
</html>
#29
Posted 05 August 2008 - 07:59 PM
Wassalaam
He Dispelled Darkness By His Beauty
Beauteous Are All His Qualities
Benediction Be Upon Him And His Family
#30
Posted 25 August 2008 - 07:25 PM
Here's the tutorial:
Simple unobtrusive Javascript Gallery/Slide show : ed everett
Here's something I put together really quickly:
Test
I want to know how I can customize what I have. I want to be able to add captions, I want to re-position the "Next" and "Previous" links, and maybe even style it a bit further with backgrounds and borders, etc. How can I go about doing those things? Any help is appreciated!
#31
Posted 25 August 2008 - 07:59 PM
I always meant to get around to CGI-fying it, but never bothered. As long as there's a thread for web developers, I figured I'd throw it up here in case someone was interested in doing that and making it available for public usage.
Also, looking at it, I notice there's an assumption of two nicks which could potentially cause a COLOR bug with one nick. So you may want to fix that as well.
#!/bin/sh
if [ $# -lt 1 ] ; then
echo "usage: `basename $0` <filename>"
exit 0
fi
head -1 $1 >/tmp/.blah.$$
if grep ' says:$' /tmp/.blah.$$ ; then
rm /tmp/.blah.$$
NICK1=`grep says: $1 | cut -d" " -f1 | uniq | head -2 | head -1`
NICK2=`grep says: $1 | cut -d" " -f1 | uniq | head -2 | tail -1`
cat $1 | sed 's/ says//g' | sed "s/^$NICK1/$NICK1/g" | sed "s/^$NICK2/$NICK2/g" | sed 's/$/~/g' | sed 's/:~/:/g' | tr 'n' ' ' | tr '~' 'n' |sed 's/:/:/g' | sed 's/$//g' | sed 's/^ //g'
exit 0
fi
rm /tmp/.blah.$$
NICK1=`cat $1 | cut -d":" -f1 | uniq | head -2 | head -1`
NICK2=`cat $1 | cut -d":" -f1 | uniq | head -2 | tail -1`
cat $1 | sed "s/^$NICK1/[COLOR=Red]$NICK1/g" | sed "s/^$NICK2/[COLOR=Blue]$NICK2/g" | sed 's/:/:/g' | sed 's/$//g'
exit 0
#32
Posted 25 August 2008 - 08:18 PM
sixpakistan said:
I always meant to get around to CGI-fying it, but never bothered. As long as there's a thread for web developers, I figured I'd throw it up here in case someone was interested in doing that and making it available for public usage.
Also, looking at it, I notice there's an assumption of two nicks which would probably cause a COLOR bug. So you may want to fix that as well.
#!/bin/sh
if [ $# -lt 1 ] ; then
echo "usage: `basename $0` <filename>"
exit 0
fi
head -1 $1 >/tmp/.blah.$$
if grep ' says:$' /tmp/.blah.$$ ; then
rm /tmp/.blah.$$
NICK1=`grep says: $1 | cut -d" " -f1 | uniq | head -2 | head -1`
NICK2=`grep says: $1 | cut -d" " -f1 | uniq | head -2 | tail -1`
cat $1 | sed 's/ says//g' | sed "s/^$NICK1/$NICK1/g" | sed "s/^$NICK2/$NICK2/g" | sed 's/$/~/g' | sed 's/:~/:/g' | tr 'n' ' ' | tr '~' 'n' |sed 's/:/:/g' | sed 's/$//g' | sed 's/^ //g'
exit 0
fi
rm /tmp/.blah.$$
NICK1=`cat $1 | cut -d":" -f1 | uniq | head -2 | head -1`
NICK2=`cat $1 | cut -d":" -f1 | uniq | head -2 | tail -1`
cat $1 | sed "s/^$NICK1/[color=Red]$NICK1/g" | sed "s/^$NICK2/[color=Blue]$NICK2/g" | sed 's/:/:/g' | sed 's/$//g'
exit 0
WHAT THE HELL is this bro?
Is it dangerous?
I'm terrified right now.
want is not always where we are.
Are we alone? Is the real winter inside our hearts? We are all struggling for definition in a world that resists our inquiries. -Tom Haverford :lol::faint:
#33
Posted 25 August 2008 - 08:31 PM
dreamdeferred said:
Is it dangerous?
I'm terrified right now.
It's Bourne shell.
It takes a conversation that looks like this:
DaFooz02: we're having a blizzard :-(
genius pants: that's like 1000 calories! >
DaFooz02: um
DaFooz02: NO DUMBASS
DaFooz02: WE'RE SERIOUSLY HAVING A BLIZZARD
genius pants: i know, should've gotten frozen yogurt
genius pants: how many people are splitting it?
DaFooz02: are you an idiot
DaFooz02: i'm at home
DaFooz02: in bed
DaFooz02: and it is snowing outside
genius pants: who's eating the blizzard with you in bed =-O
DaFooz02: no one is eating anyhting
genius pants: why are you eating a blizzard when it's so cold out
genius pants: did you finish it already?
DaFooz02: i hate you
and gives you this:
DaFooz02: we're having a blizzard :-(
genius pants: that's like 1000 calories! >
DaFooz02: um
DaFooz02: NO DUMBASS
DaFooz02: WE'RE SERIOUSLY HAVING A BLIZZARD
genius pants: i know, should've gotten frozen yogurt
genius pants: how many people are splitting it?
DaFooz02: are you an idiot
DaFooz02: i'm at home
DaFooz02: in bed
DaFooz02: and it is snowing outside
genius pants: who's eating the blizzard with you in bed =-O
DaFooz02: no one is eating anyhting
genius pants: why are you eating a blizzard when it's so cold out
genius pants: did you finish it already?
DaFooz02: i hate you
there's a pretty easily fixable bug when it comes to handling/parsing emoticons in text. i think it should probably do translation of aim/msn emoticons to islamica emoticons also (i tend to do this via commandline anyway)
#34
Posted 25 August 2008 - 08:35 PM
want is not always where we are.
Are we alone? Is the real winter inside our hearts? We are all struggling for definition in a world that resists our inquiries. -Tom Haverford :lol::faint:
#35
Posted 25 August 2008 - 08:39 PM
sixpakistan said:
It takes a conversation that looks like this:
DaFooz02: we're having a blizzard :-(
genius pants: that's like 1000 calories! >
DaFooz02: um
DaFooz02: NO DUMBASS
DaFooz02: WE'RE SERIOUSLY HAVING A BLIZZARD
genius pants: i know, should've gotten frozen yogurt
genius pants: how many people are splitting it?
DaFooz02: are you an idiot
DaFooz02: i'm at home
DaFooz02: in bed
DaFooz02: and it is snowing outside
genius pants: who's eating the blizzard with you in bed =-O
DaFooz02: no one is eating anyhting
genius pants: why are you eating a blizzard when it's so cold out
genius pants: did you finish it already?
DaFooz02: i hate you
and gives you this:
DaFooz02: we're having a blizzard :-(
genius pants: that's like 1000 calories! >
DaFooz02: um
DaFooz02: NO DUMBASS
DaFooz02: WE'RE SERIOUSLY HAVING A BLIZZARD
genius pants: i know, should've gotten frozen yogurt
genius pants: how many people are splitting it?
DaFooz02: are you an idiot
DaFooz02: i'm at home
DaFooz02: in bed
DaFooz02: and it is snowing outside
genius pants: who's eating the blizzard with you in bed =-O
DaFooz02: no one is eating anyhting
genius pants: why are you eating a blizzard when it's so cold out
genius pants: did you finish it already?
DaFooz02: i hate you
there's a pretty easily fixable bug when it comes to handling/parsing emoticons in text. i think it should probably do translation of aim/msn emoticons to islamica emoticons also (i tend to do this via commandline anyway)
hahahaah thats an hilarious convo. you are such an idiot.
#36
Posted 26 August 2008 - 06:21 AM
dreamdeferred said:
Word. I think maybe we could add something on so it could?
caffienetime said:
Thanks (I think)
So, noone wants to CGI-ize it? *looks at meraj*
#38
Posted 26 August 2008 - 12:42 PM
ssalmanj said:
make it into a CGI program.. so someone could go to
http://www.islamicaw...s/convert-convo or whatever, paste their convo into a textbox, and get back formatted text
edit: it does MSN convos as well, in case that wasn't clear
#39
Posted 26 August 2008 - 03:40 PM
sixpakistan said:
How abt a quick javascript ?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM WebSphere Studio">
<TITLE>test.html</TITLE>
<script type="text/javascript">
<!--
function convert() {
var lines;
var TA=document.form1.ta.value;
var out="";
var color="";
if(document.all) { // IE
lines=TA.split("rn");
}
else { //Mozilla
lines=TA.split("n");
}
for(var i=0; i<lines.length; i++) {
if(i%2==0){
color="Red";
}else{
color="Blue";
}
var name = lines[i].substr(0, lines[i].indexOf(":"));
var txt = lines[i].substr(lines[i].indexOf(":")+1, lines[i].length);
out = out+"[color="+color+[COLOR=#2a00ff]"]"[/COLOR]+name+[COLOR=#2a00ff]"[/color]"[/COLOR]+[COLOR=#2a00ff]":"[/COLOR]+[COLOR=#2a00ff]""[/COLOR]+txt+[COLOR=#2a00ff]""[/COLOR]+[COLOR=#2a00ff]"n"[/COLOR];
[COLOR=#7f0055]}[/COLOR]
[COLOR=#3f5fbf]//alert(out);[/COLOR]
document.form1.outputtxt.value=out;
}
[COLOR=#3f5fbf]//-->[/COLOR]
[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]script[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]HEAD[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]BODY[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]form [/COLOR][COLOR=#7f007f]action[/COLOR]=[COLOR=#2a00ff]"#" [/COLOR][COLOR=#7f007f]name[/COLOR]=[COLOR=#2a00ff]"form1"[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]P[/COLOR][COLOR=#008080]>[/COLOR]Put convo here : [COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]TEXTAREA [/COLOR][COLOR=#7f007f]rows[/COLOR]=[COLOR=#2a00ff]"20" [/COLOR][COLOR=#7f007f]cols[/COLOR]=[COLOR=#2a00ff]"50" [/COLOR][COLOR=#7f007f]name[/COLOR]=[COLOR=#2a00ff]"ta"[/COLOR][COLOR=#008080]></[/COLOR][COLOR=#3f7f7f]TEXTAREA[/COLOR][COLOR=#008080]></[/COLOR][COLOR=#3f7f7f]P[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]button [/COLOR][COLOR=#7f007f]type[/COLOR]=[COLOR=#2a00ff]"button" [/COLOR][COLOR=#7f007f]onclick[/COLOR]=[COLOR=#2a00ff]"return convert();"[/COLOR][COLOR=#008080]>[/COLOR]convert[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]button[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]br[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]p[/COLOR][COLOR=#008080]><[/COLOR][COLOR=#3f7f7f]textarea [/COLOR][COLOR=#7f007f]rows[/COLOR]=[COLOR=#2a00ff]"20" [/COLOR][COLOR=#7f007f]cols[/COLOR]=[COLOR=#2a00ff]"50" [/COLOR][COLOR=#7f007f]name[/COLOR]=[COLOR=#2a00ff]"outputtxt"[/COLOR][COLOR=#008080]></[/COLOR][COLOR=#3f7f7f]textarea[/COLOR][COLOR=#008080]></[/COLOR][COLOR=#3f7f7f]p[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]form[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]BODY[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]HTML[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]--------------[/COLOR]
[COLOR=#008080]Just put the above code in a html file and try.[/COLOR]
#40
Posted 26 August 2008 - 04:25 PM
fahmed said:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM WebSphere Studio">
<TITLE>test.html</TITLE>
<script type="text/javascript">
<!--
function convert() {
var lines;
var TA=document.form1.ta.value;
var TAout="";
var out="";
var color="";
if(document.all) { // IE
lines=TA.split("rn");
}
else { //Mozilla
lines=TA.split("n");
}
for(var i=0; i<lines.length; i++) {
if(i%2==0){
color="Red";
}else{
color="Blue";
}
var name = lines[i].substr(0, lines[i].indexOf(":"));
var txt = lines[i].substr(lines[i].indexOf(":")+1, lines[i].length);
out = out+"[color="+color+[COLOR=#2a00ff]"]"[/COLOR]+name+[COLOR=#2a00ff]"[/color]"[/COLOR]+[COLOR=#2a00ff]":"[/COLOR]+[COLOR=#2a00ff]""[/COLOR]+txt+[COLOR=#2a00ff]""[/COLOR]+[COLOR=#2a00ff]"n"[/COLOR];
[COLOR=#7f0055]}[/COLOR]
[COLOR=#3f5fbf]//alert(out);[/COLOR]
document.form1.outputtxt.value=out;
}
[COLOR=#3f5fbf]//-->[/COLOR]
[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]script[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]script[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]HEAD[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]BODY[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]form [/COLOR][COLOR=#7f007f]action[/COLOR]=[COLOR=#2a00ff]"#" [/COLOR][COLOR=#7f007f]name[/COLOR]=[COLOR=#2a00ff]"form1"[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]P[/COLOR][COLOR=#008080]>[/COLOR]Put convo here : [COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]TEXTAREA [/COLOR][COLOR=#7f007f]rows[/COLOR]=[COLOR=#2a00ff]"20" [/COLOR][COLOR=#7f007f]cols[/COLOR]=[COLOR=#2a00ff]"50" [/COLOR][COLOR=#7f007f]name[/COLOR]=[COLOR=#2a00ff]"ta"[/COLOR][COLOR=#008080]></[/COLOR][COLOR=#3f7f7f]TEXTAREA[/COLOR][COLOR=#008080]></[/COLOR][COLOR=#3f7f7f]P[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]button [/COLOR][COLOR=#7f007f]type[/COLOR]=[COLOR=#2a00ff]"button" [/COLOR][COLOR=#7f007f]onclick[/COLOR]=[COLOR=#2a00ff]"return convert();"[/COLOR][COLOR=#008080]>[/COLOR]convert[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]button[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]br[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]<[/COLOR][COLOR=#3f7f7f]p[/COLOR][COLOR=#008080]><[/COLOR][COLOR=#3f7f7f]textarea [/COLOR][COLOR=#7f007f]rows[/COLOR]=[COLOR=#2a00ff]"20" [/COLOR][COLOR=#7f007f]cols[/COLOR]=[COLOR=#2a00ff]"50" [/COLOR][COLOR=#7f007f]name[/COLOR]=[COLOR=#2a00ff]"outputtxt"[/COLOR][COLOR=#008080]></[/COLOR][COLOR=#3f7f7f]textarea[/COLOR][COLOR=#008080]></[/COLOR][COLOR=#3f7f7f]p[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]form[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]BODY[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]</[/COLOR][COLOR=#3f7f7f]HTML[/COLOR][COLOR=#008080]>[/COLOR]
[COLOR=#008080]--------------[/COLOR]
[COLOR=#008080]Just put the above code in a html file and try.[/COLOR]
Excellent. You are the man. Now just make it work for MSN convos as well.

Help




















