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.
{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.
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.
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.
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?
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.
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.
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Data Location
Experienced
Usergroup: Member
Joined: Jun 11, 2006
Total Topics: 15
Total Comments: 55
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,
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
{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.
Experienced
Usergroup: Member
Joined: Jun 11, 2006
Total Topics: 15
Total Comments: 55
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.
Experienced
Usergroup: Member
Joined: Jun 11, 2006
Total Topics: 15
Total Comments: 55
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>
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.
Experienced
Usergroup: Member
Joined: Jun 11, 2006
Total Topics: 15
Total Comments: 55
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.