• Page 1 of 1
  • 1
UcozBaze All Scripts And Templates » Scripts and Coding » Other » Ucoz script Last edited on
Ucoz script Last edited on
BAtmanDate: Tuesday, 2011-09-20, 1:59 PM | Message # 1
Group: Member
Messages: 129
3


Description:
This script display the date and the time when an entry was last modified.

Installation:
1. Add the following code into your CSS:
Code
.news_edit {
   background: url(http://uscripts.de/images/news_edit.png) no-repeat left 5px;
   padding: 0px 0px 0px 40px;
   margin: 4px 0px 0px 0px;
   min-height: 52px;
}
.copy { font-size: 8pt }
.quote {
   color: #757575;
   background-color: #FFE2D5;
   border: 1px dotted #F93;
   text-align: justify;
   padding: 5px;
}
Quellcode im neuem Fenster Anzeigen


2. Add the following code after (or just at the top in the global block "Top part of the website")
Code
<script type="text/javascript">
   function convertLD(lastmod){
   var months = ['Jan','Feb','March','April','May','June','July','Aug','Sep','Oct','Nov','Dec'];
   var lmd=[];var d=new Date();if (typeof lastmod=='string' && lastmod.length>5){lastmod=parseInt(lastmod);}if (typeof lastmod=='number' && !isNaN(lastmod)){d.setTime(lastmod*1000);}var cday=d.getDate();if(cday<=9){cday='0'+cday};var cmin=d.getMinutes();if(cmin<=9){cmin='0'+cmin};var csec=d.getSeconds();if(csec<=9){csec='0'+csec};var chour=d.getHours();if(chour<=9){chour='0'+chour};var mon=d.getMonth()+1;if(mon<=9){mon='0'+mon};var month=months[d.getMonth()];var year=d.getFullYear();
   lmd['month'] = month;
   lmd['year'] = year;
   lmd['mon'] = mon;
   lmd['day'] = cday;
   lmd['hour'] = chour;
   lmd['min'] = cmin;
   lmd['sec'] = csec
   lmd['time'] = chour+':'+cmin+':'+csec;
   return (lmd);
   }
</script>
Quellcode im neuem Fenster Anzeigen


3. Now at the following code at the top of the "Appearance of entries" of any module the following code:
Code
<script type="text/javascript">var lmd=convertLD('$LASTMOD$');</script>
Quellcode im neuem Fenster Anzeigen


4. Now at the same template at the following code after $MESSAGE$.
Code
<?if($LASTMOD$ != $TIMESTAMP$)?>
<div class="news_edit">

   <span class="copy"><i>Last edited on</i></span>
   <div class="quote"><script type="text/javascript">document.write(lmd['day']+'.'+lmd['mon']+'.'+lmd['year'])</script> at <script type="text/javascript">document.write(lmd['time'])</script></div>
</div>
<?endif?>
Quellcode im neuem Fenster Anzeigen


5. Now go to Page with entry full text and its comments and add the following code after $MESSAGE$:
Code
<?if($LASTMOD$ != $TIMESTAMP$)?>
<script type="text/javascript">var lmd=convertLD('$LASTMOD$');</script>
<div class="news_edit">

   <span class="copy"><i>Last edited on</i></span>
   <div class="quote"><script type="text/javascript">document.write(lmd['day']+'.'+lmd['mon']+'.'+lmd['year'])</script> at <script type="text/javascript">document.write(lmd['time'])</script></div>
</div>
<?endif?>
Quellcode im neuem Fenster Anzeigen


6. Now the script installation is finished.


 
Message

Description:
This script display the date and the time when an entry was last modified.

Installation:
1. Add the following code into your CSS:
Code
.news_edit {
   background: url(http://uscripts.de/images/news_edit.png) no-repeat left 5px;
   padding: 0px 0px 0px 40px;
   margin: 4px 0px 0px 0px;
   min-height: 52px;
}
.copy { font-size: 8pt }
.quote {
   color: #757575;
   background-color: #FFE2D5;
   border: 1px dotted #F93;
   text-align: justify;
   padding: 5px;
}
Quellcode im neuem Fenster Anzeigen


2. Add the following code after (or just at the top in the global block "Top part of the website")
Code
<script type="text/javascript">
   function convertLD(lastmod){
   var months = ['Jan','Feb','March','April','May','June','July','Aug','Sep','Oct','Nov','Dec'];
   var lmd=[];var d=new Date();if (typeof lastmod=='string' && lastmod.length>5){lastmod=parseInt(lastmod);}if (typeof lastmod=='number' && !isNaN(lastmod)){d.setTime(lastmod*1000);}var cday=d.getDate();if(cday<=9){cday='0'+cday};var cmin=d.getMinutes();if(cmin<=9){cmin='0'+cmin};var csec=d.getSeconds();if(csec<=9){csec='0'+csec};var chour=d.getHours();if(chour<=9){chour='0'+chour};var mon=d.getMonth()+1;if(mon<=9){mon='0'+mon};var month=months[d.getMonth()];var year=d.getFullYear();
   lmd['month'] = month;
   lmd['year'] = year;
   lmd['mon'] = mon;
   lmd['day'] = cday;
   lmd['hour'] = chour;
   lmd['min'] = cmin;
   lmd['sec'] = csec
   lmd['time'] = chour+':'+cmin+':'+csec;
   return (lmd);
   }
</script>
Quellcode im neuem Fenster Anzeigen


3. Now at the following code at the top of the "Appearance of entries" of any module the following code:
Code
<script type="text/javascript">var lmd=convertLD('$LASTMOD$');</script>
Quellcode im neuem Fenster Anzeigen


4. Now at the same template at the following code after $MESSAGE$.
Code
<?if($LASTMOD$ != $TIMESTAMP$)?>
<div class="news_edit">

   <span class="copy"><i>Last edited on</i></span>
   <div class="quote"><script type="text/javascript">document.write(lmd['day']+'.'+lmd['mon']+'.'+lmd['year'])</script> at <script type="text/javascript">document.write(lmd['time'])</script></div>
</div>
<?endif?>
Quellcode im neuem Fenster Anzeigen


5. Now go to Page with entry full text and its comments and add the following code after $MESSAGE$:
Code
<?if($LASTMOD$ != $TIMESTAMP$)?>
<script type="text/javascript">var lmd=convertLD('$LASTMOD$');</script>
<div class="news_edit">

   <span class="copy"><i>Last edited on</i></span>
   <div class="quote"><script type="text/javascript">document.write(lmd['day']+'.'+lmd['mon']+'.'+lmd['year'])</script> at <script type="text/javascript">document.write(lmd['time'])</script></div>
</div>
<?endif?>
Quellcode im neuem Fenster Anzeigen


6. Now the script installation is finished.

Author - BAtman
Date Added - 2011-09-20 в 1:59 PM
UcozBaze All Scripts And Templates » Scripts and Coding » Other » Ucoz script Last edited on
  • Page 1 of 1
  • 1
Search:
                                                               
Statistics Forum
New Posts Popular topic Top Forum Users New User

type list Appearance of entries movie site for uCoz (0)
type list Google preloader on pure CSS ucoz (0)
type list Pre-Loader for a site on pure CSS (Transition) ucoz (0)
type list Script to disable the F12 key and right-click ucoz (0)
type list Animated button for downloading using SVG and Vue UCOZ (0)
type list Top Forum Users ucoz (0)
type list Snow script for your website ucoz (0)
type list Original watch without digits ucoz (0)
type list Bookmark Buttons Generator (0)
type list Automatically add tags for all uCoz modules (6)
type list How to customize the design of the site for mobile version (3)
type list Video player for uCoz (3)
type list Auto Youtube Trailers for Ucoz Movies Web (0)
type list Pranešimai skrti jums yra matomi Tag Board Ucoz skriptas (1)
type list Why can’t I copy large files over 4GB to my USB flash drive (0)
type list Forumo Informatorius (2)
type list Pereiti i kita puslapi forume 1.2.3. Ucoz skriptas (1)

type list Skaiciuojam nuo 1 iki 1000 ! (557)
type list Forum SignatureBar (60)
type list Avatars (22)
type list Juokingos Fotkes :) (19)
type list Kaip pakeisti paveiksla mazas? (19)
type list Mini-Chatas islendantis is sono ucoz (15)
type list Mp3-Tau.do.am (13)
type list Шаблон форума для ucoz For-css (12)
type list Ucoz script - favicon (11)
type list Megsti samp? Ateik cia (10)
type list Button scrolling up ucoz (10)
type list Slider KinoPlius Help to setup :) (10)
type list Apklausa Jūsų Svetainei New ucoz (10)
type list KinoPlius (9)
type list SexMergytes.do.am (9)
type list Money for the forum ucoz (9)
type list 11.17.2011 (9)
type list Puslapis "Atliekami techniniai darbai" Ucoz scriptas (9)
type list User personal Page ucoz (8)
interout
Forum Posts: 1027
Comments: 51
Reputation: 83
Rank:
GoblinaS
Forum Posts: 380
Comments: 15
Reputation: 25
Rank:
Adi
Forum Posts: 179
Comments: 11
Reputation: 23
Rank:
Esquire
Forum Posts: 147
Comments: 8
Reputation: 5
Rank:
BAtman
Forum Posts: 129
Comments: 1
Reputation: 18
Rank:
WaSHkaZ
Forum Posts: 83
Comments: 0
Reputation: 3
Rank:
Skacikas
Forum Posts: 71
Comments: 0
Reputation: 12
Rank:
meskis
Forum Posts: 51
Comments: 0
Reputation: 25
Rank:
Gytenas
Forum Posts: 51
Comments: 0
Reputation: 1
Rank:
vicka
Forum Posts: 50
Comments: 1
Reputation: 4
Rank:
vallmu1337
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
Calean
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
K3nT
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
alinagross009
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
sheekshaggy420
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
Samartinean
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
Азиза_Азизи
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
woscs1-6
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
Matruka
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
ArEzO
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:


Site design by uCozBaze
uCozBaze © 2011-2016