473,320 Members | 2,000 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Javascript Plugin for Webpage

Does anyone know a source to find out more information about how to
setup a javascript plugin similar to Google Adsense? Thanks in
advance!

Google looks like:
<script type="text/javascript"><!--
google_ad_client = "pub-234234234234";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel = "";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "FF9900";
google_color_text = "000000";
google_color_url = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

or Digg:
<script>
digg_url = 'URLOFSTORY';
</script>
<script src="http://digg.com/api/diggthis.js"></script>

Jan 13 '07 #1
1 1131

Greg Scharlemann wrote:
Does anyone know a source to find out more information about how to
setup a javascript plugin similar to Google Adsense? Thanks in
advance!

Google looks like:
<script type="text/javascript"><!--
google_ad_client = "pub-234234234234";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel = "";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "FF9900";
google_color_text = "000000";
google_color_url = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

or Digg:
<script>
digg_url = 'URLOFSTORY';
</script>
<script src="http://digg.com/api/diggthis.js"></script>

It looks like digg is doing the following to show the number of "diggs"
for a story on your website. On my page I would have the following:
<script>
digg_url = 'URLOFSTORY';
</script>
<script src="http://digg.com/api/diggthis.js"></script>

diggthis.js looks like:
(function(){
var u=typeof digg_url=='string'?digg_url:DIGG_URL;
document.write("<iframe
src='http://www.digg.com/api/diggthis.php?u="+
escape(u)+"' height='80' width='52' frameborder='0'
scrolling='no'></iframe>");
})
()

A couple questions:
1. Why the extra paranthesis? Is that an attempt to throw people off?
2. How does this work: var u=typeof
digg_url=='string'?digg_url:DIGG_URL;

Thanks

Jan 17 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Andy | last post by:
Hi, I have a complicated question that I'm hoping someone can help me out with. I have a webpage that contains a plug-in. This plug-in can communicate/pass data with the webpage that contains it...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.