PyroCMS File Module Costomization - codeigniter

I am using Pyrocms for an application. There is a module available for File managment. Although it is good enough but i need to customize it according to my requirements.
Here are the requirements
For each file admin from backend can create multiple temporary links
Each file should be limited to some time duration defined by admin
And download limit should be 3 for each user
Now i need suggestions how i can do these tasks to accomplish the application.
Do i need some more tables to handle the situation?
Or can i extend existing file table.
What about temporary links how can i create them and let user download the file?
Another requirement if user uses the link, download popup comes and he cancels three times i have to restrict him now that he can not download it now.
So using ip will do it or some other suggestion.
If i have to send multiple links to a single user through email then how can i customize the File modules to fit my needs.
Please give some suggestion.

Would the Download module help at all?
This all sounds like it should be an extra module, as the Files job is just to handle Files. Downloads are a very different aspect, but you can use the Files library in PHP to get lists of files and server them up?
So:
Files handles Files.
Downloads handle the downloading of "Files"
If the Download module by Authur Guy is not good enough for your needs you should definitely think about building one and selling it on the store.

Related

sitecore Add users and Media folder after create sub site

I have a sitecore 7.0 solution with several sites.
Every time that I add a new site I need to create specific users (author, approver, etc..) and a specific Media Folder to the website.
Question:
Is there any way to make this automatically? I was thinking to play a bit with the pipelines but I'm not sure exactly how to start..
Thank you
I have made a custom command for this which:
asks for a site name (using Context.ClientPage.Start and Context.ClientPage.ClientResponse.Input)
creates a sites structure based on a template-branch
creates media library folders
I did not need users but you can add that as well. The only thing left to do manually is adding the configuration files.
There are many blog posts to find about adding custom commands, like:
http://www.sitecore.net/Learn/Blogs/Technical-Blogs/John-West-Sitecore-Blog/Posts/2013/04/Add-Debug-Command-to-Content-Editor-in-the-Sitecore-ASPNET-CMS.aspx
And also branches:
http://www.sitecore.net/Learn/Blogs/Technical-Blogs/Getting-to-Know-Sitecore/Posts/2012/10/Page-Editor-Secrets-1-Complex-Content-Creation.aspx

Folder metadata displaying ID instead of folder Name

I am new to Oracle UCM(already hate it) and I have this bug on the standart "Content information" page when displaying "Folder" meta - instead of DCOLLECTIONNAME I get DCOLLECTIONID from COLLECTIONS table. Now we have two versions of UCM installed on different servers, one with our custom module and one without it, you can guess which one works fine :-) I checked settings in admin aplet / Configuration manager and they are the same on both servers, so my next thought was there must be some problem with page template(I found some function named getCollectionPathFromID somewhere which does exactly what I need but dont know where to put it to make it work). Can anyone point me to the right direction? I found some template called std_page.htm but it contains realy huge amount of code... Any help would be appreciated.
What specific versions of WebCenter Content are you using? Are the two instances on the exact same version? You can find this information on the Configuration for instance name page.
How are you trying to view the data?
Are you calling &IsSoap=1 or &IsJava=1? Or are you meaning the display of the folder name/path on the page is showing dCollectionID?
I assume that based on dCollectionID you are using the Folders_g (Contribution Folders) component and not FrameworkFolders.
Can you provide a link to download your custom component? It sounds like this may be the culprate.

Joomla Component Permissions

In Joomla 2.5 I have a custom component installed that is only available to the Administrator. I would like to make this component available to the Manager Group as well.
Can someone please tell me what file I must edit? Is it an XML file in the administrator/components/name_here/? Or is this a lot more complicated than I think?
I hope I am reading the right file, this Joomla system is a mad hatter.
It's not just an XML file your component will need to check the permissions a user has.
Since Joomla! 1.6 there is an extensive Access Control (ACL) mechanism implemented for front-end and backend access. You can define an unlimited number of Groups all with different access levels on a per component basis (this presumes that the component is written correctly). The default groups that are created with the initial setup can be deleted or renamed and may not to exist on all installations, users can create groups of any name with any range of permissions.
I would recommend starting with the Access Control List/2.5/Tutorial this will give you a better understanding of the new ACL.
Then from the "Developing a Model-View-Controller Component/2.5" tutorial, re-read "Adding ACL" article, if you need custom rules you will probably want to read the Adding ACL Rules to your component article as well.

Avoid Direct Download Link of files

I am using Wordpress and Easy Digital Download plugin to sell digital files.
I have the following how-to questions:
How to avoid a user to see or to use direct download link?
How to create a download link that has an expiration like session?
How to secure a wp-contents/uploads folder?
You might be interested in this:
deny direct access to a folder and file by htaccess
simply put a .htaccess file with the content "deny from all" in the folder.
Then only scripts from your webspace should be able to read files from there.
This should be a first step. You would need a php-file serving the data instead of accessing those files directly.
Eg like this: http://www.kavoir.com/2009/05/php-hide-the-real-file-url-and-provide-download-via-a-php-script.html
(as I am not aware of wordpress plugins, maybe just google for them, this explains how to write those in php - if you cant do that youre pretty much stuck to wordpress plugins)
Nah, Nah, Nah... It's easy man update your plugin, and check your settings...
Step 2. You will see in you plugin settings, that it has 24 hours expiration date download link in forwarded email
"WP Secure Links" is WordPress plugin at codecanyon that lets you create a secure link to downloadable files.
http://codecanyon.net/item/wp-secure-links/4418678
http://sixthlife.net/product/wp-secure-links/
for securing the uploads folder needs some good .htaccess work
check the comments section of this, its explained
Still relevant in 2020 so I have written a small plugin that enables secure and temporary downloads in Wordpress:
WP DISPATCHER
It is free and simple. Check it out :)

wkhtmktopdf on shared hosting does not return any data...?

Hi friends currently i m working on a small business project.
for this project i need to convert my dynamic html page into a PDF file..
I googled for html to pdf and found wkhtml...
in my local-host system its works like charm..
But in my shared server it does not gives any output... errors also. when php wrap execute, it fails silently..
Any idea guys??
another thing.. In my shared hosting, they are disabled exec,proc_open and other process related functions, So i used .htaccess file to point another php.ini for reconfiguring the disabled_functions.
Because your hosting provider has disabled the exec methods, I'm sure they won't be pleased to find out you're trying to use wkhtmltopdf. It might be a good idea to contact them about your plans.
When downloading wkhtmltopdf, make sure you grab the right package (based on the server specs). Your best bet is to use one of the static packages as it provides most of the libraries needed to run wkhtmltopdf. You might also need to change the file permissions to be able to execute the file.
Lastly, make sure your custom php.ini is even used by php (calling phpinfo() will do the trick).

Resources