Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Padekite ideti koda
Parašė vlc· 2008 Gru. 20 11:12:36
#1
Man reikia sita koda idet i subheader
// Snow Effect Javascript
// copyright 19th November 2004, 20th July 2006 by Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the code in this script (including these
// comments) is used without any alteration
// you can change the number of snow flakes if you like
var num_flakes = 10;
var snowflakes = new Array("snowflake.gif","snowflake1.gif");
// DOM test
var aDOM = 0, ieDOM = 0, nsDOM = 0; var stdDOM = document.getElementById;
if (stdDOM) aDOM = 1; else {ieDOM = document.all; if (ieDOM) aDOM = 1; else {
var nsDOM = ((navigator.appName.indexOf('Netscape') != -1)
&& (parseInt(navigator.appVersion) ==4)); if (nsDOM) aDOM = 1;}}
function findDOM(objectId, wS) {
if (stdDOM) return wS ? document.getElementById(objectId).style:
document.getElementById(objectId);
if (ieDOM) return wS ? document.all[objectId].style: document.all[objectId];
if (nsDOM) return document.layers[objectId];
}
// window size tests
function findLivePageWidth() {return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth :700;}function findLivePageHeight() {return window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null? document.body.clientHeight :500;}
function posX() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset:document.documentElement.scrollLeft? document.documentElement.scrollLeft:document.body.scrollLeft? document.body.scrollLeft:0;}
function posY() {return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;}
// make it snow
var speed = 50;var movw = new Array();var movh = new Array();var move = new Array();var stepw = new Array();var steph = new Array();var posw = new Array();var posh = new Array();var dir = new Array();var winWidth;var winHeight;
function startSnow() {winWidth = findLivePageWidth()-75;winHeight = findLivePageHeight()-50;
for (var i = 0; i < num_flakes; i++){move[i] = 0;movh[i] = 12+ Math.random()*2;movw[i] = 11+ Math.random()*4;posw[i] = Math.random()*(winWidth-35)+12;posh[i] = Math.random()*winHeight; stepw[i] = 0.02 + Math.random()/10;steph[i] = 0.7 + Math.random();dir[i] = (Math.random()>0.5)?1:-1;document.write('<div id="snow'+ i +'" style="position: absolute; z-index: '+ i +'; visibility:hidden; "><img src="'+snowflakes[Math.floor(Math.random()*snowflakes.length)]+ '" border="0"></div>');}setTimeout("moreSnow()", speed);}
function moreSnow() {for (var i = 0; i < num_flakes; i++) {if (posh[i] > winHeight-50) {posw[i] = 10+ Math.random()*(winWidth-movw[i]-30);posh[i] = 0;dir[i]=(Math.random()<0.5)?1:-1;stepw[i] = 0.02 + Math.random()/9;steph[i] = 1.3 + Math.random();} move[i] += stepw[i] *dir[i]; if (Math.abs(move[i]) > 3) {dir[i]=-dir[i]; posh[i]+=Math.abs(movh[i]*move[i]);posw[i]+=movw[i]*move[i]; move[i]=0;} objstyle = findDOM('snow'+i,1); objstyle.left = (posX()+posw[i] + movw[i]*move[i])+'px'; objstyle.top = (posY()+posh[i] + movh[i]*(Math.abs(Math.cos(move[i])+move[i])))+'px';objstyle.visibility = 'visible';} setTimeout("moreSnow()", speed);}
Va subheader.php
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location: index.php"); exit; }
require_once THEME."theme.php";
if ($settings['maintenance'] == "1" && !iADMIN) fallback(BASEDIR."maintenance.php");
if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_lastvisit='".time()."', user_ip='".USER_IP."' WHERE user_id='".$userdata['user_id']."'");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<title>".$settings['sitename']."</title>
<meta http-equiv='Content-Type' content='text/html; charset=".$locale['charset']."'>
<meta name='description' content='".$settings['description']."'>
<meta name='keywords' content='".$settings['keywords']."'>
<link rel='stylesheet' href='".THEME."styles.css' type='text/css'>
<script type='text/javascript' src='".INCLUDES."jscript.js'></script>
</head>
<body bgcolor='$body_bg' text='$body_text'>\n";
render_header("<img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' title='".$settings['sitename']."'>");
?>
Nerasykit,kad buvo paaisnta kaip ideti,bandziau bet man nieko neisejo ;[
Parašė vlc· 2008 Gru. 20 12:12:16
#2
u nejau sunku idet koda? dar zinau kad reikia det tarp <head></head> tagu,bet man meta errora.
Parašė Žmogus· 2008 Gru. 20 12:12:08
#3
Nu sunku įdėti ir ką?
Parašė vlc· 2008 Gru. 20 12:12:53
#4
nu nesuku gi ;D tik idet reik,nu tada paaiskinkit kaip es man niek neisejo :|
Parašė Peacemaker· 2008 Gru. 20 15:12:14
#5
Nežinau, ar tau tai veiks, bet pabandyk pasinaudot echo 'tavo sriptas';
Siūlyčiau dėt po render header.
Parašė MAnjack· 2008 Gru. 20 16:12:09
#6
Šiaip galima ir papraščiau padaryt visa tai.
Parašė vlc· 2008 Gru. 22 16:12:06
#7
kaip paprasciau?
Parašė ex-it· 2008 Gru. 22 16:12:56
#8
MAnjack parašė:
Šiaip galima ir papraščiau padaryt visa tai.
include? ?|
Parašė MAnjack· 2008 Gru. 22 16:12:58
#9
rand() funkcija.
Parašė vlc· 2008 Gru. 22 16:12:11
#10
man cia naujas keiksmazodis ;D
Parašė vlc· 2008 Gru. 22 16:12:40
#12
Gal galetum lbj paaisint?
cia tipo reikia i subheader.php ar nauja faila sukurt idet ta koda ir ta sniega?
Redagavo vlc· 2008 Gru. 22 16:12:42