prowebber.ru -

 RSS
«     2016    »
 
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
 

» DataLife Engine » DLE » Multi-XFields

Multi-XFields


ProWebber.ru . .
Multi-XFields.


.

engine/inc.
engine/skins/default.css .


.xf_filt_sel {
width: 100%;
height: 40px;
float: left;
background: url(images/line_bg.gif) repeat-x bottom;
}
.xf_filt_sel span {line-height: 30px;margin-left: 10px;margin-right: 180px;font-weight: bold;color: #726F69;text-shadow: 0px 1px 0px rgba(255,255,255,0.1);}
ol.sortable {float: left;width: 100%;color: #444;marigin: 0;padding:0;}
ol.sortable li {display: block;float:left;width:100%;border-bottom: 1px dotted #aaa;}
ol.sortable li b {font-weight: normal;float:left;width: 200px;line-height: 25px;text-align: left;}
ol.sortable li b#x_name {margin-left: 10px;}
ol.sortable li b#x_cats {margin-left: 95px;}
ol.sortable li b#x_type {margin-left: 60px;}
ol.sortable li b#yes_no {margin-left: 55px;}
ol.sortable span {float: right;margin-right: 10px;margin-top: 5px;}


engine/modules/show.short.php 398 439


//
if( $xfound ) {
$xfieldsdata = xfieldsdataload( $row['xfields'] );

foreach ( $xfields as $value ) {
$preg_safe_name = preg_quote( $value[0], "'" );

if ( $value[6] AND !empty( $xfieldsdata[$value[0]] ) ) {
$temp_array = explode( ",", $xfieldsdata[$value[0]] );
$value3 = array();

foreach ($temp_array as $value2) {

$value2 = trim($value2);
$value2 = str_replace("'", "'", $value2);

if( $config['allow_alt_url'] == "yes" ) $value3[] = "<a href=\"" . $config['http_home_url'] . "xfsearch/" . urlencode( $value2 ) . "/\">" . $value2 . "</a>";
else $value3[] = "<a href=\"$PHP_SELF?do=xfsearch&amp;xf=" . urlencode( $value2 ) . "\">" . $value2 . "</a>";
}

$xfieldsdata[$value[0]] = implode(", ", $value3);

unset($temp_array);
unset($value2);
unset($value3);

}

if( empty( $xfieldsdata[$value[0]] ) ) {
$tpl->copy_template = preg_replace( "'\\[xfgiven_{$preg_safe_name}\\](.*?)\\[/xfgiven_{$preg_safe_name}\\]'is", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[xfnotgiven_{$value[0]}]", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[/xfnotgiven_{$value[0]}]", "", $tpl->copy_template );
} else {
$tpl->copy_template = preg_replace( "'\\[xfnotgiven_{$preg_safe_name}\\](.*?)\\[/xfnotgiven_{$preg_safe_name}\\]'is", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[xfgiven_{$value[0]}]", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[/xfgiven_{$value[0]}]", "", $tpl->copy_template );
}

$xfieldsdata[$value[0]] = stripslashes( $xfieldsdata[$value[0]] );


if ( preg_match( "#\\[xfvalue_{$preg_safe_name} limit=['\"](.+?)['\"]\\]#i", $tpl->copy_template, $matches ) ) {
$count= intval($matches[1]);

$xfieldsdata[$value[0]] = str_replace( "</p><p>", " ", $xfieldsdata[$value[0]] );
$xfieldsdata[$value[0]] = strip_tags( $xfieldsdata[$value[0]], "<br>" );
$xfieldsdata[$value[0]] = trim(str_replace( "<br>", " ", str_replace( "<br />", " ", str_replace( "\n", " ", str_replace( "\r", "", $xfieldsdata[$value[0]] ) ) ) ));

if( $count AND dle_strlen( $xfieldsdata[$value[0]], $config['charset'] ) > $count ) {

$xfieldsdata[$value[0]] = dle_substr( $xfieldsdata[$value[0]], 0, $count, $config['charset'] );

if( ($temp_dmax = dle_strrpos( $xfieldsdata[$value[0]], ' ', $config['charset'] )) ) $xfieldsdata[$value[0]] = dle_substr( $xfieldsdata[$value[0]], 0, $temp_dmax, $config['charset'] );

}

$tpl->set( $matches[0], $xfieldsdata[$value[0]] );

}else {
if ( dle_strrpos( $xfieldsdata[$value[0]], "~~", $config['charset'] ) ) {
$valcb = explode("\r\n", $value[4]);
$selcb = explode("~~", $xfieldsdata[$value[0]] );
$tpl2 = new dle_template();
$tpl2->dir = TEMPLATE_DIR;
$tpl2->load_template( 'xfield_checkbox.tpl' );
foreach( $selcb as $seldata) {
$tpl2->set( '{name}', str_replace("'", "&#039;", $valcb[$seldata]) );
$tpl2->compile( 'xfield_checkbox' );
}
$xfieldsdata[$value[0]] = $tpl2->result['xfield_checkbox'];
}
$tpl->copy_template = str_replace( "[xfvalue_{$value[0]}]", $xfieldsdata[$value[0]], $tpl->copy_template );
}

}
}
//


engine/modules/show.full.php 813 853


if( $xfound ) {
$xfieldsdata = xfieldsdataload( $related['xfields'] );

foreach ( $xfields as $value ) {
$preg_safe_name = preg_quote( $value[0], "'" );

if ( $value[6] AND !empty( $xfieldsdata[$value[0]] ) ) {
$temp_array = explode( ",", $xfieldsdata[$value[0]] );
$value3 = array();

foreach ($temp_array as $value2) {

$value2 = trim($value2);
$value2 = str_replace("&#039;", "'", $value2);

if( $config['allow_alt_url'] == "yes" ) $value3[] = "<a href=\"" . $config['http_home_url'] . "xfsearch/" . urlencode( $value2 ) . "/\">" . $value2 . "</a>";
else $value3[] = "<a href=\"$PHP_SELF?do=xfsearch&amp;xf=" . urlencode( $value2 ) . "\">" . $value2 . "</a>";
}

$xfieldsdata[$value[0]] = implode(", ", $value3);

unset($temp_array);
unset($value2);
unset($value3);

}

if( empty( $xfieldsdata[$value[0]] ) ) {
$tpl2->copy_template = preg_replace( "'\\[xfgiven_{$preg_safe_name}\\](.*?)\\[/xfgiven_{$preg_safe_name}\\]'is", "", $tpl2->copy_template );
$tpl2->copy_template = str_replace( "[xfnotgiven_{$preg_safe_name}]", "", $tpl2->copy_template );
$tpl2->copy_template = str_replace( "[/xfnotgiven_{$preg_safe_name}]", "", $tpl2->copy_template );
} else {
$tpl2->copy_template = preg_replace( "'\\[xfnotgiven_{$preg_safe_name}\\](.*?)\\[/xfnotgiven_{$preg_safe_name}\\]'is", "", $tpl2->copy_template );
$tpl2->copy_template = str_replace( "[xfgiven_{$preg_safe_name}]", "", $tpl2->copy_template );
$tpl2->copy_template = str_replace( "[/xfgiven_{$preg_safe_name}]", "", $tpl2->copy_template );
}

$tpl2->copy_template = str_replace( "[xfvalue_{$preg_safe_name}]", stripslashes( $xfieldsdata[$value[0]] ), $tpl2->copy_template );
}
}


engine/modules/show.custom.php 324 362

//
$xfieldsdata = xfieldsdataload( $row['xfields'] );

foreach ( $xfields as $value ) {
$preg_safe_name = preg_quote( $value[0], "'" );

if ( $value[6] AND !empty( $xfieldsdata[$value[0]] ) ) {
$temp_array = explode( ",", $xfieldsdata[$value[0]] );
$value3 = array();

foreach ($temp_array as $value2) {
$value2 = trim($value2);
$value2 = str_replace("&#039;", "'", $value2);

if( $config['allow_alt_url'] == "yes" ) $value3[] = "<a href=\"" . $config['http_home_url'] . "xfsearch/" . urlencode( $value2 ) . "/\">" . $value2 . "</a>";
else $value3[] = "<a href=\"$PHP_SELF?do=xfsearch&amp;xf=" . urlencode( $value2 ) . "\">" . $value2 . "</a>";
}

$xfieldsdata[$value[0]] = implode(", ", $value3);

unset($temp_array);
unset($value2);
unset($value3);

}

if( empty( $xfieldsdata[$value[0]] ) ) {
$tpl->copy_template = preg_replace( "'\\[xfgiven_{$preg_safe_name}\\](.*?)\\[/xfgiven_{$preg_safe_name}\\]'is", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[xfnotgiven_{$value[0]}]", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[/xfnotgiven_{$value[0]}]", "", $tpl->copy_template );
} else {
$tpl->copy_template = preg_replace( "'\\[xfnotgiven_{$preg_safe_name}\\](.*?)\\[/xfnotgiven_{$preg_safe_name}\\]'is", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[xfgiven_{$value[0]}]", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[/xfgiven_{$value[0]}]", "", $tpl->copy_template );
}

$xfieldsdata[$value[0]] = stripslashes( $xfieldsdata[$value[0]] );

if ( preg_match( "#\\[xfvalue_{$preg_safe_name} limit=['\"](.+?)['\"]\\]#i", $tpl->copy_template, $matches ) ) {
$count= intval($matches[1]);

$xfieldsdata[$value[0]] = str_replace( "</p><p>", " ", $xfieldsdata[$value[0]] );
$xfieldsdata[$value[0]] = strip_tags( $xfieldsdata[$value[0]], "<br>" );
$xfieldsdata[$value[0]] = trim(str_replace( "<br>", " ", str_replace( "<br />", " ", str_replace( "\n", " ", str_replace( "\r", "", $xfieldsdata[$value[0]] ) ) ) ));

if( $count AND dle_strlen( $xfieldsdata[$value[0]], $config['charset'] ) > $count ) {

$xfieldsdata[$value[0]] = dle_substr( $xfieldsdata[$value[0]], 0, $count, $config['charset'] );

if( ($temp_dmax = dle_strrpos( $xfieldsdata[$value[0]], ' ', $config['charset'] )) ) $xfieldsdata[$value[0]] = dle_substr( $xfieldsdata[$value[0]], 0, $temp_dmax, $config['charset'] );

}

$tpl->set( $matches[0], $xfieldsdata[$value[0]] );

} else {
if ( dle_strrpos( $xfieldsdata[$value[0]], "~~", $config['charset'] ) ) {
$valcb = explode("\r\n", $value[4]);
$selcb = explode("~~", $xfieldsdata[$value[0]] );
$tpl2 = new dle_template();
$tpl2->dir = TEMPLATE_DIR;
$tpl2->load_template( 'xfield_checkbox.tpl' );
foreach( $selcb as $seldata) {
$tpl2->set( '{name}', str_replace("'", "&#039;", $valcb[$seldata]) );
$tpl2->compile( 'xfield_checkbox' );
}
$xfieldsdata[$value[0]] = $tpl2->result['xfield_checkbox'];
}
$tpl->copy_template = str_replace( "[xfvalue_{$value[0]}]", $xfieldsdata[$value[0]], $tpl->copy_template );
}

}
//


engine/modules/search.php 1026 1066


//
$xfieldsdata = xfieldsdataload( $row['xfields'] );

foreach ( $xfields as $value ) {
$preg_safe_name = preg_quote( $value[0], "'" );

if ( $value[6] AND !empty( $xfieldsdata[$value[0]] ) ) {
$temp_array = explode( ",", $xfieldsdata[$value[0]] );
$value3 = array();

foreach ($temp_array as $value2) {

$value2 = trim($value2);
$value2 = str_replace("&#039;", "'", $value2);

if( $config['allow_alt_url'] == "yes" ) $value3[] = "<a href=\"" . $config['http_home_url'] . "xfsearch/" . urlencode( $value2 ) . "/\">" . $value2 . "</a>";
else $value3[] = "<a href=\"$PHP_SELF?do=xfsearch&amp;xf=" . urlencode( $value2 ) . "\">" . $value2 . "</a>";
}

$xfieldsdata[$value[0]] = implode(", ", $value3);

unset($temp_array);
unset($value2);
unset($value3);

}

if( empty( $xfieldsdata[$value[0]] ) ) {
$tpl->copy_template = preg_replace( "'\\[xfgiven_{$preg_safe_name}\\](.*?)\\[/xfgiven_{$preg_safe_name}\\]'is", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[xfnotgiven_{$preg_safe_name}]", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[/xfnotgiven_{$preg_safe_name}]", "", $tpl->copy_template );
} else {
$tpl->copy_template = preg_replace( "'\\[xfnotgiven_{$preg_safe_name}\\](.*?)\\[/xfnotgiven_{$preg_safe_name}\\]'is", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[xfgiven_{$preg_safe_name}]", "", $tpl->copy_template );
$tpl->copy_template = str_replace( "[/xfgiven_{$preg_safe_name}]", "", $tpl->copy_template );
}

$xfields_val = stripslashes($xfieldsdata[$value[0]]);
$tpl->copy_template = preg_replace( "'\\[xfvalue_{$preg_safe_name}\\]'i", $xfields_val, $tpl->copy_template );
}
//


. .


Z . Multi-XFields
+4
: 4263 VIP ProWebber | (8)
, .
.

#1Svezachok

  • 29 2013 13:06
  • : 5.11.2010
  • ICQ: --
  • : 24
, , "" , ,

-1

#2AID

  • 30 2013 18:51
  • : 15.07.2012
  • ICQ: --
  • : 18
full-story //

.

0

#3Renskiy

  • 8 2013 01:29
  • : 11.02.2013
  • ICQ: --
  • : 3
xfield_checkbox.tpl .

0

#4AID

  • 12 2013 00:53
  • : 15.07.2012
  • ICQ: --
  • : 18
,



{name}

0

#5kidsindigo

  • 8 2014 04:53
  • : 15.12.2009
  • ICQ: --
  • : 17
engine/modules/show.short.php 398 439
, ?

0

#6Netread

  • 21 2014 00:28
  • : 17.10.2013
  • ICQ: --
  • : 2
kidsindigo,
, //

0

#7Netread

  • 21 2014 14:17
  • : 17.10.2013
  • ICQ: --
  • : 2
1

0

#8AID

  • 3 2014 17:54
  • : 15.07.2012
  • ICQ: --
  • : 18
Netread


xfields.php, .

0

, , .

Max-energy.top - ;)

Skripters.info - . .

DLE, ! 3wave.com.ua



VDS !

, cms, ,

?

1-2
1-2
2
smile

foto
()