I'm trying to convert the theme from Drupal to Wordpress, I don't know a lot about drupal, so this function "drupal_get_private_key" confuses me a little and I can't really find a lot of documentation about it. Could someone explain me what is this function about and how could I do this in Wordpress?
Thank you for the help
Drupal uses this to generate the paths to files* (its used in other stuff too, but in themming I believe its the main reason).
*These files are the files created by users, not the files in the theme folder. The folders are configured in the admin and, when an user uploads a news picture, for example, it will be placed in the configured folder.
You problably just want to find another way to find these paths.
Related
I am currently working on an implementation reading data from a csv file from within a WordPress plugin. It was suggested the file be added within the plugin in an assets directory. I have concerns in doing this. In particular, I'm worried about security and whether this makes the site vulnerable to attacks.
That being said, I looked at the assets folder in the frontend on my local environment and was not able to see the csv file.
Does anyone know if adding a csv file directly to a plugin introduce security risks?
Alternatively, I was thinking about uploading this csv to AWS and reading the data from there.
Good day, Lara.
I am wordpress developer and try to help you now.
We know that every plugin we install should be correct but there are can be some risks.
The wordpress Core do not allow to call CSV and other files directly from folders. For example like assets folder.
But the plugin is third hands software so if a developer do not protect it, anybody can have access to the file.
My advice to check the Stars and Reviews of plugin on
https://wordpress.org/plugins/
Or find reviews of plugin here
https://codecanyon.net/category/all
If it has 4 and more Stars, I think you dont need to worry about security.
Tell please if it helps you...
I have a question. I need to add a downloadable doc/pdf files to my page by category. Tell me what I can do? Doc files will be stored in the database? I can't understand how to realize it. Help, please.
Firstly, you can't store .doc and .pdf files in a database. Your files will be stored in the wp-content folder. Databases are to be used explicitly for storing website content in tables, such as posts, pages and plugin settings for example.
I'd highly recommend you look at some basic WordPress tutorials to understand how WordPress works before taking on something like this.
You can browse the plugin directory to look for a good file manager.
Here's an article that may help you - https://www.wpmayor.com/best-document-file-management-plugins-wordpress/
Google-fu is essential for solving very simply problems like this.
I'm using a multisite setup in Drupal 7. I'm wondering if it's possible to limit where a site can look for which modules to use. For example, there are a lot of modules I'd like to be able to use across all sites (../sites/all/modules/). But I would like Site A to have access to modules/custom/siteA, but not modules/custom/siteB.
Is this possible or do I have to share all modules across all sites?
You're thinking of it the wrong way; going depth first instead of breadth first. This is one of the "benefits" to going multisite.
In Drupal 7, you should be able to put any modules you want only to appear to a specific site into it's sites/site-name/modules/ directory; site-name being whatever directory you mapped the sites/sites.php file to go to for the given URL. I think you should already have a settings.php file in your sites/site-name directory. Just add the modules folder and dump them in. I'm not really sure how to handle it further, or how to install site-specific modules from the site GUI (if that's possible.)
I only put benefits in quotes because I've never been a fan of going multisite, but plenty of people have been more than happy to and it's worked out great for them.
this is quite easy. Suppose there are two sites you have created with multisite installation.
Site A (root site)
Site B
The modules that are common will be placed in sites/all/modules directory. But you can define some modules to appear in the site B only by placing the same in
sites/SiteB/modules.
I hope, it is making sense for you. Otherwise feel free to ask your queries.
All the Best!!
I am confused as to how I can use Drupal to create multiple sites for a WAMP or LAMP installation.
I currently have everything setup and Drupal setup in the following directories:
/var/www/drupal-7.12
c:/wamp/www/drupal-7.12
When I access these folders from the browser I am able to modify and create content for my webpage.
It would appear to me that the default Drupal folder is the only one I can create my website in.
My question is: if I have multiple sites that I need to create with this one Drupal installation, how can I achieve it?
For example:
c:/wamp/www/mysite1
c:/wamp/www/mysite2
Thanks!
This document will explain a bit on how to run multiple sites from the same code base http://drupal.org/documentation/install/multi-site.
If your sites will share some common elements like users, this might also be helpful: http://drupal.org/node/201673
There may be more documentation written on the subject at Drupal.org, but most of what I can tell can be found in the following files. Be sure to read the comments in these files.
[Drupal Root Directory]/sites/example.sites.php
and
[Drupal Root Directory]/sites/default/default.settings.php
In general, the way Drupal 6 worked is that you needed to create subdirectories for each of your sites in the the sites directory. So that you would have a directory structure that looks like:
sites/default
sites/example-1.com
sites/example-2.com
etc.
I would imagine that D7 keeps this same structure, but I haven't yet It looks like the sites.php file provides a mapping of domain names and site directories that you can use to map. Drupal, will default to sites/default if it can't find an appropriate match.
While it's targeted toward linux, this might be a good place to find multisite info as well:
http://drupal.org/node/1114158
I am developing a site based on Drupal CMS and it has awesome image managing tools but there is a problem: While the images are being nicely resides rotated or else their paths become a bit weird for a common user.
It just so happens that users will see a lot of my images urls and I want them to look short, nice, and pretty. Since there is powerful module called Pathauto for Drupal users I just thought that changing masking files original url could be as simple as nodes.
Could it be that easy? If so, how? Maybe there is more than one way to do it? Could some non-Drupal way do the job?
You could try editing the htaccess file. It seems someone else has had that same thought... Drupal alias your file paths using htaccess