Auto fill tags in Datalife Engine - Works for all DLE

Auto fill tags in Datalife Engine
Pusat Dialysis Berhampiran
Auto fill tags in Datalife Engine - Works for all DLE
Auto fill tags in Datalife Engine - Works for all DLE

With this hack tags will be automatically added. When forming the tag data is taken from a short news or news headlines.

Installation:

1) 1. Open the engine / modules / addnews.php and immediately after the first occurrence:
Find:
if( $found )
Above, insert one of the following:
/*------------- formation Tag Title ----------------*/
$nNumTags = 10;
$szContent = strip_tags($title);
$arr_tags = explode(' ', $szContent);
shuffle($arr_tags);
$nNumOfTags = 0;
$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].', ';
$nNumOfTags ++;
}
if ($nNumOfTags > $nNumTags)
break;
};
$_POST['tags'] = substr($str_tag, 0, strlen($str_tag)-1);
/*------------- formation Tag Title ----------------*/
Or:
/*------------- forming tags for brief news----------------*/
$nNumTags = 10;
$szContent = strip_tags($short_story);
$arr_tags = explode(' ', $szContent);
shuffle($arr_tags);
$nNumOfTags = 0;
$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].', ';
$nNumOfTags ++;
}
if ($nNumOfTags > $nNumTags)
break;
};
$_POST['tags'] = substr($str_tag, 0, strlen($str_tag)-1);
/*------------- forming tags for brief news ----------------*/
2. Open the file engine / inc / addnews.php and find:
if( trim( $_POST['vote_title']
Above, insert one of the following:
*------------- formation Tag Title ----------------*/
$nNumTags = 10;
$szContent = strip_tags($title);
$arr_tags = explode(' ', $szContent);
shuffle($arr_tags);
$nNumOfTags = 0;
$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].', ';
$nNumOfTags ++;
}
if ($nNumOfTags > $nNumTags)
break;
};
$_POST['tags'] = substr($str_tag, 0, strlen($str_tag)-1);
/*------------- formation Tag Title ----------------*/
Or:
/*------------- forming tags for brief news ----------------*/
$nNumTags = 10;
$szContent = strip_tags($short_story);
$arr_tags = explode(' ', $szContent);
shuffle($arr_tags);
$nNumOfTags = 0;
$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].', ';
$nNumOfTags ++;
}
if ($nNumOfTags > $nNumTags)
break;
};
$_POST['tags'] = substr($str_tag, 0, strlen($str_tag)-1);
/*------------- forming tags for brief news ----------------*/

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.