Do not remember me!

Attention DLEStarter.com Members!!!

To all dlestarter.com members, currently the site is offline/closed due to team member emergency situations, so if you have asked or requested any works to team members, please contact me on dlefaq.com because dlestarter team member went missing, fortunately he has been rescued but in critical conditions, so any work requests will be on hold or possibly return or refund your payments...however, dlefaq.com is primary partner with dlestarter.com so we will do whatever we can to help dlestarter team survive...Thank you
Sort articles by: Date | Most Rates | Most Views | Comments | Alphabet

Problem theme upgraded from DLE 10.2 to 10.4

+6
Problem theme upgraded from DLE 10.2 to 10.4

Hi! i upgraded my DLE version from 10.2 to 10.4 and the theme, but i have a small problem with slider and my menu, i think is a javascript conflict but i don't know how to fix it.
Demo here Added by: in jQuery Questions on
This question was reported as fixed by user
Answered by: dlefaq

Display newest registered user in your site

+8
This quick tip will show you how to display newest member in your site, this way you can use jquery or any kind message to welcome user in your site

REF: Display newest member in dle website Added by: in PHP Questions on
if you are using DLE 10.3 and older, open index.php
if you are using DLE 10.4, open engine/modules/main.php

Find:
if ( !$user_group[$member_id['user_group']]['allow_admin'] ) $config['admin_path'] = "";

Add after
$row = $db->super_query("SELECT name,user_id FROM " . PREFIX . "_users ORDER BY user_id DESC LIMIT 1") ;
$tpl->set( '{last-user}', stripslashes( $row['name'] ) );

If you want username with link then use
$row = $db->super_query("SELECT name,user_id FROM " . PREFIX . "_users ORDER BY user_id DESC LIMIT 1") ;
$tpl->set( '{last-user}', "<a onclick=\"ShowProfile('" . urlencode( $row['name'] ) . "', '" . urlencode( $row['name'] ) . "', '" . $user_group[$member_id['user_group']]['admin_editusers'] . "'); return false;\" href=\"" . urlencode( $row['name'] ) . "\">" . $row['name'] . "</a>" );

Now you can use tag in main.tpl or any theme files attached to main.tpl
Welcome our newest member: {last-user}
Answered by: dlefaq

Ads by DLEStarter.com

Help with search settings please

+4
I need help with search option I want to have suggestions by entering one character to the quick search like the exemple in the picture below... thanx in advance
Help with search settings please
Added by: in PHP Questions on
This question is marked as answered.
Answered by: dlefaq

Share this on

+7
Can you help with making those to my website Share this on.

Thanks alot. Added by: in HTML/TPL Questions on
Yes, of course...

1) the first thing you will need to create popup jquery to make share windows popup for login and share windows, so what we use is this
<script type="text/javascript">
$(document).ready(function(){
$('a.share-popup').on('click',function(){
var w=380,h=300,left = Number((screen.width/2)-(w/2)), tops = Number((screen.height/2)-(h/2)),
popupWindow = window.open(this.href,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+w+', height='+h+',top='+tops+',left='+left);
popupWindow.focus(); return false;
});
});
</script>
w=380,h=300 is for popup windows width and height, you can change the saie as you want

2) now we will use HTML like this in fullstory.tpl
Share this on: 
<a class="share-popup social-link share-twitter" href="https://twitter.com/intent/tweet?text=Share this on&amp;url=http://www.dlefaq.com/html/14-share-this-on.html&amp;via=dlefaq"><i class="fa fa-twitter"></i> Twitter</a>
<a class="share-popup social-link share-facebook" href="http://www.facebook.com/sharer.php?u=http://www.dlefaq.com/html/14-share-this-on.html"><i class="fa fa-facebook"></i> Facebook</a>
<a class="share-popup social-link share-gplus" href="http://plus.google.com/share?url=http://www.dlefaq.com/html/14-share-this-on.html"><i class="fa fa-google-plus"></i> Google +</a>
via=dlefaq this you need to change to your twitter ID or website name

3) CSS, your css for each button style will look like this
a.social-link{display:inline-block;padding:5px 8px;margin:1px;color:#fff;text-decoration:none;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:inset 0 0 1px #fff;-moz-box-shadow:inset 0 0 1px #fff;box-shadow:inset 0 0 1px #fff;border:1px solid rgba(0,0,0,.2)}
.share-twitter{background-color:#55acee}
.share-facebook{background-color:#47639e}
.share-gplus{background-color:#dd4b39}

4) We use font awesome, you can get it here: http://fortawesome.github.io/Font-Awesome/ (no need for this if you already using font awesome on your site
Answered by: yorismith

i need help with xfvalue

+3
I want to generate automaticly xf value by sharing a link but i can't as shown in the picture
i need help with xfvalue
Added by: in PHP Questions on
in most cases, the theme should have xfields.txt comes with theme, so hat you need is upload the file to your server /engine/data/ then you should have everything working correctly.

However, you can always create xfield manually one by one, what you need is the name of your xfield in your theme, for example if in your shortstory.tpl using [xfvalue_poster] then you can create new xfield in
http://site.com/admin.php?mod=xfields&xfieldsaction=configure&xfieldssubactionadd=add

and input "poster" for "Field name"
Answered by: dlefaq

Ads by DLEStarter.com

Rating

+9
Can you help with making those to my website Rating Added by: in CSS Questions on
Yes, this can be done easily without using any images at all, but you will need css and font awesome (if you already using font awesome with your theme then it's super easy...I have attached font awesome with this message if don't have it in your theme...

1) open one of your css file from your template folder and add this at the end

This is font awesome style calling (no need for this css if you already using font awesome with your theme)
@font-face{
font-family:'FontAwesome';
src:url('fonts/fontawesome-webfont.eot?v=4.2.0');
src:url('fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),
url('fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),
url('fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),
url('fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');
font-weight:normal;
font-style:normal
}
.fa{
display:inline-block;
font:normal normal normal 14px/1 FontAwesome;
font-size:inherit;
text-rendering:auto;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale
}
.fa-thumbs-up:before{content:"\f164"}
.fa-thumbs-down:before{content:"\f165"}

Add this at the end of css file
/* DLE 10.4 rating type = 3 style */
.rating-box{font-size:0;margin:0;padding:0}
.rating-box .thumbdown,.rating-box .thumbup,.rating-box .thumbnum{font-size:14px;height:20px;line-height:20px;padding:4px 10px}
.rating-box .thumbdown{background:#cb1212;color:#fff;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}
.rating-box .thumbdown:hover{background:#aa1313;color:#fff}
.rating-box .thumbup{background:#278e0c;color:#fff;-webkit-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}
.rating-box .thumbup:hover{background:#1d7f03;color:#fff}
.rating-box .thumbnum{background:#ddd}
.ratingzero{color:#6c838e}
.ratingtypeplusminus{padding:0 2px}
.ratingtypeplus{color:#6c838e}
.ratingplus{color:green}
.ratingminus{color:red}
/* DLE 10.4 rating type = 3 style */
In your theme html in shortstory.tpl,fullstory.tpl,comments.tpl and comments.tpl use this html code for rating type "3"
[rating-type-3]
<div class="rating-box">
[rating-minus]<span class="thumbdown"><i class="fa fa-thumbs-down"></i></span>[/rating-minus]
<span class="thumbnum">+9</span>
[rating-plus]<span class="thumbup"><i class="fa fa-thumbs-up"></i></span>
[/rating-plus]
</div>
[/rating-type-3]

Note: this type of rating only available with DLE 10.4

Download font awesome below and place in your "style" folder where your css located
You are not allow to download file from our server
Answered by: yorismith

Torrent plugins

+4
Please, how can I install it? http://www.dle9.com/moduli/besplatnye-moduli/3470-dle-psevdo-treker.html I need a torrent plugins. Added by: in PHP Questions on
The installation steps is included within the package, so here is English translation for those steps of installation

===========================================================
1) - Rename the folder "{€€’…€}" inside folder "templates" to your actual template name
- Upload all files to your server
===========================================================
2) Open /engine/modules/functions.php and

Find:
if( ! defined( 'DATALIFEENGINE' ) ) {
die( "Hacking attempt!" );
}

Add below
include(ENGINE_DIR.'/modules/torrent/psxtorrent.php');

Find and REMOVE:
function show_attach($story, $id, $static = false) {
global $db, $config, $lang, $user_group, $member_id;

$find_1 = array();
$find_2 = array();
$replace_1 = array();
$replace_2 = array();

if( $static ) {

if( is_array( $id ) and count( $id ) ) $where = "static_id IN (" . implode( ",", $id ) . ")";
else $where = "static_id = '".intval($id)."'";

$db->query( "SELECT id, name, onserver, dcount FROM " . PREFIX . "_static_files WHERE $where" );

$area = "&amp;area=static";

} else {

if( is_array( $id ) and count( $id ) ) $where = "news_id IN (" . implode( ",", $id ) . ")";
else $where = "news_id = '".intval($id)."'";

$db->query( "SELECT id, name, onserver, dcount FROM " . PREFIX . "_files WHERE $where" );

$area = "";

}

while ( $row = $db->get_row() ) {

$size = formatsize( @filesize( ROOT_DIR . '/uploads/files/' . $row['onserver'] ) );
$row['name'] = explode( "/", $row['name'] );
$row['name'] = end( $row['name'] );

$find_1[] = '[attachment=' . $row['id'] . ']';
$find_2[] = "#\[attachment={$row['id']}:(.+?)\]#i";

if ( ! $user_group[$member_id['user_group']]['allow_files'] ) {

$replace_1[] = "<span class=\"attachment\">{$lang['att_denied']}</span>";
$replace_2[] = "<span class=\"attachment\">{$lang['att_denied']}</span>";

} elseif( $config['files_count'] == 'yes' ) {

$replace_1[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a> [{$size}] ({$lang['att_dcount']} {$row['dcount']})</span>";
$replace_2[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >\\1</a> [{$size}] ({$lang['att_dcount']} {$row['dcount']})</span>";

} else {

$replace_1[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a> [{$size}]</span>";
$replace_2[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >\\1</a> [{$size}]</span>";

}

}

$db->free();

$story = str_replace ( $find_1, $replace_1, $story );
$story = preg_replace( $find_2, $replace_2, $story );

return $story;

}

============================================================
3) Open /engine/inc/files.php
Find:
if( ! defined( 'DATALIFEENGINE' ) ) {
die( "Hacking attempt!" );
}

Add Below:
require_once ENGINE_DIR . '/classes/torrent.class.php';
include_once(ENGINE_DIR . '/data/dcls.config.php');

Find:
      if( @file_exists( ROOT_DIR . "/uploads/files/" . $file_prefix . $image_name ) ) {

Add Below:
if ($dclsconfig[vkl] == "on" ){ //  check if the module is enable
$fidname = '.torrent';
$proverka = strpos($image_name, $fidname);
if ($proverka !== false) {
$torrent = new Torrent( ROOT_DIR . "/uploads/files/" . $file_prefix . $image_name );
if ( $errorss = $torrent->errors() ) { // error checking and if they have nothing do

} else { // if there is no error then do your job with the torrent
if ( $dclsconfig[retreck] == "on" ) { // check whether the need to add tracker
$massivtreck = array_merge_recursive( $torrent->announce() , explode( "," , str_replace( " ", "", $dclsconfig[retrecker] ) ) );
$torrent->announce(false);
$torrent->announce($massivtreck); // add your tracker
}
if ( $dclsconfig[trcomment] = "on" ){ // check whether you need to add comment
if ( $news_id == 0 ) {
$commenttr = 10101 ;
$torrent->comment($commenttr); // add comment
} else {
$commenttr = str_replace("%link%", $config[http_home_url] . "index.php?newsid=" . /*$_REQUEST['news_id']*/$news_id, $dclsconfig[commenttr]); // forming comment
$torrent->comment($commenttr); // add comment
}
}
$torrent->save( ROOT_DIR . "/uploads/files/" . $file_prefix . $image_name ); // Save the changes in torrent
}
}
}

===========================================================
4) Open /engine/download.php
Find:
$id = intval ( $_REQUEST['id'] );

Replace with:
if ($_REQUEST['idd'] == "" ){
$id = intval ( $_REQUEST['id'] );
} else {
$idd = base64_decode($_REQUEST['idd']);
$id = intval ( $idd );
}

===========================================================
5) Open the file and main.tpl before </head> insert
<script type="text/javascript" src="{THEME}/dcls.js"></script>

===========================================================
6) Open your style.css file and insert the end of the file
    /*  dcls type  */
.btTbl {
BORDER-RIGHT: #98aab1 0px solid;
BORDER-TOP: #98aab1 0px solid;
BORDER-LEFT: #98aab1 0px solid;
BORDER-BOTTOM: #98aab1 0px solid;
BACKGROUND-COLOR: #6699cc
}
.row1 {
BACKGROUND-COLOR: #f4f8fb
}
.row3 {
BACKGROUND-COLOR: #AACCFF;
font-weight: bold;
}
.gen {
FONT-SIZE: 10pt
}
.genmed {
FONT-SIZE: 9pt
}
.gensmall {
FONT-SIZE: 8pt
}
.spoiler-wrap {
CLEAR: both;
BORDER-RIGHT: #c3cbd1 1px solid;
BORDER-TOP: #c3cbd1 1px solid;
BACKGROUND: #AACCFF;
MARGIN: 6px auto;
BORDER-LEFT: #c3cbd1 2px solid;
WIDTH: 95%;
BORDER-BOTTOM: #c3cbd1 1px solid;
}

.spoiler-wrap-title a{
color: #3030BB;
}
.spoiler-wrap-title a:visited{
color: #3030BB;
}
.spoiler-wrap-title a:active{
color: #3030BB;
}


.spoiler-head {
PADDING-RIGHT: 14px;
PADDING-LEFT: 14px;
FONT-SIZE: 11px;
PADDING-BOTTOM: 3px;
MARGIN-LEFT: 6px;
LINE-HEIGHT: 15px;
PADDING-TOP: 1px;
}
.spoiler-body {
PADDING-RIGHT: 6px;
BORDER-TOP: #c3cbd1 1px solid;
DISPLAY: none;
PADDING-LEFT: 6px;
BACKGROUND: #f5f5f5;
PADDING-BOTTOM: 2px;
PADDING-TOP: 1px;
}

.nik_images {max-width:150px; vertical-align: bottom; margin-top:-6px}

/* search rutor */
.restable {


border-left: 1px solid #ebebeb;
border-right: 1px solid #ebebeb;
}

.restable th {
width: 100px;
padding: 6px;
text-align: left;
}

.restable thead tr {

cursor: pointer;
background: #AACCFF;
border: 1px solid #98aab1;
border-radius: 5px;
color: #fff;
text-shadow: 1px 1px 2px black;
}

.restable a {
text-decoration:none;
}

.restable a:hover {
text-decoration:underline;
}

.restable tr:nth-child(2n) {
background-color:#f7f7f7;
}

.restable tr {
background-color:#fefefe;
}

.restable tbody tr:hover {
background-color:#e7e7e7;
}

.restable td {
padding:6px;
vertical-align:middle;
border-bottom: 1px solid #cccccc;
color: #333333;
font-size:12px;
}

#pselect {
display: inline;
padding: 5px 12px;
background: #ebebeb;
border-bottom: 1px solid rgba(0, 0, 0, 0.251);
cursor: pointer;
border-radius: 5px;
color: #808080;
text-shadow: white 0px 1px 2px;
margin: 3px;
font-size: 15px;
}

#pselect.active, #pselect:hover {
background: #97d234 !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.251);
text-shadow: 1px 1px 2px black;
color: #fff !important;
}

.restable th {

white-space: inherit;
}

.restable th > span {
background: url("../images/torrent/nosorted.gif") 0px 50% no-repeat;
padding-left: 8px;
}
.restable .up > span {
background: url("../images/torrent/down.gif") 0px 50% no-repeat;
padding-left: 8px;
}
.restable .down > span {
background: url("../images/torrent/up.gif") 0px 50% no-repeat;
padding-left: 8px;
}

.restable b {
background: #e4ffb5;
}

.restable a:hover {
color: #5f8f0b;
}

==============================================================
7) Run Query to the database (usually you can go to PHPMyAdmin and click on "SQL" tab)
INSERT INTO `PREFIX_admin_sections` (`name`, `title`, `descr`, `icon`, `allow_groups`) VALUES
('dclsinc', 'Working with DCLS and Torrent files', 'Module to display the contents dcls and torrent files', 'dc.png', '1');

where "PREFIX" is replaced by the prefix of your database. (default is "dle" so you should use "dle_admin_sections")
==============================================================
8) Go to Admin "Module settings" of "Working with DCLS and Torrent files" and enable "Download torrent files and dcls"
Answered by: dlefaq

I would like to limit not allow links in comments, how can I do that?

+8
There are a lot of spammers running around the internet and they try to add spam and links in to my website, so how can I limit them not to allow to add comments with link? and if it's possible to limit by usergroup? Added by: in PHP Questions on
Yes you can do that without problem by follow steps below:
- Open file: engine/modules/addcomments.php, and find:
		if( $update_comments ) {

$comments = $db->safesql( $row['text'] ) . "<br /><br />" . $db->safesql( $comments );
Add above
if( preg_match ("/href|url|http|www|\.ru|\.com|\.net|\.info|\.org|\.ua|\.biz|\.mobi|\.name|\.pro|\.xxx|\.cc|\.au|\.ch|\.ws|\.de/i", $comments) AND ($member_id['user_group'] > 3) ) {
if( $update_comments ) {
if( $row['approve'] ) $update_comments = false;
}
$where_approve = 0;
$stop[] = $lang['news_err_31'];
$CN_HALT = TRUE;
msgbox( $lang['all_info'], implode( "<br />", $stop ) . "<br /><br /><a href=\"javascript:history.go(-1)\">" . $lang['all_prev'] . "</a>" );
}

This will limit group 1,2,3 but if you want to add mroe groups or specify group individually then please use this code instead.
$groups = array(1,2,3,7,15,20); // group IDs for which to apply this action
if( preg_match ("/href|url|http|www|\.ru|\.com|\.net|\.info|\.org|\.ua|\.biz|\.mobi|\.name|\.pro|\.xxx|\.cc|\.au|\.ch|\.ws|\.de/i", $comments) AND in_array($member_id['user_group'], $groups) ) {
if( $update_comments ) {
if( $row['approve'] ) $update_comments = false;
}
$where_approve = 0;
$stop[] = $lang['news_err_31'];
$CN_HALT = TRUE;
msgbox( $lang['all_info'], implode( "<br />", $stop ) . "<br /><br /><a href=\"javascript:history.go(-1)\">" . $lang['all_prev'] . "</a>" );
}
You can specify usergroup ID on array(1,2,3,7,15,20); // group IDs for which to apply this action

The example above is for some domain names only, You can add specific domain LTD as you want, you can find full list of top level domain LTD from: http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
Answered by: yorismith

Can you provide step by step setup authentication for facebook?

+1
I am using Datalife engine 10.4 and want to use Facebook to login to my website but I don't really know how to set it up, can you provide step by step setup login for Facebook please? Added by: in Others on
Setup register and login via facebook is quite simple, all you need is create new app on facebook developer page (you can also follow screenshot steps below)
- Go to https://developers.facebook.com/apps
- Click on "+ Add a New App"
- Select "Website"
- Type in app name, example "MySiteLogin" and click "Create New Facebook App ID"
- Select "Apps for Pages" under "Category" and click "Create App ID"
- in next page under "Tell us about your website" type in your website URL for both "Site URL" and "Mobile Site URL" and click "Next"
- Now click on "My Apps" on top menu,
:::: After this click it will take you to your main apps page and you will see list of your apps, click on your "App name", example "MySiteLogin"
- in Dashboard page of your App, you will see "App ID" and "App Secret" both numbers will be needed for your site later
- Click on "Settings" link from left menu
- Fill in "App Domains", "Namespace" and "Contact Email" and click "Save Changes"
- Click "Status & Review" from left menu
- Click "Yes/No" button next to your App to enable this app for public access otherwise your users will not be able to login or register on your website if app is not enabled
- Now go back to your site admin cp and go to "Setting up social networks" and enable "Enable authentication using the Facebook"
- Input "Application ID on Facebook" and "The private/secret key on Facebook" and click "Save"
That's all you need, now your users will be able to register and login via Facebook from your site

Can you provide step by step setup authentication for facebook?
Can you provide step by step setup authentication for facebook?
Can you provide step by step setup authentication for facebook?
Can you provide step by step setup authentication for facebook?
Can you provide step by step setup authentication for facebook?
Can you provide step by step setup authentication for facebook?
Can you provide step by step setup authentication for facebook?
Can you provide step by step setup authentication for facebook?
Can you provide step by step setup authentication for facebook?
Can you provide step by step setup authentication for facebook?
Answered by: dlefaq

How to change search to search title only?

+17
Be default Datalife Engine search will search all criteria of the website including short and full story, but how can I change the search function to search keywords from "title" only? Added by: in PHP Questions on
Open: /engine/modules/search.php
Find:
else $titleonly = 0;
Replace with:
else $titleonly = 3;
Answered by: dlefaq