Computed field használata CCK mezőkön végzet műveletekhez.

  • 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.

A fórumon is felmerült, és én is mindig keresgélek, ha Computed Field-et kell használnom, úgyhogy gyorsan lejegyzetelem, amíg friss bennem a téma. :)

Gyorsa összefoglalás: A Computed field egy olyan CCK mező, amelyneket a tartalom szerkesztésekor nem lehet módosítani, hanem előre megírt php kóddal a node mentésekor töltődik fel adattal.

Az én esetemben a feladat az volt, hogy a felhasználó a születési dátumot adja meg, de az jelenjen meg, hogy hány éves az illető.

Felvettem egy CCK mezőt, aminek az lett a neve, hogy szul_ev és egy computed field-et kor névvel.

A computed field Computed Code mezőjébe mindig olyan php kódot kell írni, aminek a vége: $node_field[*]['value']=.

Az én esetemben a kód ennyire egyszerű:

[geshifilter-drupal6]$ev = (date("Y")); $node_field[0]['value'] = $ev-$node->field_szul_ev[0]['value']-1;[/geshifilter-drupal6]

Egy másik CCK mezőre a következőképpen hivatkozunk: $node->field_mezod_neve_amit_megadtal[*]['value']

A * itt egy sorszám. Ha felvettél egy mezőt, és beállítottad, hogy az Értékek száma mondjuk 5, akkor 0-4-ig egyesével hivatkozhatsz rá.

Most, hogy ezt így leírtam, remélem meg is jegyzem, mire legközelebb használnom kell. :)

Update: Ha cf beállításainál nem adjuk meg, hogy az adatbázisba is mentse az értéket, akkor az minden rendereléskor le fog futni, ergo mindig aktuális lesz az év.

Hozzászólások

Highly beneficial, looking

Highly beneficial, looking onward to coming back.

I appreciate the content on

I appreciate the content on your web site. Cheers!

fotbollströjor billige

fotbollströjor barn

websitetestlink. js-pcb.

gtublog. sayafi. ysiaq.

Thanks with regard to

Thanks with regard to offering this sort of wonderful content material.

kostakopoulos.

elitelaunch. unisotong.

Thanks, this site is

Thanks, this site is extremely useful.

feenel. infinity-october.

kimbweta. risingapes.

Hey there! I could have sworn

Hey there! I could have sworn I've been to this website
before but after checking through some of the post
I realized it's new to me. Anyways, I'm definitely happy I found it and I'll be book-marking and checking back frequently!

My web site: caremark pharmacy

Attractive section of

Attractive section of content. I simply stumbled upon your
blog and in accession capital to claim that I acquire in fact enjoyed account your
weblog posts. Anyway I'll be subscribing in your feeds or even I achievement you get right of entry to persistently fast.

my weblog; cigna home delivery pharmacy

I've been surfing online

I've been surfing online greater than three hours these days, yet I by no means found any fascinating article like yours.
It is beautiful worth sufficient for me. Personally, if all web
owners and bloggers made excellent content as you did, the web can be a
lot more helpful than ever before.

Also visit my website :: prednisolone

Hello, I think your site

Hello, I think your site might be having browser compatibility issues.
When I look at your blog site in Safari, it looks
fine but when opening in Internet Explorer, it has some overlapping.
I just wanted to give you a quick heads
up! Other then that, very good blog!

Also visit my weblog - canadian pharmacy

Article writing is also a

Article writing is also a fun, if you know after that you
can write otherwise it is difficult to write.

My homepage: canadian pharmacy

Hi there! Do you know if they

Hi there! Do you know if they make any plugins to safeguard against hackers?
I'm kinda paranoid about losing everything I've worked hard on. Any
suggestions?

My blog post ed drugs

Today, while I was at work,

Today, while I was at work, my sister stole my iPad
and tested to see if it can survive a forty foot drop, just so she can be a youtube sensation. My iPad
is now broken and she has 83 views. I know this is completely off topic but I had to share it with someone!

Here is my web page: cialis in canada

Right now it seems like

Right now it seems like Expression Engine
is the best blogging platform available right now. (from what I've read) Is that what you're using on your blog?

Feel free to visit my page ... canadian pharmacies shipping to usa

It's going to be finish of

It's going to be finish of mine day, except before
ending I am reading this wonderful post to improve my
knowledge.

Also visit my blog post :: canada pharmacies

I'm impressed, I must say.

I'm impressed, I must say. Rarely do I come across a blog that's both
educative and entertaining, and without a doubt, you've
hit the nail on the head. The issue is something too few folks are speaking intelligently about.

I'm very happy I stumbled across this during my search for something relating to this.

My blog :: prednisone

I have read several excellent

I have read several excellent stuff here.
Definitely price bookmarking for revisiting.
I wonder how much attempt you put to make one of these wonderful informative web site.

My web site: prednisone

Great information. Lucky me I

Great information. Lucky me I recently found your site by chance (stumbleupon).
I have saved it for later!

Also visit my webpage: prednisone

I do not know whether it's

I do not know whether it's just me or if everybody else encountering issues with
your site. It appears like some of the text on your posts are running off the
screen. Can someone else please provide feedback and let me know
if this is happening to them as well? This might be a problem with
my internet browser because I've had this happen previously.
Appreciate it

my website ... prednisone

If you are going for finest

If you are going for finest contents like me, just pay a visit this web page all the time because it provides quality contents, thanks

Also visit my web page; prednisone

My spouse and I stumbled

My spouse and I stumbled over here coming
from a different web page and thought I might check things out.
I like what I see so now i am following you. Look forward to finding out about your web page
for a second time.

My blog; clonidine

If some one needs expert view

If some one needs expert view concerning running a blog then i advise him/her to pay a
quick visit this blog, Keep up the pleasant work.

My blog post: canadian pharmacy

What's up, I read your blogs

What's up, I read your blogs on a regular basis. Your writing style
is witty, keep it up!

Here is my web blog :: women using cialis

It's perfect time to make

It's perfect time to make some plans for the future and it is time to be happy.
I've learn this publish and if I could I wish to counsel you some interesting issues or suggestions.

Perhaps you could write next articles referring
to this article. I want to learn even more issues about
it!

What i do not understood is

What i do not understood is in fact how you are
no longer actually a lot more well-favored than you may be
right now. You're so intelligent. You realize thus significantly on the subject of this subject, produced me in my
view imagine it from a lot of numerous angles. Its like men and women don't seem to be fascinated except it's something to accomplish with Lady gaga!
Your personal stuffs outstanding. Always take care of it up!

My webpage - Best canadian pharcharmy online reviews

Today, while I was at work,

Today, while I was at work, my cousin stole my iphone and tested to see if it can survive a thirty foot drop, just so she can be a youtube sensation.
My iPad is now broken and she has 83 views. I know this is
totally off topic but I had to share it with someone!

Also visit my webpage: Cialis 20 mg price canada

I do not know if it's just me

I do not know if it's just me or if perhaps everybody
else encountering problems with your blog. It seems like
some of the written text on your content are running off the screen. Can somebody else please comment and let me know if this is happening to them as well?
This could be a problem with my web browser because I've had this happen before.

Thanks

Here is my webpage ... dyson vacuum

I have to thank you for the

I have to thank you for the efforts you've put in writing this blog.
I'm hoping to view the same high-grade content by you
in the future as well. In truth, your creative writing abilities has inspired me
to get my own, personal website now ;)

Also visit my blog post dyson dc24

Hmm it looks like your blog

Hmm it looks like your blog ate my first comment (it was super long) so
I guess I'll just sum it up what I wrote and say, I'm thoroughly enjoying your blog.
I too am an aspiring blog writer but I'm still new to everything.
Do you have any suggestions for newbie blog writers?
I'd really appreciate it.

Feel free to surf to my website; dyson dc33

My brother suggested I might

My brother suggested I might like this blog.
He was once entirely right. This post truly made
my day. You cann't believe simply how a lot time
I had spent for this information! Thanks!

Also visit my homepage ... cialis.com

We stumbled over here by a

We stumbled over here by a different web address and thought I may as well check things out.
I like what I see so i am just following you. Look forward to going over
your web page again.

Feel free to visit my page ... little blue pill

hey there and thank you for

hey there and thank you for your info – I have certainly picked up anything new from right here.
I did however expertise several technical points using this web site, since I
experienced to reload the site a lot of times previous to I could
get it to load correctly. I had been wondering if your hosting is OK?
Not that I am complaining, but slow loading
instances times will often affect your placement in google and could
damage your high quality score if advertising and marketing with Adwords.
Well I am adding this RSS to my email and could look out for
a lot more of your respective intriguing content.
Ensure that you update this again soon.

My homepage :: cialis oral

Hurrah! Finally I got a web

Hurrah! Finally I got a web site from where I be able to actually obtain helpful
information regarding my study and knowledge.

my site ... canadian drugs online

Simply wish to say your

Simply wish to say your article is as surprising.
The clarity in your post is just nice and i could assume you are an expert in this subject.
Well together with your permission allow me
to clutch your feed to keep updated with impending post. Thank you 1,000,000
and please continue the gratifying work.

Feel free to surf to my homepage ... online pharmacy cialis

Thanks for finally talking

Thanks for finally talking about > Szántó Gábor Drupal oldala
- Computed field használata CCK mezőkön végzet műveletekhez.
< Loved it!

Here is my website - cialis from canada

Hi, just wanted to say, I

Hi, just wanted to say, I liked this article.
It was practical. Keep on posting!

Its like you read my mind!

Its like you read my mind! You seem to grasp so much approximately this,
such as you wrote the book in it or something. I feel that you
just could do with some % to power the message home a little bit, but
other than that, this is wonderful blog. A fantastic read.
I will certainly be back.

Wonderful items from you,

Wonderful items from you, man. I've keep in mind your stuff previous to and you are
just too great. I actually like what you have got right here,
really like what you're saying and the best way by which you assert it.

You're making it entertaining and you continue to take care of to stay it wise.
I cant wait to learn much more from you. This is actually a wonderful website.

Why users still use to read

Why users still use to read news papers when in this technological globe everything is accessible on net?

my weblog :: buy cialis online canada

It's truly a great and useful

It's truly a great and useful piece of information. I am happy that you just
shared this useful information with us. Please stay us informed like
this. Thanks for sharing.

Feel free to visit my weblog - cialis online pharmacy

I've been browsing online

I've been browsing online more than 4 hours today,
yet I never found any interesting article like yours.

It is pretty worth enough for me. In my view, if all web owners and bloggers made good content as you did, the net
will be much more useful than ever before.

Feel free to surf to my webpage: generic drugs

I enjoy reading through an

I enjoy reading through an article that will make men and women think.
Also, thank you for permitting me to comment!

Stop by my web site ... online pharmacy for cialis

I am regular visitor, how are

I am regular visitor, how are you everybody? This piece of writing posted at this website
is really good.

Also visit my page cialis online canada pharmacy

Wow that was strange. I just

Wow that was strange. I just wrote an extremely
long comment but after I clicked submit my comment didn't appear.
Grrrr... well I'm not writing all that over again. Anyways, just wanted
to say wonderful blog!

Have a look at my webpage ... canadian cialis online

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.