close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Creating new user/message notifications on admin page

Thread began 5/10/2011 5:16 am by Jenny I | Last modified 6/20/2011 1:25 pm by Jenny I | 2209 views | 12 replies |

Jenny I

Creating new user/message notifications on admin page

I have created a website that allows users to register and send comments using a contact form.

I have also configured my admin pages using data assist and security assist.

I just wondered if there was any way I could display a notification in my admin if a new user registers.

When I click on the notification I would then be taken to my user results table. On the results table beside each new user name I would like to display some text that says "new". If the admin clicks on the user to go to the detail page I would like that text to dissapear.

What I am trying to achieve is similar to how email notifications work on e.g. iphone. You get that red notification telling you how may new emails you have recived and when you open the email app that notification goes away.

Your help is much appreciated

Sign in to reply to this post

CraigRBeta Tester

There are probably several ways to do this.

You could try adding a field to the registration table, with a boolean or tinyint data type, and set it to 0 by default.

on your results page, if the field value is 0, then you have a new registration, so you could highlight it in some way

when you view the registration record, you could apply an update behavior to set the value to 1

Sign in to reply to this post

Jenny I

Thanks Craig,

I never thought of that I will give that a try now. I think your solution would definately solve my second problem but I am not sure how I would go about solving the first issue.

Basically when an admin logins in they will be taken to the admin homepage. On the homepage there will be a image link. I would like a little red alert image to display beside this everytime a new user registers. So if five user registers since the last time the admin clicked the image link the little red alert image will display "5". If admin clicks the image the alert disapears.

Sign in to reply to this post

CraigRBeta Tester

you could add a recordset to the admin page based on the registration table, filtered where the new field value = 0

you could display the totalrows of this recordset as your alert.

You could also use this as a trigger to update the recordset and set the value to 1

Sign in to reply to this post

Jenny I

Hi Craig

I am just working on your solution now I will let you know how I go.

Thanks

Sign in to reply to this post

Jenny I

Hi Craig,

Whwn I use DW total records behaviour it seems to ignore the filter I set in my recordset. It just counts all records in the table. I have tested my recordset and the filter definately works. This is the code DW puts out.

<?php echo $totalRows_RsUsers ?>

Do I need to add some additional code to get this to work?

Your help is much appreciated.

Sign in to reply to this post

CraigRBeta Tester

<?php echo $totalRows_RsUsers ?> should show the correct number of rows returned from the recordset.
Are you sure your recordset is filtered correctly ?

can you upload your page as a zip ?

Sign in to reply to this post

Jenny I

sorry there was an error on my page it is working now, I just need to update my results page.

Many Thanks

Sign in to reply to this post

Jenny I

Hi Craig

So far I have manged to everything working but the update record behaviour. I applied an update record behaviour to my page to update the value of the column to 1 but it does not seem to work.

I think the problem is the trigger. I am not sure what to set it to as there is no form element on my detail page. I have tried using the recordset not empty but that does not work.

Sign in to reply to this post

CraigRBeta Tester

can you upload your page as a zip ?

Sign in to reply to this post
loading

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...