Σελίδες

Translate

English French German Spain Italian Dutch Russian Portuguese Japanese Korean Arabic Chinese Simplified

17.11.12

Widget εμφανισης banner με τυχαία σειρά! - Random Banner Widget


1. Σύνδεση στον λογαριασμό από το blogger.com
2. Πανόπτης > Σχεδίαση > (Στοιχεία Σελίδας) > Προσθήκη gadget > HTML/JavaScript
3. Επικολλείτε εκεί τον παρακάτω κώδικα και κάνετε μετά μερικές τροποποιήσεις σε αυτόν:





<script language="JavaScript">
images = new Array(3);
images[0] = "<a href = 'διευθυνση 1' rel='nofollow' ><img src='διευθυνση-της-φωτο 1' border='0'height='60px' width='468px' ></a>";
images[1] = "<a href = 'διευθυνση 2' rel='nofollow' ><img src='διευθυνση-της-φωτο 2' border='0'height='60px' width='468px' ></a>";
images[2] = "<a href = 'διευθυνση 3' rel='nofollow' ><img src='διευθυνση-της-φωτο 3' border='0'height='60px' width='468px' ></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>

αλλάζετε το διεύθυνση 1 με τον σύνδεσμο στον οποίο θέλετε να οδηγεί το πρώτο banner που θα βάλετε
αλλάζετε το διευθυνση-της-φωτο 1 με τον σύνδεσμο του banner σας, π.χ. http://www.cs.utsa.edu/~wagner/berlin/brand.jpg
μεταβάλλετε το μέγεθος του banner σας, αλλάζοντας τις μεταβλητές στα width και height


προσθέστε κ αλλες φωτογραφίες προσθέτοντας το παρακάτω:


images[0] = "<a href = 'διεύθυνση 1' rel='nofollow' ><img src='διευθυνση-της-φωτο 1' border='0' height='60px' width='468px' ></a>";

εκεί που λέει images[0] αλλάξτε το 0 κάθε φορά βάζοντας 1, 2, 3, κλπ. ανάλογα με το πόσα banner θα βάλετε
και στο τέλος στο new Array(3) , αντί για 3 βάλτε τον αριθμό των banner που βάλατε.


 ******************************





  1. Go To Blogger > Design > Page Elements
  2. Choose HTML/JavaScript Widget
  3. And Paste the following code inside it, 


<div align="center">
<table border="0"  cellpadding="2" cellspacing="6" width="265" bgcolor="#ffffff">
<tbody><tr>
<td><center>
<!--  BANNER#1  -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-1' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-2' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</center></td>
<td><center>
<!--  BANNER#2  -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-1' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-2' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</center></td>
</tr>
<tr>
<td><center>
<!--  BANNER#3  -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-1' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-2' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</center></td>
<td><center>
<!--  BANNER#4  -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-1' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-2' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</td></center>
</tr>
</tbody></table>
<table border="0" bordercolor="#0084ce" cellpadding="2" cellspacing="6" width="265" bgcolor="#ffffff">
<tbody>
      <tr>
       <td><center><a href="URL OF ADVERTISER" rel="nofollow"><img width="265" height="37" border="0" alt="Advertise Now!" src=URL OF BANNER’S IMAGE" /></a></center></td>
      </tr>
    </tbody></table>
</div>

 


MAKE THE FOLLOWING CHANGES:-
1.  Replace URL OF ADVERTISER with the website link of the advertiser
2.  Replace URL OF BANNER’S IMAGE-1  and URL OF BANNER’S IMAGE-2 with the Image links of the Advertiser’s banners
3.  Replace AD DESCRIPTION with some information related to the Ad. The description appears on mouse hover.
4.  If you want to increase the distance between the ad blocks then edit width="265"
Now after making the necessary customization view your blog to see a beautiful 125 by 125 Banner widget that will change Banners on every different page.

Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου