First of all, I'm not bashing Flash. I think it's great for multimedia. What I'm bashing is all the Flash designers that label their page, "Flash Intro" or, "Flash Introduction"
Application have splash pages, Web Sites shouldn't. There's a variety of reasons they shouldn't let alone SEO.
So please quit titling your pages, "Flash Intro" Gimme a break already. This practice has gone on far too long. If someone doesn't know what flash intro is, they shouldn't even be on the web.
Tuesday, June 23, 2009
Flash Intro - Gimme A Break.
Posted by
Stephen J. Hill
around
6/23/2009 10:42:00 AM
0
Thoughts by friends or strangers
Hyperlinks to this post
Labels / Tags:
best practices,
flash,
Web Design Tips
Monday, August 18, 2008
Center a Div with CSS
This is a pretty simple CSS tip. Just a quick post to keep my streak going.
.whatever {margin: 0 auto;}
This will center a DIV on the page.
.whatever {margin: 0 auto;}
This will center a DIV on the page.
Posted by
Stephen J. Hill
around
8/18/2008 11:34:00 PM
0
Thoughts by friends or strangers
Hyperlinks to this post
Labels / Tags:
center a div,
CSS
Saturday, August 16, 2008
Filter bad language with Delphi / Pascal...
This has been adapted from a ISAPI web application. The first step is to fill a TStringList with a list of bad words, or even characters that you don't want to save into your database.
I've call my StringList BWSL. After initializing the StringList, and adding the words, loop through and see if any of the words you've added are present.
If they are, redirect, or use other handling depending on the type of application you're writing. My form element on the calling web page is in the variable "Tag"
EXAMPLE:
---------------------------------------------------------------------------------
for I:=0 to BWSL.Count-1 do
if pos (BWSL.Strings[I], LowerCase(tag)) > 0 then begin
Response.SendRedirect(Request.ScriptName+'/BadRequest?Bid=6&Extra=The_Word,_Character,_or_Phrase,_' + BWSL.Strings[I] +'_is_Prohibited.');
Exit;
end;
---------------------------------------------------------------------------------
I've call my StringList BWSL. After initializing the StringList, and adding the words, loop through and see if any of the words you've added are present.
If they are, redirect, or use other handling depending on the type of application you're writing. My form element on the calling web page is in the variable "Tag"
EXAMPLE:
---------------------------------------------------------------------------------
for I:=0 to BWSL.Count-1 do
if pos (BWSL.Strings[I], LowerCase(tag)) > 0 then begin
Response.SendRedirect(Request.ScriptName+'/BadRequest?Bid=6&Extra=The_Word,_Character,_or_Phrase,_' + BWSL.Strings[I] +'_is_Prohibited.');
Exit;
end;
---------------------------------------------------------------------------------
Posted by
Stephen J. Hill
around
8/16/2008 11:58:00 PM
0
Thoughts by friends or strangers
Hyperlinks to this post
Labels / Tags:
delphi code,
delphi tip,
filter bad language
Friday, August 15, 2008
Google Adsense Hickups - Strange Border Behavior

I've been noticing some fairly strange behavior concerning the ads Google serves to some of my websites, including my website design blog. (the blog you're reading)
Periodically, when loading a page I'll notice the border that I usually set to blend with the background appears in another color. That color I think will usually be the text color option. I'm pretty sure that is the text color that the border appears on. When I refresh the page, the border will disappear. Of course the border SHOULD never appear. I've been a little too busy to properly research this matter, but I figure that other people have run into this, and who knows if this could affect earnings as we all know ads that blend are much better at producing click than ads with borders. Perhaps some working is going into the adsense display system right now, and the hiccups are just temporary. I would hate to think that this is and will be happening frequently. As I don';t view my own sites that much, I really can't give a good percentage of page loads versus time the ads have borders.
That's right borders appear, then disappear. This effect doesn't happen all that often but for all the time I've used adsense to monetize my content, I've only noticed this strange behavior for the last three days. If anyone could shed some light or posit some theories about what's happening with the Google ads, borders please post a comment.
Posted by
Stephen J. Hill
around
8/15/2008 01:09:00 PM
0
Thoughts by friends or strangers
Hyperlinks to this post
Labels / Tags:
Borders Appear,
Disappear,
Google Ads,
Google Adsense,
Strange Behavior
Keep an eye open with Netstat Steps to secure your windows web server

For those of you running your own servers, with all the illegal hacking activity, it's a good idea to keep your eyeballs peeled to your open connection with netstat or a similar utility.
It's fairly easy to track an ip address with website services, such as the one here » Ip Look up.
I keep a utility on my desktop that monitors the flow of traffic through my NIC. when this stays lit for extended periods, it mean non-stop traffic. Now sense I'm a website publisher that earns revenue from his websites, you'd normally think that that was a good thing. Of course if you notice twenty or more open pipes from the same IP address, it certainly could indicate trouble. If that IP address is coming from China, then well it's really up in the air.
What to do???
Well for on thing you can take every precaution that you can to secure your server. Now I run a Windows server, so I started off by hardening my machine with what the operating system offers. Closing unused ports, turning off unneeded and dangerous services. You can learn how to do some of this over at Gibson Research.
Second you have to have a firewall. I have a good one, and allow only port 80 traffic inbound.
Third you download IISLOCKDOWN. You can use this to configure IIS to be a ton more secure.
Fourth you can set up IPSEC. For the novice user, IPSEC can be a bit daunting. Don't worry there are plenty of tutorials like this one to get you started. It's well worth all the trouble to set things up to be as bullet proof as you can. This still will not prevent bots, or other people from sending a lot of traffic to your port eighty. So in IPSEC configure a rul that will block users by IP address, and as you find suspicious IP addresses in your logs, or with netstat, block them.
It's every webmaster's responsibility to run as secure a server as they have the power to. Fortunately there are many resources devoted to this topic, it just takes a little time. (And effort!)
Posted by
Stephen J. Hill
around
8/15/2008 01:32:00 AM
0
Thoughts by friends or strangers
Hyperlinks to this post
Labels / Tags:
firewall,
iis security,
iislockdown,
ip address,
netstat,
web server
Thursday, August 14, 2008
Use Crystal Reports in Delphi ISAPI Web Application
Well obviously, you may have tried to use the VCL component, and cashed and burned repeatedly. I took my a long time to properly integrate Crystal reports with an Isapi application through delphi. After literally weeks of research in 2004 I was able to properly utilize almost all of Crystal's functionality inside an ISAPI.
Why am I just now writing about this? Well.. As time rolls on, the technology is still viable. Especially if you have a tone of Crystal reports you'd like your users to be able to download in .Doc or .PDF formats.
Here Goes...
Import the Crystal Reports type library, save it as CRAXDRT_TLB; (into new unit) This would apply to Crystal Reports version 9. Don't forget to add the "cr" in front of the object names!!!
Here's the source code example: Please forgive any poor formatting on my part I wrote an automated .Pas to HTML conversion program, in about ten minutes, and right now it's imperfect. So I will work on that program as I continue to post Delphi Tips. Thanks and enjoy.
PLEASE LEAVE ME A COMMENT IF YOU LIKE!
---------------------------------------------------------------------------------
procedure TWebModule1.WebModule1WaExportReportAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var CrReport : Report;
NewStream : TStream;
TheReportType :CRExportFormatType;
S, TheCType : String;
begin
try
//For Initilization purposes only
TheReportType:= CRAXDRT_TLB.crEFTPortableDocFormat;
//End Initialization
////Use the value of a web page radio button to determine the type of export ////the users desires.
If TheButtonVal='PDF' then begin
TheReportType:= CRAXDRT_TLB.crEFTPortableDocFormat;
TheCType:='application/pdf'
end;
If TheButtonVal='DOC' then begin
TheReportType:= CRAXDRT_TLB.crEFTWordForWindows;
TheCType:='application/doc'
end;
If TheButtonVal='XLS' then begin
TheReportType:= CRAXDRT_TLB.crEFTExcel80;
TheCType:='application/xls'
end;
If TheButtonVal='RTF' then begin
TheReportType:= CRAXDRT_TLB.crEFTExactRichText;
TheCType:='application/rtf'
end;
///You could use the actual report name added to a select element using ///Delphi's ///FindFiles...
CrReport := Application1.OpenReport('DirectoryName\'+TheReportName);
CrReport.DiscardSavedData;
CrReport.EnableParameterPrompting:=False;
CrReport.DisplayProgressDialog:=False;
if TheButtonVal='PDF' then
CrReport.ExportOptions.PDFExportAllPages;
if CrReport.ParameterFields.Count=1 then
CrReport.ParameterFields.Item[1].AddCurrentValue(Code1);
////Depending upon any parameter values the Report uses and how they are //configured, these lines could change.
if CrReport.ParameterFields.Count=2 then begin
CrReport.ParameterFields.Item[1].AddCurrentValue(Code2);
CrReport.ParameterFields.Item[2].AddCurrentValue(Code3);
end;
CrReport.ExportOptions.FormatType :=TheReportType ;
CrReport.ExportOptions.DestinationType :=CRAXDRT_TLB.crEDTDiskFile;
/////Give the created report a destination on disk, and name
CrReport.ExportOptions.DiskFileName :=
CrReport.Export(False);
NewStream:=TFileStream.Create(the name you created above),
fmOpenRead and fmShareDenyWrite);
Response.ContentStream:=NewStream;
//IMPORTANT
Response.ContentType:=TheCType;
Response.SetCustomHeader('content-disposition', 'attachment; filename=YourShortFileName));
Except
Response.SendRedirect('Your Error Handling Page')
end;
end;
---------------------------------------------------------------------------------
Why am I just now writing about this? Well.. As time rolls on, the technology is still viable. Especially if you have a tone of Crystal reports you'd like your users to be able to download in .Doc or .PDF formats.
Here Goes...
Import the Crystal Reports type library, save it as CRAXDRT_TLB; (into new unit) This would apply to Crystal Reports version 9. Don't forget to add the "cr" in front of the object names!!!
Here's the source code example: Please forgive any poor formatting on my part I wrote an automated .Pas to HTML conversion program, in about ten minutes, and right now it's imperfect. So I will work on that program as I continue to post Delphi Tips. Thanks and enjoy.
PLEASE LEAVE ME A COMMENT IF YOU LIKE!
---------------------------------------------------------------------------------
procedure TWebModule1.WebModule1WaExportReportAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var CrReport : Report;
NewStream : TStream;
TheReportType :CRExportFormatType;
S, TheCType : String;
begin
try
//For Initilization purposes only
TheReportType:= CRAXDRT_TLB.crEFTPortableDocFormat;
//End Initialization
////Use the value of a web page radio button to determine the type of export ////the users desires.
If TheButtonVal='PDF' then begin
TheReportType:= CRAXDRT_TLB.crEFTPortableDocFormat;
TheCType:='application/pdf'
end;
If TheButtonVal='DOC' then begin
TheReportType:= CRAXDRT_TLB.crEFTWordForWindows;
TheCType:='application/doc'
end;
If TheButtonVal='XLS' then begin
TheReportType:= CRAXDRT_TLB.crEFTExcel80;
TheCType:='application/xls'
end;
If TheButtonVal='RTF' then begin
TheReportType:= CRAXDRT_TLB.crEFTExactRichText;
TheCType:='application/rtf'
end;
///You could use the actual report name added to a select element using ///Delphi's ///FindFiles...
CrReport := Application1.OpenReport('DirectoryName\'+TheReportName);
CrReport.DiscardSavedData;
CrReport.EnableParameterPrompting:=False;
CrReport.DisplayProgressDialog:=False;
if TheButtonVal='PDF' then
CrReport.ExportOptions.PDFExportAllPages;
if CrReport.ParameterFields.Count=1 then
CrReport.ParameterFields.Item[1].AddCurrentValue(Code1);
////Depending upon any parameter values the Report uses and how they are //configured, these lines could change.
if CrReport.ParameterFields.Count=2 then begin
CrReport.ParameterFields.Item[1].AddCurrentValue(Code2);
CrReport.ParameterFields.Item[2].AddCurrentValue(Code3);
end;
CrReport.ExportOptions.FormatType :=TheReportType ;
CrReport.ExportOptions.DestinationType :=CRAXDRT_TLB.crEDTDiskFile;
/////Give the created report a destination on disk, and name
CrReport.ExportOptions.DiskFileName :=
CrReport.Export(False);
NewStream:=TFileStream.Create(the name you created above),
fmOpenRead and fmShareDenyWrite);
Response.ContentStream:=NewStream;
//IMPORTANT
Response.ContentType:=TheCType;
Response.SetCustomHeader('content-disposition', 'attachment; filename=YourShortFileName));
Except
Response.SendRedirect('Your Error Handling Page')
end;
end;
---------------------------------------------------------------------------------
Posted by
Stephen J. Hill
around
8/14/2008 07:21:00 PM
1 Thoughts by friends or strangers
Hyperlinks to this post
Labels / Tags:
Crystal reports,
delphi code,
Isapi,
WEb application
Great Website Icons - FREE web Graphics

Being a jack of all trades is kinda hard sometimes. I'm not really that good at creating small icon graphics that websites can uses to represent various functionality of their websites.
I'm much better creating backgrounds, Logos, header graphics, tiles, etc... And of course the CSS, and the XHTML, and web application.
Even the site with the best content in the world has to have great website icons.
I am always scouring the Internet for great free graphics I can use on my various websites and in my applications.
The FINE, FINE folks over at FAMFAMFAM have some of the best free icon sets available all for free! Having released freeware myself in a variety of ways, it makes me feel good about the Internet as a whole when people take something that has taken both their time and talent, and made it freely available for anyone to use.
So kudos to you all famfamfam, and thanks for the free icons. Note: These icons come in .png format.
Posted by
Stephen J. Hill
around
8/14/2008 05:05:00 PM
0
Thoughts by friends or strangers
Hyperlinks to this post
Labels / Tags:
famfamfam,
free web graphics,
great website icons
Tuesday, August 12, 2008
How To "Really" Make Application Splash Screen in Delphi
Anybody else think Zarco Gajic is an idget sometimes? No seriously, I AM KIDDING. However, after looking at his how to create a splash screen in Delphi code, I realized to really make a cool splash screen in Delphi... something else would be needed.
This article will accomplish three things.
1. It will provide you code on how to prevent your application from running more than one instance.
2. It will create a splash screen that will show during your applications start up.
3. It will animate into view (fade) the splash screen. This effect although simple really adds "Splash" to your Delphi splash screen.
To Begin »
First those of you who are unfamiliar with how to view the source of your .EXE or Delphi project file simply right click in the Delphi project manager on the .exe and select view source.
That will open up the project source id the IDE editor window. Take a look at how your current source is laid out. It will appear similar to that below. Below is the full source code you will need to create the three effects outlined above.
You'll obviously need to create a new form and name it FrmSplash. Remove it from the available forms section via Projects » Options » Forms.
You'' also need to add "Windows", "Dialogs" & "Forms" if not present in the source's USES clause. Follow the code and it will dress up your Delphi application in a nice way.
-------------------------------------------------------------------------------------
program xyz;
uses
Windows,
Forms,
Dialogs,
MdiUnit in 'MdiUnit.pas' {FrmMain},
{$R *.res}
var
MyProgramNameMutex: Thandle;
I : Integer;
begin
MyProgramNameMutex:=CreateMutex(nil, False, 'MyProgramNameMutex');
if WaitForSingleObject (MyProgramNameMutex, 0) <> Wait_TimeOut then
begin
Application.Initialize;
Application.Title := 'My Program Name';
//Create Splash Screen
with TFrmSplash.Create(nil) do
try
Show;
Update;
// AnimateWindow(Handle, 1000, AW_HIDE Or AW_BLEND); Lame Code that don't work!~
for I := 0 to 255 do begin
AlphaBlendValue := I;
Sleep(10);
Application.ProcessMessages;
end;
Application.CreateForm(TFrmMain, FrmMain);
finally
Free;
end;
Application.Run;
end
else begin
MessageDlg(Application.Title+' is already running!!!', mterror, [mbok], 0);
Application.BringToFront;
Application.RestoreTopMosts;
end;
end.
-------------------------------------------------------------------------------------
Posted by
Stephen J. Hill
around
8/12/2008 06:01:00 PM
0
Thoughts by friends or strangers
Hyperlinks to this post
Labels / Tags:
application development,
coding applications,
cool code,
delphi code,
delphi tip,
splash screen
Making Div Layouts extend all the way to the bottom

Here's a easy way to make divs "seemingly" extend all the way to the bottom of the page, even when the content distribution varies from sidebars. This technique applies to all two or three column CSS layouts. This only applies to fixed width CSS layout designs.
The first thing you want to do if you want to have different colors for your columns, other than the content container it to create a background image that you can apply as the background image for the containing DIV. As long as your CSS is fixed width for all your columns, which quite a lot are, your side columns will extend all the way to the bottom no matter even if one or more of your columns are empty. Make sure you apply "background: transparent;" to the columns and the content div containers.
Simply color in the width of each column in your favorite graphics editor, apply a border in between or even a drop shadow as your in-between borders. I've used this technique a bit and it works great without a bunch of CSS tricks. It is the easiest way to make your content columns to appear even, and using a graphic can often provide a much slicker interface for your site, providing you are subtle with the effect you use.
I hope this web design tip helps someone, as my goal it to help sites look and operate better.
Posted by
Stephen J. Hill
around
8/12/2008 03:48:00 PM
0
Thoughts by friends or strangers
Hyperlinks to this post
Labels / Tags:
Appear Uneven,
Cool CSS design,
CSS,
CSS layout,
Fixed Width,
Three columns,
Two Columns,
Web Design Tips,
XHTML
Bug! Firefox Opens 2 Windows - Firefox Bug Fix Here

Yep the newest version of Firefox (FireFox 3) still opens 2 windows. You can download a registry file from my website that corrects this 2 windows opening problem in the registry. This bug has been in Firefox for like... forever.
I still remains a mystery as to how this bug keeps slipping by the developers of this fine and dandy web browser, but it does. I can't remember where i got the .reg file but I've had it forever. I use it every time I upgrade Firefox, and it clears the problem up at least until Firefox is upgraded and up pop two windows.
This problem it getting a little annoying as in my security conscious mind, it's like???? What the crap why does two windows op up every-time I use the Windows address bar?
If someone could make this two window error open up a phishing site and the legitimate window, and they looked exactly alike, and the url looks identical, then what's the one you close? It it bothersome in that respect for me. I strongly urge that the FireFox team fix this bu with the 2 windows permanently.
Posted by
Stephen J. Hill
around
8/12/2008 01:15:00 AM
0
Thoughts by friends or strangers
Hyperlinks to this post
Labels / Tags:
2 windows,
bug bugzilla,
firefox,
firefox strange behavior,
two window bug
Monday, August 11, 2008
Wikipedia full of spam YUM!

Yep. Wikipedia is full of spam at least on the entry for freight payment service that I started years ago. Apparently users from Data2Logistics added a link inside along with a snippet. Since they provide freight payment service, how is this not SPAM? Tell me again, HOW IS THIS NOT SPAM?
Another reason wikipedia is full of crap. I used to be the webmaster for the Logistics Group, who also provided freight payment services. I didn't add our url to the entry, simply created to ORIGINAL entry, and linked to it from our site. Pretty smart way back in the day like five years ago.
Luckily the Wikipedia entry for freight payment service still comes up BEHIND my website: http://www.freightpayment.net. » BlogSwallow I say!
Posted by
Stephen J. Hill
around
8/11/2008 11:59:00 PM
0
Thoughts by friends or strangers
Hyperlinks to this post
Labels / Tags:
Spam,
Spammer at it again. Widipedia Spam,
Spammers
Subscribe to:
Posts (Atom)