Webmastersite.net
Register Log In

Data Location
Location of user download count

Comments on Data Location

eric0524
Experienced

Usergroup: Member
Joined: Jun 11, 2006

Total Topics: 15
Total Comments: 55
Posted Jul 01, 2006 - 1:07 PM:

Does anyone know what table the user download count is in. I know the upload count is in the members table in the field images. I need to know where the amount of images they have viewed is.

Thanks,
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 02, 2006 - 11:48 AM:

{THISMEMBERLINKSVIEWED} isn't in a field. It's calculated via $db->selectcount('linkstable', "viewers LIKE '%[END]". $id ."[,]%' or viewers LIKE '". $id ."[,]%'"); so it makes use of information in the viewers field of the wsngallery_links table.
eric0524
Experienced

Usergroup: Member
Joined: Jun 11, 2006

Total Topics: 15
Total Comments: 55
Posted Jul 02, 2006 - 1:46 PM:

So I would have to run an SQL query on two tables to lower the users user level via an SQL statement. My other idea might be better if I can get the code in the template to work. Otherwise after uploading, they would have to wait until I ran the query again.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 03, 2006 - 9:16 PM:

If {THISMEMBERLINKSVIEWED} doesn't work for you, doing the query isn't either since they're exactly the same thing of course. Note that the option of recording views by members has to be specially turned on in the image settings.
eric0524
Experienced

Usergroup: Member
Joined: Jun 11, 2006

Total Topics: 15
Total Comments: 55
Posted Jul 04, 2006 - 2:25 PM:

I have it turned on. At the top of every page is says Downloads = XXXX: Uploads = XXXX so that part must be working. I think I just need to get the logic in the code to work. Do the if and /if work like regular programming where they are nested?

ie.

<if this=that>
<if a = b>
<if c = d>
Do this
</if> *c =d
</if> * a = b
</if> * this = that
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 04, 2006 - 7:19 PM:

They nest, but your example there has the syntax all wrong.

If you know basic PHP, you can just use that in the template. Conditionals are translated to PHP at run time.
eric0524
Experienced

Usergroup: Member
Joined: Jun 11, 2006

Total Topics: 15
Total Comments: 55
Posted Jul 15, 2006 - 9:05 AM:

Then I think the ratio thing in the templates is a definate possiblity. I will work on it over the week end and then submit the code incase anyone else needs it. Thanks for the guidence (is that even a word, doesn't look right). So I can reference THISMEMBERLINKSVIEWED in the PHP just as if it is a declared variable? I think I can do this with two nested if's around the displaying of the image. I will just display the thumbnail if the upload download ratiio is out of range or uploads are zero and the downloads are 50 or greater. This way they will be able to correct there issue and be able to go on viewing right away.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 17, 2006 - 8:02 AM:

Template variables are all replaced with their values before the PHP runs, so writing {THISMEMBERLINKSVIEWED} is just like typing its actual value in the code.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.