We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Change entry status when userl eaves a comment

Development and Programming

Yuri's avatar
Yuri
273 posts
17 years ago
Yuri's avatar Yuri

We had following problem:

I have a single-entry page with a comment form. I would like the corresponding entry status to change when any user, except the entry’s author, leaves a comment.

So we wrote the following extension (see attachment). Note that you need to set up two new statuses: answered and unanswered Also note that when you call {exp:weblog:entries} call it as {exp:weblog:entries status="answered|unanswered|open"}

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hiya,

Looks like a really great addition to the comments code. Well done on this one. Will try this out later on when I get some time.

Could come in very handy for a sort of support ticket post type of system.

Best wishes,

Mark

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hiya,

Just thinking about this one it might be nice if the extension had a settings section so that people could choose what to call their statuses? Answered and Unanswered are very good but other people might want other names.

Just a thought though. Great extension.

Best wishes,

Mark

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hi there,

I just tried this out and I’m not sure if I’m doing something wrong somewhere as I can’t get this to work. I have a standard new install of EE and have made two new statuses answered and unanswered. I then placed the status=”answered|unanswered|open” parameter into the standard comments template that is installed with EE and then posted a comment but the status doesn’t change.

Is there something I a missing somewhere perhaps?

Thanks for any help on this.

Best wishes,

Mark

       
Yuri's avatar
Yuri
273 posts
17 years ago
Yuri's avatar Yuri

This is actually what the extension was developed for - to help build communication system between users and support team.

Regarding extending it with options - sure, it can easily be done, I just needed it to be developed quickly. Anyone can go ahed improving the extension now 😊

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hiya,

Just wondering if you have any ideas on why it isn’t working for me though? 😉

Best wishes,

Mark

       
Yuri's avatar
Yuri
273 posts
17 years ago
Yuri's avatar Yuri

Forgot to mention that when the entry is created its status needs to be set up as unanswered.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Ahah,

I will give that a go, thanks!!

Also as a small aside I noticed that when you view the extensions page the description for this extension is coming up in Russian. I guess you are Russian yourself?

Best wishes,

Mark

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
17 years ago
Robin Sowell's avatar Robin Sowell

Thanks yurrua!

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hiya,

Sorry I must be thick here or something. Do you not mean that it should be set to answered first and then when someone different posts it will then be set to unanswered?

I tried both ways. Setting it to answered and setting it to unanswered but neither seem to work for me. Also does this keep on working say if someone posts and then you change the status back after say posting an answer?

Best wishes,

Mark

       
Yuri's avatar
Yuri
273 posts
17 years ago
Yuri's avatar Yuri

Robin, welcome 😊

Mark, I am Ukrainian, but the site is developed in Russian

Here is how extension is working for me: 1. User logs in 2. User creates an entry using SAEF. The status of the entry is authomatically set to unanswered. (I created additional status group for that, but that should not matter). We regard the entry as unanswered support request 3. Admin (not this whould not be the same user who created the entry) logs in into CP and sees new entry with status unanswered. He then goes to this entry’s page on the website. 4. Admin leaves a comment to the entry. The entry status is set to “answered” 5. User logs in, leaves a comment, the status is set to “unanswered”

Steps 3-5 can be repeated as long as people want…

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hiya,

Sorry about the Russian part. Not very good on my languages me!!

Thanks for the info. I will try it in this way instead as soon as I get the chance.

Best wishes,

Mark

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.