Egy node egyszer látható, és többet nem - Rules megvalósítással

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.

Sir_Csavar a drupal.hu-n időnként elég érdekes témákkal tud előállni.

Vagy hogy lehet megoldani, hogy tartalom beküldés után még egyszer láthassa a delikvens aztán váljon rejtetté a mező/tartalom. A gond az, hogy adatokat nem adhatok ki és regisztrálatlan userek is beküldhetik az adataikat.

A topic itt található.

Először egyszerűen egy akciót próbáltunk ráhúzni a Content is going to be viewed eseményre, hogy rejtse el a tartalmat. Igenám, viszont ez az esemény már az előtt bekövetkezik, hogy egyáltalán megjelenne a tartalom.

Végül egy Rules set lett a megoldás, abból kiindulva, hogyha egy tartalomnak van a láthatóságon kívül más alapból módosítható paramétere, akkor miért ne használjuk ki, ha egyszer úgy is el kell rejtenünk a node-ot?

A megoldás így néz ki leírva: A tartalom beküldéskor legyen alapértelmezetten kiemelt, és publikus. Két lépésben kell dolgozni a tartalommal:

  1. Ha a node kiemelt és publikus, akkor mielőtt megjelenik, állítsuk nem kiemeltre.
  2. Ha a node nem kiemelt és publikus, akkor állítsuk nem publikusra.

 

Tehát első megjelenés alkalmával, ami a node beküldése után egyből történik, átállítjuk nem kiemeltté a tartalmat, viszont publikus marad. A következő megjelenéskor, amikor már ugye nem kiemelt a tartalom, akkor viszont elrejtődik.

Hogy néz ki ez Rules-szal?

Hozz létre egy új Rules setet, adj hozzá egy "Tartalom" típusú változót.

A létrehozott Rules setre kattintva a jobb oldali tabon kattints az "Add new rule"-ra.

Állítsd be a következőket:

  1. Add condition: "Content is sticky = False"
  2. Add an action: "Tartalom elrejtése".
  3. Súlyát állítsd -1-re.

 

Hozz létre a Rules seten belül még egy Rulest a következőkkel:

  1. Add condition: "Content is sticky = TRUE"
  2. Add an action: "Tartalom nem kiemelté tétele".

 

Utolsó lépésként az admin/rules/trigger/add menüpontnál hozz létre egy új Rulest, válaszd ki a "Content is going to be viewed" eseményt, majd:

  1. Add condition: "Content has type =tartalomtípusod neve, amivel dolgozni akarsz"
  2. Add an action: Válaszd ki az előbb létrehozott Rules setedet a listából

Hozzászólások

Guangdong New Vision Film

Thanks, Edna Sales for

Thanks, Edna Sales for szantogabor.com

Thanks, Jack Goldsmith for

Thanks, Jack Goldsmith for szantogabor.com

I truly love your blog.. Very

I truly love your blog.. Very nice colors & theme.
Did you build this amazing site yourself? Please reply back as I?m wanting to create
my own personal website and would love to know where you got
this from or what the theme is named. Thanks!

When I initially left a

When I initially left a comment I appear to have clicked on the -Notify me when new comments are added-
checkbox and now each time a comment is added I get four emails with the same comment.
There has to be a way you can remove me from that service?
Many thanks! https://trello.com/robertd871

Hello, i feel that i noticed

Hello, i feel that i noticed you visited my blog so i got here to ?return the prefer?.I am attempting to
to find issues to enhance my website!I assume its adequate to use a few of your ideas!!

Hi, Neat post. There's an

Hi, Neat post. There's an issue along with your website in web explorer,
could check this? IE still is the market leader and a good part of folks will miss your
excellent writing due to this problem.

It's amazing in favor of me

It's amazing in favor of me to have a web site, which is beneficial in favor of my experience.
thanks admin

Hi mates, its fantastic

Hi mates, its fantastic paragraph regarding tutoringand entirely explained, keep it up all the
time.

When I initially commented I

When I initially commented I seem to have clicked the -Notify me when new comments are added- checkbox and from now on each time a comment is added I get four emails with the exact same comment.
There has to be an easy method you are able to remove me from
that service? Cheers!

You made some good points

You made some good points there. I looked on the internet for the subject matter
and found most guys will go along with with your website.

Hi friends, its impressive

Hi friends, its impressive paragraph regarding tutoringand fully defined,
keep it up all the time.

Its good as your other posts

Its good as your other posts :D, thanks for putting up.

Hello There. I found your

Hello There. I found your blog using msn. This is a very well written article.
I'll be sure to bookmark it and return to read more
of your useful information. Thanks for the post. I'll definitely return.

This is a good tip especially

This is a good tip especially to those fresh to the blogosphere.
Short but very precise information... Thank you for sharing this one.
A must read article!

Valuable information. Lucky

Valuable information. Lucky me I found your site unintentionally, and I'm
shocked why this twist of fate did not took place earlier!
I bookmarked it.

I simply couldn't depart your

I simply couldn't depart your web site prior to suggesting that I
actually loved the usual information an individual supply on your visitors?

Is gonna be back continuously to investigate cross-check
new posts

The other day, while I was at

The other day, while I was at work, my cousin stole my apple ipad and tested to see if it can survive a 40 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!

I was just looking for this

I was just looking for this info for some time. After six hours of continuous Googleing, at last I got it in your site.
I wonder what's the lack of Google strategy that don't rank this type of informative websites in top of the
list. Usually the top sites are full of garbage.

I really like what you guys

I really like what you guys are up too. This type of clever
work and reporting! Keep up the amazing works guys I've included you guys to my own blogroll.

Thanks on your marvelous

Thanks on your marvelous posting! I genuinely enjoyed reading it, you may be a
great author.I will be sure to bookmark your blog and may come back from now on. I want to encourage you
to ultimately continue your great work, have a nice day!

A fascinating discussion is

A fascinating discussion is definitely worth comment.
I think that you ought to publish more about this subject, it
may not be a taboo subject but typically people don't speak about these topics.
To the next! Best wishes!!

I leave a response each time

I leave a response each time I appreciate a post on a blog or I have something to add
to the conversation. Usually it's triggered by
the passion communicated in the article I read. And on this
article Válasz a hozzászólásra. I was excited enough to post a thought ;) I
actually do have a few questions for you if it's allright.
Is it simply me or does it give the impression like some
of the responses come across as if they are coming from brain dead
people? :-P And, if you are writing on additional places, I would like to keep up with
anything fresh you have to post. Would you make a list the complete urls of all your public sites like your linkedin profile, Facebook page or twitter feed?

Please let me know if you're

Please let me know if you're looking for a author for your site.
You have some really good posts and I feel I would be a good asset.
If you ever want to take some of the load
off, I'd really like to write some articles for your blog in exchange for a link back
to mine. Please blast me an email if interested.

Thanks!

You made some good points

You made some good points there. I did a search
on the subject and found most guys will consent with your website.

I like this site it's a

I like this site it's a master piece! Glad I observed this on google.

Every weekend i used to visit

Every weekend i used to visit this site, as i want enjoyment, as this this site conations really pleasant funny
material too.

Thank you for the sensible

Thank you for the sensible critique. Me & my neighbor were just preparing to do a little research on this.
We got a grab a book from our area library but I
think I learned more from this post. I'm very glad to
see such fantastic information being shared freely out
there.

My relatives every time say

My relatives every time say that I am wasting my time here at web, except I know I am getting knowledge
daily by reading thes good articles.

Keep functioning ,great job!

Keep functioning ,great job!

Rattling great information

Rattling great information can be found on site.

Some times its a pain in the

Some times its a pain in the ass to read what blog owners wrote but this
site is very user friendly!

PHENYL ACETATE

Definitely believe that which

Definitely believe that which you said. Your favorite justification seemed to be on the internet the simplest thing to be aware of.
I say to you, I definitely get irked while people
think about worries that they plainly do not know about.
You managed to hit the nail upon the top and also defined out the whole
thing without having side effect , people could take a signal.
Will probably be back to get more. Thanks

Hello, yes this post is

Hello, yes this post is genuinely fastidious and I have learned lot of things from it
on the topic of blogging. thanks.

thank you for this wondrous

thank you for this wondrous post, I am glad I observed this
web site on yahoo.

Hello there, You've done a

Hello there, You've done a great job. I will definitely
digg it and personally recommend to my friends. I'm confident they'll be benefited from this website.

What's up all, here every

What's up all, here every person is sharing these kinds of know-how,
thus it's good to read this blog, and I used to pay a visit this website everyday.

My partner and I stumbled

My partner and I stumbled over here coming from a different web page and thought I should check things out.
I like what I see so now i'm following you. Look forward to checking out your web page again.

Sweet blog! I found it while

Sweet blog! I found it while browsing on Yahoo News.
Do you have any suggestions on how to get listed in Yahoo News?
I've been trying for a while but I never seem to get there!
Many thanks

Really instructive and good

Really instructive and good bodily structure of content, now
that's user genial (:.

I couldn't resist commenting.

I couldn't resist commenting. Well written!

you are actually a just right

you are actually a just right webmaster. The web site loading velocity is amazing.
It kind of feels that you are doing any distinctive trick.
Also, The contents are masterwork. you have performed a
wonderful process on this matter! http://www.good-tutorials.com/users/siffft

It is the best time to make a

It is the best time to make a few plans for the longer term and
it is time to be happy. I have read this publish and if I may
just I want to suggest you some attention-grabbing issues or suggestions.

Maybe you can write next articles regarding
this article. I desire to learn more issues approximately it!

I happen to be commenting to

I happen to be commenting to make you know what a superb discovery my wife's child undergone reading your
web site. She realized plenty of things, which include what
it's like to have an amazing giving mood to
make other folks without problems master certain impossible issues.
You truly did more than visitors' expected results.
Many thanks for showing these invaluable, trustworthy, explanatory as well
as unique tips about this topic to Sandra.

When someone writes an

When someone writes an paragraph he/she maintains the idea of a user in his/her brain that how a user can be
aware of it. Thus that's why this post is amazing. Thanks!

I got this site from my buddy

I got this site from my buddy who informed me about this site and now this
time I am browsing this site and reading very informative articles or reviews here.

Spot on with this write-up, I

Spot on with this write-up, I seriously believe that this amazing site needs a great
deal more attention. I'll probably be back again to see
more, thanks for the information! https://imageshack.com/user/robertd813

Hi there very cool blog!! Man

Hi there very cool blog!! Man .. Beautiful ..
Wonderful .. I'll bookmark your web site and take the feeds additionally...I'm satisfied to find numerous
useful information right here in the publish, we'd like develop extra techniques on this
regard, thanks for sharing.

I don't even understand how I

I don't even understand how I finished up here,
but I believed this put up was once great. I do not understand who you are but certainly you're going to
a well-known blogger if you happen to aren't already. Cheers!

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.