lundi 26 janvier 2015

Accordion menu for DLE English

Accordion menu for DLE English
Accordion menu for DLE is a simple solution to create additional columns on your site. In this menu, you can not add new limited menu options and customize it to suit your taste is not difficult. Hak Dle menu itself is adjusted to the column to the width of your template, and if the rise is not quite exactly you can always set it up in style.
Add to folder menu template in the right place to insert in the template file main.tpl:
{include file="/menu/menu.tpl"}


Download

dimanche 25 janvier 2015

ShortMain 1.0 DLE 10,2-10,4 DLE English

ShortMain 1.0 DLE 10,2-10,4 DLE English
Setting
1) Make SQL query :
ALTER TABLE  `dle_category` ADD  `main_tpl` VARCHAR( 40 ) NOT NULL AFTER  `full_tpl`;
If you have another prefix, change dle on his own.
2) OPEN File engine/modules/show.short.php find and delete :
if( $category_id and $cat_info[$category_id]['short_tpl'] != '' ) $tpl->load_template( $cat_info[$category_id]['short_tpl'] . '.tpl' );
else $tpl->load_template( 'shortstory.tpl' );

if( strpos( $tpl->copy_template, "[xfvalue_" ) !== false OR strpos( $tpl->copy_template, "[xfgiven_" ) !== false ) { $xfound = true; $xfields = xfieldsload();}
else $xfound = false;

if( count( $banners ) AND $config['allow_banner'] AND !$smartphone_detected) {

$news_c = 1;

if( isset( $ban_short ) ) {
for($indx = 0, $max = sizeof( $ban_short['top'] ), $banners_topz = ''; $indx < $max; $indx ++)
if( $ban_short['top'][$indx]['zakr'] ) {
$banners_topz .= $ban_short['top'][$indx]['text'];
unset( $ban_short['top'][$indx] );
}

for($indx = 0, $max = sizeof( $ban_short['cen'] ), $banners_cenz = ''; $indx < $max; $indx ++)
if( $ban_short['cen'][$indx]['zakr'] ) {
$banners_cenz .= $ban_short['cen'][$indx]['text'];
unset( $ban_short['cen'][$indx] );
}

for($indx = 0, $max = sizeof( $ban_short['down'] ), $banners_downz = ''; $indx < $max; $indx ++)
if( $ban_short['down'][$indx]['zakr'] ) {
$banners_downz .= $ban_short['down'][$indx]['text'];
unset( $ban_short['down'][$indx] );
}

$middle = floor( $config['news_number'] / 2 );
$middle_s = floor( ($middle - 1) / 2 );
$middle_e = floor( $middle + (($config['news_number'] - $middle) / 2) + 1 );
}
}
3) OPEN File engine/modules/show.short.php AND SEARCH :
while ( $row = $db->get_row( $sql_result ) ) {
INSERT THE FOLLOWING :
$cat_tpl = explode( ',', $row['category'] );
if($category_id and $cat_info[$category_id]['short_tpl'] != '' ) {
$tpl->load_template( $cat_info[$category_id]['short_tpl'] . '.tpl' );
} elseif( !$category_id and $cat_info[$cat_tpl[0]]['main_tpl'] != '') {
$tpl->load_template( $cat_info[$cat_tpl[0]]['main_tpl'] . '.tpl' );
} else {
$tpl->load_template( 'shortstory.tpl' );
}

if( strpos( $tpl->copy_template, "[xfvalue_" ) !== false OR strpos( $tpl->copy_template, "[xfgiven_" ) !== false ) { $xfound = true; $xfields = xfieldsload();}
else $xfound = false;

if( count( $banners ) AND $config['allow_banner'] AND !$smartphone_detected) {

$news_c = 1;

if( isset( $ban_short ) ) {
for($indx = 0, $max = sizeof( $ban_short['top'] ), $banners_topz = ''; $indx < $max; $indx ++)
if( $ban_short['top'][$indx]['zakr'] ) {
$banners_topz .= $ban_short['top'][$indx]['text'];
unset( $ban_short['top'][$indx] );
}

for($indx = 0, $max = sizeof( $ban_short['cen'] ), $banners_cenz = ''; $indx < $max; $indx ++)
if( $ban_short['cen'][$indx]['zakr'] ) {
$banners_cenz .= $ban_short['cen'][$indx]['text'];
unset( $ban_short['cen'][$indx] );
}

for($indx = 0, $max = sizeof( $ban_short['down'] ), $banners_downz = ''; $indx < $max; $indx ++)
if( $ban_short['down'][$indx]['zakr'] ) {
$banners_downz .= $ban_short['down'][$indx]['text'];
unset( $ban_short['down'][$indx] );
}

$middle = floor( $config['news_number'] / 2 );
$middle_s = floor( ($middle - 1) / 2 );
$middle_e = floor( $middle + (($config['news_number'] - $middle) / 2) + 1 );
}
}
4) OPEN file engine/inc/categories.php AND SEARCH (2 times) :
if ( $_POST['short_tpl'] ) {

$url = @parse_url ( $_POST['short_tpl'] );
$file_path = dirname (clear_url_dir($url['path']));
$tpl_name = pathinfo($url['path']);
$tpl_name = totranslit($tpl_name['basename']);

if ($file_path AND $file_path != ".") $tpl_name = $file_path."/".$tpl_name;

$short_tpl = $tpl_name;

} else $short_tpl = "";
INSERT BELOW (2 times) :
if ( $_POST['main_tpl'] ) {

$url = @parse_url ( $_POST['main_tpl'] );
$file_path = dirname (clear_url_dir($url['path']));
$tpl_name = pathinfo($url['path']);
$tpl_name = totranslit($tpl_name['basename']);

if ($file_path AND $file_path != ".") $tpl_name = $file_path."/".$tpl_name;

$main_tpl = $tpl_name;

} else $main_tpl = "";
5) OPEN file engine/inc/categories.php AND SEARCH
full_tpl='$full_tpl'
Replace with :
full_tpl='$full_tpl', main_tpl='$main_tpl'
6) OPEN file engine/inc/categories.php AND SEARCH :
<div class="form-group">
<label class="control-label col-lg-2">{$lang['cat_f_tpl']}</label>
<div class="col-lg-10">
<input style="width:100%;max-width:200px;" type="text" name="full_tpl">.tpl&nbsp;<span class="help-button" data-rel="popover" data-trigger="hover" data-placement="right" data-content="{$lang['cat_f_tpl_hit']}" >?</span>
</div>
</div>
INSERT THE FOLLOWING :
<div class="form-group">
<label class="control-label col-lg-2">{$lang['cat_m_tpl']}</label>
<div class="col-lg-10">
<input style="width:100%;max-width:200px;" type="text" name="main_tpl">.tpl&nbsp;<span class="help-button" data-rel="popover" data-trigger="hover" data-placement="right" data-content="{$lang[cat_m_tpl_hit]}" >?</span>
</div>
</div>
7) OPEN file engine/inc/categories.php AND SEARCH :
short_tpl, full_tpl
Replace with :
short_tpl, full_tpl, main_tpl
8) OPEN file engine/inc/categories.php AND SEARCH :
'$short_tpl', '$full_tpl'
Replace with :
'$short_tpl', '$full_tpl', '$main_tpl'
9) OPEN file engine/inc/categories.php AND SEARCH :
<div class="form-group">
<label class="control-label col-lg-2">{$lang['cat_f_tpl']}</label>
<div class="col-lg-10">
<input style="width:100%;max-width:200px;" type="text" name="full_tpl" value="{$row['full_tpl']}">.tpl&nbsp;<span class="help-button" data-rel="popover" data-trigger="hover" data-placement="right" data-content="{$lang['cat_f_tpl_hit']}" >?</span>
</div>
</div>
INSERT THE FOLLOWING :
<div class="form-group">
<label class="control-label col-lg-2">{$lang['cat_m_tpl']}</label>
<div class="col-lg-10">
<input style="width:100%;max-width:200px;" type="text" name="main_tpl" value="{$row['main_tpl']}">.tpl&nbsp;<span class="help-button" data-rel="popover" data-trigger="hover" data-placement="right" data-content="{$lang[cat_m_tpl_hit]}" >?</span>
</div>
</div>
10) OPEN file language/English/adminpanel.lng AND SEARCH :
'cat_f_tpl'    =>  "Full news template",
INSERT ABOVE :
'cat_m_tpl'    =>  "Pattern Short News",
'cat_m_tpl_hit' => "In addition to the appointment of a separate template for this category, you can specify only a single template file for display on the main news summary. You can leave this field blank, then it will load the standard template file <b>shortstory.tpl</b>",

All of them! Haq installed. To configure the template admin panel -> Categories. (When editing or adding appears at the bottom of the new field, enter a name in there and tpl file to display on the main news.)
screenshots

Counter Click or Total of Downloads DLE English

Counter Click or Total of Downloads
Counter clicks on the button or number of downloads.

1. At the root of the site to create a folder called click_counter ask her permission to write 777.

2. It create a PHP file with the contents of index.php:
<?PHP
@error_reporting ( E_ALL ^ E_WARNING ^ E_NOTICE );
@ini_set ( 'error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE );
@ini_set ( 'display_errors', true );
@ini_set ( 'html_errors', false );
define ( 'ROOT_DIR', dirname ( __FILE__ ) );

if(!$_GET['href']) die('Undefinded href');
$href = md5($_GET['href']);
$stat = unserialize(file_get_contents(ROOT_DIR."/stats.txt"));
if(!$stat[$href]) $stat[$href] = 0;
if($_GET['type']=='set'){
$stat[$href]++;
file_put_contents(ROOT_DIR. "/stats.txt", serialize($stat), LOCK_EX);
}
echo $stat[$href];
?>

3. We now turn to the template and JS handler. As a trigger for the desired button adds the class name click_count.
For example it was:
<a href="[xfields_download]">Download</a>

And to do so:
<a href="[xfields_download]" class="click_count">Download</a>

4. Staying Connected js, for this purpose, in principle any pattern connected to the JS file, you can insert the following code:
$(function(){
function get_counter(a,b){
$.get(dle_root+'click_counter/index.php',{type:b,href:a.attr('href')},function(d){
a.find('.click_counter').html(d);
});
}
var click_trigger = ".click_count";
$(click_trigger).each(function(){
$(this).append(" <span class='click_counter' title='Click'><img src='/click_counter/loading.gif' alt=''/></span>");
get_counter($(this),'');
});
$('body').on("click",click_trigger,function(){
get_counter($(this),'set');
});
})

Done!
We should also mention - where and how the number itself will appear counter. On the example of the same html code that I quoted above, we get:
<a href="[xfields_download]" class="click_count">Download<span class='click_counter' title='Click'>0</span></a>

You just need to customize the style for the most number of counters.
Well, still, as you can see in the code, as long as the script is not processed as a plug used image /click_counter/loading.gif, you can either fill in your picture download anything at all clear picture of the code to you.

Version DLE: 9.x-10.x
Author: Sander

vendredi 23 janvier 2015

Upgrade Templates from DLE 10.3 to 10.4

Upgrade Templates from DLE 10.3 to 10.4
Changes in patterns DataLife Engine with version 10.3 to 10.4.
List of changes in Templates for DataLife Engine when upgrading to new versions of the script.

Changes to the templates in order of priority from version to version, depending on the version from which you updated. For example, you performed the update script DLE version 10.1 to version 10.4, then in this case you need to make changes in turn, first those who were between 10.1 and 10.2, then the changes that were between versions 10.2 and 10.3, then the differences between versions 10.3 and 10.4, etc.

installation:

1. From the standard pattern in the distribution archive, copy the files /images/like.png, images / ratingplus.png, images / ratingminus.png in the same folder of your template.

2. In a shared folder templates/templates/create a file with the contents rss.tpl:
[shortrss]<item>
<title>{title}</title>
<guid isPermaLink="true">{rsslink}</guid>
<link>{rsslink}</link>
<description>{short-story}</description>
<category>{category}</category>
<dc:creator>{rssauthor}</dc:creator>
<pubDate>{rssdate}</pubDate>
</item>[/shortrss]
[fullrss]<item>
<title>{title}</title>
<guid isPermaLink="true">{rsslink}</guid>
<link>{rsslink}</link>
<description><![CDATA[{short-story}]]></description>
<category><![CDATA[{category}]]></category>
<dc:creator>{rssauthor}</dc:creator>
<pubDate>{rssdate}</pubDate>
</item>[/fullrss]
[yandexrss]<item>
<title>{title}</title>
<link>{rsslink}</link>
<description>{short-story}</description>
<category>{category}</category>{images}
<pubDate>{rssdate}</pubDate>
<yandex:full-text>{full-story}</yandex:full-text>
</item>[/yandexrss]

3. Open the file style/engine.css to the bottom add:
.ratingzero {
color: #6c838e;
}

.ratingtypeplusminus {
padding: 0px 5px;
}

.ratingtypeplus {
color: #6c838e;
padding: 0px 0px 0px 5px;
}

.ratingplus {
color: green;
}

.ratingminus {
color: red;
}

4. Open the file style/styles.css in the bottom add:
.ratebox2 {
float: right;
}

.ratebox3 {
float: right;
}

.ratebox ul, .ratebox ul li {
float: left;
}

.ratebox2 ul, .ratebox2 ul li {
float: left;
}

.ratebox3 ul, .ratebox3 ul li {
float: left;
}

5. Open the file comments.tpl at the right place for you to add support for these rankings:
[rating]
[rating-type-1]<div class="ratebox"><div class="rate">{rating}</div></div>[/rating-type-1]
[rating-type-2]<div class="ratebox2">
<ul class="reset">
<li>[rating-plus]<img src="{THEME}/images/like.png" title="Like" alt="Like" style="width:14px;" />[/rating-plus]</li>
<li>{rating}</li>
</ul></div>[/rating-type-2]
[rating-type-3]<div class="ratebox3">
<ul class="reset">
<li>[rating-minus]<img src="{THEME}/images/ratingminus.png" title="Dislike" alt="Dislike" style="width:14px;" />[/rating-minus]</li>
<li>{rating}</li>
<li>[rating-plus]<img src="{THEME}/images/ratingplus.png" title="Like" alt="Like" style="width:14px;" />[/rating-plus]</li>
</ul>
</div>[/rating-type-3]
[/rating]

6. Open the file fullstory.tpl get it:
[rating]<div class="ratebox"><div class="rate">{rating}</div></div>[/rating]

Replace with:
[rating]
[rating-type-1]<div class="ratebox"><div class="rate">{rating}</div></div>[/rating-type-1]
[rating-type-2]<div class="ratebox2">
<ul class="reset">
<li>[rating-plus]<img src="{THEME}/images/like.png" title="Like" alt="Like" style="width:14px;" />[/rating-plus]</li>
<li>{rating}</li>
</ul></div>[/rating-type-2]
[rating-type-3]<div class="ratebox3">
<ul class="reset">
<li>[rating-minus]<img src="{THEME}/images/ratingminus.png" title="Dislike" alt="Dislike" style="width:14px;" />[/rating-minus]</li>
<li>{rating}</li>
<li>[rating-plus]<img src="{THEME}/images/ratingplus.png" title="Like" alt="Like" style="width:14px;" />[/rating-plus]</li>
</ul>
</div>[/rating-type-3]
[/rating]

7. Open the file searchresult.tpl get it:
[rating]<div class="ratebox"><div class="rate">{rating}</div></div>[/rating]

Replace with:
[rating]
[rating]
[rating-type-1]<div class="ratebox"><div class="rate">{rating}</div></div>[/rating-type-1]
[rating-type-2]<div class="ratebox2">
<ul class="reset">
<li>[rating-plus]<img src="{THEME}/images/like.png" title="Like" alt="Like" style="width:14px;" />[/rating-plus]</li>
<li>{rating}</li>
</ul></div>[/rating-type-2]
[rating-type-3]<div class="ratebox3">
<ul class="reset">
<li>[rating-minus]<img src="{THEME}/images/ratingminus.png" title="Dislike" alt="Dislike" style="width:14px;" />[/rating-minus]</li>
<li>{rating}</li>
<li>[rating-plus]<img src="{THEME}/images/ratingplus.png" title="Like" alt="Like" style="width:14px;" />[/rating-plus]</li>
</ul>
</div>[/rating-type-3]
[/rating]

8. Open the file shortstory.tpl get it:
[rating]<div class="ratebox"><div class="rate">{rating}</div></div>[/rating]

Replace with:
[rating]
[rating-type-1]<div class="ratebox"><div class="rate">{rating}</div></div>[/rating-type-1]
[rating-type-2]<div class="ratebox2">
<ul class="reset">
<li>[rating-plus]<img src="{THEME}/images/like.png" title="Like" alt="Like" style="width:14px;" />[/rating-plus]</li>
<li>{rating}</li>
</ul></div>[/rating-type-2]
[rating-type-3]<div class="ratebox3">
<ul class="reset">
<li>[rating-minus]<img src="{THEME}/images/ratingminus.png" title="Dislike" alt="Dislike" style="width:14px;" />[/rating-minus]</li>
<li>{rating}</li>
<li>[rating-plus]<img src="{THEME}/images/ratingplus.png" title="Like" alt="Like" style="width:14px;" />[/rating-plus]</li>
</ul>
</div>[/rating-type-3]
[/rating]

9. Open the file userinfo.tpl get it:
<div class="ratebox"><div class="rate">{rate}</div><span>Rating:</span></div>

Replace with:
[rating-type-1]<div class="ratebox"><div class="rate">{rate}</div><span>Rating:</span></div>[/rating-type-1]
[rating-type-2]<div class="ratebox2"><span>Rating:</span> {rate}</div>[/rating-type-2]
[rating-type-3]<div class="ratebox2"><span>Rating:</span> {rate}<span></div>[/rating-type-3]

Note: The list of changes is given relative to a standard template Default. You need to make changes to your template is already based on the needs and the layout of your template directly. Not all change is needed is your site, and optionally that the design is right for your site.

DOWNLOAD DATALIFE ENGINE 10.4 FINAL ENGLISH

DLE 10.4  English
DATALIFE ENGINE 10.4 NULLED ENGLISH


We present you a new version of our script DataLife Engine v.10.4. In this release, you expect a new rating system for publications and comments on the site, new opportunities to create a template e-mail messages that are sent from the site, the possibility of interfacing accounts into a single account, using the authorization through different social networks, and more, but about all details ...

Download Datalife Engine 10.4 Final English_utf8

Download Datalife Engine 10.4 Final English_windows-1251

vendredi 2 janvier 2015

BLOGSS Template For DLE 10.3 English


BLOGSS Template For Datalife Engine 10.3 English

Easy and simple template for Blogss DLE, made in light colors with bright accents. Template versatile, it can be applied to any subject. The first thing that comes to mind, then this template will look great warez sites or news. In the footer as usually located counters copyrights. It is important to take into account the fact that the template for DLE Blogss would look perfect in any browser, because the pattern is universal and width, you can customize yourself. Responsive, blogging design for DLE 10.3 using Bootstrap 3 and absolutely quality and will work on all browsers. The color palette pattern of light and has an excellent layout and excellent study design. Generics fixed width, which allows him to work without problems on monitors with different screen resolutions. Blogss template for DLE 10.3 adapted to the latest version of the script and you can now download it for free. Among the advantages it should be noted that the design is not overloaded with numerous graphic elements. It is important to take into account the fact that the pattern would look perfect in any browser, because the pattern is universal and width, you can customize yourself.

Author: Youth-Templates
Template Type: RIP
Version DLE: 10.3
Tested: IE, Opera, Chrome, Mozilla
Options: template instruction
Size: ~ 840 Kb

Download BLOGSS Template For DLE 10.3 English

1) Installation Template - Uploading a folder template to a site in the templates - Choose the settings our template engine.
2) Customize Template
Right menu to adjust the file _sidebar.tpl
3) Make a nice view of the sort of news
Open /engine/modules/functions.php
Find the code:

<form name="news_set_sort" id="news_set_sort" method="post" action="" >" . $lang['sort_main'] . "&nbsp;" . implode( " | ", $sort );

$sort .= <<<HTML
<input type="hidden" name="dlenewssortby" id="dlenewssortby" value="{$config['news_sort']}" />
<input type="hidden" name="dledirection" id="dledirection" value="{$config['news_msort']}" />
<input type="hidden" name="set_new_sort" id="set_new_sort" value="{$find_sort}" />
<input type="hidden" name="set_direction_sort" id="set_direction_sort" value="{$direction_sort}" />
<script type="text/javascript">
<!-- begin

function dle_change_sort(sort, direction){

var frm = document.getElementById('news_set_sort');

frm.dlenewssortby.value=sort;
frm.dledirection.value=direction;

frm.submit();
return false;
};

// end -->
</script></form>
Replace it with:

<form class="pull-left" name="news_set_sort" id="news_set_sort" method="post" action="" ><button type="button" class="btn btn-default dropdown-toggle btn-sort" data-toggle="dropdown"><span class="glyphicon glyphicon-sort"></span> <span class="caret"></span></button> <ul class="dropdown-menu">" . implode( " ", $sort );

$sort .= <<<HTML
<input type="hidden" name="dlenewssortby" id="dlenewssortby" value="{$config['news_sort']}" />
<input type="hidden" name="dledirection" id="dledirection" value="{$config['news_msort']}" />
<input type="hidden" name="set_new_sort" id="set_new_sort" value="{$find_sort}" />
<input type="hidden" name="set_direction_sort" id="set_direction_sort" value="{$direction_sort}" />
<script type="text/javascript">
<!-- begin

function dle_change_sort(sort, direction){

var frm = document.getElementById('news_set_sort');

frm.dlenewssortby.value=sort;
frm.dledirection.value=direction;

frm.submit();
return false;
};

// end -->
</script></ul></form>
Find the code:

$sort[] = $value['image'] . "<a href="#" onclick="dle_change_sort('{$value['value']}','{$value['direction']}'); return false;">" . $value['name'] . "</a>";
Replace it with:

$sort[] = $value['image'] . "<li><a href="#" onclick="dle_change_sort('{$value['value']}','{$value['direction']}'); return false;">" . $value['name'] . "</a></li>";
Find the code and deleting it:

if( strtolower( $direction ) == "asc" ) {

$soft_by_array[$soft_by]['image'] = "<img src="{THEME}/dleimages/asc.gif" alt="" />";
$soft_by_array[$soft_by]['direction'] = "desc";

} else {

$soft_by_array[$soft_by]['image'] = "<img src="{THEME}/dleimages/desc.gif" alt="" />";
$soft_by_array[$soft_by]['direction'] = "asc";
}
4. The picture of the author in the full news. Installation.
Open /engine/modules/show.full.php
Find the code:

$news_find = array
Add the above:

$ava = $db->get_row($db->query("SELECT foto FROM ".PREFIX."_users WHERE name='".$row['autor']."'")); if($ava['foto']) $tpl->set('{poster_avatar}', "<a href="".$config['http_home_url']."uploads/fotos/".$ava['foto']."" onclick="return hs.expand(this)" ><img src="".$config['http_home_url']."uploads/fotos/".$ava['foto']."" width="60px"></a>"); else $tpl->set('{poster_avatar}', "<img src="/templates/Blogss/dleimages/noavatar.png">");
The configuration is complete.