Бар сверху сайта!
Добрый!
Прошу выложить скрипт бара,который находиться на многих сайта вверху.
В баре находиться баннер L2Top и пару строк.
Кто выложит(как чёрный бар так и прозрачный) таму спасибо гарантированно от меня!
<DIV class="reminder" id="reminderDiv">
<TABLE cellpadding="0" cellspacing="0" border="0" width="100"><TBODY>
<TR><TD valign="top" STYLE='padding-left: 7px' nowrap="true"></TD>
<TD valign="top" STYLE='padding-left: 7px' nowrap="true"><DIV align="center">
<a href="http://l2top.ru/?voteme=5223" target="_blank"><img src="http://l2top.ru/catalog/top.php?id=" width="88" height="31" border="0" alt="L2top.ru: Рейтинг-каталог серверов Lineage2"></a></DIV></TD>
<TD valign="top" nowrap="true" align="center">
<font color=red> Хотите помочь серверу? <STRONG>Голосуйте</STRONG> за наш сервер в рейтингах!<BR><STRONG>Ежедневное</STRONG> голосование положительно <STRONG>влияет на онлайн!</STRONG> </TD><BR>
<TD valign="top" STYLE='padding-right: 7px' nowrap="true"><IMG src="icon/close.gif" width="16" height="16" alt="" onclick="document.getElementById('reminderDiv').style.display='none'; document.getElementById('reminderplaceDiv').style.display='none';"> </TD></TR></TABLE></DIV>
Псбику
<?php
/**********************************************************
* Parse XML data into an array structure *
* Usage: array parse_rss ( string data ) *
**********************************************************/
function parse_rss($reg_exp, $xml_data) {
preg_match_all($reg_exp, $xml_data, $temp);
return array(
'count'=>count($temp[0]),
'title'=>$temp[1],
'link'=>$temp[2],
'desc'=>$temp[3]
);
}
/**********************************************************
* Parse Array data into an HTML structure *
* Usage: string parse_rss ( array data ) *
**********************************************************/
function output_rss($pattern, $rss_data) {
for($i=0; $i<$rss_data['count']; $i++) {
$temp .= sprintf($pattern,
$rss_data['link'][$i],
html_entity_decode($rss_data['title'][$i]),
html_entity_decode($rss_data['desc'][$i])
);
}
return $temp;
}
/**********************************************************
* Settings *
**********************************************************/
$url = 'http://example.org/rss.xml';
$reg_exp = '#<item>.*?<title>(.*?)<\/title>.*?';
$reg_exp .='<link>(.*?)<\/link>.*?<description>';
$reg_exp .='(.*?)<\/description>.*?<\/item>#si';
$pattern = '<a href="%s">%s</a><br>%s<hr>';
/**********************************************************
* Main script *
**********************************************************/
if ( $xml_data = file_get_contents($url) ) {
$rss_data = parse_rss($reg_exp, $xml_data);
echo output_rss($pattern, $rss_data);
}
/**********************************************************
* The END *
**********************************************************/
?>
alex12345678, а причем тут топ-бар и xml/rss обработчик?
С головой дружишь? Нет? ![]()
— Ålderdom - ingen glädje..
ПАсибку дайте))
Хм..а почему она внизу сайта находить ?как исправить ?
И во вторых,почему кнопочка закрытия не показываеться ? и как её отодвинуть в конец бара ?
нужно создать айл close.gif и кинуть в папку где используется код, + кидай его лучше в head а не боди))
вот что у меня в index.php
куда мне этот скрипт засунуть,чтобы он находился вверху
/*
<a href="http://l2top.ru/?voteme=5223" target="_blank"><img src="http://l2top.ru/catalog/top.php?id=" width="88" height="31" border="0" alt="L2top.ru: Рейтинг-каталог серверов Lineage2"></a></DIV></TD>
<TD valign="top" nowrap="true" align="center">
<font color=red> Хотите помочь серверу? <STRONG>Голосуйте</STRONG> за наш сервер в рейтингах!<BR><STRONG>Ежедневное</STRONG> голосование положительно <STRONG>влияет на онлайн!</STRONG> </TD><BR>
<TD valign="top" STYLE='padding-right: 7px' nowrap="true"><IMG src="icon/close.gif" width="16" height="16" alt="" onclick="document.getElementById('reminderDiv').style.display='none'; document.getElementById('reminderplaceDiv').style.display='none';"> </TD></TR></TABLE></DIV>
=====================================================
Pазработка -=Corsar=-
-----------------------------------------------------
http://moyweb.moy.su/
-----------------------------------------------------
Copyright (c) 2006,2007 Moy-weB
=====================================================
Данный код защищен авторскими правами
=====================================================
Удаление копирайтов запрещено
-----------------------------------------------------
Назначение: Главная страница
=====================================================
*/
require 'blocks/functions.php';
include("config/config.php");
$skins = array(1 => array('Основной',$skin1),
2 => array('Легкий',$skin2));
if (isset($_GET['k']) || isset($_POST['k'])) {
$k = trim(isset($_POST['k']) ? $_POST['k'] : $_GET['k']);
if (preg_match("/[^a-zA-Z0-9_]/", $k)) {Header();exit;}}
if (isset($_GET['id']) || isset($_POST['id'])) {
$id = trim(isset($_POST['id']) ? $_POST['id'] : $_GET['id']);
if (preg_match("/[^a-zA-Z0-9_]/", $id)) {
Header("Location: index.php?id=start");
exit;
}
} else {
$id = "start";
}
switch ($id):
case 'change_skin':
$skin_name = $_POST["skin"];
setcookie("skin_name", $skin_name, time()+2592000);
quickrefresh('index.php?id=start');
break;
case 'logout':
resetcookies();
quickrefresh('index.php?id=start');
break;
endswitch;
$skin_name = $_COOKIE['skin_name'];
if ($skin_name == '') $skin_name = $skins[1][1];
$skin_name="skins/".$skin_name."/".$skin_name.".php";
if (file_exists($skin_name))
{
include($skin_name);
}
else
{
include ('skins/'.$skin1.'/'.$skin1.'.php');
}
if (!file_exists('skins/'.$skin1.'/'.$skin1.'.php'))
{
echo "<h3>Вы не выбрали основной скин, либо указали неверно его имя.
<br> Исправьте в config/config.php</h3>";
}
?>
нет выше ээтойй строки
<?php
/*
я кинула в хеад... все стало вверху как надо,но фон белый у этой полосы,а мне нужно,чтобы она была прозрачной или чёрной+чтобы кнопочка для закрытия находилась в конце бара,а не сразу после текста...
<DIV class="reminder" id="reminderDiv">
<TABLE cellpadding="0" cellspacing="0" border="0" width="100"><TBODY>
<TR><TD valign="top" STYLE='padding-left: 7px' nowrap="true"></TD>
<TD valign="top" STYLE='padding-left: 7px' nowrap="true"><DIV align="center">
<a href="http://l2top.ru/?voteme=5223" target="_blank"><img src="http://l2top.ru/catalog/top.php?id=" width="88" height="31" border="0" alt="L2top.ru: Рейтинг-каталог серверов Lineage2"></a></DIV></TD>
<TD valign="top" nowrap="true" align="center">
<font color=red> Хотите помочь серверу? <STRONG>Голосуйте</STRONG> за наш сервер в рейтингах!<BR><STRONG>Ежедневное</STRONG> голосование положительно <STRONG>влияет на онлайн!</STRONG> </TD><BR>
<TD valign="top" STYLE='padding-right: 7px' nowrap="true"><IMG src="icon/close.gif" width="16" height="16" alt="" onclick="document.getElementById('reminderDiv').style.display='none'; document.getElementById('reminderplaceDiv').style.display='none';"> </TD></TR></TABLE></DIV>
html>
вот этот
кидай выше хеада в самое начало страницы.
дай свой сайт
<STYLE type="text/css">
.reminder {position: fixed; width: 100%; height: 58px; left: 0; top: 0; background: black; margin: 0; color: #ffffe1; font-family: "Tahoma", arial; font-size: 10px; border-bottom: 1px solid #A7A6AA; z-index: 101;}
* html .reminder {position: absolute;}
.reminder table{width: 100%; border:0; font-size: 13px}
.reminder td{verical-align: middle; border:0;}
.reminder img{border: 0;}
.reminder a{text-decoration: underline;}
.reminderplace {height: 30px;}
* html .reminderplace {height: 14px;}
</STYLE>
<DIV class="reminder" id="reminderDiv">
<TABLE cellpadding="0" cellspacing="0" border="0" width="100%"><TBODY>
<TR><TD valign="top" STYLE='padding-left: 7px' nowrap="true"></TD>
<TD valign="top" STYLE='padding-left: 7px' nowrap="true"><DIV align="center">
<a href="http://l2top.ru/?voteme=5223" target="_blank"><img src="http://l2top.ru/catalog/top.php?id=" width="88" height="31" border="0" alt="L2top.ru: Рейтинг-каталог серверов Lineage2"></a></DIV></TD>
<TD valign="top" nowrap="true" align="center">
<font color=red> Хотите помочь серверу? <STRONG>Голосуйте</STRONG> за наш сервер в рейтингах!<BR><STRONG>Ежедневное</STRONG> голосование положительно <STRONG>влияет на онлайн!</STRONG> </TD><BR>
<TD valign="top" STYLE='padding-right: 7px' nowrap="true"><IMG src="img/close000.png" width="16" height="16" alt="" onclick="document.getElementById('reminderDiv').style.display='none'; document.getElementById('reminderplaceDiv').style.display='none';"> </TD></TR></TABLE></DIV>
вот все.
Пасибку дай)) и не одну)
пасибу дала !
А можно чтобы бар был прозрачным,мне оч нужно !! черный неподходит....
фрост,я жду ответа...
всё спасибо сама разобралась.
Если кому нетрудно,выложите рабочий скрипт л2 топа поощерений,только что бы он работал,прочтите мою просьбу тут-http://la2base.ru/forum/index.php?showtopic=27343
Спасибо!
<DIV class="reminder" id="reminderDiv">
<TABLE cellpadding="0" cellspacing="0" border="0" width="100%"><TBODY>
<TR><TD valign="top" STYLE='padding-left: 7px' nowrap="true"></TD>
<TD valign="top" STYLE='padding-left: 7px' nowrap="true"><DIV align="center">
<a href="http://l2top.ru/?voteme=5223" target="_blank"><img src="http://l2top.ru/catalog/top.php?id=" width="88" height="31" border="0" alt="L2top.ru: Рейтинг-каталог серверов Lineage2"></a></DIV></TD>
<TD valign="top" nowrap="true" align="center">
<font color=red> Хотите помочь серверу? <STRONG>Голосуйте</STRONG> за наш сервер в рейтингах!<BR><STRONG>Ежедневное</STRONG> голосование положительно <STRONG>влияет на онлайн!</STRONG> </TD><BR>
<TD valign="top" STYLE='padding-right: 7px' nowrap="true"><IMG src="img/close000.png" width="16" height="16" alt="" onclick="document.getElementById('reminderDiv').style.display='none'; document.getElementById('reminderplaceDiv').style.display='none';"> </TD></TR></TABLE></DIV>
Вот тебе прозрачно.
— ы
только переименуй и смени разрешение если надо ну и в папку кинь нужную
и пасибку незабудь





