We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Download Lock Counter Extension Error

Development and Programming

Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

There is a Download Counter extension out there that works in conjunction with the Download Lock module. It ships with an error on line 80:

Parse error: syntax error, unexpected ‘=’ in
/site/system/extensions/ext.custom_download_count.php on line 80

The lines in that area look like:

else
  {
  tdata = array($data['t'], $data['mt']);
  $mid_sql = $data['t'].', '.$data['mt'];
  $sql = "UPDATE exp_weblog_data SET ".$mid_sql." WHERE entry_id = $entry_id";
  $DB->query($sql);        
  }

Has anyone successfully used this extension with Download Lock? Did you change line 80 from tdata to ‘$data’ or ‘$tdata’ or ‘$sdata’? The PHP right in that area is still a little beyond my immediate comprehension. Thanks for any help with this module/extension.

And while we’re on the subject, has anyone seen my post on the old Download Lock thread with a slew of questions relating to Download Lock itself?

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
15 years ago
Robin Sowell's avatar Robin Sowell

Hrm- try changing

tdata = array($data['t'], $data['mt']);
to
$tdata = array($data['t'], $data['mt']);
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.