15.08.2014, 22:24
http://fcsh.pl/sparingpartner.html
Chciałbym wprowadzić:
-Automatyczne usuwanie po jakims czasie wpisów
- Dodanie na strone główna w index
pliki:
oraz
Jak coś takiego zrobić?
Chciałbym wprowadzić:
-Automatyczne usuwanie po jakims czasie wpisów
- Dodanie na strone główna w index
Kod:
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top" style="padding-right: 20px" >
{$inferno_shoutbox}{$mychat}{$mychat}{$forums}
{$boardstats}
</td>
<td valign="top" width="170">
<table border="0" cellspacing="0" cellpadding="4" class="tborder">
<tr>
<tr>
<td class="thead"><strong>FCSH.TV</strong></td>
</tr>
<tr>
</tr>
</table>
<center><iframe width="235" height="205" src="//www.youtube.com/embed/I1QQ1iRGGT4" frameborder="0" allowfullscreen></iframe></center>
................................................
<center><iframe width="235" height="205" src="//www.youtube.com/embed/CRewoJF9_a4?rel=0" frameborder="0" allowfullscreen></iframe></center>
<br />
<table border="0" cellspacing="0" cellpadding="4" class="tborder">
<tr>
{$teamonline}
{$latestthreads}
<table border="0" cellspacing="0" cellpadding="4" class="tborder">
<tr>
<td class="thead"><strong>Podgląd TS3</strong></td>
</tr>
<tr>
</tr>
</table>
<iframe src="http://cache.www.gametracker.com/components/html0/?host=178.217.188.172:9987&bgColor=FFFFFF&fontColor=333333&titleBgColor=FFFFFF&titleColor=000000&borderColor=BBBBBB&linkColor=091858&borderLinkColor=5C5C5C&showMap=0¤tPlayersHeight=160&showCurrPlayers=1&showTopPlayers=0&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="348"></iframe>
<br />
</tr>
</table><br />
</td>
</tr>
</table>
</td>
{$footer}
</body>
</html>
pliki:
Kod:
<html>
<head>
<center>
<title>Wyszukiwarka sparingów</title>
</head>
<body>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
<tr>
<td class="thead" colspan="2">
Wyszukiwarka sparingów
</td>
</tr>
<tr>
<td class="trow2 post_content ">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>jQuery</title>
<style type="text/css">
#daddy-shoutbox {
padding: 5px;
background: #3E5468;
color: white;
width: 600px;
font-family: Arial,Helvetica,sans-serif;
font-size: 11px;
}
.shoutbox-list {
border-bottom: 1px solid #627C98;
padding: 5px;
display: none;
}
#daddy-shoutbox-list {
text-align: left;
margin: 0px auto;
}
#daddy-shoutbox-form {
text-align: left;
}
.shoutbox-list-time {
color: #8DA2B4;
}
.shoutbox-list-nick {
margin-left: 5px;
font-weight: bold;
}
.shoutbox-list-message {
margin-left: 5px;
}
</style>
<script type="text/javascript" src="javascript/jquery.js"></script>
<script type="text/javascript" src="javascript/jquery.form.js"></script>
</head>
<body>
<center>
<div id="daddy-shoutbox">
<div id="daddy-shoutbox-list"></div>
<br />
<form id="daddy-shoutbox-form" action="daddy-shoutbox.php?action=add" method="post">
System: <input type="text" name="nickname" /> Say: <input type="text" name="message" />
<input type="submit" value="Submit" />
<span id="daddy-shoutbox-response"></span>
</form>
</div>
</center>
<script type="text/javascript">
var count = 0;
var files = '';
var lastTime = 0;
function prepare(response) {
var d = new Date();
count++;
d.setTime(response.time*1000);
var mytime = d.getHours()+':'+d.getMinutes()+':'+d.getSeconds();
var string = '<div class="shoutbox-list" id="list-'+count+'">'
+ '<span class="shoutbox-list-time">'+mytime+'</span>'
+ '<span class="shoutbox-list-nick">'+response.nickname+':</span>'
+ '<span class="shoutbox-list-message">'+response.message+'</span>'
+'</div>';
return string;
}
function success(response, status) {
if(status == 'success') {
lastTime = response.time;
$('#daddy-shoutbox-response').html('<img src="'+files+'images/accept.png" />');
$('#daddy-shoutbox-list').append(prepare(response));
$('input[@name=message]').attr('value', '').focus();
$('#list-'+count).fadeIn('slow');
timeoutID = setTimeout(refresh, 3000);
}
}
function validate(formData, jqForm, options) {
for (var i=0; i < formData.length; i++) {
if (!formData[i].value) {
alert('Please fill in all the fields');
$('input[@name='+formData[i].name+']').css('background', 'red');
return false;
}
}
$('#daddy-shoutbox-response').html('<img src="'+files+'images/loader.gif" />');
clearTimeout(timeoutID);
}
function refresh() {
$.getJSON(files+"daddy-shoutbox.php?action=view&time="+lastTime, function(json) {
if(json.length) {
for(i=0; i < json.length; i++) {
$('#daddy-shoutbox-list').append(prepare(json[i]));
$('#list-' + count).fadeIn('slow');
}
var j = i-1;
lastTime = json[j].time;
}
//alert(lastTime);
});
timeoutID = setTimeout(refresh, 3000);
}
// wait for the DOM to be loaded
$(document).ready(function() {
var options = {
dataType: 'json',
beforeSubmit: validate,
success: success
};
$('#daddy-shoutbox-form').ajaxForm(options);
timeoutID = setTimeout(refresh, 100);
});
</script>
</body>
</html>
</td>
</tr>
</table>
{$footer}
</body>
</html>
</center
oraz
Kod:
<?php
define('IN_MYBB', 1);
require "./global.php";
add_breadcrumb("sparingpartner", "sparingparnter.php"); //Tekst w pierwszym cudzysłowie "nazwa nowej podstrony" oznacza tekst wyświetlany w nawigacji, a tekst w drugim cudzysłowie "podstrona.php" oznacza nazwę plik, w którym znajduje się ten kod
eval("\$podstr = \"".$templates->get("sparingpartner")."\";"); // kod "("podstrona")oznacza z jakiego szablonu będzie pobierana treść, Jeżeli Twój szablon nosi nazwę np. regulamin, to kod "("podstrona")" zmień na "("regulamin")"
output_page($podstr);
?>
Jak coś takiego zrobić?