Table in home
Pagina 1 din 2 • Distribuiţi
Pagina 1 din 2 • 1, 2
Re: Table in home
Buna seara,
Sa inteleg ca doriti sa primiti la dvs. pe forum ultimele noutati de pe forumul de suport ?
Sa inteleg ca doriti sa primiti la dvs. pe forum ultimele noutati de pe forumul de suport ?
Re: Table in home
Nu de pe forumul de suport, dar din sectiunea notati din forumul meu.
linkprivat.forumgratuit.ro/f1-anunturi
linkprivat.forumgratuit.ro/f1-anunturi
Re: Table in home
Posteaza link-ul forumului pe care doresti modificarile sau versiunea de pe forum !
Cod:
Cod:
- Cod:
var $ = window.jQuery;
var storage = window.localStorage;
$(function() {
$.get('link forum', function(d) {
var topics = 3;
// other codes
});
});
Re: Table in home
Este un forum pentru staff, prefer sa ramana privat.
Phpbb3
Unde il pun?
Phpbb3
Unde il pun?
Re: Table in home
- Cod:
var $ = window.jQuery,
storage = window.localStorage,
cacheTime = 1000 * 60 * 5,// 5 Hours cache
htmlTopics = "";
function text(xml, selector) {
return $(selector, xml).text();
}
$(function() {
if(storage && storage['news_feed'] && storage['news_feed_exp'] >= +new Date - cacheTime) {
var clone = storage['news_feed'];
$('.paNewsBox .paNewsList').html(clone[0].outerHTML + clone[1].outerHTML + clone[2].outerHTML + clone[3].outerHTML);
} else {
$.get('/feed/?f=4', function(xml) {
var forum_title = text(xml, 'title'),
forum_desc = text(xml, 'description'),
topics = xml.getElementsByTagName('item'),
i = 0,
t = null;
;for(;(t=topics[i++]);) {
var topic_title = text(t, 'title'),
link = text(t, 'link'),
time = text(t, 'pubDate');
var author = t.getElementsByTagName('guid')[0].nextSibling.firstChild.nodeValue;
var htmlTopicsx = '<li><span class="paNewsContent"><a href="'+ link +'">'+ topic_title +'</a></span> <span class="paNewsDate date-and-time">'+ time +'</span></li>';
htmlTopics += htmlTopicsx;
}
var clone = $(htmlTopics).slice(0, 4).clone();
storage['news_feed'] = clone[0].outerHTML + clone[1].outerHTML + clone[2].outerHTML + clone[3].outerHTML;
storage['news_feed_exp'] = +new Date;
$('.paNewsBox .paNewsList').html(clone[0].outerHTML + clone[1].outerHTML + clone[2].outerHTML + clone[3].outerHTML);
});
}
});
Re: Table in home
Salut,
Asa trebuie pus?? nu merge...
- Cod:
<p><div style="position: relative;">
<div class="paNewsTitle">
Annunci
</div>
<div class="paNewsBox" id="feed">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<ul class="paNewsList">
<script>
var $ = window.jQuery,
storage = window.localStorage,
cacheTime = 1000 * 60 * 5,// 5 Hours cache
htmlTopics = "";
function text(xml, selector) {
return $(selector, xml).text();
}
$(function() {
if(storage && storage['news_feed'] && storage['news_feed_exp'] >= +new Date - cacheTime) {
var clone = storage['news_feed'];
$('.paNewsBox .paNewsList').html(clone[0].outerHTML + clone[1].outerHTML + clone[2].outerHTML + clone[3].outerHTML);
} else {
$.get('/feed/?f=1', function(xml) {
var forum_title = text(xml, 'title'),
forum_desc = text(xml, 'description'),
topics = xml.getElementsByTagName('item'),
i = 0,
t = null;
;for(;(t=topics[i++]);) {
var topic_title = text(t, 'title'),
link = text(t, 'link'),
time = text(t, 'pubDate');
var author = t.getElementsByTagName('guid')[0].nextSibling.firstChild.nodeValue;
var htmlTopicsx = '<li><span class="paNewsContent"><a href="'+ link +'">'+ topic_title +'</a></span> <span class="paNewsDate date-and-time">'+ time +'</span></li>';
htmlTopics += htmlTopicsx;
}
var clone = $(htmlTopics).slice(0, 4).clone();
storage['news_feed'] = clone[0].outerHTML + clone[1].outerHTML + clone[2].outerHTML + clone[3].outerHTML;
storage['news_feed_exp'] = +new Date;
$('.paNewsBox .paNewsList').html(clone[0].outerHTML + clone[1].outerHTML + clone[2].outerHTML + clone[3].outerHTML);
});
}
});
</script>
</ul>
</div>
<style>
.paNewsBox {
background-color: #FAFAFA;
border: 1px solid #E4E4E4;
}
.paNewsTitle {
color: #999999;
float: left;
font-family: Bree Serif;
font-size: 19px;
left: -50px;
position: absolute; absolute
text-transform: uppercase;
top: 70px;
transform: rotate(-89deg);
-webkit-transform: rotate(-89deg);
width: 85px;
}
.paNewsList {
list-style: none outside none;
margin: 8px 10px 8px 0;
padding-left: 25px;
}
.paNewsList li {
background-color: #EEEEEE;
border-bottom: 1px solid #FFFFFF;
color: #555555;
font-size: 11px;
padding: 5px 10px;
text-align: justify;
}
.paNewsList li:nth-child(2),.paNewsList li:nth-child(4) {
background-color: #F6F6F6;
}
.paNewsDate {
float: right;
font-style: italic;
margin-left: 21px;
}</style>
Asa trebuie pus?? nu merge...
Re: Table in home
Salut, incearca sa adaugi asa:
Panou > Module > HTML & JAVASCRIPT > Gestiunea codurilor javascript > Creati un nou cod JavaScript
Panou > Module > HTML & JAVASCRIPT > Gestiunea codurilor javascript > Creati un nou cod JavaScript
- Titlu: Feed News
- Amplasare: Index
- Cod:
- Cod:
var $ = window.jQuery,
storage = window.localStorage,
cacheTime = 1000 * 60 * 5,// 5 Hours cache
htmlTopics = "";
function text(xml, selector) {
return $(selector, xml).text();
}
$(function() {
if(storage && storage['news_feed'] && storage['news_feed_exp'] >= +new Date - cacheTime) {
var clone = $(storage['news_feed']).slice(0, 1).clone();
$('.paNewsBox .paNewsList').html(clone[0].outerHTML);
} else {
$.get('/feed/?f=1', function(xml) {
var forum_title = text(xml, 'title'),
forum_desc = text(xml, 'description'),
topics = xml.getElementsByTagName('item'),
i = 0,
t = null;
;for(;(t=topics[i++]);) {
var topic_title = text(t, 'title'),
link = text(t, 'link'),
time = text(t, 'pubDate');
var author = t.getElementsByTagName('guid')[0].nextSibling.firstChild.nodeValue;
var htmlTopicsx = '<li><span class="paNewsContent"><a href="'+ link +'">'+ topic_title +'</a></span> <span class="paNewsDate date-and-time">'+ time +'</span></li>';
htmlTopics += htmlTopicsx;
}
var clone = $(htmlTopics).slice(0, 1).clone();
storage['news_feed'] = clone[0].outerHTML;
storage['news_feed_exp'] = +new Date;
$('.paNewsBox .paNewsList').html(clone[0].outerHTML);
});
}
});
Pagina 1 din 2 • 1, 2
Subiecte similare
» Spațiu .pun table.table td, categoriile forumului
» Anunt pe home
» Chat home
» Home Page
» Problema home
» Anunt pe home
» Chat home
» Home Page
» Problema home
Pagina 1 din 2
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum