1. Hack Top News Rotator and Related News in DLE 9.4

Hack Top News Rotator and Related News in DLE 9.4

  |   13
Hack Top News Rotator and Related News in DLE 9.4

Hack Top News Rotator and Related News in DLE 9.4


Rotator module scrolls through news and Top news or srelated news.

Demo for this Hack

Installation

1- upload the file to a folder with s3Slider.js j4vascripts files in your template

2- open main.tpl and insert the code between the tag HEAD

insert the code:
<script type="text/javascript" src="{THEME}/js/s3Slider.js"></script>


3- At end of any CSS file (engine.css OR style.css) add the following code:

/* Slider Dleblog */
#s3slider {
width: 400px; /* important to be same as image width */
height: 300px; /* important to be same as image height */
left: 100px; /* offset from the left edge */
position: relative; /* important */
overflow: hidden; /* important */}
#s3sliderContent {
width: 400px; /* important to be same as image width or wider */
position: absolute; /* important */
top: 0; /* important */
margin-left: 0; /* important */}
.s3sliderImage {
float: left; /* important */
position: relative; /* important */
display: none; /* important */ }
.s3sliderImage span {
position: absolute; /* important */
left: 0;
font: 12px Verdana, Arial, Helvetica, sans-serif;
padding: 10px 13px;
width: 374px;
background-color: #000;
filter: alpha(opacity=70); /* here you can set the opacity of box with text */
-moz-opacity: 0.7; /* here you can set the opacity of box with text */
-khtml-opacity: 0.7; /* here you can set the opacity of box with text */
opacity: 0.7; /* here you can set the opacity of box with text */
color: #fff;
display: none; /* important */
top: 0;}
.clear {clear: both;}

4- After that before tag /head insert the following code:
<script type="text/javascript">
<!--
$(function() { $('#category_menu')
.accordion({
autoHeight:false,
active:false,
collapsible:true,
navigation:true })
.show();
});
//-->
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#s3slider')
.s3Slider({
timeOut: 4000
});
});
</script>


5- put field in the right place for your template, insert:
<div id="s3slider">
<ul id="s3sliderContent">
{topnews}
<div class="clear s3sliderImage"></div>
</ul>
</div>


where,
{topnews}
will display top news as a slider.
As in the full news can be replaced by
{topnews} or {related-news} 
the slider is already playing like a news template file fullstory.tpl.

6- replace all code in file topnews.tpl, with this code:

<li class="s3sliderImage"><a href="{link}"><img src="{image-1}" width="400px" height="275px" alt="{title}"/> <span>{title}</span></a></li>


If you want to make a slider for related news that respectively replace the entire contents of
File relatednews.tpl and submitted to the above code.

that`s all ^^

Login Required!Only registered users can download files. Please register or Login

For those who use xfield for images, please use this module, but please note that this module will not work with "Related News" module in relatednews.tpl or fullstory.tpl
Login Required!Only registered users can download files. Please register or Login
Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.

Details

+9

Comments 13

drinkordie
drinkordie
Members
Commented By drinkordie on November 29, 2011 (11:52 pm)
I have a problem, - I use custom fields to load covers and I try to add this slider to my template but when I finish all steps covers dosent show ,- is it possible to load covers from xf ?
2 27Forum topics : 13Forum replies : 27Forum likes : 0

My new site - moviearchive.eu
spamhater
spamhater
DLE TEAM
Commented By spamhater on November 30, 2011 (12:00 am)
give me sometime I will customize it with moviepopular module will work good with xfield...
24 386Forum topics : 12Forum replies : 950Forum likes : 130

Love is a symbol of eternity. It wipes out all sense of time, destroying all memory of a beginning and all fear of an end!
Great achievement is usually born of great sacrifice, and is never the result of selfishness...Without continual growth and progress, such words as improvement, achievement, and success have no meaning.
drinkordie
drinkordie
Members
Commented By drinkordie on November 30, 2011 (12:06 am)
Wow SPAMHATER, you are great mate, thanks a lot ! I will wait applause
2 27Forum topics : 13Forum replies : 27Forum likes : 0

My new site - moviearchive.eu
spamhater
spamhater
DLE TEAM
Commented By spamhater on November 30, 2011 (12:15 am)
ok the module is added..sorry I wish I can make it to work with related news but unfortunately can't get it to work...sorry...but it will work with top news...

Let me know if anything else I can help you with...
24 386Forum topics : 12Forum replies : 950Forum likes : 130

Love is a symbol of eternity. It wipes out all sense of time, destroying all memory of a beginning and all fear of an end!
Great achievement is usually born of great sacrifice, and is never the result of selfishness...Without continual growth and progress, such words as improvement, achievement, and success have no meaning.
drinkordie
drinkordie
Members
Commented By drinkordie on November 30, 2011 (1:03 am)
I dont know why but now it dosent show in my sidebar, it shows only in breadcrumbs area laughing but its not good place for this module ... Hmm maybe there is a problem with my template , I dont know ... but thanks for help cvetok
2 27Forum topics : 13Forum replies : 27Forum likes : 0

My new site - moviearchive.eu
spamhater
spamhater
DLE TEAM
Commented By spamhater on November 30, 2011 (2:05 am)
are you sure you use this code:
<div id="s3slider">
<ul id="s3sliderContent">
     {moviepopular}
     <div class="clear s3sliderImage"></div>
    </ul>
</div>


All step must follow instructions given by Gozan posted above, only extra is that add more code for movies popular anything else the same only different on those are "{topnews}" and "{moviepopular}" tag
24 386Forum topics : 12Forum replies : 950Forum likes : 130

Love is a symbol of eternity. It wipes out all sense of time, destroying all memory of a beginning and all fear of an end!
Great achievement is usually born of great sacrifice, and is never the result of selfishness...Without continual growth and progress, such words as improvement, achievement, and success have no meaning.
drinkordie
drinkordie
Members
Commented By drinkordie on November 30, 2011 (2:55 am)
its working, I have problem with css ,- when I add this code from post (css) directly into my theme style.css module was inactive. I changed that css and now it works beer2

Thanks for this very nice ...
2 27Forum topics : 13Forum replies : 27Forum likes : 0

My new site - moviearchive.eu
Gozan
Gozan
V.I.P.
Commented By Gozan on November 30, 2011 (6:09 pm)
w00w SPAMHATER you looks spiderman for me hypnosis
thanks for caring coz i`m not a programmer or designer feel

and sorry for KEYMASTER to take his avatar tongue

i wish DRINKORDIE find his solution ^^
33 132Forum topics : 20Forum replies : 88Forum likes : 7
drinkordie
drinkordie
Members
Commented By drinkordie on December 1, 2011 (8:45 pm)
Gozan I find it few days ago chih but right now I have another qestion ,- is it possible to limit this module to load news from for example one category (by cat id) ?
2 27Forum topics : 13Forum replies : 27Forum likes : 0

My new site - moviearchive.eu
Gozan
Gozan
V.I.P.
Commented By Gozan on December 2, 2011 (6:02 pm)
who put this artice, absolutly not me nini

i put my self in trouble, i must to remove this article ouch

Actually , you embarrass me DRINKORDIE, i`m not a programmer, cry

i translated from another site, i wish i can help u

maybe SPAMHATER has your answer thumbsup

Escape car
33 132Forum topics : 20Forum replies : 88Forum likes : 7
spamhater
spamhater
DLE TEAM
Commented By spamhater on December 2, 2011 (8:15 pm)
the answer is simple...yes and no...

1) No, because this module is not actually module but it's just customize the existing modules which are "Top News" and "Related News", the hack is just customize the regular top news and related news into slide show..nothing else changed and nothing modified in the files and DLE core file

2) Yes, if you have knowledge on php and know how to modify the /engine/topnews.php and /engine/show.full.php

Be extremely caution when you modify this files and code because you are modifying the DLE core system, always makes full file backup before you start it...

For top news open /engine/modules/topnews.php, find:
$db->query( "SELECT id, short_story, title, date, alt_name, category,

try like:
$db->query( "SELECT id, short_story, title, date, alt_name, category ='1,2,3,4',


For related news, this will cause a lot of issue in your related news so I will not advice you to do anything with this module

open /engine/modules/show.full.php and find:
$tpl2->load_template( 'relatednews.tpl' );
           $db->query( "SELECT id, short_story, title, date, category,


However, the module I just customized and I upload above will support both regular images and xfield images, for "Top news" module, so if you want to modify it for category, I strongly advice you to modify it instead of topnews.php

simply open moviepopular.php and find:
$sql = $db->query( "SELECT id, title, date, alt_name, category,

Replace with:
$sql = $db->query( "SELECT id, title, date, alt_name, category='1,2,3,4',

make sure 1,2,3,4 are the categories ID you want to show...

Gozan,
there is no reason to be embarrassed because this is website all about, who knows the answers will answer and help each others...we all know that not everyone here write their own modules and hacks...so we will help what we can...
24 386Forum topics : 12Forum replies : 950Forum likes : 130

Love is a symbol of eternity. It wipes out all sense of time, destroying all memory of a beginning and all fear of an end!
Great achievement is usually born of great sacrifice, and is never the result of selfishness...Without continual growth and progress, such words as improvement, achievement, and success have no meaning.
marius240
marius240
Members
Commented By marius240 on December 2, 2012 (4:24 pm)
any update for 9.7 ?
N/A 3Forum topics : 0Forum replies : 0Forum likes : 0
noobos
noobos
DLE TEAM
Commented By noobos on December 3, 2012 (6:05 pm)
marius240,
I the hack will work with 9.4 to 9.7 versions
16 302Forum topics : 12Forum replies : 1036Forum likes : 170
Information!Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.