- 1
- 2
foreach($keys as $key)
$settings[$type][$fieldname][$key] = (isset($fl[$type] [$fieldname] ['widget'] [$key] ) ) ? $fl[$type] [$fieldname] ['widget'] [$key] : '';
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 35
+34
foreach($keys as $key)
$settings[$type][$fieldname][$key] = (isset($fl[$type] [$fieldname] ['widget'] [$key] ) ) ? $fl[$type] [$fieldname] ['widget'] [$key] : '';
вобля
+16
div.field.field-type-filefield.field-field-videofile,
div.field.field-type-filefield.field-field-videoftp,
.content .field-field-videofile div.field-items,
.content .field-field-videoftp div.field-items,
.content .field-field-videofile div.field-item,
.content .field-field-videoftp div.field-item{clear:both;overflow:hidden;display:block;}
.field-field-videofile div.field-label-inline-first,
.field-field-videofile div.field-label-inline,
.field-field-videoftp div.field-label-inline-first,
.field-field-videoftp div.field-label-inline{clear:both;overflow:hidden;display:block;visibility:visible;}
Вот такой вот css родил. кстате где CSS разметко здеся?
+36
//
<?php if (arg(0) == 'taxonomy' && arg(1) == 'term') {
$term = taxonomy_get_term(arg(2));
if ($term->vid == 2) { ?>
LCD TV Listings
<?php } elseif ($term->vid == 1) { ?>
Size LCD TV Listings
<?php } elseif ($term->vid == 8) { ?>
Questions
<?php } elseif ($term->vid == 10) { ?>
LCD TV News
<?php } elseif ($term->vid == 11) { ?>
Related LCD TV News
<?php } ?>
<?php } ?>
Вот такое прямо в шаблоне.... no comments
+33
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1251">
<meta http-equiv="Pragma" content="no-cache">
<link rel=File-List href="SL_php2weeks_box.files/filelist.xml">
<title>PHP за 2 недели - курс обучения PHP от Школы Программирования</title>
<style type="text/css">
<!--
.style1 {font-family: Georgia, "Times New Roman", Times, serif}
.style5 {font-family: Georgia, "Times New Roman", Times, serif; font-style: italic; }
.style6 {font-family: Georgia, "Times New Roman", Times, serif; font-weight: bold; }
.style7 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style8 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
font-style: italic;
color: #009000;
}
.style9 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 18px;
}
.style10 {
font-family: "Courier New", Courier, monospace;
font-size: 12px;
}
.style11 {
font-size: 24px;
font-weight: bold;
}
.style12 {font-size: 24px; font-weight: bold; font-family: Georgia, "Times New Roman", Times, serif; }
.style13 {font-size: 24px; font-weight: bold; font-family: Georgia, "Times New Roman", Times, serif; font-style: italic; }
.style14 {font-family: Georgia, "Times New Roman", Times, serif; font-weight: bold; font-style: italic; }
.style15 {
color: #0000FF;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style17 {font-family: Georgia, "Times New Roman", Times, serif; font-style: italic; font-size: 16px; }
.style18 {
font-size: 20px
}
-->
</style>
</head>
<body lang=RU link=blue vlink=purple>
<!-- SmartResponder.ru PopOver code (begin) -->
<script language="javascript" type="text/javascript" src="popover.js"></script>
<span style="margin: 0pt; padding: 0pt; width: 400px; height: 400px; position: absolute; left: 0pt; top: 0pt; right: 0pt; z-index: 1; display: none;" id="SR_PopOver">
<table cellpadding="0" cellspacing="0" height="246" width="400">
<tbody>
<tr>
<td style="border: 1px solid rgb(0, 0, 0);">
<table bgcolor="#ffffff" cellpadding="3" cellspacing="0" height="100%" width="100%">
<tbody>
<tr bgcolor="#dddddd" valign="middle">
<td onMouseDown="popover_drag_start(event, this, 'SR_PopOver')" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 255); font-weight: bold;" align="center" width="100%">
<b>Подарок Вам - <font style="color:#009000;">Курс Web-Старт!</font><br /> 7 Бесплатных Видеоуроков По PHP!</b></td>
<td align="right">
<table cellspacing="0">
<tbody>
<tr>
<td style="padding: 0pt 3px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0); font-weight: bold;" onClick="popover_close(this, 'popover_start_to(\'SR_PopOver\', 21, 0, \'windowWidth\', parseInt(popover_obj.style.top) - popover_base_y)')" onMouseOver="this.style.cursor='pointer'" onMouseOut="this.style.cursor='default'">X</td>
</tr>
</tbody>
</table>
http://prog-school.ru/php2weeks/
вот как бывает! исходник страницы смотрите сами :)
+20
if(
('node' == arg(0) ) &&
is_numeric(arg(1) ) &&
($node = node_load(array('nid' => arg(1), 'status' => 1 ) ) ) &&
(
('chapter' == $node->type) ||
('article' == $node->type) ||
('gall' == $node->type)
) &&
isset($node->field_parentchapter) &&
is_array($node->field_parentchapter) &&
count($node->field_parentchapter)
){
/// blah blah
}
матан, или как сделать из кучи одинаковых if() один