This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Not able to load phpseclib in drupal 7

Hi,

   I am working in a project in drupal 7 and i am using phpseclib here to download file from SFTP server to my local system in D7. But I am not able to connect/login to SFTP server anyhow? Here the steps I am using to get  the files,

  1. Downloaded phpseclib1.0.5 and put it in /sites/libraries directory

  2. From my module .inc file I am using the following code,

$host = "mysftdomain.com";
$port = 22;
$username = "sftpusername";
$password = "sftppass";
$connection = NULL;
$remoteDir = "/myremotedir";

URL leading to FTP caching?

Hi

A third-party who holds data for the company I'm helping, says they can run a script on the website I'm working on, every time the data I need to access changes.

The data can only be accessed via FTP, so I need to use FTP to store all the data in a database (or flat text file as the data is fairly small) every time the script is called.

In theory, I can do this as a standalone PHP script outside of Drupal, however, it seems more sensible to use Drupal as it will be more secure and I can use the FTP libraries etc.

How would I go about doing this?

Pager with Ajax Content

What is required to include a pager when returning ajax from a controller and or block? 

I have created content with a pager that updated on page load simply by adding the pager api. Something like so - 

return [
  'results' => [
    '#theme' => 'some_theme_template',
    '#nodes' => $nodes,
  ],
  'pager' => [
    '#type' => 'pager',
  ],
];

How to change a store type ?

I have several types of store on my site and I want to modify the button Add to cart of all the products associated with the store type online (online is the machine name of my store type).

How to do this ?

The custom module below works and changes the Add to Cart button for products in all store types.

How to limit it to the type of store online ?

Development version is updated, zip option does not have the latest modifications.

Hi,

I have updated the development branch (8.x-2.x) of the openstory module with the latest modifications. After that I have created a new tag and updated also the master branch. If I download the tag 2.8 version all good.

I have a problem with the zip option of the 8.x-2.x-dev development version. If I use the composer command to download the project, I can see the latest modifications, the same for the tar.gz option.

How can I solve the issue with the zip option?

Drupal form design

hello folks!!!!

I am working on the forms in Drupal. The fields in my forms change every year. some new fields get added and some get removed. The user fills should get the form field based on their selection. What is the best way to implement this functionality? Does Drupal provide multiple versions of form or do I need to design new forms every year? basically, my form contains 50 fields and design them every year is a hectic task to me. can anyone please help me out.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions