Javascript-форум (https://javascript.ru/forum/)
-   (X)HTML/CSS (https://javascript.ru/forum/xhtml-html-css/)
-   -   Вписать flash в страницу (https://javascript.ru/forum/xhtml-html-css/73028-vpisat-flash-v-stranicu.html)

3eJleHuY 15.03.2018 10:55



мне надо сделать чтобы вот так игры запускались в шаблоне

3eJleHuY 15.03.2018 10:56

Цитата:

Сообщение от Nexus (Сообщение 480602)
3eJleHuY, (https://site.ru/games/novomatic/inde...game=luckylady) так на странице ничего нет, кроме самой игры...
На странице на скриншоте вы, вероятно, подключаете игру как iframe.
Чтобы уменьшить размеры окна можете добавить ближайшему родителю тега iframe тег "style" со значением "max-width:300px;"
Пример:
<div style="max-width:300px;">
<iframe/>
</div>


мне надо чтобы в шаблоне запускались слоты вот так

Nexus 15.03.2018 11:04

На странице игры найдите тег "object", у этого тега измените значение тега "width" на "100%".

3eJleHuY 15.03.2018 11:09

Цитата:

Сообщение от Nexus (Сообщение 480605)
На странице игры найдите тег "object", у этого тега измените значение тега "width" на "100%".

там стоит 100%

щас игры запускаються вот так в полном екране


а мне надо вот так чтобы

Nexus 15.03.2018 11:13

3eJleHuY, попробуйте обернуть "object" в "<div>".

3eJleHuY 15.03.2018 11:42

Цитата:

Сообщение от Nexus (Сообщение 480607)
3eJleHuY, попробуйте обернуть "object" в "<div>".

не дало результата

3eJleHuY 15.03.2018 11:47

Цитата:

Сообщение от Nexus (Сообщение 480607)
3eJleHuY, попробуйте обернуть "object" в "<div>".

мне надо php код шаблона закинуть чтобы автомат в шаблоне был

вот нашол какой то 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, '&nbsp;');
}
	
//Большие слайды.
$bigSlides = $mLotteries->GetBigSlides();									
$countBigSlides = 0;
	
//Слайд победителей.
$winners = $mWinners->GetWinners();
if(count($winners) > 1)
	array_unshift($winners, end($winners));
  
eval("?>" . $header_nomain_tpl . "<?");
?>

Nexus 15.03.2018 11:58

3eJleHuY, этот скрипт, судя по наименования переменной "header_nomain_tpl ", должен отрисовывать только шапку.
Ваш нужно редактировать представление.
Оно должно быть в папке, на которую ссылается константа "TEMPLATE_DIR".

3eJleHuY 15.03.2018 12:01

Цитата:

Сообщение от Nexus (Сообщение 480610)
3eJleHuY, этот скрипт, судя по наименования переменной "header_nomain_tpl ", должен отрисовывать только шапку.
Ваш нужно редактировать представление.
Оно должно быть в папке, на которую ссылается константа "TEMPLATE_DIR".

у меня header_nomain_tpl и footer_nomain_tpl еще есть

<?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 . "<?");
?>

Nexus 15.03.2018 12:07

3eJleHuY,
Цитата:

Сообщение от Nexus
Ваш нужно редактировать представление.
Оно должно быть в папке, на которую ссылается константа "TEMPLATE_DIR".

Ищите файлы с расширением ".tpl".


Часовой пояс GMT +3, время: 02:40.