Перейти к содержимому



Как вставить в php файл html5 анимацию?

#1 alexander70

alexander70
  • Пользователь
  • 3 сообщений
  • Репутация: 0
0

Отправлено 20 Апрель 2013 - 10:22

Здравствуйте! Решил заменить flash анимацию на моих сайтах html5 анимацией. Для этого воспользовался сервисом https://www.google.c.../studio/swiffy/ . В результате получился htm файл с анимацией, я закачал его сюда http://disability-pe.../dispeople1.htm . Как правильно вставить этот файл в php файл, чтобы на сайте была анимация?

 

 

  • 0

#2 html-ka

html-ka
  • Пользователь
  • 455 сообщений
  • Репутация: 82

Отправлено 20 Апрель 2013 - 10:32

все зависит от того как устроена твоя страница к которой ты подключаешь нужный тебе на ил, начиная с include и заканчивая file_put_contents
  • 0

#3 alexander70

alexander70
    Topic Starter
  • Пользователь
  • 3 сообщений
  • Репутация: 0

Отправлено 20 Апрель 2013 - 10:46

На сайте шаблон, вставляю в файл header.php шаблона. Ниже привел код этого файла с flash анимацией:

А выглядит на сайте так: http://disability-people.com/

Ниже код файла, куда вставил flash



<?php if(!defined("C_URL")) die('Can`t access file directly!'); ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">

<html dir=<?=C_HTML_DIR?>>

<head>

<title><?=C_TITLE?></title>

<link rel="stylesheet" type="text/css" href="<?=C_URL?>/templates/<?=C_TEMP?>/style.css">

<META name=robots content=all>

<META HTTP-EQUIV="Expires" Content="0">

<meta http-equiv=Content-Type content="text/html; charset=utf-8">

<meta name=Copyright content="<?=C_SNAME?>">

<meta name=Author content="AzDG.com">

<META name=description content="<?=C_DESCRIPTION?>">

<META name=keywords content="<?=C_KEYWORDS?>">

<script>

<!--

function open_win(win_file, win_title) {

window.open(win_file, win_title, 'width=<?=C_WIN_WIDTH?>,height=<?=C_WIN_HEIGHT?>,toolbar=no,scrollbars=yes,location=no,menubar=no,status=no,resizable=yes');

}

-->

</script>

<?if(MyID()) {?>

<script type="text/javascript" src="<?=C_URL?>/templates/<?=C_TEMP?>/user_menu.js"></script>

<style type="text/css" media="screen, projection">

@import "<?=C_URL?>/templates/<?=C_TEMP?>/user_menu.css";

</style>

<?}?>

<?php if(C_DISABLE_RIGHTCLICK_ANYWHERE) DisableRightClick();?>

<?if(IsAccess(C_AJAX) || (IsAccess(C_AJAX_MSGINF) && C_HAVE_MESSAGE && MyID() > 0)) {?>

<script language="JavaScript" src="<?=C_URL?>/classes/Ajax.js"></script>

<script>

function lp(page) {

str = page.split('?');

var r = new Ajax();

r.onreadystatechange = function() {

if (r.readyState == 4) {

if (r.resp) {

document.getElementById('PageContent').innerHTML = r.resp.content;

document.getElementById('social').style.visibility='hidden';

}

}

}

r.caching = true;

r.open(null, '<?=C_URL?>/dl.php?l=<?=LANGUAGE?>', true);

r.send({ check:str[0], params:str[1]});

}

var newmsg = <?=NEWMSG?>;

function SRA() {

var r = new Ajax();

r.onreadystatechange = function() {

if (r.readyState == 4) {

if (r.resp) {

document.getElementById('newmsg').innerHTML = r.resp.newmsg;

document.getElementById('newicon').innerHTML = r.resp.icon;

if(r.resp.num > newmsg) {

<?if(get_info('imsound')){?>

document.getElementById('num').innerHTML = '<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="1" height="1" name="chat" src="<?=C_URL?>/templates/<?=C_TEMP?>/images/chat.swf" bgcolor="#660000" quality="high" swLiveConnect="false" allowScriptAccess="samedomain" loop=false></embed>';

<?}?>


} else document.getElementById('num').innerHTML = '';

newmsg = r.resp.num;

}

}

}

r.open(null, '<?=C_URL?>/dl.php', true);

r.send({ check:'2'});

setTimeout("SRA()",<?=C_MSGINF_SEC*1000?>) ;

}

setTimeout("SRA()",<?=C_MSGINF_SEC*1000?>) ;

</script>

<? } ?>
<?php // hte_compliments ?>
<script type="text/javascript" src="<?=C_URL?>/hte_compliments/jquery.js"></script>
<script type="text/javascript" src="<?=C_URL?>/hte_compliments/compliments.js"></script>
<link rel="stylesheet" href="<?=C_URL?>/hte_compliments/compliments.css"/>
<?php // hte_compliments ?>
</head>

<?php
// hte_compliments
$id_to = intval( $_GET['id'] );
if ( $id_to > 0 ) {
echo '
<script type="text/javascript">
var compliment_from = "' . $id_to . '";';

if ( LANGUAGE != '' ) {
echo 'var hte_lang = "' . LANGUAGE .'";';
} else {
echo 'var hte_lang = ""';
}

echo ';
</script>
';
include_once C_PATH . '/hte_compliments/popup.php';
}
// hte_compliments
?>
<body bgcolor=#BDD3F4 background="http://disability-people.com/templates/default/images/131491-3888x2592.jpg" leftmargin=0 topmargin=0>
<div align="center">
<script type="text/javascript"><!--

google_ad_client = "ca-pub-8912914637318292";

/* Розовый 728 x 90 */

google_ad_slot = "4424066703";

google_ad_width = 728;

google_ad_height = 90;

//-->

</script>
<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>
</div>
<p align="center">
<script type="text/javascript"><!--

google_ad_client = "ca-pub-8912914637318292";

/* 728 x 90 розовые */

google_ad_slot = "0385517244";

google_ad_width = 728;

google_ad_height = 15;

//-->

</script>
<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>
</p>
<form action="http://www.google.com/cse" id="cse-search-box" target="_blank">
<div align="center">
<input type="hidden" name="cx" value="partner-pub-8912914637318292:1187115059" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="95" />
<input type="submit" name="sa" value="&#x041f;&#x043e;&#x0438;&#x0441;&#x043a;" />
</div>
</form>
<div align="center">
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=ru"></script>
<Table border="1" cellspacing="0" cellpadding="0" bordercolor="<?=C_TBCOLOR?>" bgcolor="<?=COLOR2?>">
<tr>
<td width="740" height="94" align=left><table width="100%" border="0">
<tr>
<td width="14%" rowspan="4"><img src="http://disability-people.com/templates/default/images/ani-bird_red.gif" width="130" height="104"></td>
<td width="60%" rowspan="4"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="100">
<param name="movie" value="http://disability-people.com/templates/default/images/dispeople1.swf">
<param name="quality" value="high">
<embed src="http://disability-people.com/templates/default/images/dispeople1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="100"></embed></object></td>

<td width="26%"><a href="http://disability-people.com/games/games.htm" target="_parent"><img src="http://disability-people.com/templates/default/images/bullet_heart.gif" alt="On-line Games" width="19" height="15" border="0"></a>
<a href="http://disability-people.com/games/games.htm" title="On-line Games" target="_parent"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><font color="#6600FF">Games</font></strong></font></a>
</td>
</tr>
<tr>

<td><a href="http://disability-people.com/chat/flashchat.php" target="_blank"><img src="http://disability-people.com/templates/default/images/bullet_heart.gif" alt="Чат" width="19" height="15" border="0"></a>
<a href="http://disability-people.com/chat/flashchat.php" title="???" target="_blank"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><font color="#6600FF">Chat</font></strong></font></a>
</td>
</tr>
<tr>

<td><a href="http://travel-dating.com" target="_blank"><font size="3"><font color="#6600FF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Сайт
знакомств Гармония</font></font></a></td>
</tr>
<tr>

<td><a href="http://monamour-dating.com" target="_blank"><font size="3"><font color="#6600FF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Сайт
знакомств Мон Амур</font></font></a></td>
</tr>
</table></td>
</tr>
</table>
<Table CellSpacing="<?=C_BORDER?>" CellPadding="0" width="<?=C_BWIDTH?>" bgcolor="<?=C_TBCOLOR?>" align=center>
<Tr>
<Td> <Table Border=0 CellSpacing="<?=C_IBORDER?>" CellPadding="1" width="<?=C_BWIDTH?>" class=mes>
<?show_languages()?>
<Tr bgcolor="<?=COLOR2?>">
<Td align="center"> <a href="<?=MAIN_PAGE_LINK?>" class=menu>
<?=MAIN_PAGE?>
<?if(CountUsersPerPage("_OnlineMainIDs")){?>
(
<?=_OnlineMainIDs?>
)
<?}?>
</a> | <a href="<?=REGISTER_LINK?>" class=menu>
<?=REGISTER?>
</a> | <a href="<?=SEARCH_LINK?>" class=menu>
<?=SEARCH?>
<?if(CountUsersPerPage("_OnlineSearchIDs")){?>
(
<?=_OnlineSearchIDs?>
)
<?}?>
</a> |
<?if(C_FORUM) { /* If Forum is enabled - Begin */?>
<a href="<?=FORUM_LINK?>" class="menu">
<?=FORUM?>
<?if(CountUsersPerPage("_OnlineForumIDs")){?>
(
<?=_OnlineForumIDs?>
)
<?}?>
</a> |
<?} /* If Forum is enabled - Begin */?>
<?if(C_ALLOW_CHAT) {/* If Chat Allow - Begin*/?>
<a href="<?=CHAT_LINK?>" class="menu">
<?=CHAT?>
<?if(CountUsersPerPage("_OnlineChatIDs")){?>
(
<?=_OnlineChatIDs?>
)
<?}?>
</a> |
<?} /* If Chat Allow - End*/?>
<a href="<?=BLOGS_LINK?>" class=menu>
<?=BLOGS?>
</a> | <a href="<?=ARTICLES_LINK?>" class=menu>
<?=ARTICLES?>
</a> | <a href="mailto:fromsite@disability-people.com?subject=from site" class=menu>
<?=FAQ?>
<?if(CountUsersPerPage("_OnlineFAQIDs")){?>
(
<?=_OnlineFAQIDs?>
)
<?}?>
</a> | <A CLASS="menu" HREF="<?=SUBSCRIBE_LINK?>">
<?=SUBSCRIPTION?>
<?if(CountUsersPerPage("_OnlineSubscrIDs")){?>
(
<?=_OnlineSubscrIDs?>
)
<?}?>
</A> | <A CLASS="menu" HREF="<?=LINKS_LINK?>">
<?=LINKS?>
<?if(CountUsersPerPage("_OnlineLinksIDs")){?>
(
<?=_OnlineLinksIDs?>
)
<?}?>
</A> | <a href="<?=STATISTICS_LINK?>" class=menu>
<?=STATISTICS?>
<?if(CountUsersPerPage("_OnlineStatIDs")){?>
(
<?=_OnlineStatIDs?>
)
<?}?>
</a> </td>
</tr>
</table></Td>
</Tr>
</table>

<?if(MyID()) {/* If User is Registered - Begin */?>
<div align="center">
<script type="text/javascript"><!--


google_ad_client = "ca-pub-8912914637318292";


/* Розовый 728 x 90 */


google_ad_slot = "4424066703";


google_ad_width = 728;


google_ad_height = 90;


//-->


</script>
<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>
</div>
<p align="center">
<script type="text/javascript"><!--


google_ad_client = "ca-pub-8912914637318292";


/* 728 x 90 розовые */


google_ad_slot = "0385517244";


google_ad_width = 728;


google_ad_height = 15;


//-->


</script>
<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>
</p>
<Table CellSpacing="0" CellPadding="1" width="<?=C_BWIDTH?>" bgcolor="<?=C_TBCOLOR?>" align=center>
<Tr>
<Td> <Table Border=0 CellSpacing="0" CellPadding="2" width="<?=C_BWIDTH?>" class=mes>
<Tr bgcolor="<?=COLOR1?>" class=desc>
<Td colspan=7>
<?=MEMBERS_MENU?>

<p>:
<?=MEMBER_NAME?>
<?if(C_PAYMENT_HISTORY){?>
<a href="<?=PAYMENTS_LINK?>" class=menu>
<?=MEMBER_TYPE?>
</a>
<?} else {?>
<?=MEMBER_TYPE?>
<?}?>
<?if(EXPIRE_DATE != ''){?>
(
<?=EXPIRE_DATE?>
: <B>
<?=PRIVILEGIES_EXPIRE?>
</B>)
<?}?>
<?if(IsAccess(C_POINTS)) {?>
[
<?=POINTS?>
: <b>
<?=POINTS_NUMBER?>
</b>]
<?}?>
<sup><span id=newicon>
<?=NEW_ICON?>
</span><span id=num></span><a href="<?=VIEW_MESSAGES_LINK?>" class=menu><span id=newmsg>
<?=YOU_HAVE_NEW_MESSAGE?>
</span></a></sup></p>

</Td>

</Tr>

<Tr bgcolor="#73AED2" class=desc>

<Td colspan=6 width=95%> <ul id="Menu">

<li id="AB"><a href="#" style="color:#000"><IMG SRC="<?=C_URL?>/templates/<?=C_TEMP?>/images/messages.gif" WIDTH="16" HEIGHT="16" style="border-style: none;vertical-align: middle;padding-bottom: 2px; padding-top: 1px; margin-top: -2px;">

<?=VIEW_MESSAGES?>

</a>

<ul>

<li><a class=link3 href="<?=VIEW_MESSAGES_LINK?>">

<?=VIEW_MESSAGES?>

</a></li>

<li><a class=link3 href="<?=ADDRESS_BOOK_LINK?>">

<?=ADDRESS_BOOK?>

</a></li>

<?if(IsAccess(C_BBS)){?>

<li><a class=link3 href="<?=BBS_LINK?>">

<?=BBS?>

</a></li>

<?}?>

</ul>

</li>

<li id="AB"><a href="#" style="color:#000"><IMG SRC="<?=C_URL?>/templates/<?=C_TEMP?>/images/mydata.gif" WIDTH="16" HEIGHT="16" style="border-style: none;vertical-align: middle;padding-bottom: 2px; padding-top: 1px; margin-top: -2px;">

<?=MY_DATA?>

</a>

<ul>

<li><a class=link3 href="<?=MY_PROFILE_LINK?>">

<?=MY_PROFILE?>

</a></li>

<?if(IsAccess(C_WHO_SEEN_OWN)){?>

<li><a class=link3 href="<?=WHO_SEEN_MY_PROFILE_LINK?>">

<?=WHO_SEEN_MY_PROFILE?>

</a></li>

<?}?>

<li><a class=link3 href="<?=CHANGE_PROFILE_LINK?>">

<?=CHANGE_PROFILE?>

</a></li>

<?if(IsAccess(C_BLOG)) {?>

<li><a class=link3 href="<?=MY_BLOG_LINK?>">

<?=MY_BLOG?>

</a></li>

<?}?>

<?if(IsAccess(C_PP_CREATE)) {?>

<li><a class=link3 href="<?=PRIVATE_PHOTOS_LINK?>">

<?=PRIVATE_PHOTOS?>

</a> </li>

<?}?>

<?if(IsAccess(C_NOTES)) {?>

<li><a class=link3 href="<?=MY_NOTES_LINK?>">

<?=MY_NOTES?>

</a></li>

<?}?>

<?if (C_REMOVE_ALLOW) {?>

<li><a class=link3 href="<?=REMOVE_PROFILE_LINK?>">

<?=REMOVE_PROFILE?>

</a></li>

<?}?>

</ul>

</li>

<li id="AB"><a href="#" style="color:#000"><IMG SRC="<?=C_URL?>/templates/<?=C_TEMP?>/images/search.gif" WIDTH="16" HEIGHT="16" style="border-style: none;vertical-align: middle;padding-bottom: 2px; padding-top: 1px; margin-top: -2px;">

<?=SEARCH?>

</a>

<ul>

<li><a class=link3 href="<?=ALL_USERS_LINK?>">

<?=ALL_USERS?>

</a></li>

<?if(IsAccess(C_PRATE_ACL)) {?>

<li><a class=link3 href="<?=HOT_OR_NOT_LINK?>">

<?=HOT_OR_NOT?>

</a></li>

<?}?>

<li><a class=link3 href="<?=ONLINE_LINK?>">

<?=USERS_ONLINE?>

</a></li>

<li><a class=link3 href="<?=VISITED_PROFILES_LINK?>">

<?=VISITED_PROFILES?>

</a></li>

<li><a class=link3 href="<?=MATCHMAKER_LINK?>">

<?=MATCHMAKER?>

</a></li>

<?if(IsAccess(C_VIEWS_ENABLE)) {?>

<li><a class=link3 href="<?=MYVIEWS_LINK?>">

<?=MYVIEWS?>

</a></li>

<?}?>

</ul>

</li>

<?if(ALLOW_TO_PURCHASE) {/* If Allow to purchase - Begin */?>

<li id="AB"><a href="#" style="color:#000"><IMG SRC="<?=C_URL?>/templates/<?=C_TEMP?>/images/purchase.gif" WIDTH="16" HEIGHT="16" style="border-style: none;vertical-align: middle;padding-bottom: 2px; padding-top: 1px; margin-top: -2px;">

<?=PURCHASE?>

</a>

<ul>

<li><a class=link3 href="<?=PURCHASE_LINK?>">

<?=PURCHASE?>

</a></li>

<li><a class=link3 href="<?=PLANS_LINK?>">

<?=PLANS?>

</a></li>

<?if(C_AFF_ENABLE) {?>

<li><a class=link3 href="<?=AFFILIATE_LINK?>">

<?=AFFILIATE?>

</a></li>

<?}?>

</ul>

</li>

<?}?>

<li id="AB"><a href="#" style="color:#000"><IMG SRC="<?=C_URL?>/templates/<?=C_TEMP?>/images/options.gif" WIDTH="16" HEIGHT="16" style="border-style: none;vertical-align: middle;padding-bottom: 2px; padding-top: 1px; margin-top: -2px;">

<?=OPTIONS?>

</a>

<ul>

<?if(IsAccess(C_OPTIONS)) {?>

<li><a class=link3 href="<?=OPTIONS_LINK?>">

<?=OPTIONS?>

</a></li>

<?}?>

<li><a class=link3 href="<?=CHANGE_PASSWORD_LINK?>">

<?=CHANGE_PASSWORD?>

</a></li>

<li><a class=link3 href="<?=BANLIST_LINK?>">

<?=BANLIST?>

</a></li>

<li><a class=link3 href="<?=MY_FAVORITES_LINK?>">

<?=MY_FAVORITES?>

</a></li>

</ul>

</li>

</ul></Td>

<Td align=right> <div align=right><a href="<?=EXIT_LINK?>"><img src="<?=C_URL?>/templates/<?=C_TEMP?>/images/exit.png" alt="<?=EXIT_FROM?>" width="16" height="16" border="0"></a>

&nbsp;</div></Td>

</Tr>

<?if(NOTICE) {?>

<tr align="center" bgcolor="<?=COLOR1?>">

<td colspan=7>

<?=NOTICE?>

</td>

</tr>

<?}?>

</table></Td>

</Tr>

</table>

<?}/* If User is Registered - End */?><div align=center> <div id="PageContent">

</div>

  • 0

#4 html-ka

html-ka
  • Пользователь
  • 455 сообщений
  • Репутация: 82

Отправлено 20 Апрель 2013 - 10:51

я не совсем понимаю, куда именно ты хочешь вставить? ты можешь тупо вставить содержимое файла с анимацией в нужный тебе файл и будет тебе счастье
  • 0

#5 alexander70

alexander70
    Topic Starter
  • Пользователь
  • 3 сообщений
  • Репутация: 0

Отправлено 20 Апрель 2013 - 11:00

Там есть фрагмент, где я вставил Flash:

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="100">
<param name="movie" value="http://disability-people.com/templates/default/images/dispeople1.swf">
<param name="quality" value="high">
<embed src="http://disability-people.com/templates/default/images/dispeople1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="100"></embed></object></td>

Вместо этого flash хочу вставить этот htm файл
  • 0


Оформление форума – IPBSkins.ru