SEO for DLE 9.6 - 10.x - English

SEO for DLE


Improve SEO performance header title
1.Improve SEO performance header title

Open /engine/engine.php, find code :

$metatags['title'] = $nam_e . $page_extra . ' » ' . $metatags['title']; 

Change to:

$metatags['title'] = $nam_e . $page_extra; 

Next, look for :

$metatags['title'] = $titl_e . $page_extra . ' » ' . $config['home_title']; 

Change to :

$metatags['title'] = $titl_e . $page_extra;   

Next, look for code :

if ( $metatags['header_title'] ) $metatags['title'] = stripslashes($metatags['header_title'].$page_extra); 

Change to:


if ($do == "cat" and $category != '' and $subaction == '') //if the category
{ 
 if ( $metatags['header_title'] and ! $page_extra ) $metatags['title'] = stripslashes($metatags['header_title']);
 else $metatags['title'] = stripslashes($cat_info[$category_id]['name']) . $page_extra;
}
elseif ($dle_module == "main") //if the main page
{
 if ( ! $page_extra ) $metatags['title'] = stripslashes($config['home_title']);
 else $metatags['title'] = stripslashes($config['short_title']) . $page_extra;
}
elseif ($metatags['header_title']) $metatags['title'] = stripslashes($metatags['header_title']);   

2.Explanation :
At this point, we will get rid of the prefix name of the site in meta title.
Eliminates the problem of duplicating the full news on different addresses

1.Eliminates the problem of duplicating the full news on different addresses

Open .htaccess, find code :

# Sam post
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html$ engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 [L]

RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 [L]
RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html$ engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/([0-9]+)-(.*).html$ index.php?newsid=$2&seourl=$3&seocat=$1 [L]

RewriteRule ^page,([0-9]+),([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 [L]
RewriteRule ^page,([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$2&news_page=$1&seourl=$3 [L]
RewriteRule ^print:page,([0-9]+),([0-9]+)-(.*).html$ engine/print.php?news_page=$1&newsid=$2&seourl=$3 [L]
RewriteRule ^([0-9]+)-(.*).html$ index.php?newsid=$1&seourl=$2 [L]

And replaced:

# Sam Post
RewriteBase /
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).(.*)$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).(.*)$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).(.*)$ engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).(.*)$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4 [L]
 
RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*)$ index.php?newsid=$4&news_page=$2&cstart=$3 [L]
RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+)-(.*)$ index.php?newsid=$3&news_page=$2 [L]
RewriteRule ^([^.]+)/print:page,([0-9]+),([0-9]+)-(.*)$ engine/print.php?news_page=$2&newsid=$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^.]+)/([0-9]+)-(.*)$ index.php?newsid=$2 [L]
 
RewriteRule ^page,([0-9]+),([0-9]+),([0-9]+)-(.*)$ index.php?newsid=$3&news_page=$1&cstart=$2 [L]
RewriteRule ^page,([0-9]+),([0-9]+)-(.*)$ index.php?newsid=$2&news_page=$1 [L]
RewriteRule ^print:page,([0-9]+),([0-9]+)-(.*)$ engine/print.php?news_page=$1&newsid=$2 [L]
RewriteRule ^([0-9]+)-(.*)$ index.php?newsid=$1 [L]  

Open /engine/modules/show.full.php, find the code :

if ($config['seo_control'] AND ( isset($_GET['seourl']) OR strpos ( $_SERVER['REQUEST_URI'], "?" ) !== false ) ) {
 
 if ($_GET['seourl'] != $row['alt_name'] OR $_GET['seocat'] != $c_url OR strpos ( $_SERVER['REQUEST_URI'], "?" ) !== false) {

  if ($view_template == "print") {

   $re_url = explode ( "engine/print.php", strtolower ( $_SERVER['PHP_SELF'] ) );
   $re_url = reset ( $re_url );

  } else {

   $re_url = explode ( "index.php", strtolower ( $_SERVER['PHP_SELF'] ) );
   $re_url = reset ( $re_url );

  }

  header("HTTP/1.0 301 Moved Permanently");
  header("Location: {$re_url}{$c_url}/{$row['id']}-{$row['alt_name']}.html");
  die("Redirect");

 }

}

Next, we look for the code and delete :

if ($config['seo_control'] AND ( isset($_GET['seourl']) OR strpos ( $_SERVER['REQUEST_URI'], "?" ) !== false ) ) {
 
 if ($_GET['seourl'] != $row['alt_name'] OR $_GET['seocat'] OR $_GET['news_name'] OR strpos ( $_SERVER['REQUEST_URI'], "?" ) !== false ) {

  if ($view_template == "print") {

   $re_url = explode ( "engine/print.php", strtolower ( $_SERVER['PHP_SELF'] ) );
   $re_url = reset ( $re_url );

  } else {

   $re_url = explode ( "index.php", strtolower ( $_SERVER['PHP_SELF'] ) );
   $re_url = reset ( $re_url );

  }

  header("HTTP/1.0 301 Moved Permanently");
  header("Location: {$re_url}{$row['id']}-{$row['alt_name']}.html");
  die("Redirect");

 }

}

Next, we look for the code and delete :

if ( $config['seo_control'] ) {
 
 if ($_GET['newsid'] OR strpos ( $_SERVER['REQUEST_URI'], "?" ) !== false) {

  if ($view_template == "print") {

   $re_url = explode ( "engine/print.php", strtolower ( $_SERVER['PHP_SELF'] ) );
   $re_url = reset ( $re_url );

  } else {

   $re_url = explode ( "index.php", strtolower ( $_SERVER['PHP_SELF'] ) );
   $re_url = reset ( $re_url );

  }

  header("HTTP/1.0 301 Moved Permanently");
  header("Location: {$re_url}".date( 'Y/m/d/', $row['date'] ).$row['alt_name'].".html");
  die("Redirect");

 }

}

We find the code below :

} else {

 $full_link = $config['http_home_url'] . "index.php?newsid=" . $row['id'];
 $print_link = $config['http_home_url'] . "engine/print.php?newsid=" . $row['id'];
 $short_link = "";
 $link_page = "";
 $news_name = "";

And above insert :

$true_link = $config['http_home_url'] . substr ($_SERVER['REQUEST_URI'], 1);
if (intval($_REQUEST['cstart']) >= 2) $full_link = $link_page . intval($_REQUEST['cstart']) . "," . $news_name . ".html";
elseif ($news_page >= 2) $full_link = $link_page . $news_name . ".html";
if ($true_link != $full_link) {
 header('HTTP/1.1 301 Moved Permanently');
 header ('Location: ' . $full_link);
 die();
}

2.Explanation :
At this point, we get rid of the availability of news at page, 1, and not by any other valid address to the full news.
1.Error 404 with a non-existent page pagination
1.Error 404 with a non-existent page pagination

Open /engine/modules/show.short.php, find code :

}
?> 

Above insert:

$all_pages_count = @ceil( $count_all / $config['news_number'] );
if ($cstart > $all_pages_count) {
 @header("HTTP/1.0 404 Not Found");
 @header("Status: 404 Not Found");
 @require_once($_SERVER['DOCUMENT_ROOT'].'/404.html');
 exit();
}

2.Explanation :
At this point, we will get rid of non-existent pages pagination, gives 404.
Error 404 with a non-existent page pagination comments
1.Error 404 with a non-existent page pagination comments

Open /engine/modules/show.full.php,find code :

if( $comments_num > 0 ) {   

Above insert:

$all_comm_page = @ceil( $comments_nums / intval($config['comm_nummers']) );
if ( $_REQUEST['cstart'] > $all_comm_page ) {
 @header("HTTP/1.0 404 Not Found");
 @header("Status: 404 Not Found");
 @require_once($_SERVER['DOCUMENT_ROOT'].'/404.html');
 exit();
}

2.Explanation :
At this point, we will get rid of non-existent pages pagination comments given to 404.
Error 404 sections and categories that no longer exist
1.Error 404 sections and categories that no longer exist

Open /engine/engine.php, find code :

if (!$category_id) $category_id = 'not detected'; 

Change to:

if (!$category_id AND $view_template != "rss") {
 @header("HTTP/1.0 404 Not Found");
 @header("Status: 404 Not Found");
 @require_once($_SERVER['DOCUMENT_ROOT'].'/404.html');
 exit();
}

2.Explanation :
At this point, we get rid of the categories which are already present, was not or was removed.
Error 404 for publications that do not have ID
1.Error 404 for publications that do not have ID

Open /engine/modules/static.php, find code :

        @header( "HTTP/1.0 404 Not Found" );
 $lang['static_page_err'] = str_replace ("{page}", $name.".html", $lang['static_page_err']);
 msgbox( $lang['all_err_1'], $lang['static_page_err'] );
Change to:
        @header("HTTP/1.0 404 Not Found");
 @header("Status: 404 Not Found");
 @require_once($_SERVER['DOCUMENT_ROOT'].'/404.html');
 exit();

2.Explanation :
At this point, we will make out 404 pages which do not have the ID and they are not static. It is more correct and logical than to do a 301 redirect to the main
Error 404 remote or non-existent news
1.Error 404 remote or non-existent news

Open /engine/modules/show.full.php, find code :

elseif( !$news_found ) {
  @header( "HTTP/1.0 404 Not Found" );
  msgbox( $lang['all_err_1'], $lang['news_err_12'] );
 }

Change to:

 elseif( ! $news_found ) {
  @header("HTTP/1.0 404 Not Found");
  @header("Status: 404 Not Found");
  @require_once($_SERVER['DOCUMENT_ROOT'].'/404.html');
  exit();
 }

2.Explanation :
At this point, we will make a return for news that 404 is not present, or were deleted.
Add the tag rel=”canonical” to view the full pages of news
1.Add the tag rel=”canonical” to view the full pages of news

Open /engine/modules/show.full.php, find code :

} else {
 
 $full_link = $config['http_home_url'] . "index.php?newsid=" . $row['id'];
 $print_link = $config['http_home_url'] . "engine/print.php?newsid=" . $row['id'];
 $short_link = "";
 $link_page = "";
 $news_name = "";

}

Below insert:

$full_canonical = $full_link;   
Open /engine/engine.php and find:

if ($config['allow_rss']) $metatags .=  

Above insert:

if ($full_canonical) {
    $metatags .= "<link rel="canonical" href=". $full_canonical . " />";
}

2.Explanation :
At this point, we do note the canonical page attribute rel="canonical" order that would specify the main page, and beat off all its possible duplicates.
Hiding from the index page, such as the /page,1,2,1-post1.html
1.Hiding from the index page, such as the /page,1,2,1-post1.html

Open /engine/modules/show.full.php, find code :

$comments->build_navigation('navigation.tpl', $link_page . "{page}," . $news_name . ".html#comment", $user_query, $full_link);  

Below insert :

if(intval( $_GET['news_page'] ) > 0) {
 $metatags['no_index'] = PHP_EOL . "<meta name="robots" content="noindex,nofollow" />";
}

Open /engine/engine.php, find code :

<meta name="keywords" content="{$metatags['keywords']}" />{$disable_index} 
Above insert :

{$metatags['no_index']}  

2.Explanation :

At this point, we get rid of the index pages of comments asking them meta robots - noindexs
Add meta tags rel="next" and rel="prev"
1.Add meta tags rel="next" and rel="prev"

Open /engine/engine.php, find code :

if ($canonical) {
if there is no such line, then you have an older version of this look for this line :
if ($config['allow_rss']) $metatags .= << 

Above insert :

if($dle_module == "main" || $dle_module == "cat")
{
 $cat_cat =  !empty($category) ? strip_tags(stripslashes($category)) . '/' : '';

 $all_pages_count = @ceil( $count_all / $config['news_number'] );
 if($cstart < 2 && 1 != $all_pages_count)
 {
  $next_rel = PHP_EOL . '<link rel="next" href="'. $config['http_home_url'] . $cat_cat . 'page/2' . '">';
  $prev_rel = '';
 }
 else if(1 != $all_pages_count)
 {
  if($cstart >= $all_pages_count)
   $next_rel = '';
  else
   $next_rel = PHP_EOL . '<link rel="next" href="'. $config['http_home_url'] . $cat_cat .  'page/'. ($cstart + 1) .'">';

  if($cstart == 2)
   $prev_rel = PHP_EOL . '<link rel="prev" href="'. $config['http_home_url'] . $cat_cat . '">';
  else
   $prev_rel = PHP_EOL . '<link rel="prev" href="'. $config['http_home_url'] . $cat_cat .  'page/'. ($cstart - 1) .'">';
 }
}
$metatags .= $prev_rel . $next_rel;

2.Explanation :
- What is the next and prev meta tags?
1) These attributes rel = "next" and rel = "prev", will help to indicate the relationship between several URL.
2) Due to this layout, Google may determine that the contents of these pages associated in a logical sequence, and to transmit the user to the home page.
And :
Create a consolidated index pages to links are not scattered between individual pages page-1.html, page-2.html, and so on
Searching direct the user to the most relevant page of all the others, such as the beginning of the article, divided into several pages

Add these attributes to the main pagination pagination for categories.
Remove index.php and index.html from your homepage
1.Remove index.php and index.html from your homepage

Open .htaccess, find :

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+).html$ index.php?do=static&page=$1&seourl=$1 [L] 

Above the insert :

# Redirect with index.php site
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.(php|html) HTTP/
RewriteRule .* / [R=301,L] 

2.Explanation :

At this point, we remove duplicates on the main page index.php/html
Gluing mirrors
1.Gluing mirrors
Open .htaccess, find code :

RewriteEngine On
And then insert your choice
1) The site will be opened only for site.com

# Determine the primary mirror as the site.com (site.com replace with your domain) 
RewriteCond %{HTTP_HOST} ^www.site.com$ [NC]
RewriteRule ^(.*)$ http://site.com/$1 [R=301,L]  

2) The site will be opened only for www.site.com

#Determine the primary mirror as www.site.com (www.site.com replace with your domain)
RewriteCond %{HTTP_HOST} ^site.com$ [NC]
RewriteRule ^(.*)$ http://www.site.com/$1 [R=301,L]  

2.Explanation :
At this point, we get rid of the mirrors of the domain and set the primary mirror of our domain.
ErrorDocument 404
1.ErrorDocument 404
Open .htaccess, find code :

RewriteEngine On  

Below insert

ErrorDocument 404 /404.html  

2.Explanation :
At this point we will ask 404 page via htaccess
Error 404 instead "By publishing this address on the website could not be found"
1.Error 404 instead "By publishing this address on the website could not be found"

Open /engine/modules/main.php, find code :

if( $_SERVER['QUERY_STRING'] AND !$tpl->result['content'] AND !$tpl->result['info'] AND !$custom_news) {

 @header( "HTTP/1.0 404 Not Found" );
 msgbox( $lang['all_err_1'], $lang['news_err_27'] );

}

Change to :

if( $_SERVER['QUERY_STRING'] AND !$tpl->result['content'] AND !$tpl->result['info'] AND !$custom_news)
{
 @header("HTTP/1.0 404 Not Found");
 @header("Status: 404 Not Found");
 @require_once($_SERVER['DOCUMENT_ROOT'].'/404.html');
 exit();
}

2.Explanation :
At this point, then we will ask 404 when there is no content or errors.
Regular bread crumbs
1.Regular bread crumbs

Open /engine/engine.php, find code :

if ($config['speedbar'] AND !$view_template ) {
 
 $s_navigation = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{$config['http_home_url']}" itemprop="url"><span itemprop="title">" . $config['short_title'] . "</span></a></span>";

 if( $config['start_site'] == 3 AND $_SERVER['QUERY_STRING'] == "" AND !$_POST['do']) $titl_e = "";

 if (intval($category_id)) $s_navigation .= " {$config['speedbar_separator']} " . get_breadcrumbcategories ( intval($category_id), $config['speedbar_separator'] );
 elseif ($do == 'tags') {
  
  if ($config['allow_alt_url']) $s_navigation .= " {$config['speedbar_separator']} <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="" . $config['http_home_url'] . "tags/" itemprop="url"><span itemprop="title">" . $lang['tag_cloud'] . "</span></a></span> {$config['speedbar_separator']} " . $tag;
  else $s_navigation .= " {$config['speedbar_separator']} <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="?do=tags" itemprop="url"><span itemprop="title">" . $lang['tag_cloud'] . "</span></a></span> {$config['speedbar_separator']} " . $tag;

 } elseif ($nam_e) $s_navigation .= " {$config['speedbar_separator']} " . $nam_e;

 if ($titl_e) $s_navigation .= " {$config['speedbar_separator']} " . $titl_e;
 else {

  if ( isset($_GET['cstart']) AND intval($_GET['cstart']) > 1 ){
  
   $page_extra = " {$config['speedbar_separator']} ".$lang['news_site']." ".intval($_GET['cstart']);
  
  } else $page_extra = '';

  $s_navigation .= $page_extra;

 }
 
 $tpl->load_template ( 'speedbar.tpl' );
 $tpl->set ( '{speedbar}', '' . stripslashes ( $s_navigation ) . '' );
 $tpl->compile ( 'speedbar' );
 $tpl->clear ();

}

Change to :

if ($config['speedbar'] AND !$view_template ) {
 
 if($dle_module == "main")
  $s_navigation = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">" . $config['short_title'] . "</span></span>";
 else
  $s_navigation = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{$config['http_home_url']}" itemprop="url"><span itemprop="title">" . $config['short_title'] . "</span></a></span>";
 if( $config['start_site'] == 3 AND $_SERVER['QUERY_STRING'] == "" AND !$_POST['do']) $titl_e = "";

 if($dle_module == "cat")
  $s_navigation .= " {$config['speedbar_separator']} " . get_breadcrumbcategories ( (array)$category_id, $config['speedbar_separator'] );
 else if($dle_module == "showfull")
  $s_navigation .= " {$config['speedbar_separator']} " . get_breadcrumbcategories ( $id_cat, $config['speedbar_separator'] );
 
 if ($nam_e && $dle_module != "cat") $s_navigation .= " {$config['speedbar_separator']} " . $nam_e;
 elseif ($do == 'tags') {
  
  if ($config['allow_alt_url']) $s_navigation .= " {$config['speedbar_separator']} <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="" . $config['http_home_url'] . "tags/" itemprop="url"><span itemprop="title">" . $lang['tag_cloud'] . "</span></a></span> {$config['speedbar_separator']} " . $tag;
  else $s_navigation .= " {$config['speedbar_separator']} <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="?do=tags" itemprop="url"><span itemprop="title">" . $lang['tag_cloud'] . "</span></a></span> {$config['speedbar_separator']} " . $tag;

 }
 
 if ($titl_e) $s_navigation .= " {$config['speedbar_separator']} " . $titl_e;
 else {

  if ( isset($_GET['cstart']) AND intval($_GET['cstart']) > 1 ){
  
   $page_extra = " {$config['speedbar_separator']} ".$lang['news_site']." ".intval($_GET['cstart']);
  
  } else $page_extra = '';

  $s_navigation .= $page_extra;

 }
 
 $tpl->load_template ( 'speedbar.tpl' );
 $tpl->set ( '{speedbar}', '<span id="dle-speedbar">' . stripslashes ( $s_navigation ) . '</span>' );
 $tpl->compile ( 'speedbar' );
 $tpl->clear ();

}

Next, open /engine/modules/functions.php find :

function get_breadcrumbcategories($id, $separator="&raquo;") {
 
 global $cat_info, $config, $PHP_SELF;
 
 if( ! $id ) return;
 
 $parent_id = $cat_info[$id]['parentid'];
 
 if( $config['allow_alt_url'] ) $list = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="" . $config['http_home_url'] . get_url( $id ) . "/" itemprop="url"><span itemprop="title">{$cat_info[$id]['name']}</span></a></span>";
 else $list = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="$PHP_SELF?do=cat&category={$cat_info[$id]['alt_name']}" itemprop="url"><span itemprop="title">{$cat_info[$id]['name']}</span></a></span>";
 
 while ( $parent_id ) {
  
  if( $config['allow_alt_url'] ) $list = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="" . $config['http_home_url'] . get_url( $parent_id ) . "/" itemprop="url"><span itemprop="title">{$cat_info[$parent_id]['name']}</span></a></span>" . " {$separator} " . $list;
  else $list = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="$PHP_SELF?do=cat&category={$cat_info[$parent_id]['alt_name']}" itemprop="url"><span itemprop="title">{$cat_info[$parent_id]['name']}</span></a></span>" . " {$separator} " . $list;
  
  $parent_id = $cat_info[$parent_id]['parentid'];

  if($parent_id) {  
   if( $cat_info[$parent_id]['parentid'] == $cat_info[$parent_id]['id'] ) break;
  } 
 }
 
 return $list;
}

Change to :

function get_breadcrumbcategories($id, $separator="&raquo;") {
 
 global $cat_info, $config, $PHP_SELF, $dle_module;

 if( ! $id ) return;

 $id = end($id);
 
 $parent_id = $cat_info[$id]['parentid'];
 
 if($dle_module != "cat")
  $list = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="" . $config['http_home_url'] . get_url( $id ) . "" itemprop="url"><span itemprop="title">{$cat_info[$id]['name']}</span></a></span>";
 else
  $list = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">{$cat_info[$id]['name']}</span></span>";

 while ( $parent_id ) {
  
  if($dle_module != "cat")
   $list = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="" . $config['http_home_url'] . get_url( $parent_id ) . "" itemprop="url"><span itemprop="title">{$cat_info[$parent_id]['name']}</span></a></span>" . " {$separator} " . $list;
  else
   if($id != $cat_info[$parent_id]['id'])
    $list = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="" . $config['http_home_url'] . get_url( $parent_id ) . "" itemprop="url"><span itemprop="title">{$cat_info[$parent_id]['name']}</span></a></span>" . " {$separator} " . $list;
   else
    $list = "<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">{$cat_info[$parent_id]['name']}</span></span>" . " {$separator} " . $list;
  
  $parent_id = $cat_info[$parent_id]['parentid'];
  
  if($parent_id) {
   if( $cat_info[$parent_id]['parentid'] == $cat_info[$parent_id]['id'] ) break;
  } 
 }
 
 return $list;
}

Next, open /engine/modules/show.full.php find :

$cat_list = explode( ',', $row['category'] );

Below insert :

$id_cat = array();
$link_cats = array();
foreach($cat_list as $val)
{
 if($cat_info[$val]['parentid'] && $cat_info[$val]['parentid'] != $val)
  $link_cats[] = "<a href="" . $config['http_home_url'] . $cat_info[$val]['alt_name'] . "">{$cat_info[$val]['name']}</a>";

 $id_cat[] = $val;
}
2.Explanation :
At this point, we will do so on the page that we are not relied on itself in the bread crumbs. So it was opened since princely times
News only parent category
News only parent category
Attention! Thank you look here and read this. This correction only for the NC-2. It does not work for others
Open /engine/modules/show.short.php and show.custom.php, find code :

$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html"; <
/code>

Change to :

if($cat_info[$row['category']]['parentid'])
 $full_link = $config['http_home_url'] . $cat_info[$cat_info[$row['category']]['parentid']]['alt_name'] . "/" . $row['id'] . "-" . $row['alt_name'];
else
 $full_link = $config['http_home_url'] . $cat_info[$row['category']]['alt_name'] . "/" . $row['id'] . "-" . $row['alt_name']; 

Next, look for :

$cat_list = explode( ',', $row['category'] );  

Below insert :

$link_cats = array();
foreach($cat_list as $val)
 if($cat_info[$val]['parentid'] && $cat_info[$val]['parentid'] != $val)
  $link_cats[] = "<a href=\"" . $config['http_home_url'] . $cat_info[$val]['alt_name'] . "\">{$cat_info[$val]['name']}</a>";

Next, look for :

''{link-category}' => $my_cat_link,

Change to :

'{link-category}' => $my_cat_link, '{links-category}' => $link_cats, 
Open /engine/modules/show.full.php find :

$rel_full_link = $config['http_home_url'] . get_url( $related['category'] ) . "/" . $related['id'] . "-" . $related['alt_name'] . ".html"; 

Change to :

if($cat_info[$related['category']]['parentid'])
 $cat_url = $cat_info[$cat_info[$related['category']]['parentid']]['alt_name'];
else
 $cat_url = $cat_info[$related['category']]['alt_name'];
$rel_full_link = $config['http_home_url'] . $cat_url . "/" . $related['id'] . "-" . $related['alt_name']; 

Next, look for :

$c_url = get_url( $category_id );

Change to :

if($cat_info[$category_id]['parentid'])
 $c_url = $cat_info[$cat_info[$category_id]['parentid']]['alt_name'];
else
 $c_url = $cat_info[$category_id]['alt_name'];
Then we find (If you do not make a point 15 to do something, otherwise skip this step)

$cat_list = explode( ',', $row['category'] ); 

Below insert :

$id_cat = array();
$link_cats = array();
foreach($cat_list as $val)
{
 if($cat_info[$val]['parentid'] && $cat_info[$val]['parentid'] != $val)
  $link_cats[] = "<a href=\"" . $config['http_home_url'] . $cat_info[$val]['alt_name'] . "\">{$cat_info[$val]['name']}</a>";

 $id_cat[] = $val;
}
}

Next, we look for (this is done in any case) :

'{link-category}' => $my_cat_link, 

Change to :

'{link-category}' => $my_cat_link, '{links-category}' => $link_cats,  

Open /engine/classes/google.class.php find :

global $db, $config; 

Change to :

global $db, $config, $cat_info; 
Next, look for :

$loc = $this->home . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html"; 

Change to :

if($cat_info[$row['category']]['parentid'])
 $loc = $this->home . $cat_info[$cat_info[$row['category']]['parentid']]['alt_name'] . "/" . $row['id'] . "-" . $row['alt_name'];
else
 $loc = $this->home . $cat_info[$row['category']]['alt_name'] . "/" . $row['id'] . "-" . $row['alt_name'];

2.Explanation :
At this point, we will make access to the news only roditelskoy category. For example, we have a Home Films category, it has a sub-Action In this case, the news is that in the category of Action, may be available as /Films/militants/news.html and /militants/news.html and now we have done that would have been only /Films/news.html
Why and why and for what :
1) So we remove the unnecessary duplication of news.
And so, if you're somewhere in the output category news via tag {link-category} now we change it to {links-category}
Redirect from the first page to the main
1.Redirect from the first page to the main

Open .htaccess, find code :

RewriteEngine On   

Below insert :

# Redirect from the first page to the main
RewriteBase /
RewriteRule ^(.*)page/1(/|)$ $1 [R=301,L]  

2.Explanation :
At this point, we do the redirect with pagination 1 to the main page
With a slash on without slash
1.With a slash on without slash

Open .htaccess, find code :

# Redirects  

Above the insert :

RewriteRule ^(.+)/$ $1 [R=301,L]

Next, look for :

RewriteRule ^tags/([^/]*)(/?)+$ index.php?do=tags&tag=$1 [L]  

Change to :

RewriteRule ^tags$ index.php?do=tags [L]
RewriteRule ^tags/([^/]*)(/?)+$ index.php?do=tags&tag=$1 [L]

Open /engine/engine.php find :

header("Location: {$re_url}{$re_cat}/"); 

Change to :

header("Location: {$re_url}{$re_cat}"); 

Next, we look for :

if ($re_cat != $_GET['category'] OR substr ( $_SERVER['REQUEST_URI'], - 1, 1 ) != '/' ) {  

Change to :

if ($re_cat != $_GET['category'] OR substr ( $_SERVER['REQUEST_URI'], - 1, 1 ) == '/' ) {  

Open /engine/modules/functions.php find (4 times):

"/\"

Change to :

"\"

Open /engine/modules/show.short.php and show.custom.php find (3 times):

. "/";

Change to :

;

Next, we find :

. "/" );

Change to :

);
Then we find (anything you'll find)
"/\"

Change to :

"\"

Open /engine/modules/profile.php find :

$link_profile = $config['http_home_url'] . "user/" . urlencode( $row['name'] ) . "/"; 

Change to :

$link_profile = $config['http_home_url'] . "user/" . urlencode( $row['name'] );  
Open /engine/modules/show.full.php find (2 times):

. "/";

Change to :

;

Next, we find :

. "/" );

Change to :

);

Next, we find (All that you will find)

"/\"

Change to :

"\"

Open /engine/modules/tagscloud.php find (All that you will find):

"/\"

Change to :

"\"

Open /engine/classes/google.class.php find :

if( $this->allow_url ) $loc = $this->home . $this->get_url( $cats[id], $cat_info ) . "/"; 

Change to :

if( $this->allow_url ) $loc = $this->home . $this->get_url( $cats[id], $cat_info );   

2.Explanation :
At this point, we remove all references to slash on without him. For pages with a slash, and without it - different pages.
NoIndex
Copy all the files from the archive in the Upload to your server. Open main.tpl and after the tag

{headers}

Insert

{include file="/engine/modules/noindex.php?noindex=cstart,userinfo&index=cat,showfull,main"}

Available Values :
main - Home
date - page news for specific dates
cat - category page
showfull - page full news
search - Search Results Page
userinfo - Profile Page
register - Registration page
stats - Statistics page
pm - page personal messages
feedback - feedback page
favorites - page bookmarks
newposts - new page news
addnews - page for add news
lastnews - page latest news on site
lastcomments - page recent comments
lostpassword - Page recovery password account
static - page static
catalog - Catalog Page
alltags - page tag cloud
tags - news page of the tag cloud
allnews - Page with all the news on the site, or all the news of any user
cstart - Pages pagination


noindex - here to add value to the closing of the indexing, separated by commas.
index - here to add value to index a comma.

Download Modules
Author: Gameer. http://gameer.name/

About the Author

Saya bagian dari CKD (pesakit buah pinggang kronik) selama 8 thn. siapa-siapa nak bantu saya untuk biaya Injection.boleh email saya. Click Profile

7 comments

  1. Thanks for sharing this informative content.,
    Leanpitch provides online training in Scrum Master Certification , everyone can use it wisely.
    Join Leanpitch 2 Days CSM Certification Workshop in different cities.
    CSM online certification

    CSM online training
  2. Thanks for sharing this informative content.,
    Leanpitch provides online training in Scrum Master Certification , everyone can use it wisely.
    Join Leanpitch 2 Days CSM Certification Workshop in different cities.

    CSM training online

    Scrum master training online
  3. Thanks for sharing this informative content.,
    Leanpitch provides online training in Scrum Master Certification , everyone can use it wisely.
    Join Leanpitch 2 Days CSM Certification Workshop in different cities.

    CSM online

    Online Scrum master certification
  4. Excellent content ,Thanks for sharing this .,
    Leanpitch provides online training in CSPO, everyone can use it wisely.

    CSPO
    Product owner certification
  5. Excellent content ,Thanks for sharing this .,
    Leanpitch provides online training in CSPO, everyone can use it wisely.


    CSPO certification online
    Certified scrum product owner



  6. Excellent content ,Thanks for sharing this .,
    Leanpitch provides online training in CSPO, everyone can use it wisely.

    CSPO ONLINE TRAINING
    CSPO ONLINE
  7. Excellent content ,Thanks for sharing this .,
    Leanpitch provides online training in CSPO, everyone can use it wisely.
    CSPO certification cost
    Product owner certification
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.