1. Related news in 2 columns

Related news in 2 columns

  |   16
Related news in 2 columns


Installation:-
Edit the file /templates/Your Template/relatednews.tpl,

Delete:-
<li><a href="{link}">{title}</a></li>


Insert:-
{opa}<table><tr><td><a href="{link}"><img alt="{title}" title="{title}" class="relate" src="{image-1}" width=50px height=50px></a></td><td><a href="{link}">{title}</a><br/> {text limit="150"}...</td></tr></table>{opa1}


{opa} and {opa1} - tags for the organization of the required withdrawal of the news. They do not touch, do not remove,
they must be strictly in these locations - the first from the top, the second - from the bottom. Everything else can be changed at your discretion.

Next, open the file engine/modules/show.full.php and find:
while ( $related = $db->get_row() ) {


Insert Above:-
$z = 0;


Same line
while ( $related = $db->get_row() ) {


Insert Below:-
$z++;if($z % 2 == 0) {$tpl2->set( '{opa}', "<td>" );$tpl2->set( '{opa1}', "</td></tr>" );} else {$tpl2->set( '{opa}', "<tr><td>" );$tpl2->set( '{opa1}', "</td>" );}


In the same file, Search for:-
$buffer = $tpl2->result['content'];


replace with:-
$buffer = "<table>".$tpl2->result['content']."</tr></table>";


Installation Completed

Tested on Dle 9.4

For a Live Demo:- Click Here
Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.

Details

+5

Comments 16

jopaulmj
jopaulmj
V.I.P.
Commented By jopaulmj on December 19, 2011 (1:57 pm)
in 9.3 i can't find this line
$buffer = $tpl2->result['content'];
5 26Forum topics : 0Forum replies : 0Forum likes : 0
romeoluv56
Commented By romeoluv56 on December 19, 2011 (4:09 pm)
Quote: jopaulmj
in 9.3 i can't find this line


Compatible with Dle 9.4
jopaulmj
jopaulmj
V.I.P.
Commented By jopaulmj on December 19, 2011 (4:48 pm)
romeoluv56,

Ok
5 26Forum topics : 0Forum replies : 0Forum likes : 0
Keymaster
Keymaster
V.I.P.
Commented By Keymaster on December 20, 2011 (12:01 am)
Didnt work on mine still shows the single line
4 50Forum topics : 13Forum replies : 96Forum likes : 4

The Secret to life is to live life as if there is no tomorrow.
romeoluv56
Commented By romeoluv56 on December 20, 2011 (6:00 am)
Quote: Keymaster
Didnt work on mine still shows the single line

What ver of Dle you are using ? This hack tested on DLE 9.4

in /templates/Your Template/relatednews.tpl
Please delete this line <li><a href="{link}">{title}</a></li> and insert above shown code and save.

in engine/modules/show.full.php, the code will look like this

$z = 0;
while ( $related = $db->get_row() ) {
$z++;
if($z % 2 == 0) {
$tpl2->set( '{opa}', "<td>" );
$tpl2->set( '{opa1}', "</td></tr>" );
} else {
$tpl2->set( '{opa}', "<tr><td>" );
$tpl2->set( '{opa1}', "</td>" );
}
tbenmcp
tbenmcp
DLE TEAM
Commented By tbenmcp on December 20, 2011 (9:45 pm)
seems to be working fine on my test too...

but man, this hack is king of server resources using hahaha...you can see your site cache go up to double size easily...good news is that related news use some cache otherwise... request
20 150Forum topics : 11Forum replies : 248Forum likes : 32

"A True Friend is Someone Who Sees the Pain in Your Eyes while Everyone Else Believes the Smile on Your Face"
Let me Google for you!
Keymaster
Keymaster
V.I.P.
Commented By Keymaster on December 21, 2011 (4:37 am)
yeah I am using 9.4 and its working now but I disabled it because of thr resources it uses but thanks
4 50Forum topics : 13Forum replies : 96Forum likes : 4

The Secret to life is to live life as if there is no tomorrow.
romeoluv56
Commented By romeoluv56 on December 22, 2011 (3:51 am)
Yes, it consume more resources of server... i have installed Auto Clear cache, to clear the cache it self in every 30 minutes
dbrasii
dbrasii
V.I.P.
Commented By dbrasii on January 4, 2012 (3:22 am)
You can use that images as preview.

Change
<td><a href="{link}"><img alt="{title}" title="{title}" class="relate" src="{image-1}" width=50px height=50px></a></td>

To
<td class="highslide-image">
<a href="{image-1}" class="highslide" onclick="return hs.expand(this)">
        <img src="{image-1}"  alt=""
            style=&#
34;width: 107px;height:120px;" />
    </a>
</td>



you may change width and height
1 5Forum topics : 4Forum replies : 28Forum likes : 1
Waqas Ahmad
Commented By Waqas Ahmad on March 15, 2012 (11:29 am)
Is it possible to get the result like this in the image http://img842.imageshack.us/img842/4931/10973528.png
with some hover effects?
1 28Forum topics : 14Forum replies : 67Forum likes : 5
sawanbanna
sawanbanna
DLE TEAM
Commented By sawanbanna on March 15, 2012 (9:41 pm)
Waqas Ahmad,
the hack is for 2 columns...if you only want 1 column, don't use the hack the standard 9.5 already set to one per line...all you need is in relatednews.tpl use something like this
<li><a href="{link}"><img src="{image-1}"  alt="{title}" align="left" /><b>{title}</b><br />{text limit="250"}</a></li>
The rest if effect you can set in CSS..for example:
ul.related li {display:block;border-bottom:1px solid #ccc}
ul.related li:hover {background:#ddd} 
in fullstory.tpl, use related news as
<ul class="related">
	{related-news}
</ul>
This is very simple CSS, you can control image size using css as well or you can specify in image tag...
31 409Forum topics : 23Forum replies : 979Forum likes : 150

« Live as if you were to die tomorrow. Learn as if you were to live forever! »
Waqas Ahmad
Commented By Waqas Ahmad on March 16, 2012 (4:03 pm)
sawanbanna You are the best
It works perfectly
Thank you very much
1 28Forum topics : 14Forum replies : 67Forum likes : 5
deliciosu
deliciosu
Members
Commented By deliciosu on May 28, 2013 (5:42 pm)
i don't anderstant how to install cand you make a movie tutorial ? please
N/A 3Forum topics : 0Forum replies : 0Forum likes : 0

http://www.cinemarx.biz/
noobos
noobos
DLE TEAM
Commented By noobos on May 28, 2013 (9:58 pm)
deliciosu
Try this: http://www.dlestarter.com/tutorials/212-customize-related-top-news.html
16 302Forum topics : 12Forum replies : 1036Forum likes : 170
deliciosu
deliciosu
Members
Commented By deliciosu on May 30, 2013 (5:35 am)
thanks for informations
N/A 3Forum topics : 0Forum replies : 0Forum likes : 0

http://www.cinemarx.biz/
BlaZe
BlaZe
Members
Commented By BlaZe on April 2, 2014 (2:47 pm)
Work on 10.1 ?
N/A 13Forum topics : 40Forum replies : 83Forum likes : 2
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.
DLEStarter Notice!Please note...Every hack and every module will get additional queries from your database and some hacks and some modules may result your server overload, so install only what you "need", remove any hacks and modules from your script when you don't need them, all hacks and modules appears in this website are not guaranteed by DLEStarter Team for your script security and compatibility, please read instruction carefully and use hacks and modules at your own risk...Thank you.