Click to See Complete Forum and Search --> : Just to many blue squares !!
$SuperString
12-09-2002, 07:47 AM
See this page, look at the top were the blue background turns to white (just after the curved white graphics on either side) - does it dip in about 10 px showing a blue square?. the bottom is also not aligned correctly. Its probably only noticable on (1024*768), IE 6 or something. but its just a wee tad annoying.
You will probably find that its the Ad banner thats throwing it off, just take it off (anf the ad at the side too) and all will be fine (:)joking).
When I look at some of the sites I did a few years ago (using strange browsers) they also have graphics aligned incorrectly. Its all in the aid of great fun.
Weedpacket
12-15-2002, 09:44 AM
And I thought it was just me....
It's the table cells between the corners that are at fault - they're not entirely empty - they have spaces in them. And a space is as high as the rest font says it is. (Which is why the gap gets bigger as the font size goes up).
Hey, so I was bored. We're all supposed to be using CSS to do layout anyway :rolleyes:
$SuperString
12-17-2002, 06:57 AM
good call subduck, a make-over would be ideal. You would think a site as active as this would be better designed. The forum is fine (as its out the box) but the rest is just a really scrappy.
I bet the PHP Builder Staff already know this and have been planning to update the design for sometime. Get the finger out lads, im sure there is plenty of users willing to lend a hand.
jstarkey
12-22-2002, 12:13 PM
The site is going through a major overhaul. Once that's complete, I'd like to do a redesign.
I'll also try to find a Windows machine today and check the layout.
Here are a few of the next in lines, after I finish my current project:
1) a shell script to regexp the email addresses in the mail archive and replace them with <email protected> or similar.
2) a shell script which will email opt in users the day's threads from vB.
3) A script to tie the article comments in to vB (I started this but ran into a can of worms).
4) Clean out the code library.
5) Script a daily/weekly update to the manual. I have it pulling the cvs copy and building it, but that's too much for the machine, so I'm going to an rsync method. Both mean that I have to change quite a few links that are absolute.
If anyone is interested in any of the above, I'd be happy to create a 'praise' page with credits.
mahendrakalkura
12-31-2002, 05:00 PM
Originally posted by jstarkey
2) a shell script which will email opt in users the day's threads from vB.
i really love this idea
and i am more than willing to lend both my hands and legs to this project
just kidding
i am really interested to help you out in this
jstarkey
12-31-2002, 07:45 PM
Originally posted by mahendrakalkura
i am really interested to help you out in this
Sounds great. You know the table layout, right? What would you need from me?
I think we can work something out regarding your other request. You'd be saving me a few hours here, so I think it's fair.
Thanks much.
jstarkey
01-03-2003, 06:14 AM
I'm having a really hard time finding a windows machine at the moment. Could someone possibly send me a screenshot of the table problem?
$SuperString
01-09-2003, 12:49 PM
Originally posted by jstarkey
I'm having a really hard time finding a windows machine at the moment. Could someone possibly send me a screenshot of the table problem?
I have attached a screen capture of what I see.
planetsim
01-10-2003, 11:02 PM
Yea this is quite a pitty some forums i go to or just visit have like loads of designs. But this is like a very popular site. Quite Confusing. But other than that this is probably the best forum for the PHP addict
jstarkey
01-14-2003, 06:03 PM
I haven't forgotten about this. I've been trying to find my Windows key, so that I can actually install it.
Weedpacket sent me the details of how he got it working, but I can't just post the fix without checking it.
jstarkey
01-16-2003, 05:13 PM
Ok, sorry for the delay. I've finally gotten a copy of windows set up again.
All better now?
Weedpacket
01-20-2003, 07:32 AM
Halfway. :( At least in Mozilla. In IE 5.5 it looks the way it should. In Mozilla, the upper corners are fine, but the lower corners look as they do in the attachment.
[Edit: I say this and a few seconds later they look fine. Maybe they were fixed while I was checking them out?]
$SuperString
01-20-2003, 08:59 AM
Ehh.. looked fine on IE untill I go to a new post screen were I get the same problem weedpacket mentions !!!. It seems to have wrapped the right banner down to under all the posts and created the 'not enough white squares effect' :) as per weebpackets picture.
jstarkey
01-20-2003, 03:11 PM
Ooops. Forgot to get that page. Today's a holiday, I'm just being the usual geek and stopping by while checking my email. I'll fix that ASAP -- I promise it won't take as long this time :)
altexis
01-21-2003, 08:32 AM
Originally posted by jstarkey
1) a shell script to regexp the email addresses in the mail archive and replace them with <email protected> or similar.
I am very very new to regular expressions... so I made a script with the way I know better. I am posting it here so any other of you guys interested you can just copy&paste it for yourselves.
ok... here we go..
this is a function looking for emails and changing them to the format someone (at) somewhere (dot) com
function replaceEmails($inBody, $ATsign, $DOTsign) {
$outBody="";
$inBodyNextCopyIndex=0;
$inBodyLen=strlen($inBody);
$iAT=-1;
while(true){
if ($iAT+1>$inBodyLen-1) break;
$iAT=strpos($inBody, "@", $iAT+1);
if ($iAT===false) break;
else {
// look for the beginning
$i=$iAT-1;
while($i>=0 && strpos("._-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", substr($inBody, $i, 1))!==false) $i--;
$i++;
if ($i==$iAT) continue;
else {
if (substr($inBody, $i, 1)==".") continue;
else {
$iStart=$i;
// look for the ending
$i=$iAT+1;
$iDOT=-1;
while($i<$inBodyLen && strpos(".-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", substr($inBody, $i, 1))!==false){
if (substr($inBody, $i, 1)==".") $iDOT=$i; // look for the final dot
$i++;
}
$i--;
if ($i==$iAT) continue;
else {
if ($iDOT==-1) continue;
elseif (strpos("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", substr($inBody, $i, 1))===false) continue; // the .com part should always end in a letter
else {
// success - extract+format good parts - continue loop
$outBody.=substr($inBody, $inBodyNextCopyIndex, $iStart-$inBodyNextCopyIndex)."".substr($inBody, $iStart, $iAT-$iStart)." ".$ATsign." ".substr($inBody, $iAT+1, $iDOT-$iAT-1)." ".$DOTsign." ".substr($inBody, $iDOT+1, $i-$iDOT);
$inBodyNextCopyIndex=$i+1;
$iAT=$i;
continue;
}
}
}
}
}
}
return $outBody;
}
now... I also made a transpose of this to include support for the tags vBulleting is using:
function replaceEmailsIgnoreTags($inBody, $ATsign, $DOTsign) {
$outBody="";
$inBodyLower=strtolower($inBody);
$inBodyNextCopyIndex=0;
$inBodyLen=strlen($inBody);
$iAT=-1;
while(true){
if ($iAT+1>$inBodyLen-1) break;
$previous_iAT=$iAT;
// find which occurrence comes first (2147483647 is the max signed integer number)
$iAT=strpos($inBodyLower, "@", $previous_iAT+1); if ($iAT===false) $iAT=2147483647;
$iQuote=strpos($inBodyLower, "", $previous_iAT+1); if ($iQuote===false) $iQuote=2147483647;
$iPhp=strpos($inBodyLower, "", $previous_iAT+1); if ($iPhp===false) $iPhp=2147483647;
$iMin=min($iAT, $iQuote, $iPhp);
if ($iMin==2147483647) {
$outBody.=substr($inBody, $inBodyNextCopyIndex, $inBodyLen-$inBodyNextCopyIndex);
break;
}
elseif ($iMin==$iAT) {
// look for the beginning
$i=$iAT-1;
while($i>=0 && strpos("._-abcdefghijklmnopqrstuvwxyz0123456789", substr($inBodyLower, $i, 1))!==false) $i--;
$i++;
if ($i==$iAT) continue;
else {
if (substr($inBody, $i, 1)==".") continue;
else {
$iStart=$i;
// look for the ending
$i=$iAT+1;
$iDOT=-1;
while($i<$inBodyLen && strpos(".-abcdefghijklmnopqrstuvwxyz0123456789", substr($inBodyLower, $i, 1))!==false){
if (substr($inBody, $i, 1)==".") $iDOT=$i; // look for the final dot
$i++;
}
$i--;
if ($i==$iAT) continue;
else {
if ($iDOT==-1) continue;
elseif (strpos("abcdefghijklmnopqrstuvwxyz", substr($inBodyLower, $i, 1))===false) continue; // the .com part should always end in a letter
else {
// success - extract+format good parts - continue loop
$outBody.=substr($inBody, $inBodyNextCopyIndex, $iStart-$inBodyNextCopyIndex)."[B]".substr($inBody, $iStart, $iAT-$iStart)." ".$ATsign." ".substr($inBody, $iAT+1, $iDOT-$iAT-1)." ".$DOTsign." ".substr($inBody, $iDOT+1, $i-$iDOT)."";
$inBodyNextCopyIndex=$i+1;
$iAT=$i;
}
}
}
}
}
else {
if ($iMin==$iQuote) $st="";
elseif ($iMin==$iPhp) $st="";
else die("young"); // this should never happen
$i=strpos($inBodyLower, $st);
$len=strlen($st);
if ($i===false) {
// did not find closing tag ... returning rest of text as is
$outBody.=substr($inBody, $inBodyNextCopyIndex, $inBodyLen-$inBodyNextCopyIndex);
break;
} else {
// return text until the closing tab as is. continue computations with the rest
$outBody.=substr($inBody, $inBodyNextCopyIndex, $i-$inBodyNextCopyIndex+$len);
$inBodyNextCopyIndex=$i+$len;
$iAT=$i+$len-1;
}
}
}
return $outBody;
}
I haven't given it much testing yet... but I usually make only typing errors :)
when I apply this little test:
$st="this is just a b@c.com sample\r\ntext to see how good\r\ni have _alex@some.where.gr become during the last 34j@php.net\r\n year in php progr@mming";
echo "<p>".nl2br(htmlspecialchars(replaceEmailsIgnoreTags($st, "(at)", "(dot)")))."</p>\n";
I have this result:
this is just a b@c.com sample
text to see how good
i have _alex (at) some.where (dot) gr become during the last 34j (at) php (dot) net
year in php progr@mming
It looks fine to me... if any of you test it and find any bugs please msg me!!
altexis
01-21-2003, 08:35 AM
damn!!... vBulleting got mixed up again with its own tags
what are the escape characters for vBulletin's tags?
I hope there are escape characters... so that I can post you the proper code!
altexis
01-21-2003, 08:40 AM
here you go... read it in the attachment
Weedpacket
01-24-2003, 05:13 AM
It always seems a bit overboard to me to write your own email parser as anything but a personal exercise when there is already a perfectly good RFC822 class in the PEAR that one can call on/hack.
altexis
01-24-2003, 08:45 AM
no... what I just showed you is not an email parser!
it changes something like this:
Hi my problem is blah blah blah....
any help you be much appreciated
please email me at here@somewhere.com
to that:
Hi my problem is blah blah blah....
any help you be much appreciated
please email me at here (at) somewhere (dot) com
If I understood jstarkey's problem correctly... then this is what he was looking for. And it actually works quite good :)
altexis
01-24-2003, 09:19 AM
well, I will add one more comment:
in the attachment I have two functions
replaceEmails does what my previous post says
replaceEmailsIgnoreTags is the same but it leaves the email references intact if they are enclosed in {PHP}{/PHP} tags. That is because someone might use an email as an example in a php script which must stay as it is. This function can also take into account tags other that {PHP}{/PHP}; the only thing needed is to adjust 2 lines of code.
Weedpacket
01-25-2003, 04:43 AM
Okay, but it does contain something that attempts to locate emails - and for that it needs a parser.
Incidentally, it won't work on
$text = <<<EOF
This are a couple of email addresses: address me@here.com and something@example.com.
Something is wrong.
EOF;
altexis
01-25-2003, 10:57 AM
Hey Weedpacket thanks for pointing out this one.
It didn't work with replaceEmails
but it worked good with replaceEmailsIngoreTags
But even with replaceEmailsIngoreTags it throwed out the final "and something@example.com." because emails cannot end in a dot. But since natural language sentences may well end in dots I made an adjustment and it now works good.
I also merged the two functions to avoid maintenance problems. Have a look :)
also, about the parser issue... RFC822 is about parsing the content of emails. thats why I said it is not an email parser. if there is something like I have already done, its also ok... I use to invent the wheel very often :-S
Weedpacket
01-26-2003, 04:50 AM
Have you read RFC0822?
RFC 0822
6. ADDRESS SPECIFICATION .................................. 27
6.1. Syntax ........................................... 27
6.2. Semantics ........................................ 27
6.3. Reserved Address ................................. 33
...including what characters can appear where, which is what I had in mind when I saw what you were checking for. I too would search for @ signs, then grow the address forwards and backwards until invalid characters are hit; then trim off characters that are valid but not when they're on the ends (like trailing '.' characters).
As for the content of the email (as opposed to the headers), all RFC 0822 says about it is that it's "...simply a sequence of lines containing ASCII characters. It is separated from the headers by a null line."
The real problem may well be semantic, though: munging email addresses blindly may turn posts into gibberish (like those in this thread).
ednark
02-21-2003, 11:02 PM
check out rfc 2822 also
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.