Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dlenettr
dlenettr / Broken Links (168)
Created September 18, 2014 14:52
Broken Links (168)
@dlenettr
dlenettr / İlave Alanlar için Çoklu Arama (252)
Created September 19, 2014 09:08
İlave Alanlar için Çoklu Arama (252)
// İlave alan çoklu arama
} elseif ($do == 'xfsearch') {
if ($cstart) {
$cstart = $cstart - 1;
$cstart = $cstart * $config['news_number'];
}
$fields = array(
'year' => "Yıl",
'country' => "Ülke",
'rating' => "Değerlendirme",
@dlenettr
dlenettr / Custom için xfield parametresi (332)
Created September 19, 2014 09:10
Custom için xfield parametresi (332)
Dosya : engine/modules/functions.php
Bul :
----------------8<---------------------
global $db, $is_logged, $member_id, $xf_inited, $cat_info, $config, $user_group, $category_id, $_TIME, $lang, $smartphone_detected, $dle_module, $allow_comments_ajax, $PHP_SELF, $news_date, $banners, $banner_in_news, $url_page, $user_query, $custom_news, $global_news_count;
----------------8<---------------------
İle değiştir ( Yani arasına $_custom_xfield ekle ):
@dlenettr
dlenettr / Reklam Kodu 10.1 için (398)
Created October 11, 2014 13:21
Reklam Kodu 10.1 için (398)
if( $config['allow_banner'] ) include_once ENGINE_DIR . '/modules/banners.php';
if( $config['allow_banner'] AND count( $banners ) ) {
foreach ( $banners as $name => $value ) {
$tpl->result['content'] = str_replace( "{banner_" . $name . "}", $value, $tpl->result['content'] );
if ( $value ) {
$tpl->result['content'] = str_replace ( "[banner_" . $name . "]", "", $tpl->result['content'] );
$tpl->result['content'] = str_replace ( "[/banner_" . $name . "]", "", $tpl->result['content'] );
}
}
}
@dlenettr
dlenettr / Download Modülünde Yer değişikliği (450)
Created November 1, 2014 20:15
Download Modülünde Yer değişikliği (450)
} elseif( $config['files_count'] ) {
$replace_1[] = "<span class=\"attachment\">[{$size}] ({$lang['att_dcount']} {$row['dcount']}) <a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a></span>";
$replace_2[] = "<span class=\"attachment\">[{$size}] ({$lang['att_dcount']} {$row['dcount']}) <a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >\\1</a></span>";
} else {
$replace_1[] = "<span class=\"attachment\">[{$size}] <a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a></span>";
$replace_2[] = "<span class=\"attachment\">[{$size}] <a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >\\1</a></span>";
}
@dlenettr
dlenettr / Örnek SQL kodu ( 464 )
Created November 11, 2014 18:26
Örnek SQL kodu ( 464 )
<?php
/*
DLE MySQL Connect Example
Author: Mehmet Hanoğlu ( MaRZoCHi )
*/
define ( 'DATALIFEENGINE', true );
define ( 'ROOT_DIR', dirname ( __FILE__ ) );
define ( 'ENGINE_DIR', ROOT_DIR . '/engine' );
@dlenettr
dlenettr / Highslide CSS (514)
Created November 29, 2014 19:35
Highslide CSS (514)
.highslide-wrapper, .highslide-outline {
background: #FFFFFF;
}
.highslide-image {
border: 2px solid #FFFFFF;
}
.highslide-active-anchor {
visibility: hidden;
@dlenettr
dlenettr / Haber Manşet Sistemi (344)
Created December 24, 2014 05:07
Haber Manşet Sistemi (344)
#mansetx {
float: left;
border: 1px #ccc solid;
}
#mansetx-selector ul {
float: left;
width: 100%;
height: 30px;
background: #f1f1f1;
margin:0;
@dlenettr
dlenettr / Attachment alanındaki id yi almak ? (572)
Created December 24, 2014 05:25
Attachment alanındaki id yi almak ? (572)
// Custom Attachments v1.2
if( strpos( $tpl->copy_template, "{attach " ) !== false ) {
preg_match( "#\{attach\s(.*?)\}#", $tpl->copy_template, $matches ); $param_str = $matches[1];
$attach = array( "order" => "date", "by" => "DESC" );
if( preg_match( "#xfield=['\"](.+?)['\"]#i", $param_str, $match ) ) { $attach['xfield'] = $db->safesql( $match[1] ); }
if( preg_match( "#story=['\"](.+?)['\"]#i", $param_str, $match ) ) { $attach['story'] = $db->safesql( $match[1] ); }
if( preg_match( "#ignore=['\"](.+?)['\"]#i", $param_str, $match ) ) { $attach['ignore'] = $db->safesql( $match[1] ); }
if( preg_match( "#template=['\"](.+?)['\"]#i", $param_str, $match ) ) { $attach['template'] = $db->safesql( $match[1] ); }
if( preg_match( "#order=['\"](.+?)['\"]#i", $param_str, $match ) ) { $attach['order'] = ( empty( $match[1] ) ) ? "date" : $db->safesql( $match[1] ); }
if( preg_match( "#by=['\"](.+?)['\"]#i", $param_str, $match ) ) { $attach['by'] = ( empty( $match[1] ) ) ? "DESC" : $db->safesql( $m
@dlenettr
dlenettr / İçerikte kod gösterme (584)
Created December 27, 2014 19:08
İçerikte kod gösterme (584)
/*
Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;