Вписать flash в страницу
Здравствуйте! Помогите плиз.
Хочу сделать чтобы игровой автомат был не на весь экран скрин: А вот так чтобы было скрин: |
Ознакомьтесь со страницей:
http://htmlbook.ru/css/width |
Цитата:
|
3eJleHuY, как элемент вставляется на страницу (код интересует)?
|
Цитата:
https://site.ru/games/novomatic/inde...game=luckylady я так понимаю мне в файле https://site.ru/games/novomatic/index.php надо дописать header, footer, и боковые блоки но шаблон в .tpl написать, а там .php |
Цитата:
|
Цитата:
вот ссылка |
3eJleHuY, страница доступна только авторизованным пользователям.
|
Цитата:
пароль - demo |
3eJleHuY, (https://site.ru/games/novomatic/inde...game=luckylady) так на странице ничего нет, кроме самой игры...
На странице на скриншоте вы, вероятно, подключаете игру как iframe. Чтобы уменьшить размеры окна можете добавить ближайшему родителю тега iframe тег "style" со значением "max-width:300px;" Пример: <div style="max-width:300px;"> <iframe/> </div> |
мне надо сделать чтобы вот так игры запускались в шаблоне |
Цитата:
мне надо чтобы в шаблоне запускались слоты вот так |
На странице игры найдите тег "object", у этого тега измените значение тега "width" на "100%".
|
Цитата:
щас игры запускаються вот так в полном екране а мне надо вот так чтобы |
3eJleHuY, попробуйте обернуть "object" в "<div>".
|
Цитата:
|
Цитата:
вот нашол какой то php код страницы главной, можешь исправить чтобы слот был как на скриншоте и походу еще надо будет tpl писать к нему да? <?php if (!defined("CASINOENGINE")) die("Нет доступа!<script>location.href='/';</script>"); require_once ('m/M_Lotteries.php'); require_once ('m/M_Winners.php'); require_once ('m/M_Users.php'); require_once ('m/M_Tools.php'); $mLotteries = M_Lotteries::Instance(); $mWinners = M_Winners::Instance(); $mUsers = M_Users::Instance(); $mTools = M_Tools::Instance(); if (!empty($_SESSION['login'])) $clients_query = $mUsers->GetUserInfoByLogin($_SESSION['login']); $header_nomain_tpl = file_get_contents(TEMPLATE_DIR . "/header_nomain.tpl"); $header_nomain_tpl = str_replace("{language}", $_SESSION['language'], $header_nomain_tpl); if (!empty($_SESSION['login'])){ //Аватар пользователя. $avatar_name = $mUsers->GetUserAvatarName($clients_query['id_avatar']); $avatar_src = "/img/avatars/".$avatar_name; $header_nomain_tpl = str_replace("{cash_wmr}", $clients_query['cash'], $header_nomain_tpl); $header_nomain_tpl = str_replace("{id}", $clients_query['id'], $header_nomain_tpl); $header_nomain_tpl = str_replace("{avatar_src}", $avatar_src, $header_nomain_tpl); $header_nomain_tpl = str_replace("{cash_fun}", $clients_query['cashfun'], $header_nomain_tpl); $header_nomain_tpl = str_replace("{login}", $_SESSION['login'], $header_nomain_tpl); $header_nomain_tpl = str_replace("{cash_partnerka}", $clients_query['cash_ref'], $header_nomain_tpl); } //Джекпот $newJP = $mTools->GetJackpot(true); $arrayJP = str_split ($newJP); $howMuch = 6 - count($arrayJP); for ($i =0; $i < $howMuch; $i++ ){ array_unshift($arrayJP, ' '); } //Большие слайды. $bigSlides = $mLotteries->GetBigSlides(); $countBigSlides = 0; //Слайд победителей. $winners = $mWinners->GetWinners(); if(count($winners) > 1) array_unshift($winners, end($winners)); eval("?>" . $header_nomain_tpl . "<?"); ?> |
3eJleHuY, этот скрипт, судя по наименования переменной "header_nomain_tpl ", должен отрисовывать только шапку.
Ваш нужно редактировать представление. Оно должно быть в папке, на которую ссылается константа "TEMPLATE_DIR". |
Цитата:
<?php if (!defined("CASINOENGINE")) die("Нет доступа!<script>location.href='/';</script>"); require_once ('m/M_Tools.php'); $mTools = M_Tools::Instance(); $siteadress = $mTools->GetSiteAdress(); $footer_nomain_tpl = file_get_contents(TEMPLATE_DIR . "/footer_nomain.tpl"); $footer_nomain_tpl = str_replace("{siteadress}", $siteadress, $footer_nomain_tpl); $footer_nomain_tpl = str_replace("{theme}", "/templates/" . $template . "/" . $_SESSION['language'], $footer_nomain_tpl); $footer_nomain_tpl = str_replace("{language}", $_SESSION['language'], $footer_nomain_tpl); $footer_nomain_tpl = str_replace("{users_online}", $_SESSION['online'], $footer_nomain_tpl); //get template lotteries $lottery_template = get_template($footer_nomain_tpl, "[lotteries_wrapping]", "[/lotteries_wrapping]"); //header $head_lottery_template = get_template($lottery_template, "[lottery_wrapping_top]", "[/lottery_wrapping_top]"); $head_lottery_template = str_replace("[lottery_wrapping_top]", "", $head_lottery_template); $head_lottery_template = str_replace("[/lottery_wrapping_top]", "", $head_lottery_template); //links $links_template = get_template ($lottery_template, "[list_navigation]", "[/list_navigation]"); $links_navigation = ""; if ($count_pages_lotteries > 1){ for ($i = 0; $i < $count_pages_lotteries; $i++){ if ($i == 0) $links_navigation .= str_replace("{special_class}", "marker_link_select", $links_template); else $links_navigation .= str_replace("{special_class}", "marker_link_empty", $links_template); } } $head_lottery_template = str_replace($links_template, $links_navigation, $head_lottery_template); $head_lottery_template = str_replace("[list_navigation]", "", $head_lottery_template); $head_lottery_template = str_replace("[/list_navigation]", "", $head_lottery_template); //loteries block $lottery_block_tempalte = get_template($lottery_template, "[lottery_block]", "[/lottery_block]"); $lottery_block_tempalte = str_replace("[lottery_block]", "", $lottery_block_tempalte); $lottery_block_tempalte = str_replace("[/lottery_block]", "", $lottery_block_tempalte); // Подстановка данных $arrLotteriesModifer = $arr_lotteries; if ($countLotteriesInBlock >= count($arr_lotteries)){ $countEmptyBlocks = $countLotteriesInBlock - count($arr_lotteries); } elseif($countLotteriesInBlock == 1 || $countLotteriesInBlock == 0){ $countEmptyBlocks = 0; } else{ $countEmptyBlocks = $countLotteriesInBlock - (count($arr_lotteries)%$countLotteriesInBlock); } for ($i = 0; $i<$countEmptyBlocks; $i++){ $arrLotteriesModifer [] = array ('id_lottery'=> '', 'img' => "default.jpg", "title" => "Акция отсутствует...", "short_story" => ""); } //Наполнение акциями. $counterDisplayNone = 0; // Счетчик для скрывания акций $counterForLClass = 0; // Счетчик для l_ класса $sringLotteries = ""; // Акции для выдачи $tLotteryblock = ""; // Временная строка $classString = ""; // Допонительные классы foreach ($arrLotteriesModifer as $arrLotteryModifer){ $classString .= " l_".$counterForLClass; if ($counterDisplayNone >= $countLotteriesInBlock) $classString .= " displayNone"; $tLotteryblock = str_replace("{adding_classes}", $classString, $lottery_block_tempalte); $tLotteryblock = str_replace("{lottery_img}", 'img/lotteries/small/'.$arrLotteryModifer['img'], $tLotteryblock); $tLotteryblock = str_replace("{lottery_title}", $arrLotteryModifer['title'], $tLotteryblock); $tLotteryblock = str_replace("{lottery_short_story}", $arrLotteryModifer['short_story'], $tLotteryblock); $tLotteryblock = str_replace("{lottery_link}", "/lottery/".$arrLotteryModifer['id_lottery'], $tLotteryblock); if (empty($arrLotteryModifer['id_lottery'])){ $tLinks = get_template($tLotteryblock, "[link_to_lottery]", "[/link_to_lottery]"); $tLotteryblock = str_replace($tLinks, "", $tLotteryblock); } $tLotteryblock = str_replace("[link_to_lottery]", "", $tLotteryblock); $tLotteryblock = str_replace("[/link_to_lottery]", "", $tLotteryblock); $sringLotteries .= $tLotteryblock; $tLotteryblock = ""; $classString = ""; $counterDisplayNone++; if ((floor($counterDisplayNone / $countLotteriesInBlock)) == ($counterDisplayNone / $countLotteriesInBlock) && $counterDisplayNone != 0){ $counterForLClass++; } } //footer $bottom_lottery_template = get_template($lottery_template, "[lottery_wrapping_bottom]", "[/lottery_wrapping_bottom]"); $bottom_lottery_template = str_replace("[lottery_wrapping_bottom]", "", $bottom_lottery_template); $bottom_lottery_template = str_replace("[/lottery_wrapping_bottom]", "", $bottom_lottery_template); //replace data $footer_nomain_tpl = str_replace ($lottery_template, $head_lottery_template.$sringLotteries.$bottom_lottery_template, $footer_nomain_tpl); $footer_nomain_tpl = str_replace ("[lotteries_wrapping]", "", $footer_nomain_tpl); $footer_nomain_tpl = str_replace ("[/lotteries_wrapping]", "", $footer_nomain_tpl); eval("?>" . $footer_nomain_tpl . "<?"); ?> |
3eJleHuY,
Цитата:
|
Цитата:
<? //Досутп тока скрипту define ( 'CASINOENGINE', true ); //Запускаем сессии session_start(); //Проверяем на вход и сессию include_once('../../engine/core/games/game_secure.php'); $game = $_GET['game']; if ($_SESSION['mode'] == 'fun') { $mode = 'demo';} else { $mode = 'real';} ?> <html> <head> <title>Novomatic (Мультигаминатор) | <?=$game?></title> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" src="pages/swfobject.js"></SCRIPT> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" src="pages/main.js"></SCRIPT> </head> <body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#333333"> <center> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="100%" height="100%" id="loader" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <param name="movie" value="/slots/slotmenu.swf?backurl=/game.php&game=<?=$game?>&min=1&user=real&cur=RUR&denoms=1|2|3|4|5|10|15|20|30|40|50|100&loadpath=/slots/" /> <param name="quality" value="high" /> <param name="bgcolor" value="#000000" /> <embed src="/slots/slotmenu.swf?backurl=/game.php&game=<?=$game?>&min=1&user=real&cur=RUR&denoms=1|2|3|4|5|10|15|20|30|40|50|100&loadpath=/slots/" quality="high" bgcolor="#333333" width="100%" height="100%" name="loader" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /> </object> </center></body></html> |
Так можно ограничить ширину области объекта.
<div style="max-width:150px;"> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="100%" height="100%" id="loader" align="middle" style="background:#F00"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <param name="movie" value="/slots/slotmenu.swf?backurl=/game.php&game=<?=$game?>&min=1&user=real&cur=RUR&denoms=1|2|3|4|5|10|15|20|30|40|50|100&loadpath=/slots/" /> <param name="quality" value="high" /> <param name="bgcolor" value="#000000" /> <embed src="/slots/slotmenu.swf?backurl=/game.php&game=<?=$game?>&min=1&user=real&cur=RUR&denoms=1|2|3|4|5|10|15|20|30|40|50|100&loadpath=/slots/" quality="high" bgcolor="#333333" width="100%" height="100%" name="loader" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /> </object> </div> Однако это нужно делать на странице, на которой присутствует не только игра, но и остальной интерфейс. |
я тебя одно прошу, а ты мне пихаешь совсем другое
мне код надо под tpl переписать который я последний кинул можешь??? |
или хотябы это как в tpl переписать надо скажи
<?=$game?> он в tpl не роботает |
Цитата:
<? //Досутп тока скрипту define ( 'CASINOENGINE', true ); //Запускаем сессии session_start(); //Проверяем на вход и сессию include_once('../../engine/core/games/game_secure.php'); $game = $_GET['game']; if ($_SESSION['mode'] == 'fun') { $mode = 'demo';} else { $mode = 'real';} ?> <html> <head> <title>Novomatic (Мультигаминатор) | <?=$game?></title> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" src="pages/swfobject.js"></SCRIPT> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" src="pages/main.js"></SCRIPT> </head> <body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#333333"> <center> <div style="max-width:150px;"> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="100%" height="100%" id="loader" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <param name="movie" value="/slots/slotmenu.swf?backurl=/game.php&game=<?=$game?>&min=1&user=real&cur=RUR&denoms=1|2|3|4|5|10|15|20|30|40|50|100&loadpath=/slots/" /> <param name="quality" value="high" /> <param name="bgcolor" value="#000000" /> <embed src="/slots/slotmenu.swf?backurl=/game.php&game=<?=$game?>&min=1&user=real&cur=RUR&denoms=1|2|3|4|5|10|15|20|30|40|50|100&loadpath=/slots/" quality="high" bgcolor="#333333" width="100%" height="100%" name="loader" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /> </object> </div> </center></body></html> |
Часовой пояс GMT +3, время: 17:55. |