HELP with rotating news items by specific field

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

HELP with rotating news items by specific field

Postby btown » Thu Oct 06, 2005 6:42 pm

I have been using Coranto for a couple of weeks now and I am starting to learn alittle bit of perl on the way. I am running into a big problem that I can't figure out but I know there is a simple solution for.

I have a section on my webpage with upcoming events. In this profile it only includes 3 items at a time. I'm trying to figure out how to make each item rotate according to the current date.
Example: 3 items are showing and the top item is an old date. I need to make that top item dissapear and bump the item below it in its place. Doing this while keeping 3 items in rotation at all times.

The date fields I have created for the event items are <Field: CustomField_eventmonth> , <Field: CustomField_eventday> , <Field: CustomField_eventyear>. All of these fields are numeric values. Ex. 10.05.2005

Does anyone have any suggestions? I am in of help bad. Thanks so much in advance!
btown
 
Posts: 24
Joined: Fri Feb 11, 2005 5:27 pm

Re: HELP with rotating news items by specific field

Postby Parahead » Thu Oct 06, 2005 6:49 pm

btown wrote:Example: 3 items are showing and the top item is an old date. I need to make that top item dissapear and bump the item below it in its place. Doing this while keeping 3 items in rotation at all times.
Have you checked out the ChangeDateNew addon? It allows you to specify an 'End Date' when the newsitem should be removed.
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

One question?

Postby btown » Thu Oct 06, 2005 7:39 pm

Parahead, this is a very handy addon thanks for the recommendation. I think this addon uses the date the actual item was uploaded or submitted. I need it to work with a date that was entered in through a Field that I created. The date the actual item was submitted does not match up with the date the user submitted through a specific field.

Am I on the right track? maybe this addon has those capabilities?
I think perl code in the style would take care of this, but I have no earthly clue how to script it haha. suggestions? THANKS SO MUCH!!! :D :D
btown
 
Posts: 24
Joined: Fri Feb 11, 2005 5:27 pm

Postby Psykosys » Thu Oct 06, 2005 8:06 pm

ChangeDateNew will do what you want, but you probably have to drop the idea of using the field you created and instead use the end date field provided by the addon (if you don't see it on your submit pages already after enabling ChangeDateNew, go to Change Settings under the Administration section and make sure that "Specify an enddate for individual news?" is set to "Yes".

Assuming you're not using viewnews.cgi to display the upcoming events dynamically, you might also want to use AutoBuild to make your newsfiles rebuild automatically at set intervals (thus bumping old entries out of the listing even when you haven't manually built news for awhile).
Psykosys
 
Posts: 252
Joined: Tue Apr 15, 2003 10:37 pm
Location: Ithaca, NY

Thanks

Postby btown » Thu Oct 06, 2005 8:14 pm

Hey thanks. Yeah maybe you're right, I need to drop the idea of using a specific field. I will try it out and see how it works.

Out of curiousity, could my original idea work using some simple perl code in the style?

Thanks! :D :D
btown
 
Posts: 24
Joined: Fri Feb 11, 2005 5:27 pm

Problems

Postby btown » Thu Oct 06, 2005 8:56 pm

Well I tried using the addon without the use of any custom fields.
Could not get it to work to way I need it to.

I have a profile called "upcomingevents" and another profile called "Events".
The addon seems to want to apply the End date to both Profiles when I tell not to in the Change Settings area. I want to just to apply end date to the "upcomingevents" Profile. I am using X Multi Submit for these Profiles. I'm assuming that the ChangeDateNew addon is compatible with the XMS profile.
Check it out and you can visually see what I;m try to achieve
http://www.classiccase.net/ccnew/php/ccmain.php

Thanks
btown
 
Posts: 24
Joined: Fri Feb 11, 2005 5:27 pm

Postby Psykosys » Thu Oct 06, 2005 10:47 pm

Having two profiles changes things quite a bit, since the end date applies to every newsitem and you can't selectively disable based on which profile is trying to add the item. You're right, it's possible you do need some PerlCode. Can anyone else think of any solution that wouldn't require double-posting items or perl code?
Psykosys
 
Posts: 252
Joined: Tue Apr 15, 2003 10:37 pm
Location: Ithaca, NY

Re: Problems

Postby Parahead » Fri Oct 07, 2005 1:57 pm

btown wrote:I have a profile called "upcomingevents" and another profile called "Events".
The addon seems to want to apply the End date to both Profiles when I tell not to in the Change Settings area. I want to just to apply end date to the "upcomingevents" Profile. I am using X Multi Submit for these Profiles. I'm assuming that the ChangeDateNew addon is compatible with the XMS profile.
Yes, the CDN addon is compatible with the XMS addon. If you go to Administration -> Change Settings -> ChangeDateNew Settings, you have a multiple selection field called "Active Enddate Profiles", where you can specify which profiles the End Date should be active for.

Also, you can move newsitems to another category when the end date occur, which allows you to have profiles for "Upcoming Events", "All Events" and "Old Events", just including the right category. OR use the ChangeDateNew addon to specify the submission date and have one profile filtering future newsitems. There are often more than one way of doing things with Coranto... ;-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron