Codice per inserire un calendario nel forum

« Older   Newer »
 
  Share  
.
  1. ¤°.¸¸Capitan America¸¸.°¤
     
    .

    User deleted


    Amministrazione --> Gestione codice HTML
    Copiate il codice e inseritelo nella parte del forum che preferite

    CODICE
    <!-- Prelevato nel Forum di Supporto di ForumFree.net e ForumCommunity.net -->
    <script type="text/javascript">setCal();
    function getTime(){var now=new Date(); var hour=now.getHours(); var minute=now.getMinutes(); now=null; var ampm=""; if(hour>=12){hour-=12; ampm="PM"} else ampm="AM"; hour=hour==0 ? 12 : hour; if(minute<10) minute="0"+minute; return hour+":"+minute+" "+ampm}
    function leapYear(year){return year % 4==0 ? true : false}
    function getDays(month,year){var x=new Array(31,(leapYear(year) ? 29 : 28),31,30,31,30,31,31,30,31,30,31); return x[month]}
    function getMonthName(month){var y=new Array("Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"); return y[month]}
    function setCal(){var now=new Date(); var year=now.getFullYear(); var month=now.getMonth(); var monthName=getMonthName(month); var date=now.getDate(); now=null; var firstdayInstance=new Date(year,month,1); var firstday=firstdayInstance.getDay(); firstdayInstance=null; var days=getDays(month,year); drawCal(firstday+1, days, date, monthName, year)}

    function drawCal(firstday, lastDate, date, monthName, year) {
    var topHeight=20 // height of the table's top cell
    var border=4 // 3D height of table's border
    var cellspacing=3 // width of table's border
    var topColor="midnightblue" // color of table's top
    var topSize="+1" // size of tables top font
    var colWidth=30 // width of columns in table
    var dayCellHeight=15 // height of cells containing days of the week
    var dayColor="darkblue" // color of font representing week days
    var cellHeight=20 // height of cells representing dates in the calendar
    var todayColor="red" // color specifying today's date in the calendar
    var timeColor="purple" // color of font representing current time
    var text=""
    text+='<table border='+border+' cellspacing='+cellspacing+'>' // table settings
    text+='<th colspan=7 height='+topHeight+'>' // create table top cell
    text+='<font face="verdana" color="'+topColor+'" size='+topSize+'>' // set font for table top
    text+=monthName+' '+year
    text+='</font>' // close table top's font settings
    text+='</th>' // close top cell

    var openCol='<td width='+colWidth+' height='+dayCellHeight+'>'; openCol+='<font face="verdana" color="'+dayColor+'">'; var closeCol='</font>'; var weekDay=new Array("Dom","Lun","Mar","Mer","Gio","Ven","Sab"); text+='<tr align="center" valign="center">'; for(var dayNum=0; dayNum<7; ++dayNum){text+=openCol+weekDay[dayNum]+closeCol} var digit=1; var curCell=1; for(var row=1; row<=Math.ceil((lastDate+firstday-1)/7); ++row){text+='<tr align="right" valign="top">'; for(var col=1; col<=7; ++col){if(digit>lastDate) break; if(curCell<firstday){text+='<td>'; curCell++} else{if(digit==date){text+='<td height='+cellHeight+'>'; text+='<b><font face="verdana" color="'+todayColor+'"></b>'; text+=digit; text+='</font><br>'; text+='<font face="verdana" color="'+timeColor+'" size="2">'; text+='</font>'} else text+='<td HEIGHT='+cellHeight+'><font face="verdana">'+digit+'</font>'; digit++}}} text+='</table>'; document.write(text)}</script>
     
    Top
    .
  2.  
    .
    Avatar

    Group
    Fan
    Posts
    19,183

    Status
    utile..
    SPOILER (click to view)
    io vedo la scritta che và a capo

    Web
     
    Top
    .
  3. PrInCeSs Of MuSiC
     
    .

    User deleted


    grazie :D
     
    Top
    .
  4. LadyGriever™
     
    .

    User deleted


    Molto carino ^_^
     
    Top
    .
  5. serglasser12
     
    .

    User deleted


    Un grazie caloroso per queste guide.
     
    Top
    .
  6. Kà-Pà-Rò-96
     
    .

    User deleted


    serglasser12 non uppare topic che risiedono a più di 3 giorni fa,questo è quasi un mese.
     
    Top
    .
  7.  
    .
    Avatar

    あしたのジョー

    Group
    SuperMod
    Posts
    53,877
    Location
    Pontedera

    Status
    QUOTE (Kà-Pà-Rò-96 @ 22/8/2009, 02:22)
    serglasser12 non uppare topic che risiedono a più di 3 giorni fa,questo è quasi un mese.

    ha ringraziato...stai calmo...
    Web
     
    Top
    .
  8. Kà-Pà-Rò-96
     
    .

    User deleted


    Beh intanto non mi sono scaldato,ho solo detto che sarebbe meglio uppare un topic vecchio,se poi lui (o solo tu....) ha inteso che volevo riprenderlo mi scuso con lui.
    Ecco tutto,non ho detto nulla di forte poi.
     
    Top
    .
  9. <kikkina>
     
    .

    User deleted


    CITAZIONE (Kà-Pà-Rò-96 @ 22/8/2009, 03:33)
    Beh intanto non mi sono scaldato,ho solo detto che sarebbe meglio uppare un topic vecchio,se poi lui (o solo tu....) ha inteso che volevo riprenderlo mi scuso con lui.
    Ecco tutto,non ho detto nulla di forte poi.

    di solito qnd dicono grazie è xkè cercavano la guida,l'hanno trovata,usata e quindi ringraziano
     
    Top
    .
  10. oOMitcWarOo
     
    .

    User deleted


    già utilissimo
     
    Top
    .
  11. LUIGI-97-ITA
     
    .

    User deleted


    grazie mille
     
    Top
    .
  12. AlboXD
     
    .

    User deleted


    si riuscirebbe anche a cambiare colore al calendario?
     
    Top
    .
  13. laion97
     
    .

    User deleted


    grazie mille
     
    Top
    .
  14.  
    .
    Avatar

    Group
    Member
    Posts
    65,579
    Location
    Dal Villaggio Dei Mini Uomini

    Status
    Grazie
     
    Top
    .
  15. Aci1999
     
    .

    User deleted


    Grazie^^^
     
    Top
    .
18 replies since 10/12/2008, 07:47   5956 views
  Share  
.