 | |  |
 |

dimeco
User
May 11, 2008, 6:29 PM
Post #1 of 10
(297 views)
Shortcut
|
|
Flagging New and if Video...
|
Can't Post
|
|
In my search engine software on one of my sites I can do this... and it prompted me to see if I could also do this with Artman: (Probably an "if" statement? but would need help?) i.e., while I have the "latest headlines" list, is there a way to have it say for example: Article 1 Title ~new~ (actually would contain a "new" graphic see for example: http://www.dime-co.com/technology/Business_and_Home_CCTV_Surveillance_Systems.shtml When you look at the middle/right column, it shows a "new" grahpic... unfortunately while I had coded that, ALL now appear as "new" even if not. So - is there a way to have it show "new" with an "if" it was published within the past say either 3 days OR since the person's last visit, whichever is easier? Also - on any category index page, headlines and index page, have a similar button that shows if it has video or not? i.e., Suppose Article 1 and 3 has video, but articles 2 and 4 etc. don't, it would look like: Article 1 title and Summary ~video~ Article 2 title and summary article 3 title and summary ~video~ article 4 title and summary etc? Ideas? Possible? Amber
|
|
|  |
 |

Jake
Staff
/ Moderator

May 12, 2008, 12:46 AM
Post #2 of 10
(281 views)
Shortcut
|
|
Re: [dimeco] Flagging New and if Video...
[In reply to]
|
Can't Post
|
|
Hi Amber, Because Article Manager doesn't generate pages on the fly like a search engine, there isn't really a way to selectively display a "New" graphic or text based off of a time difference. That being said, it is possible to show a "New" graphic for the latest two or three articles only, which may in fact be within that date range, depending on how often your site is updated. Let us know if you'd like more information on that. In regards to your second question, that is definitely something that you can do. In this case, you'd be using a templateIf statement to check to see if the video field is empty or not for a given article. Just add this code to your category index, global index, and headlines templates where you'd like the video indicator to appear:
<!-- templateIf: $article.video$ ne "" --> ***Video image or text here*** <!-- /templateIf --> This example assumes that your video field is named "video" - you might want to change that if necessary. I hope this helps! ----------------------------------------------------------- Cheers, Jake Swanson - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

dan_999
User
May 12, 2008, 8:50 AM
Post #3 of 10
(275 views)
Shortcut
|
|
Re: [Jake] Flagging New and if Video...
[In reply to]
|
Can't Post
|
|
This will display new next to any articles that are newer than 30 days: <!-- templatecell : articleRow --> <tr> <td><span class="nav_right_headlines"><a href="$published.articlePage.url$">$article.title$</a> <script type="text/javascript"> var todaysDate=new Date() todaysDate.setDate(todaysDate.getDate()) var newUntilDate=new Date() newUntilDate.setFullYear($article.date:format(yyyy,MM,dd)$) if (newUntilDate>todaysDate) document.write("<font color='red'>New!</font>") </script> </span></td> </tr> <!-- /templatecell : articleRow --> If you wanted an image to be displayed just change the bit in the document.write to the <img> tag and location. If you wanted to add more days you can change this line: $article.date:format(yyyy,MM,dd)$ and add your figure to the end like this: $article.date:format(yyyy,MM,dd)$+30 I'm sure I got this from a post on the site but I have no idea who posted it now, I've had a search but can't see it anywhere. Hartlepool
|
|
|  |
 |

dimeco
User
May 12, 2008, 9:08 AM
Post #4 of 10
(274 views)
Shortcut
|
|
Re: [dan_999] Flagging New and if Video...
[In reply to]
|
Can't Post
|
|
Thank you! Amber
|
|
|  |
 |

dimeco
User
May 12, 2008, 11:01 AM
Post #5 of 10
(270 views)
Shortcut
|
|
Re: [dimeco] Flagging New and if Video...
[In reply to]
|
Can't Post
|
|
Thanks... just fyi... I changed the "+30" (where you said to put it there if I wanted to extend it?) I put -7 instead... and that works nicely :) (Didn't want a whole month's worth). Thanks - this was a huge help :) Amber
|
|
|  |
 |

MikeB
Staff
/ Moderator

May 12, 2008, 2:27 PM
Post #6 of 10
(267 views)
Shortcut
|
|
Re: [dimeco] Flagging New and if Video...
[In reply to]
|
Can't Post
|
|
Hi Amber, I'm glad to hear that this worked for you! Let me know if you have any other questions or comments Cheers, Mike Briggs - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

dimeco
User
May 14, 2008, 8:41 AM
Post #7 of 10
(249 views)
Shortcut
|
|
if statement not working Re: Flagging New and if Video...
[In reply to]
|
Can't Post
|
|
If statement is not working. Wierd. This doesn't entirely work now for some reason. When you go to the site, now ALL have "video" even though they don't. :( <!-- templateIf: $article.video$ ne "" --> ***Video image or text here*** <!-- /templateIf --> i.e., http://www.thatsubject.com/index.shtml Look on the right. only one of those actually does have video. BUT... if you go to the category index page: http://www.thatsubject.com/internet-marketing/index.shtml It's correct. Ideas? Amber
(This post was edited by dimeco on May 14, 2008, 1:55 PM)
|
|
|  |
 |

Jake
Staff
/ Moderator

May 15, 2008, 1:02 AM
Post #8 of 10
(239 views)
Shortcut
|
|
Re: [dimeco] if statement not working Re: Flagging New and if Video...
[In reply to]
|
Can't Post
|
|
Hi Amber, That's definitely strange! I looked at the HTML on your page and nothing seemed to be amiss - would you mind attaching your headlines template to a forum post so that we can take a look at it? We may need to move this to a second-level request, but checking the template is the best place to start. ----------------------------------------------------------- Cheers, Jake Swanson - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 | |  |
 |

MikeB
Staff
/ Moderator

May 15, 2008, 3:07 PM
Post #10 of 10
(218 views)
Shortcut
|
|
Re: [dimeco] if statement not working Re: Flagging New and if Video...
[In reply to]
|
Can't Post
|
|
Hi Amber, I had a look at this a bit earlier today while looking at one of your Rapid Response Tickets and it actually looks like the issue is the field name. From what I can tell here, you'll actually want to use "embeddedVideo" instead of "video" and from there you should get the results you'd expect. I hope this helps! Cheers, Mike Briggs - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
|