98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Dreamweaver Training and help » News
News
Resolved · Low Priority · Version CS3
Nicholas has attended:
Dreamweaver Introduction (2 days) course
News
Hi There
I am considering adding a 'scrolling news' feature to our website - could you give me any advice regarding how I could do this in Dreamweaver (or if there is some pre-existing code that I may simply be able to copy and paste?). Ideally I'd like to be able to add images to the news items as they scroll (just with a little lead-in text and link to the full story).
Also, can an automated archive function be setup for news stories (ie. after 6 months they are removed from the scroller/ the scroller is limited to displaying a max. of 5 stories, with the remainder being archived)?
As a side issue, I recently saw a website which made use of 'lightbox' technology to display the news story (whereby you do not leave the current page, you simply view the story with the remainder of the page darkened into the background). It looked pretty smart and I just wondered if you had heard of it/ if it is simple to do?
Thanks!
Nick
RE: News
Hi Nicholas,
There are many scrolling news features out there. Whilst I haven't used any myself (in the belief that scrolling stuff on pages distracts and annoys people!), I did see this one the other day, which is free and includes pictures:
http://www.widgetmate.com/news/
In terms of 'archiving' news items, you'd probably need to link them to a back-end database. So a bit of server-side coding like PHP, ASP or .NET would be required, so that you can check the date on the news item in the database, and don't display if it's X (6) months old.
This way, you would also do a select statement from the database, and limit the SQL to Y (5) results.
More and more sites are using 'lightbox', I'm sure you've noticed. One site I did see that did it quite well, and doesn't seem too hard to implement is this one:
http://jquery.com/demo/thickbox/
That would probably be the one I will eventually use, once we require it. ThickBox also allows in-line content, which can include text, so would be okay to use for News items etc.
Hope this helps, and good luck.
Regards, Rich
RE: News
Hi Rich
Really helpful stuff in your previous replies thanks!
I just have a couple of further questions, then I
RE: News
Nick,
1. Not that I know of. I'd recommend a database, certainly not plain text files to store user log-in accounts etc. MySQL database is probably easiest to learn. There's definitely some free PHP scripts out there, or search for tutorials online. Ask your hosting provider too, they may have free scripts or add-ons for customers, and should be able to help you set it up, or even help set up 3rd party applications.
2. Google Analytics is fairly easy to set up. Once you've created your account and set the site up, copy the code they give you. Now rather than going and pasting this code on to the bottom of every page in the web site, I'd recommend doing one of two things:
(A) Put the code into an 'include' file, then include the file at the bottom of every page. For example, if you use PHP files, the code would be something like
< ? PHP include($_SERVER['document_root']."/includes/googleanalytics.php"); ? >
That way, if Google ever changes the code, you just have to update one file. You may want to put the Include statement into your template, if you use them.
(B) Put the code into your template, just before the </BODY> tag. The Dreamweaver template should then update all your pages for you.
Personally, I use 'header' and 'footer' include files. So at the top of every page, i include a 'header' file. If I ever wanted to put something at the top of every page, code or html elements, I would create another include file, and include THAT file within the header file. (You can include a file within another include file). Same goes for Footer data.
I hope that makes sense!? Let me try to write a structure...
SINGLE PAGE
INCLUDE HEADER
HEADER INFORMATION SUCH AS TITLE TAG
INCLUDE META
GLOBAL META TAGS HERE
MAIN PAGE CONTENT
INCLUDE FOOTER
COPYRIGHT MESSAGE
INCLUDE GOOGLE ANALYTICS FILE
GOOGLE ANALYTICS CODE
REST OF SINGLE PAGE
3. Again, not that I know of. Sounds like you'd be best off creating a MySQL (or similar) database, with a few tables such as 'user', where you can store all your log-in account information. And then create another one called 'event', which you can store fields like Date, Title, Description, Location etc. Then do a query to pull event information out and display on your page.
Try this page to get started, if you've no idea where to begin:
http://www.phpbuilder.com/getit/
Adding an event to an Outlook calendar by clicking a link on a web page seems to be fairly complicated - check this out: http://tools.ietf.org/html/rfc2445
But the general consensus seems to be that it's actually an e-mail that gets sent with an appointment request, or an iCal file.
"a meeting request is really just a specially formatted email It may be possible to write a script so that when the user clicks on a link or enters their email address in a form you send them and email with the event details."
See this page (scroll way down) to see discussion on the matter:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/HTML/Q_22732696.html
iCal tutorial (I think it's using ASP):
http://ryanfarley.com/blog/archive/2008/08/08/adding-calendar-items-from-a-webpage-via-icalendar.aspx
If you could show me the sites that do what you say, It may be possible to see their code and see how they've done it.
It may also be that the link is a specially formatted protocol. eg. if you have skype:username as a link, it will call the username using skype, but only if the user has Skype installed. skype: is a protocol like http: is a protocol.
4. RSS is fairly easy to do once you've set one feed up. First, you have to let whatever is reading the file/feed that it's XML. In PHP, you do this like:
< ? php header('Content-type: text/xml; charset=utf-8'); ?>
Then, you format the file with appropriate tags. This is a snapshot of the code from our Hints and Tips feed:
< ? xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title>Hints and tips stl-training.co.uk</title>
<link>https://www.stl-training.co.uk/microsoft-office-hints-tips.html </link>
<description>Software application hints and tips from our Microsoft Qualified trainers</description>
<language>en</language>
<pubDate>Wed, 04 Feb 2009 11:01:10 GMT</pubDate>
<lastBuildDate>Wed, 04 Feb 2009 11:01:10 GMT</lastBuildDate>
<docs>https://www.stl-training.co.uk/rss-feeds.php </docs>
<item>
<title>(Excel) Separate the year from a date</title>
<description>To separate the year from a date use the =year() function, eg a date is in cell A1 and in A2 you wish to display the year enter the function =year(A1)</description>
<link>https://www.stl-training.co.uk/tip-548-separate-year-from-date.html </link>
<pubDate>Mon, 12 Mar 2007 00:00:00 GMT</pubDate>
<guid>https://www.stl-training.co.uk/tip-548-separate-year-from-date.html</guid>
</item>
</channel>
</rss>
Try this page for a tutorial in setting up a feed:
http://www.devx.com/xml/Article/10790
Again, I'd recommend using a database to make it easier. You could have a 'news' table.
Hope this helps.
Regards, Rich
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Dreamweaver tip:Toggle panels on and offPress the F4 key to toggle all the panels in Dreamweaver on or off. This gives you more editing and programming screen space. |