|
Hi
My site in development is using a dynamic system that outputs metatag content and page titles stored in the database for each page, with defaults to catch any situation where no values exist for a particular page.
Now the crunch for me here is that the page is to be aimed at two audiences in particular. International and German speaking.
Currently it is outputing content in english but I need to somehow reliably determine (using ASP3) if the incoming user (or crawler/robot for that instance) is from a german domain so that meta tag content and page titles are in german.
This is especially important (in my situation) for indexing on google.de
Or does it not matter in this instance.
Cheers for any help in this matter.
John
|
|
|
|
|
johncogan wrote:
Currently it is outputing content in english but I need to somehow reliably determine (using ASP3) if the incoming user (or crawler/robot for that instance) is from a german domain so that meta tag content and page titles are in german.
This is especially important (in my situation) for indexing on google.de
Firstly there is no 100% reliable method, some Germans are going to slip through and some non-Germans are going to be tagged as Germans. So make sure you have a "English/German" toggle on the site that people can click.
Ok, if 100% of your traffic is coming from Google.de searches then just do a referrer check. It is available through the ASP Headers.
The other way is to get the IP and then ascertain if it might be of German origin. Have a look at GeoIP right here on CP for this.
Enjoy.
Paul Watson Bluegrass Cape Town, South Africa
Roger Wright wrote:
Using a feather is kinky; using the whole chicken is perverted!
|
|
|
|
|
Cheers for this Paul, on thinking on it, I think trying to seperate the two is going to be difficult so will probably have to translate the site into german at a later date. Now all I need to find is someone who can read/write german :/
Good to see there is a visible SA presence on this site. I am in the UK/London and missing the World Cup
|
|
|
|
|
Look for the "Accept-Language:" HTTP header, and see if it has "de" includes with higher priority than "en"
|
|
|
|
|
Hello guys ...
I am fasing a problem which I am unable to handle. I am using CDONTS object for mailling (since only object support by the server ). I am using HTML fromatting in that mail, when sending mail display on the HOTMAIL it is display good (all HTML formatting is worked) but when i saw this mail in any other mail server like YAHOO and in OUTLOOK box the HTML formatting did not WORK and worse is that the HTML TAGS also displayed in the message.
How can i handle this ... and what i should do ...
Waitting for your urgent reply ....
Thanx in advance
|
|
|
|
|
Ensure that the BodyFormat is set to 0 .
Here is the NewMail Object[^] for reference.
That is the only thing I can think of off-hand. HTH
Wally Atkins Newport News, VA, USA
|
|
|
|
|
Hi Syed Hassan,
Here is the solution.
<br />
<%<br />
dim strMessage myMail<br />
strMessage = "<center>Welcome My Friend</center>"<br />
strMessage = strMessage & "<br><font color=red>How are you?</font>"<br />
Set myMail = Server.CreateObject("CDONTS.NewMail")<br />
myMail.From = "somewhere@anydomain.com"<br />
myMail.To = "somefriend@anyotherdomain.com"<br />
myMail.Subject = "Hello"<br />
myMail.Message = strMessage<br />
myMail.Send<br />
Response.Write("Mail has been sent successfully.")<br />
set myMail = NOTHING<br />
%><br />
Zeeshan Mehmood
|
|
|
|
|
I design website in Dreamweaver MX and want to make a button "Download" so that users can download the file when they need. Please help me what to do.
I have never done it before so thinhking is very difficult. Could you give me the source code of it? (Javascript is OK) .
Any advice or idea appreciated.
Thank you very much in advance.
Thuydinh,
|
|
|
|
|
Thuy Dinh wrote:
I design website in Dreamweaver MX and want to make a button "Download" so that users can download the file when they need. Please help me what to do.
This is another misconception in web dev. I also had it when I first started.
To make a download link, you just use a normal A link. It is then up to the client as to how it is handled. If the link points to an HTML file then the client downloads it and opens it as a "normal" web page. If the link points to a file that the browser does not know how to handle, then it asks you to Save As or Save To or whatever. But it does not open it. That is the only difference when downloading say an HTML file or a Zip.
You can check this idea out by finding a machine that does not have Adobe Acrobat Reader on it, or does not have Microsoft Word. Click a link to one of those docs, you will see it asks to save the file and does not open it in the browser. Because the client does not know how to handle that file.
So you can make a download link like this:
<a href="files/downloadme.zip">Download</a>
Paul Watson Bluegrass Cape Town, South Africa
Roger Wright wrote:
Using a feather is kinky; using the whole chicken is perverted!
|
|
|
|
|
Thank you very much for your kind help me. I'll find what I want now.
Thuydinh,
|
|
|
|
|
|
|
|
Hi Guys,
Want to allow the public to upload jpg files to my webserver.
Does anyone have an ASP file upload component which calls a virus scanner.dll and scan the files as part of the upload process to the webserver? Or scans the files prior to completing the file-upload process? In that way you can send a message back to the web-user that their file contained a virus.
If I use just a normal virus scanner sitting on the server scanning memory, then end users don't get any feedback about the uploaded file. Plus you are left with a virus on your hard drive and hoping that the virus scanner will pick it up on the next scan.
Plus if you are wanting to do something with that file from another automated process and the virus scanner hasn't already killed or cleaned it, then you're in trouble.
Any suggestions??
|
|
|
|
|
Hi Andrew,
You may try this workaround. Normally all antivirus scanners have shell extensions, whereby you can scan from other application and have your application respond to the user depending on particular return value from the AntiVirus software. This way only WinZip works scanning the archives after you configure an antivirus scanner in its configuration.
Here are the steps:
- Use an object to execute the ShellExtension application of the antivirus software passing the file to scan as the argument. You can use http://www.serverobjects.com/ ASPExec too. This is free. For example on ShellExtensions for Antivirus, you may need to check up with the Antivirus Software Help files. For McAfee Viruscan, I think it is C:\Program Files\Common Files\Network Associates\On Demand Scanner\Scan32\scan32.exe. For AVG Antivirus from Grisoft, it is AVGSE.EXE from C:\Program Files\Grisoft\AVG\AVGSE.EXE
- After the file has been scanned, you may check out the return value, which should help you out to find whether the file has been infected or not and then suitably inform the user regarding the same.
Does this solve your doubt?
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Thanks for this, will have a look at.
Andrew
|
|
|
|
|
Hi Guys,
Want to allow the public to upload jpg files to my webserver.
Does anyone have an ASP file upload component which calls a virus scanner.dll and scan the files as part of the upload process to the webserver? Or scans the files prior to completing the file-upload process? In that way you can send a message back to the web-user that their file contained a virus.
If I use just a normal virus scanner sitting on the server scanning memory, then end users don't get any feedback about the uploaded file. Plus you are left with a virus on your hard drive and hoping that the virus scanner will pick it up on the next scan.
Plus if you are wanting to do something with that file from another automated process and the virus scanner hasn't already killed or cleaned it, then you're in trouble.
Any suggestions??
Andrewpe
|
|
|
|
|
I have a class defined like this, in my css file:
.MyTD
{
height:20px;
}
And in the html file, I have:
...
<td class="MyTD">blah blah</td>
...
The problem is, in IE5, the height is "too small", and in IE6 it's OK. On the other hand, if I change the height in the css to 25px, it now looks OK in IE5, but now it is "too tall" in IE6.
What could be the cause of this?
I should mention here that both the PCs have the same dislay setting, same resolution, everything is the same, except the browser. So when I say it should be 25px, shouldn't it be 25px, no less, no more? Why does it look different on both the PCs?
Is there any way to include two different css files for IE5 and IE6? But then how can I be sure that the other browsers are dislaying it correctly? I don't have a lot of them installed, where I can test them. I thought the best thing would be to follow the standard, and this is what I am doing. My css file validates as CSS2 at the w3.org website. But then why this problem?
Any help with this would be much appreciated, and thanks a lot in advance.
Regards,
Rohit Sinha
Character is like a tree, and reputation like its shadow. The shadow is what we think of it; the tree is the real thing. - Abraham Lincoln
The whole world steps aside for the man who knows where he is going. - Anonymous
|
|
|
|
|
Well, IE5 didn't support standards, since they were still under development. This can answer to "why".
And yes, you can use different stylesheets for browsers. If you can do ASP, then just determine the browser and write out appropriate "link" tag. If not, well, try to do the same with javascript, e.g. using document.write()
Oh and don't try to catch ALL browsers. You can't IE5, IE6, Netscape and Opera are enough
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Philip Patrick wrote:
If you can do ASP, then just determine the browser and write out appropriate "link" tag.
Yes, I think I'll have to do it that way. Thanks for the tip.
Regards,
Rohit Sinha
Character is like a tree, and reputation like its shadow. The shadow is what we think of it; the tree is the real thing. - Abraham Lincoln
The whole world steps aside for the man who knows where he is going. - Anonymous
|
|
|
|
|
Rohit Sinha wrote:
The problem is, in IE5, the height is "too small", and in IE6 it's OK. On the other hand, if I change the height in the css to 25px, it now looks OK in IE5, but now it is "too tall" in IE6.
Are you talking about the height of the font, or the height of the table cell (as you have embedded the text in a <td> tag) ?
I recommend to make all experimentations outside <td> tags, to avoid the weaknesses and changes of the browser table rendering algorithm throughout versions.
|
|
|
|
|
.S.Rod. wrote:
Are you talking about the height of the font, or the height of the table cell (as you have embedded the text in a tag) ?
The height of the table cell. I also defined other attributes of the td in the css file, but omitted them here, because I thought there were not relevant. Font weight, font family, borders, padding, etc. Is it possible that IE5 does not recognize, or chooses to ignore, some of these attributes, such as padding, which may be causing it?
Anyway, is there some way of making the browser include a different css file, depending on the browser type? I read somewhere about those "@import" tricks, but it's been a long time and I don't remember what they were, nor can I find the source again.
Of course, if everything fails, I'll detect the browser type in asp as Philip Patrick suggested above, and change it from there, but I want to make it a last resort.
Regards,
Rohit Sinha
Character is like a tree, and reputation like its shadow. The shadow is what we think of it; the tree is the real thing. - Abraham Lincoln
The whole world steps aside for the man who knows where he is going. - Anonymous
|
|
|
|
|
Rohit Sinha wrote:
Is it possible that IE5 does not recognize, or chooses to ignore, some of these attributes, such as padding, which may be causing it?
Yes, these unfortunate things are called bugs, or broken compatibility or even improvements (depending on your point of view). What's unsure is whether they were on purpose or not.
Rohit Sinha wrote:
Anyway, is there some way of making the browser include a different css file, depending on the browser type?
Yes. For instance, in your html header section add this :
<!--CSS_START-->
<SCRIPT SRC="dtuelink.js"></SCRIPT>
<!--CSS_END-->
dtuelink.js :
var ieVer = getIEVersion();
writeCSS(jsPath);
function getIEVersion() {
var verNum = 0
if (navigator.appName == "Microsoft Internet Explorer") {
var sVer = window.navigator.userAgent
var msie = sVer.indexOf ( "MSIE " )
if ( msie > 0 ) {
verNum = parseFloat( sVer.substring ( msie+5, sVer.indexOf ( ";", msie ) ) );
}
}
return verNum;
}
function writeCSS(spath) {
var dtueCSS = "";
var HxLinkPath = "";
var HxLink = "";
if ( ieVer == 4) {
....
}
document.writeln('<LINK REL="stylesheet" HREF="' + HxLinkPath + HxLink + '">');
document.writeln('<LINK REL="stylesheet" HREF="' + spath + dtueCSS + '">');
}
PS : word of wisdom, be sure to know that by adding pixel-fixed CSS styles, you are preventing your audience to resize the text in the browser.
|
|
|
|
|
|
Wow, thanks for the link. Turned out there is a slight discrepancy between IE5 and IE6 in the way they calculate the height and width of elements. IE6 does it the CSS way, while IE5 has got it slightly wrong. Not that it's going to help me get the height OK, except by following S/ Rod.'s advice above, but at least I know what else to watch out for.
Thanks a bunch.
Regards,
Rohit Sinha
Character is like a tree, and reputation like its shadow. The shadow is what we think of it; the tree is the real thing. - Abraham Lincoln
The whole world steps aside for the man who knows where he is going. - Anonymous
|
|
|
|
|