I am very green at Drupal and I would like to recreate a list of files like the table that is shown at any module page in drupal.org [example]: it shows a table with the recommended releases and development releases. Each entry has a link to the file and some release notes.
What I would like is to clarify how this should be done, since I am new at drupal and I tend to be a bit confused. I am currently thinking that this is just a View, but I'm no sure.
In addition to this, I would also like to allow the download of these files to a specific role. I have managed to control this to pages, but not to attachments. Any ideas for this issue as well?
For the files, if you want access control on your files, you need to use the private files system which you can setup in the file settings. There are different modules that can help you with different tasks, like uploading etc.
How to best generate a table really depends where the files are coming from. If they are attached to nodes with CCK, it will be quite easy to use views. You can setup the fields, and how it should be displayed. If you want to create a download link, I believe you should use the generic file format.
Related
I would like to query a website that provides files for download to see all the available files for download.
For example: webpage called https://download.website.com/path/to/file has a file of interest to me, but I would also like to see other available files available in the system publicly.
Essentially I would like to be able to view a hierarchy of all of the publicly-facing files given some parent link. So if I know I want all files stored under https://download.website.com/path/, the query would turn up a recursive list of available files from https://download.website.com/path/*.
Is this even possible to do for most websites? Would allowing this behavior be too compromising to web frameworks in general, so it might not exist? Am I XYing out of control?
Any help here greatly appreciated.
This method isn't perfect, but you can try it. Just put this query in Google Search.
You can do a Google search for some publicly available and indexed path.
For example if you want to search all available page on a website/domain:
site:download.website.com
If you want to search all PDF files in this site:
site:download.website.com filetype:pdf
If you want to search all links with path download.website.com/wp-content/:
site:download.website.com inurl:/wp-content/
I hope it will help you a little bit.
I was given a Drupal project and asked to figure out how its code base structured and how the project is structured overall.
I successfully installed it using xampp.
Now I see nothing custom in the project:
For blocks I have only Bartik and Rubik. For content type only Basic page. For file types Audio, Document, Image and Video. For menus Main Menu, Management, Navigation and User menu.
So, does it mean that I was given a blank empty project? What else may I check that may have been customly changed in an empty project? What may I have missed while installing the project that may cause it to become empty, without any customisations? Maybe it is possible to check for something in the files of the project?
I am asking a few questions here, since I am not sure which one of them will convey the matter which concerns me. But basically all of them mean the same: I just want to see what someone else did in the project. And the more customisations I will find, the better it will be.
Thank you.
This does look like a virgin install typically does. If you were expecting to see more, perhaps you need to import a database...
Confirm you've imported the project database and that your settings file is pointing to it. It looks like you're using Drupal 8, so the file should be in sites/default/settings.php
Check under Content to see if any nodes have been created. If you have some sort of botched import, you can also try accessing a few nodes randomly at example.com/node/1, example.com/node/2 to check directly in case something is wrong with the index
Other than Nodes, Drupal content can be also in the form of Views. These are available at example.com/admin/structure/views. This is usually for heavily customised content. There are roughly 15 default Views that come with Drupal 8.
A default install will have no Modules installed in /modules. If you're seeing any directories there, it could be that the site was relying on these to display the content you're being asked to admin.
Trust this puts you on the right path. :)
I do not have much experience with plone, I searched on other forums an answer to my problem but without success. I saw that with plone you can enter text via "Add" event, news, page, file .... is to add a file that I have encountered a problem, that I can not add more files. I need to add multiple files with a single description, there is a way to do it?
Thank you !
Supposing you are looking for a possibility to batch-upload files into a folder, there are several add-ons for help out there. I live happily with collective.quickupload, but you might want to make your own choice and have a look at the other products, too, as for example:
wildcard.foldercontents (this will be the default behaviour in Plone 5)
ATMassloader
collective.upload
collective.uploadify
PloneFlashUpload
PloneJUpload (Java)
sc.base.uploader
Also: Plone/Zope has a native FTP/WebDAV-support. You can connect to a running Plone using a Webdav client, upload files and see them loaded in the CMS.
Additionally plone.formwidget.multifile allows you to add a file-field to your contenttype, which is capable to select multiple files at once for the upload in one single file-field. Haven't seen an out-of-the-box integration into a contenttype around, though, just in case you'd like to do it :-)
Might be interesting, too in this context:
Browse-able ZIP
collective.archiveviewer
I'm planning a personal/portfolio web site based on WordPress. What I would like to have is a list of example webdev projects/plugins/widgets along with the source code available for browsing in the least obtrusive way (if possible to skip downloading, going to another site, etc).
The alternatives:
The simplest:
Upload the code at github, sourceforge, launchpad, google code, or similar.
Share the link to the projects source code in the respective section in my site.
The easiest:
Use an existing WordPress plugin for exposing part of the uploads directory where I can upload the projects' source code.
Use a shortcode/widget/custom page for displaying the tree view with the projects and the source code within a WordPress page(s).
The most realistic:
Write the WordPress plugin from above. From my initial research, there is no such plugin for exposing the uploads directory files in the user and/or admin section of a WordPress site.
From my initial ideas the plugin is basically a file browser with a fancy tree view and a view panel for the source code file contents
(Nice to have) AJAX-ify the plugin to view the source code contents in a DIV with syntax highlighting.
What's your take on this?
Thanks
I think what you list as the simplest option is also probably the best. You have all the tools that people are used to -- syntax coloring, etc. -- and all you have to do is make a comment or two and then link to it. This may sound silly, but there is also a certain gravitas lent to your code because it's not "just on some WordPress site".
Can any one help me out on how to theme a view.
For each view created i want to have different templates.
Theming views can be somewhat tricky, depending on the kind of views you have created and the changes you need to make. Check out this introduction for Views 2, and make sure to install the Advanced Help module to get at the views2 documentation from the views module itself (there will be a link to the documentation on your views overview and edit pages, once you activated the Advanced Help module).
You can also find some questions/answers here on SO (e.g. Drupal 6: How to quickly theme a view?), if you search a bit.
I actually did this the other day. Ill give you a brief overview and expand a little later.
Set up your view; by going to Views -> Add View
Once, your view is completely set up, at the bottom of the view (left column in D6, right-most "Advanced" column in D7), you will see a link called "Theme: Information", click on it.
What you will be presented with is a list of templates (.tpl.php) files that the views uses to theme your data. Basically the file names that are bolded are the files views is using to theme the data.
To Customize Your Views
Select the page you need to theme. For Example, if you created a "Block" view, and I wanted to customize the basic html layout, I would pick a name (other than the one that is currently bolded) that is being displayed to me and create the file in my themes directory (sites/all/zen/custom-file-view-fields-views.tpl.php) - this is if views told me that I could use the filename custom-file-view-fields-views.tpl.php
The next step is knowing what code you need to put in there. The quickest way, is to go back to the theming information in views, click on the link of the file your replacing and grab the code that is presented to you. Paste that code in the file you created.
From here on out, you can now successfully customize that view.
Keep in mind that the theming information presented to you is presented from basic to complex (up to down). So choose which file you need to edit carefully. Ill put up some images in this answer a little later.
Hope this helps! Cheers!
Is there something specific you're trying to accomplish? There's a lot of ways to "theme" a view, unless you mean "theme" in the strict Drupal sense.
Personally I just give the fields classes and use those, rewriting the output to include variables as classes if need be. This tends to be easier and more manageable than modifying TPL files directly.