I'm trying to modify dumpstats.php to be able to use a variable (supplied by either a url or another include) to select what catagory the torrents are sorted by. I changed the folowing in the ds_DUMPTORRENTSTATS function
but I get the following error: Parse error: parse error, unexpected T_VARIABLE in /home/animeno/public_html/includes/torrent/dumpstats.php on line 133
I'm still pretty new to php but I've tried every combination of brackets and quotes I could find but all produce some error. I would really appreciate any help on this I can get.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What you are trying to do is illegal. At the function declaration, those values are specified and used if a variable does not exist (i.e. you didn't specify it when calling the function.) These are static values and cannot be variables. This is why it is saying there is an unexpected variable in the error message.
When using the dumpstats module you need to figure out what to sort by etc *prior* to calling one of the functions. Have your script decide how to sort and what category to use, then call the appropriate function.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to modify dumpstats.php to be able to use a variable (supplied by either a url or another include) to select what catagory the torrents are sorted by. I changed the folowing in the ds_DUMPTORRENTSTATS function
131 function ds_DumpTorrentStats($dsConnectToDB = true,
132 $dsCategory = "main",
133 $dsOrder = $sort,
134 $dsSortDescending = false,
but I get the following error: Parse error: parse error, unexpected T_VARIABLE in /home/animeno/public_html/includes/torrent/dumpstats.php on line 133
I'm still pretty new to php but I've tried every combination of brackets and quotes I could find but all produce some error. I would really appreciate any help on this I can get.
What you are trying to do is illegal. At the function declaration, those values are specified and used if a variable does not exist (i.e. you didn't specify it when calling the function.) These are static values and cannot be variables. This is why it is saying there is an unexpected variable in the error message.
When using the dumpstats module you need to figure out what to sort by etc *prior* to calling one of the functions. Have your script decide how to sort and what category to use, then call the appropriate function.