1. Auto fill tags in Datalife Engine 10

Auto fill tags in Datalife Engine 10

  |   9
Name: Auto fill tags in Datalife Engine
Described: automatic get tag in title associated with tags in "Tag Cloud, Keywords" and remove tags duplicate
DLE Versions: 10 (because me just checked in version 10)

I am a Vietnam, did not know English (this article uses translate.google) and learn about DLE only 3 days. When I found this Hack Tutorials auto fill tags have used but it does not work on DLE version 10. With my limited knowledge I have sought to make themselves. Tutorials can this "non-standard" but here is my attempt.

Installation:
1) Open the file /engine/modules/addnews.php

Find
$db->query( "INSERT INTO " . PREFIX . "_post (date, autor, short_story, full_story, xfields, title, keywords, category, alt_name, allow_comm, approve, allow_main, fixed, allow_br, symbol, tags) values ('$thistime', '{$member_id['name']}', '$short_story', '$full_story', '$filecontents', '$title', '', '$category_list', '$alt_name', '$allow_comm', '$approve', '$allow_main', '$news_fixed', '$allow_br', '$catalog_url', '" . $_POST['tags'] . "')" );


Inserted above it
        /*-------------Auto Fill Tags Starts ----------------*/
$check_at = "\" ( ) ! @ # $ [ ] / ? . , < > ' ; : = + - _ } { | % ^ * & ~ `";
$check_at = explode(" ", $check_at);
$auto_tags = $title;
$auto_tags = str_replace($check_at, " ", $auto_tags);
$auto_tags = str_replace(" ",",",$auto_tags);
$cf_tags = explode(",",$auto_tags);
foreach($cf_tags AS $key => $tag){
if(strlen($tag)<2){
unset($cf_tags[$key]);
}
}
if(!empty($_POST['tags'])){
$_POST['tags'] = $_POST['tags'].",";
}
$_POST['tags'] = $_POST['tags'].implode(",",$cf_tags);
$_POST['tags'] = explode(",",$_POST['tags']);
$_POST['tags'] = array_unique($_POST['tags']);
$_POST['tags'] = implode(",",$_POST['tags']);
/*-------------!Auto Fill Tags Ends ----------------*/


2) Open the file /engine/inc/addnews.php

Find:
$db->query( "INSERT INTO " . PREFIX . "_post (date, autor, short_story, full_story, xfields, title, descr, keywords, category, alt_name, allow_comm, approve, allow_main, fixed, allow_br, symbol, tags, metatitle) values ('$thistime', '{$member_id['name']}', '$short_story', '$full_story', '$filecontents', '$title', '{$metatags['description']}', '{$metatags['keywords']}', '$category_list', '$alt_name', '$allow_comm', '$approve', '$allow_main', '$news_fixed', '$allow_br', '$catalog_url', '{$_POST['tags']}', '{$metatags['title']}')" );


Inserted above it
    /*-------------Auto Fill Tags Starts ----------------*/
$check_at = "\" ( ) ! @ # $ [ ] / ? . , < > ' ; : = + - _ } { | % ^ * & ~ `";
$check_at = explode(" ", $check_at);
$auto_tags = $title;
$auto_tags = str_replace($check_at, " ", $auto_tags);
$auto_tags = str_replace(" ",",",$auto_tags);
$cf_tags = explode(",",$auto_tags);
foreach($cf_tags AS $key => $tag){
if(strlen($tag)<2){
unset($cf_tags[$key]);
}
}
if(!empty($_POST['tags'])){
$_POST['tags'] = $_POST['tags'].",";
}
$_POST['tags'] = $_POST['tags'].implode(",",$cf_tags);
$_POST['tags'] = explode(",",$_POST['tags']);
$_POST['tags'] = array_unique($_POST['tags']);
$_POST['tags'] = implode(",",$_POST['tags']);
/*-------------!Auto Fill Tags Ends ----------------*/

Note:
if(strlen($tag)<2){

tags with 2 or more characters, you can replace 2 with larger numbers
Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.

Details

0

Comments 9

Inphecthyuz
Commented By Inphecthyuz on January 26, 2014 (9:53 pm)
This is not working on 10.1
N/A 21Forum topics : 1Forum replies : 2Forum likes : 0

Please wait while the pixels get undressed. No peeking ;)
nellyville
Commented By nellyville on April 23, 2014 (1:52 pm)
Tested on 10.2, not working.
30 41Forum topics : 9Forum replies : 34Forum likes : 1

Check my website http://www.Jocuriarena.com
mrbuzz
mrbuzz
Members
Commented By mrbuzz on May 16, 2014 (12:34 am)
:( working 10.2 and 10.1, i'm tester. make sure you have the right guide
link img http://imgur.com/b8Olfdy http://imgur.com/HQFENn4
Quote: nellyville
Tested on 10.2, not working.

Quote: Inphecthyuz
This is not working on 10.1
1 3Forum topics : 0Forum replies : 0Forum likes : 0
soomro
soomro
Members
Commented By soomro on June 24, 2014 (12:22 am)
Working on 10.2 Thanks
N/A 15Forum topics : 6Forum replies : 18Forum likes : 1
Bogdan.
Bogdan.
Members
Commented By Bogdan. on July 12, 2014 (3:24 am)
Workin on 10.2 ,very well!
N/A 3Forum topics : 6Forum replies : 11Forum likes : 1

http://lafel.ro - HD MOVIES,HD SERIES :) !
Nash
Nash
Members
Commented By Nash on March 18, 2016 (6:29 pm)
work on 10.4 and 10.6 ??
N/A 7Forum topics : 65Forum replies : 115Forum likes : 0
Micr0lab
Micr0lab
Members
Commented By Micr0lab on March 23, 2016 (4:12 am)
Works fine in 10.6
N/A 1Forum topics : 0Forum replies : 0Forum likes : 0
shadowless
shadowless
Members
Commented By shadowless on May 24, 2016 (12:51 pm)
what about inc/editnews.php ?

not from $title and generate it from $short_story ?

(dle >10.1)
N/A 4Forum topics : 0Forum replies : 0Forum likes : 0
Nash
Nash
Members
Commented By Nash on August 13, 2016 (3:20 pm)
work on dle 11 ?
N/A 7Forum topics : 65Forum replies : 115Forum likes : 0
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.