DLEVIET - DataLife Engine Support Home Page

DataLife Engine Support » DataLife Engine » Edit Code » Auto Tags Generation in DLE 8.3-8.5

Auto Tags Generation in DLE 8.3-8.5

  • Author: Pakistan;  
  • Views: 3493;  
  • Date: 28 April 2010;  
Auto Tags Generation in  DLE 8.3-8.5

As you all people know tags are very much important for SEO.. Its very time wasting and boring to insert tags for each post.. also sometimes you forget tags or dont enter because it irritates
but not anymore , from now onward you can save your time by reducing posting operation.. just follow the given instructions..

H@ck Features:
From the Title Words (exclude digits and special characters) Longer than 3 Alphabets and Adds as Tag Strings


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

Finds the first occurrence of:
if( $found )


and ABOVE it insert following script


$arr_tags = explode(' ', $title);
$str_tag = '';
foreach ( $arr_tags as $tvalue ) {
$tvalue = trim($tvalue);
preg_match('/[a-zA-Zа-яА-Я]{4,}/', $tvalue, $t_v);
if ($t_v[0]) {
$str_tag .= $t_v[0].',';
}
};
$_POST['tags'] = substr($str_tag, 0, strlen($str_tag)-1);


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

Find:
if( trim( $_POST['vote_title']

And ABOVE it Paste The Above Given Code

Now Chill tongue

DLEVIET FIXED
1. Change -2 to -1 at
$_POST['tags'] = substr($str_tag, 0, strlen($str_tag)-1);


Because we need to delete only "comma" at the end of tags string.

2. Code for English website

$arr_tags = explode(' ', $title);
$str_tag = '';
foreach ( $arr_tags as $tvalue ) {
$tvalue = trim($tvalue);
preg_match('/[a-zA-Z]{4,}/', $tvalue, $t_v);
if ($t_v[0]) {
$str_tag .= $t_v[0].',';
}
};
$_POST['tags'] = substr($str_tag, 0, strlen($str_tag)-1);


3. Code for Auto switch between Manual Auto tag

if( $_POST['tags'] == "")
{
$arr_tags = explode(' ', $title);
$str_tag = '';
foreach ( $arr_tags as $tvalue ) {
$tvalue = trim($tvalue);
preg_match('/[a-zA-Zа-яА-Я]{4,}/', $tvalue, $t_v);
if ($t_v[0]) {
$str_tag .= $t_v[0].',';
}
};
$_POST['tags'] = substr($str_tag, 0, strlen($str_tag)-1);
}


Idea: If tags textbox have data (you enter), don't do this code and else love

4. For each tags characters length
From the Title Words (exclude digits and special characters) Longer than 3 Alphabets and Added as Tag Strings
Change {4,} in code if you want!
We encourage you to Register or Login to website under your name.

jaganguys

Posted 28 April 2010 20:53 Register: 7.04.2010

Thanx man...

in tag automatically i want to add its category name how to do that.. please tell me..

agroni112

Posted 28 April 2010 21:36 Register: 12.04.2010
Thanks bro working great fellow

Pakistan

Posted 29 April 2010 13:18 Register: 2.03.2010
jaganguys,
You need to ask someone to customize tagcloud.php for you

KingOfDCP

Posted 29 April 2010 15:43 Register: 19.03.2010
Thanks Pakistan.

But what should I do if I want it accept I tag manually. It means when I don't fill in tag field, it will tag automatically but if I tag manually, it will accept my tags.

HEROTHUY

Posted 1 December 2010 13:41 Register: 13.05.2010
It working in dle 9.0.did it???

admin

Posted 7 December 2010 08:23 Register: 25.04.2009
HEROTHUY,

Try it before ask please!

hiroshimamovies

Posted 25 February 2012 02:42 Register: 25.02.2012
No, it dont work on DLE 9.0

florindle

Posted 2 March 2012 17:08 Register: 2.03.2012
Can somebody make this work for DLE 9.4 ? Thanks
Information
Members of Guest cannot leave comments.

Pagerank Update

    Updates Yandex SEO
    13.04.2012
    16.02.2012
    04.02.2012
    Updates Yandex search
    17.05.2012
    15.05.2012
    12.05.2012
    Updates Yandex Catalogue
    18.05.2012
    16.05.2012
    11.05.2012
    Updates Google
    03.05.2012
    06.02.2012
    08.11.2011

Find us on Facebook

Poll

How do you know DataLife Engine Support?

Search Engine
Other DLE Support websites
Forum
Friends
Others

Sponsor

Calendar

«    May 2012    »
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
Contact us in social network

Facebook

Twitter