Tartalombeküldési form dátumformátumának megváltoztatása

  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.
Kategória: 
Snippet

A felhasználókat meg tudja zavarni a beküldés idejéhez beírt 2010-07-08 11:49:42 +0200 dátumformátum. Így alakíthatjuk át hook_form_alterből, kösz Yorknak és a #drupal.hu csatornának a substr tippért, én magamtól először valamilyen regexpes megoldást kerestem. :)

<?php
$is_node_form = substr($form_id, -9) ;
if ($is_node_form === 'node_form') {
$node = node_load(arg(1));
if ($node->created) {
$form['author']['date']['#default_value'] = format_date($node->created, 'custom', 'Y-m-d H:i:s') ;
}
$form['author']['date']['#description'] = t
('Format: %time. Leave blank to use the time of form submission.', array('%time' => !empty($node->date) ? $node->date : format_date($node->created, 'custom', 'Y-m-d H:i:s')));
}
?>

Hozzászólások

Great looking site. Presume

Great looking site. Presume you did a bunch of your very own coding.

I love this site - its so

I love this site - its so usefull and helpfull.

ynmy. dipul. baicechina.

Appreciate it! It is an

Appreciate it! It is an fantastic web site!

Fantastic page, Carry on the

Fantastic page, Carry on the useful job. Thank you so much!|

mercury. campuscreators.

promolistic. rayanwebhost.

vins-zink. open-innovator.

ysiaq. bluebell. mercury.

ysiaq. unisotong. samsung.

vins-zink. samsung.

So revealing....look ahead to

So revealing....look ahead to returning.

Truly....such a advantageous

Truly....such a advantageous site.

I adore this website - its so

I adore this website - its so usefull and helpfull.

forum. clevio. einstein.

dhc2016. campuscreators.

elitelaunch. book-dream.

islandbridge.

You have remarkable knowlwdge

You have remarkable knowlwdge on this website.

steerhome. libresite.

dhc2016. ysiaq.

steerhome. bluebell.

homelandlovers. soikeo.

Surprisingly individual

Surprisingly individual friendly website. Immense info offered on couple of clicks.

You've possibly the best web

You've possibly the best web pages.

mealdam. ghabolshi. rier.

vzglyadzagran.

Hozzászólás

A mező tartalma nem nyilvános.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Engedélyezett HTML elemek: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <del> <img>
  • A webcímek és email címek automatikusan linkekké alakulnak.
  • A sorokat és bekezdéseket a rendszer automatikusan felismeri.
  • Engedélyezett HTML elemek: <a> <blockquote> <br> <cite> <code> <dd> <del> <div> <dl> <dt> <em> <li> <ol> <p> <span> <strong> <ul>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <php>, <python>, <ruby>, <sql>. The supported tag styles are: <foo>, [foo].
  • Minden email cím át lesz alakítva ember által olvasható módon, vagy (ha a JavaScript engedélyezett) ki lesz cserélve kattintható, de biztonságos hivatkozásra.