close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How can I set up recently viewed function on my site with Dynamic Suite?

Thread began 6/22/2010 2:36 pm by victor405909 | Last modified 7/08/2010 5:38 pm by Eric Mittman | 1942 views | 11 replies |

victor405909

How can I set up recently viewed function on my site with Dynamic Suite?

I have dynamic suite: Data Assist,Security Assist, Universal Email,Ecart

I want to implement a recently viewed section into a div on site.

Can any one point me in the right direction as to how I can successfully implement this?

I have looked at some forums and get the impression sessions and cookies have a correlation to this. Can Data Assist or cookies Toolkit help me in this area?

Sign in to reply to this post

Miguel

i would create a new table for logs and register wich page is visited with date on timestamp to autoupdate depending on the user

Sign in to reply to this post

Eric Mittman

Like Sades has mentioned I think it would be best to have this information in a table in your db. If you are not concerned about individual users then you could just have a table and have an update server behavior at the top of each page, you can then just insert a record into the db for each page in the site, then update that record when the page is loaded.

Sign in to reply to this post

victor405909

Thank you both to Sadie and Eric's for quick response

I have gone into phpAdmin to access database (using Mysql 5.1.44)

I have created a table called 'logs' with only following selections:
in Field:'logs' Type:'TIMESTAMP' Default: 'CURRENT_TIMESTAMP'

Do I need to auto increment or set any other options?

I tried to set options you mentioned Sadie by choosing TYPE:Date and Default: TIMESTAMP (on mine, option is CURRENT_TIMESTAMP) however an error appears that prints "#1067 - Invalid default value for 'logs' "

Did I set it right? Please forgive me if I got it wrong as I am new to this but not affraid to get stuck in.

Thanks

Sign in to reply to this post

Eric Mittman

I would add an id column to this table to add as the primary key, it should be unique, not null and auto increment. As for setting the default value if you can't get it worked out in the db you can do this in the php code for the inserted value. If you would like a full date and time entry for the current time the value you would use in php would look like this:

php:
<?php echo date("Y-m-d H:i:s"time()); ?>
Sign in to reply to this post

victor405909

Thanks for the code Eric, only thing is I don't know how to apply it yet.

In regards to MySql setup I would like to make sure it is set up in exactly the same way you know it to work (i.e. customers who may look at products on a site can view recently viewed products) so I have attached 2 images from phpadmin.

One displays error I received in attempt to set DATE and CURRENT_TIMESTAMP.

The other shows the setup now in relation to info I have received in this thread.

Could you please confirm settings are correct. I followed what you said in regards to id column. However because I cannot set that date option in the other field I feel it may not work.

Thanks.

Sign in to reply to this post

Miguel

ok for the field you selected date dont do that select timestamp and on attributes you can select update timestamp, you would also need a field where you store wich section is been view, i also add a ipaddress field to store the adress from the visitor

Sign in to reply to this post

victor405909

Thanks again Sades for you input.

I tried to set attribute to auto update as you said but that option is not available in phpadmin please see jpeg.

The only options available there are SIGNED, UNSIGNED and UNSIGNED ZEROFIELD. I am completely confused.

What do you use to set up your database?

Also I have included jpeg of current setup any tips are most welcome.

Do I need to have 2/ 3 fields i.e:

logID: INTEGER, PRIMARY, UNIQUE, AUTOINCREMENT,
logs: TIMESTAMP, CURRENT_TIMESTAMP
logIP:?

Thanks again for your help.

Sign in to reply to this post

victor405909

Response?

Still awaiting some insight from technical support on this issue.

Can someone please reply.

Sign in to reply to this post

Eric Mittman

When you are updating the records you can set the time column to the following value:

php:
<?php echo date("Y-m-d H:i:s"time()); ?>



This will set the column to the current date and time when updated. As for setting the default value of the db I'm not sure why you are not able to do this. Setting the value directly in the insert or update server behavior should have the same effect.

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