Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/240.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Drupal-文本在哪里;提交人:;来自哪里?_Php_String_Templates_Drupal 7_Drupal Views - Fatal编程技术网

Php Drupal-文本在哪里;提交人:;来自哪里?

Php Drupal-文本在哪里;提交人:;来自哪里?,php,string,templates,drupal-7,drupal-views,Php,String,Templates,Drupal 7,Drupal Views,我的首页上有新闻,通过Viewsplugin显示。我找到了视图项(新闻)模板的位置。我用节点--news.tpl.php覆盖了它,在这里我可以更改新闻项的html。但有: <?php if ($display_submitted): ?> <span class="submitted"><?php print $submitted; ?></span> <?php endif; ?> 返回的一段代码:由Inclusible于2

我的首页上有新闻,通过
Views
plugin显示。我找到了视图项(新闻)模板的位置。我用
节点--news.tpl.php
覆盖了它,在这里我可以更改新闻项的html。但有:

<?php if ($display_submitted): ?>
  <span class="submitted"><?php print $submitted; ?></span>
<?php endif; ?>

返回的一段代码:
由Inclusible于2015年10月3日星期二提交-19:40

在内容设置中,只需执行以下操作:

作者:难以置信
作者:2015-03-1019:40:15+0100


提交的字符串来自何处?我如何编辑它?

默认节点预处理函数中设置了$Submitted变量:

通过在主题的template.php文件中实现,可以覆盖默认值,如下所示:

function MYTHEME_preprocess_node(&$variables) {
  $variables['submitted'] = // Your username logic here.
}
function MYTHEME_preprocess_node(&$variables) {
  $variables['submitted'] = // Your username logic here.
}