concrete5

concrete5 - how to get files uploaded through ajax in php

核能气质少年 提交于 2020-12-27 07:17:14
问题 I'm trying to upload multiple files through ajax but I can't figure out how to get the uploaded files in PHP. I sent them var attachments = $('.attachment-file'); var post_data = new FormData(); if (attachments.length > 0) { attachments.each(function(i, v) { post_data.append('my_file', $(v)[0].files); }); } $.ajax({ cache: false, contentType: false, processData: false, method: 'post', type: 'post', data: post_data, url: form.attr('action'), }) .done(function(response) { ... but when I try to

Create PostFinance payment request

纵然是瞬间 提交于 2020-08-08 05:15:03
问题 PHP: Can anyone help me how to create a payment request using wysow repository? I found this link, but there weren't any solutions. I am am using concrete5's Community Store and am trying to create a PostFinance payment package/addon. I have the following code in /packages/community_store_postfinance/src/CommunityStore/Payment/Methods/CommunityStorePostfinance/CommunityStorePostfinancePaymentMethod.php file (which is a copy of the example in GitHub): $passphrase = new Passphrase($shaInSecret)

Create PostFinance payment request

血红的双手。 提交于 2020-08-08 05:14:06
问题 PHP: Can anyone help me how to create a payment request using wysow repository? I found this link, but there weren't any solutions. I am am using concrete5's Community Store and am trying to create a PostFinance payment package/addon. I have the following code in /packages/community_store_postfinance/src/CommunityStore/Payment/Methods/CommunityStorePostfinance/CommunityStorePostfinancePaymentMethod.php file (which is a copy of the example in GitHub): $passphrase = new Passphrase($shaInSecret)

Bootstrapping C5 from an external script

老子叫甜甜 提交于 2020-02-05 03:18:25
问题 I'm writing an import script to add some external content to a C5 installation. I'm unsure which file(s) I need to include in order to get the C5 API available (without any action like loading a page)? /concrete/dispatcher.php does a truckload of initializations, but I'm unsure which ones are required. Just including dispatcher.php causes the script to navigate to the installation dialog. Is there a canonical way to initialize C5 in an external tool? I can't find any in the developer docs.

the Google SEO considerations over using .htaccess rule to ignore top level directory

a 夏天 提交于 2020-01-25 03:28:12
问题 I am using the Concrete 5 CMS to build a website and i'd like to push it live. I have the code in a directory called /concrete5.5.2.1 and rather than updating the references in the database and moving the code on the filesystem, i'm considering using an .htaccess rule to effectively ignore that directory. However, I'm keen to know if doing something like this below would mean that Google would index the /concrete5.5.2.1? Or would this be ignored? RewriteEngine On RewriteRule ^concrete5.5.2.1/

AXMLS database schema - default values and foreign keys

你离开我真会死。 提交于 2020-01-17 04:13:36
问题 I am developing a package for Concrete5 that uses AXMLS format to specify the database schema. http://www.concrete5.org/documentation/how-tos/developers/creating-and-working-with-db-xml-files/ Here is the schema: <?xml version="1.0"?> <schema version="0.3"> <table name="notificationCategory"> <field name="id" type="I"> <!-- integer --> <key/> <autoincrement/> </field> <field name="name" type="C" size="255"> <!-- varchar(255) --> </field> <field name="created" type="T"> <deftimestamp/> </field

How does Concrete5 arrange it's absolute paths?

隐身守侯 提交于 2020-01-16 05:38:06
问题 I've been asked to figure out how the Concrete5 system works for an employer, and I can't figure something out. I have Concrete5 installed to a directory on the server called /realprofessionals . When the Concrete5 system makes new pages, it gives them their own absolute paths, for instance: http://www.wmcpartners.com/realprofessionals/footer However, it hasn't actually made a folder in the /realprofessionals directory called footer . So how does that work? How can http://www.wmcpartners.com

how to pass php value from one file to another through java script

眉间皱痕 提交于 2020-01-01 19:40:36
问题 I am working with Concrete-5 CMS, I have an issue in passing value form view to controller.In my application I am using following code for displaying employee role. foreach($rd as $data){ echo "<tr><td>".$data[role_name]."</td><td>".$data[role_description]."</td><td><a href=".$this->action('edit', $data['role_id']).">Edit</a></td><td>".$ih->button_js(t('Delete'), "deleteRole('".$data['role_id']."')", 'left', 'error')."</td></tr>"; } <input type="hidden" name="rno" id="rno" /> script:

Concrete5 5.7: using a ServiceProvider cross-package

穿精又带淫゛_ 提交于 2019-12-24 04:13:13
问题 I'm migrating old code to 5.7, and I'm running into a weird issue when it comes to helpers. I'm working with two packages - let's call them A and B. Package A one implements a ServiceProvider. I would like to use it in a controller in package B, but it seems unable to find it properly. I'm configuring it in the install() function of package A, as follows $providers = Config::get('providers'); if (!$providers) { $providers = array('group_membership' => '\Concrete\Package\A\Src\GroupMembership

Strange error on increasing memory limit

折月煮酒 提交于 2019-12-24 03:42:16
问题 I am using a shared hosting environment and the default memory limit for PHP is 32M. I am facing some problems with Concrete5 setup. When I try to sign into the admin panel of Concrete5, it gives memory limit error Allowed memory size of 33554432 bytes exhausted . So I increased the memory limit with ini_set('memory_limit', '128M') to 128M . After this I get an error that says: Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data. I tried lowering the