Skip to content
WJunction - Webmaster Forum

How to install this module in DLE?

Status
Not open for further replies.
Hi

i have installed similar news module in dle 9.3 but its not working can any dle expert guide me how to activate this module?

1292529361_capture1.jpg

Code:
http://dle-en.com/hacks/773-similar-news-v1.html
 

8 comments

How to install?!
Open:
templates/Default/addnews.tpl

Search:
<td><input type="text" name="title" value="{title}" maxlength="150" class="f_input" /></td>
</tr>


Add
id="title"

and
{include file="engine/modules/f_relates.php"}




Example :
<td><input type="text" name="title" value="{title}" maxlength="150" class="f_input" id="title" /></td>
</tr>
{include file="engine/modules/f_relates.php"}

In
engine folder----->modules folder
create a file
f_relates.php
add this code inside and upload

<?PHP
/*
*/
if(!defined('DATALIFEENGINE'))
{
die("Hacking attempt!");
}

echo "
<SCRIPT LANGUAGE=\"JavaScript\">
function find_relates ( )
{
var ajax = new dle_ajax();

var title = ajax.encodeVAR( document.getElementById('title').value );
var varsString = \"title=\" + title;

ajax.onShow ('');
ajax.requestFile = 'engine/ajax/find_relates.php';
ajax.method = 'POST';
ajax.element = 'related_news';
ajax.sendAJAX(varsString);

return false;

};
</SCRIPT>";
echo <<<HTML
<tr>
<td width="110" height="25" nowrap="nowrap">&nbsp;</td>
<td><input class="bbcodes" type="button" onclick="find_relates(); return false;" value="Find related news" ><span id="related_news"></span></td>
</tr>
HTML;

?>
Done enjoy
 
^^ What was the difference between what the documentation at that site provided? Its same.
The op asked this because this trick doesn't works anymore with DLE 9.4 (or probably 9.3 too

OT:
As wwj said, the dle ajax is used in different manner in DLE 9.4 (or probably 9.3)
One just need to modify the plugin or add dle_ajax library to be used

I fixed this for my website (currently on dle 9.4) i.e. http://www.dl4everything.com/
Just cant access ftp atm. Will post the fix later on today
 
I am also facing this problem. I'd tried the dle_ajax library thing but still in vain.

@Soft
Waiting from your side buddy
 
I am also facing this problem. I'd tried the dle_ajax library thing but still in vain.

@Soft
Waiting from your side buddy

what is the original file of the related news inside dle 10.0 ? i am asking about the php one ... is there a relatednews.php file? if not, what is the relatednews.php file that actually shows the related news?
 
Status
Not open for further replies.

About the author

S
Senior Member · Joined
1,124
Messages
141
Reactions
63
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom