Skip to content

Instantly share code, notes, and snippets.

@dlenettr
Created February 1, 2016 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlenettr/0f8b188f058f3e18e127 to your computer and use it in GitHub Desktop.
Save dlenettr/0f8b188f058f3e18e127 to your computer and use it in GitHub Desktop.
DLE önceki konu, sonraki konu eklentisi (PHP) (634)
// Önceki sonraki konu eklentisi
if ( $dle_module == "showfull" ) {
if ( isset( $prev_news ) && $prev_news ) {
$tpl->set( '{prev-link}', get_full_link( $prev_news['id'], $prev_news['category'], $prev_news['alt_name'], $prev_news['date'] ) );
$tpl->set_block( "'\\[prev-news\\](.*?)\\[/prev-news\\]'si", "\\1" );
} else {
$tpl->set_block( "'\\[prev-news\\](.*?)\\[/prev-news\\]'si", "" );
}
if ( isset( $next_news ) && $next_news ) {
$tpl->set( '{next-link}', get_full_link( $next_news['id'], $next_news['category'], $next_news['alt_name'], $next_news['date'] ) );
$tpl->set_block( "'\\[next-news\\](.*?)\\[/next-news\\]'si", "\\1" );
} else {
$tpl->set_block( "'\\[next-news\\](.*?)\\[/next-news\\]'si", "" );
}
}
// Önceki sonraki konu eklentisi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment