Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-03-25 15:32:44

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Track recently viewed *images*

I have a client who wants to show a navigation trail of where a visitor has just been. Sounds like a job for smd_lately, right?

…except they want to track images viewed, not articles viewed. Stef has confirmed that smd_lately can’t do what I need:

Unfortunately smd_lately uses the visitor logs, and image impressions aren’t logged; only articles are, because they are the only things that transmit REQUEST_URI from the server which gives the page URL to log.

Can anyone think of a way to do it? Right now, I just need to sketch out a solution so I can cost it up. If the job comes through I’ll also need to hire someone to implement it.

I’m pretty sure I’ll be able to configure unique URLs for each image, using gpb_permanent links or maybe even Stef’s latest rc. The bit I’m stuck on is how to log page views and serve them back to the visitor as Recently Viewed links.

Any suggestions appreciated.

Offline

#2 2010-03-25 18:25:30

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Track recently viewed *images*

Hi pieman

how do the URLs for images look like? I mean, when you mention “to track images viewed”, where are those images being viewed? On its “filesystem” URL, like http://www.example.com/images/1.jpg? Or on some Textpattern URL (like a section, or a particular article)?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2010-03-25 22:56:19

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: Track recently viewed *images*

Hi Maniqui

The images will be grouped into Galleries – for which I imagine I will use and article for each.

So the gallery page might be /galleries/gallery-name

and an individual image might be /galleries/gallery-name/image-id

I think we figured something like this for 6of3 but with files – no? Can’t remember what it was, but I remember it was possible ;-)

Offline

#4 2010-03-26 19:49:06

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Track recently viewed *images*

An idea I had yesterday, while thinking in the reply, is to combine rvm_counter and smd_query.
rvm_counter counts things and store the count on the database.
So, for each image, you could create a unique counter, using for example the gallery-name+image-id, and rvm_counter will start to count each hit to /galleries/gallery-name/image-id.

Then, you could retrieve that info using smd_query… mmm, now that I re-read your request, you are asking for recently viewed, not most viewed…
I can’t recall, but there is a chance that rvm_counter also stores some related timestamp? Or maybe it can be easily hacked to save a timestamp instead (or as a complement) to just the counter?

I hope this idea has some sense, and it’s not just some sci-fi idea.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2010-03-26 22:51:27

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Track recently viewed *images*

pieman wrote:

and an individual image might be /galleries/gallery-name/image-id

I think that if you wouldn’t mind having URLs like /galleries/gallery-name/?img=image-id, you could use adi_gps.

Offline

#6 2010-04-11 11:02:52

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: Track recently viewed *images*

Els wrote:

I think that if you wouldn’t mind having URLs like /galleries/gallery-name/?img=image-id, you could use adi_gps.

No, I wouldn’t mind that. So I could use adi_gps to record image ids to a txp:variable then use it to build a menu? It sounds too simple. Must be a catch :)

Offline

Board footer

Powered by FluxBB