Help needed - Listing website with labels

5 posts by 2 authors in: Forums > CMS Builder
Last Post: July 8, 2014   (RSS)

By shawn - July 8, 2014

Hi Everyone,

I'm creating a basic listings website. I have created 3 labels / stickers in HTML that get added to a listing (New, Featured and Popular).

I want to achieve the following via check boxes in CMS Builder:

- For "New" listings, the checkbox will be checked by default (but can be unchecked). For every new listing that I add to the website, it tags a listing with the "New" label. Then after 30 days it automatically removes the "New" label from the listing. (The actual listing however remains active - only the label will be removed).

- If you check the "Featured" checkbox, then the "Featured" label will be added to the listing. I want to then display those featured listings on the homepage of the website. (So only listings tagged as featured will appear on the homepage.)

- If you check the "Popular" checkbox, then the "Popular" label is added to the listing. I then want any listings tagged as popular to appear highest on the page or in search results.

In all 3 of the above, only the new listings will have their labels removed automatically. However all 3 can be manually unchecked to remove their individual labels.

If anyone could assist me getting started with this, I would appreciate the guidance.

Thank you,
Shawn

Attachments:

Listing.jpg 35K

By claire - July 8, 2014

Hi Shawn

Basically what you'd need to get started with this is a cron job plugin to change the labels after 30 days, and then a few getRecords functions to get the right listings in each area.

It's not complicated if you've got a sound knowledge of PHP. What's your level of technical expertise?

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By shawn - July 8, 2014

Hi Claire, 

Sadly my php knowledge is non existent. I'm more on the design and front end side. So any help doing something would be great.

Kind regards

Shawn

By shawn - July 8, 2014

Ok, so I've basically setup a checkbox with the fieldname "new" - checked by default. This makes my label show correctly. If I uncheck it now, it disappears which is correct.

So what I need to do now, is somehow use the "createdDate" field name and after a certain time automatically set the checkbox to unchecked. Any help?