Downloadcontrol+wdir scenario

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Tata
Posts: 3601
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Downloadcontrol+wdir scenario

Post by Tata » Fri Jun 10, 2016 5:55 pm

Well, couldn't wait.
Created:

Code: Select all

<h1>Public Downloads</h1>
<div>{{{control}}}</div>
<h2>Members L1 Downloads</h2>
<div>{{{control 'protected1'}}}</div>
<h2>Members L1-2 Downloads</h2>
<div>{{{control 'protected2'}}}</div>
<h2>Members L1-2-3 Downloads</h2>
<div>{{{control 'protected3'}}}</div>
My intentioin - showing protected1+protected2 for L1-2, or protected1+2+3 for L1-2-3 - doesn't work of course. This wouldn't be that bad. Worse is the message:
Fatal error: Allowed memory size of 314572800 bytes exhausted (tried to allocate 72 bytes) in /www/c/m/u13296/public_html/_sub/cmsimplexh167/cmsimple/functions.php on line 1471
after using any link.
Also, it would be nice to have optional mask input in the config or plugin call. Now, also _XHdebug.txt is downloadable among public accessible files.
http://cmsimplexh167.cmsimple.sk
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: Downloadcontrol+wdir scenario

Post by svasti » Fri Jun 10, 2016 6:48 pm

Tata wrote:Fatal error: Allowed memory size of 314572800 bytes exhausted
now beta 2 available... sorry forgot that I changed the location of the log and the counter files to the userfiles, but didn't change this in the index.php :oops:
Tata wrote:it would be nice to have optional mask input
ok, reasonable
Tata wrote:My intentioin - showing protected1+protected2 for L1-2, or protected1+2+3 for L1-2-3
I see...

Tata
Posts: 3601
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Downloadcontrol+wdir scenario

Post by Tata » Fri Jun 10, 2016 7:49 pm

Now:
I have beta2 on host. Seems to work so far. But what setting shall I use in memberpages and/or in downloadcontrol to see all pages incl. memberpages

Code: Select all

<h1>Public Downloads</h1>
<div>{{{control}}}</div>
<h2>Members L1 Downloads</h2>
<div>{{{control 'protected1'}}}</div>
<h2>Members L1-2 Downloads</h2>
<div>{{{control 'protected2'}}}</div>
<h2>Members L1-2-3 Downloads</h2>
<div>{{{control 'protected3'}}}</div>
and get notice if trying to download protected file, that only logged-in members have access to (or the link is dead/dimed/inactive)?
This would make more visitors to register.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Tata
Posts: 3601
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Downloadcontrol+wdir scenario

Post by Tata » Sat Jun 11, 2016 6:19 am

So far - at list on my test site - everything seems to work. One feature would be very useful:
In plugin background:
1. an input field for a mask of desirable files
2. corresponding to the mask generated list of downloads directory evtl. its subdirectories incl. files
3. checkbox for files selected for download
This way it would be very reliable and comfortable to assign files for unlimited public download.
Protected download would be defined the same way, just the call would be p laced on a protected page.
The simplifying factore here would be no need to define files in plugin call (which may produce typos and errors) and even long list of downloadable files would be easy to create.
It is possible right now as well, but it is to complicated to create comma separated groups of many files (or the files must be saved more time in various "protected" subdirectories").
Anyway, promissing progress.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: Downloadcontrol+wdir scenario

Post by svasti » Sat Jun 11, 2016 2:52 pm

Tata wrote:The simplifying factore here would be no need to define files in plugin call (which may produce typos and errors) and even long list of downloadable files would be easy to create.
Yes, I also had that idea but was too lazy or too stressed or whatever and didn't implement it, hoping nobody will notice the shortcoming. Too bad, you noticed...
You'll have to wait a little bit for beta3 with this feature

Tata
Posts: 3601
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Downloadcontrol+wdir scenario

Post by Tata » Sat Jun 11, 2016 2:59 pm

I am sorry for seeing more than necessary, but I am also lazy to write things that somone else can write for me :-))
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Tata
Posts: 3601
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Downloadcontrol+wdir scenario

Post by Tata » Sun Jun 12, 2016 9:51 pm

After some testing, only one small notice:
If would be to consider if a table is the best solution. Especially if the plugin is used on pages with respinsible design. In this case maybe the table row shaould be constructed in floating DIVs/ E.g.:

Code: Select all

<div class="row">
     <div class="two_columns">
          <div class="2columns">
               <div class="column">File Name</div><div class="column">Size</div>
          </div>
          <div class="2columns">
               <div class="column">Last Change</div><div class="column">Downloads</div>
          </div>
     </div>
</div>
I use to style templates for min width 320px. Here the table goes out of display. If the row is made of "two-columns" DIVs, they fould move below and create two rows with the File Name and Size in first row, and Last Change and Downloads in the second row.
E.g.:
Content width=700px
| File Name | Size | Last Change | Downloads |

Content width=320px
|...File Name...|......Size......|
| Last Change | Downloads |

Makes sense? Such constructor won't be much more complicated then constructing a table-row for each file.
Styling the table width by 100% doesn't solve it sufficiently.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: Downloadcontrol+wdir scenario

Post by svasti » Thu Jun 23, 2016 7:26 pm

Beta3 is out. I hope I have implemented what you asked for, it's a graphic interface with checkboxes for all files and input fields for other settings. Please run a test so that the final may come out.
Download
Tata wrote:If would be to consider if a table is the best solution. Especially if the plugin is used on pages with respinsible design. In this case maybe the table row shaould be constructed in floating DIVs
Sorry, I havend seen this posting. Yes, maybe it can be done.

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: Downloadcontrol+wdir scenario

Post by svasti » Thu Jun 23, 2016 8:27 pm

Just experimented a bit with tables in smartphones. There are some suggestions to be found on the internet. I found making the tables scrollable quite a good solution. I'll probably implement that.

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: Downloadcontrol+wdir scenario

Post by svasti » Thu Jun 23, 2016 8:49 pm

Just changed the css of Downloadcontrol 1.7 beta3, sorry, without changing the name, what shouldn't be done. :oops: (one person already downloaded the first version). Anyhow, check the responsiveness now. The big buttons also have gotten responsive.

Post Reply