iceberk
Forum Replies Created
-
But there should be an option to change “reply-to” address in the plugin. Some other plugins have that ability, when hit to reply button it sends to submitter directly. I need that option either. Don’t want to change plugin, please help.
- This reply was modified 6 years, 3 months ago by iceberk.
Forum: Plugins
In reply to: [Contact Form DB] Upload to directory not getting urlI have found a solution like that:
First installed a plugin called “Add Shortcodes Actions And Filters” and then created action containing below code:
function cfdbFilterSaveFiles($formData) {
// CHANGE THIS: CF7 form name you want to manipulate
$formName = ‘krediiii’;
$current_user = wp_get_current_user();
$klasoradi = $current_user->user_login;
if (!file_exists(‘fal_resimleri/’.$klasoradi)) {
mkdir(‘fal_resimleri/’.$klasoradi, 0777, true);
}if ($formData && $formName == $formData->title) {
// CHANGE THIS: directory where the file will be saved permanently
$uploadDir = ‘../public_html/fal_resimleri/’. $current_user->user_login.’/’;// CHANGE THIS: URL to the above directory
$urlDir = ‘www.astroenerji.com/fal_resimleri/’. $current_user->user_login.’/’;// CHANGE THIS: upload field names on your form
$fieldNames = array(‘Resim-1’, ‘Resim-2’, ‘Resim-3’, ‘Resim-4’, ‘Resim-5’);return saveFilesInForm($formData, $uploadDir, $urlDir, $fieldNames);
}return $formData;
}add_filter(‘cfdb_form_data’, ‘cfdbFilterSaveFiles’);
function saveFilesInForm($formData, $uploadDir, $urlDir, $fieldNames) {
// make a copy of data from cf7
$formCopy = clone $formData;foreach ($fieldNames as $fieldName) {
if (isset($formData->uploaded_files[$fieldName])) {
// breakdown parts of uploaded file, to get basename
$path = pathinfo($formCopy->uploaded_files[$fieldName]);
// directory of the new file
$newfile = $uploadDir . time().$path[‘basename’];// check if a file with the same name exists in the directory
if (file_exists($newfile)) {
$dupname = true;
$i = 2;
while ($dupname) {
$newpath = pathinfo($newfile);
$newfile = $uploadDir . $newpath[‘filename’] . ‘-‘ . $i . ‘.’ . $newpath[‘extension’];if (file_exists($newfile)) {
$i++;
} else {
$dupname = false;
}
}
}// make a copy of file to new directory
copy($formCopy->uploaded_files[$fieldName], $newfile);// save the path to the copied file to the cfdb database
$formCopy->posted_data[$fieldName] = time().$path[‘basename’];// delete the original file from $formCopy
unset($formCopy->uploaded_files[$fieldName]);
}}
return $formCopy;
}add_filter(‘cfdb_form_data’, ‘cfdbFilterSaveFiles’);
then I wrote the below code under the cfdb shortcode where I want to show the output:
<?php
$current_user = wp_get_current_user();
?><script type=”text/javascript”>
(function ($) {
$(‘td[title=”Resim-1″] div’).each(
function () {
$(this).html(‘user_login; ?>/’ + $(this).html() + ‘”>Foto?raf-1‘);
})
})(jQuery);
</script>Forum: Themes and Templates
In reply to: [Savile Row] One column on mobileThank you for yor answers CrouchingBruin.
I have added a new code like that;
@media all and (max-width:768px){ .woocommerce ul.products li.col-3.product, .woocommerce-page ul.products li.col-3.product{ width: 98%; margin:1%; } }
and it is now working.
Forum: Themes and Templates
In reply to: [Savile Row] One column on mobileI tried this code but still same.
Forum: Themes and Templates
In reply to: [Savile Row] One column on mobileForum: Themes and Templates
In reply to: [Savile Row] One column on mobileThe site is;
Hello,
Thank you for your answer.
I searched deeper after I asked this question and found the code “mycred_get_users_cred” which is working fine. I added this code to my template file not in content field.
This code is what I need.
Thank you.
Is there a solution for that?
Hello again,
Let me explain what I want to do;
I want to sell products by users preiad credits. So I have to check if there is enough credit in user’s balance to buy the product. If there not enough credit, than I want to show “please add more credit to buy this product” text instead of submit form or payment button.
Yhank you.
Hello,
I have done what is written in the link before and then I opened this ticket. I tried copying German files yesteeday and some of the translations worked. But there were phrases not translated. For example “My Orders” in the fronted user profile sidebar.
Thanks
Forum: Plugins
In reply to: [Contact Form DB] Display result from all formsHello again,
I realize that it show only numerical values, so I will try to do that with PHP Transform Class as you said.
Thank you.
Forum: Plugins
In reply to: [Contact Form DB] Display result from all formsHello again,
I really appreciate your answer.
I have found some examples from your plugin site. I think the code below is for what I want;
[cfdb-value function="max" form="Deneme" show="Submitted Login"]
but it returns nothing while th code below shows-up the result;
[cfdb-value form="Deneme" show="Submitted Login" limit="1"]
Am I using it in wrong way?
Forum: Plugins
In reply to: [Contact Form DB] Display result from all formsThank you for your answer, I have one more question, i would be appreciated for the answer;
I want to show the data, that has been entered mostly to a column in wordpress. I have this columns in my custom wp database;
field_name field_value id 1 entry 489 Submitted indirimdeki IP 212.156.66.142 id 1 entry 689 Submitted indirimdeki IP 212.156.66.142 id 1 entry 750 Submitted indirimdeki IP 212.156.66.142 id 1 entry 790 Submitted zamli IP 212.156.66.142 id 1 entry 790 Submitted zamli IP 212.156.66.142
I need the most popular Word in column “field_value” according to “Submitted” within the same form_name
In this example the result should be “indirimdeki”
How can I manage it?
Thank you very much.
Forum: Plugins
In reply to: [Contact Form DB] Display result from all formsHello again,
I want to display only one of multiple same entries from field_name. For example;
field_name
1
1
5
3
2
5
1
2
3
3is my table and i want to retrieve and display it as;
field_name = 1, 2, 3, 5all the same values displayed once and the other same values are not displayed.
I have tried below code to display as I want;
$results = $wpdb->get_results( ‘SELECT DISTINCT field_name FROM wp_cf7dbplugin_submits’, OBJECT );but it outputs “Array”
Then I tried this one;
$results = $wpdb->query( ‘SELECT DISTINCT field_name FROM wp_cf7dbplugin_submits’, OBJECT );and it showed-up the number of entries (output = 4)
How can I get this work?
Thank you for your answer
Forum: Plugins
In reply to: [Contact Form DB] Display result from all formsOk thank you