close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Announcement App

Thread began 9/03/2009 11:44 am by Daryl | Last modified 9/08/2009 4:11 pm by Eric Mittman | 3004 views | 6 replies |

DarylBeta Tester

Announcement App

I would like to add an "Announcement App" to the members area of a website that I am building.

I was thinking of having a div that displayed the message when a user logged in. I would create the content using Data Assist so that an archive could be kept for people to view.

The idea would be that I would have two close buttons on the div, one to "close" and one to "not show until new announcement"

I have found loads of articles about closing a div, but nothing about how to achieve the don't open again until the content has changed.

I guess I could use the cookies toolkit somehow to achieve some of this....

Any suggestions:confused:?

Sign in to reply to this post

DarylBeta Tester

I have come up with a completely different solution, so no need to reply.

Sign in to reply to this post

Eric Mittman

What is the new approach you are trying?

Sign in to reply to this post

DarylBeta Tester

I am creating a DIV with show if 0

The user can tick the box that will add a 1 to a column in the user database

When they login next this value will be kept as a session variable which means that when they return they wont be able to see the DIV

When an announcement is created using DA it will insert it into the announcement table but will also complete a multiple update of all user records which will change all of the 1 back to 0 so that the DIV is visible when people log back in again.

Sign in to reply to this post

Eric Mittman

Very clever, nice use of boolean logic.

Sign in to reply to this post

DarylBeta Tester

It would be if I could get it to work...

Using SA I have added another Session Variable

But I don't think that it is getting to my next page, which is a bit odd because other Session Variables are being carried as I have the page saying Welcome "Name"

I have tried echoing the News session variable but nothing is printed.

Sign in to reply to this post

Eric Mittman

Just before your header call where you are going to the next page try adding in the session commit like this:

session_commit

Or you can use the other one:

session_write_close()

The session_commit is an alias of session_write_close. Try putting this in place on the page just before the header call that redirects the user. On the new page make sure that you have a session_start() before you call the session variable.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...