Forum Replies Created

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • in reply to: Problem with Unicode when exporting entries! #5317
    haritos
    Participant

    Ok! Thank you for all!

    in reply to: Problem with Unicode when exporting entries! #5315
    haritos
    Participant

    I have one more question.. I want to use 2 Facebook Like buttons with html element but i want to hide the second Facebook Like button and make it appear when the first button has been liked. Is this possible with the conditional logic?

    in reply to: Problem with Unicode when exporting entries! #5313
    haritos
    Participant

    I found it.. All the changes can be made with the text import wizard.. Thank you Ally!

    You have the best support ever!

    in reply to: Problem with Unicode when exporting entries! #5312
    haritos
    Participant

    Thank you for your quick reply! I fixed that problem but i want to ask one more thing… Can i use instead of commas the data in different cells? How can i do this?

    in reply to: How to create a register form for WordPress users? #4903
    haritos
    Participant

    Excellent support!

    haritos
    Participant
    haritos
    Participant

    Thank you josef777, the [raw] issue is solved. Also i have a problem with the reCAPTCHA as it seems not been displayed well. Do you have a solution for this problem?

    in reply to: Problem with my blog! #4388
    haritos
    Participant

    It seems that there is not a PHP error because i debug it and there is no recent error written in the debug log. What exactly “Update active themes cache” does? Because i use a child theme if that matters…

    in reply to: How to automatically create a post? #4362
    haritos
    Participant

    Hi Ally,

    How can i autopopulate a date from the form to the Advanced custom field?

    I use a date picker so what i have to do?

    in reply to: How to automatically create a post? #4297
    haritos
    Participant

    I did it but nothing changed!

    Where do i have to put the array for the checkboxes?


    array(
    0 => 'Chosen Option 1',
    1 => 'Chosen Option 2'
    )

    How the whole code i gave you, should look like?

    in reply to: How to automatically create a post? #4288
    haritos
    Participant

    Thanks for the notification but where do i have to put the checkbox array?

    i use this code:

    add_action('iphorm_post_process_1', 'mytheme_create_wp_post', 10, 1);

    function mytheme_create_wp_post($form)
    {
    $title = $form->getValue('iphorm_1_1');
    $content .= 'Δώρα διαγωνισμού: ' . $form->getValueHtml('iphorm_1_30') . '<br />';
    $content .= 'Κατηγορία διαγωνισμού: ' . $form->getValueHtml('iphorm_1_39') . '<br />';
    $content .= 'Διοργανωτής διαγωνισμού: ' . $form->getValueHtml('iphorm_1_36') . '<br />';
    $content .= 'Απαιτείται λογαριασμός Facebook: ' . $form->getValueHtml('iphorm_1_45') . '<br />';
    $content .= 'Περιορισμός περιοχής: ' . $form->getValueHtml('iphorm_1_15') . '<br />';
    $content .= 'Ημερομηνία λήξης: ' . $form->getValueHtml('iphorm_1_8') . '<br />';
    $content .= 'Ώρα λήξης: ' . $form->getValueHtml('iphorm_1_9') . '<br />';
    $content .= 'Όροι διαγωνισμού: ' . $form->getValueHtml('iphorm_1_32') . '<br />';
    $content .= 'Πληροφορίες διαγωνισμού: ' . $form->getValueHtml('iphorm_1_35') . '<br />';
    $link .= 'Link διαγωνισμού: ' . $form->getValueHtml('iphorm_1_11') . '<br />';

    $post = array(
    'post_title' => $title,
    'post_content' => $content,
    'post_status' => 'draft'
    );

    $post_id = wp_insert_post($post);
    add_post_meta($post_id, 'dwra_diagwnismou', $form->getValue('iphorm_1_30'));
    add_post_meta($post_id, 'category', $form->getValue('iphorm_1_39'));
    add_post_meta($post_id, 'diorganwths_diagwnismou', $form->getValue('iphorm_1_36'));
    add_post_meta($post_id, 'apaitei_logariasmo_facebook', $form->getValue('iphorm_1_45'));
    add_post_meta($post_id, 'periorismos_perioxhs', $form->getValue('iphorm_1_15'));
    add_post_meta($post_id, 'hmeromhnia_lhkshs', $form->getValue('iphorm_1_8'));
    add_post_meta($post_id, 'wra_lhkshs', $form->getValue('iphorm_1_9'));
    add_post_meta($post_id, 'link_diagwnismou', $form->getValue('iphorm_1_11'));
    add_post_meta($post_id, 'oroi_diagwnismou', $form->getValue('iphorm_1_32'));
    add_post_meta($post_id, 'plhrofories_diagwnismou', $form->getValue('iphorm_1_35'));

    // Add attachments
    $file = $form->getValue('iphorm_1_10');

    if (isset($file[0]))
    {
    $file = $file[0];
    $filename = $file['text'];
    $path = $file['fullPath'];

    $wp_filetype = wp_check_filetype($filename, null);

    $attachment = array(
    'post_mime_type' => $wp_filetype['type'],
    'post_title' => sanitize_file_name($filename),
    'post_content' => '',
    'post_status' => 'inherit'
    );

    $attach_id = wp_insert_attachment($attachment, $path, $post_id);

    require_once(ABSPATH . 'wp-admin/includes/image.php');
    $attach_data = wp_generate_attachment_metadata( $attach_id, $path );
    wp_update_attachment_metadata( $attach_id, $attach_data );

    set_post_thumbnail( $post_id, $attach_id );
    }

    }

    in reply to: How to automatically create a post? #4248
    haritos
    Participant

    Hi Ally,

    You are totally right!

    I have one more problem.. It may be yours or the ACF Plugin!

    I have three fields in the ACF and i want to autofill them with the submitted form data. I can do this for all other fields but with these three i can’t!

    The fields are a date picker, a text and a checkbox.

    Can you help me?

    haritos
    Participant

    Hello Ally,

    I’ve added the code below and works fine:

    add_post_meta($post_id, 'link_diagwnismou', $form->getValue('iphorm_1_11'));

    Thank you for all!

    By the way, use gave me a code to insert the submitted image into the post but by inserting the code in the functions.php an error occurs. This is the code you gave me:
    // Insert the post
    $post_id = wp_insert_post($post);

    // Add attachments
    $file = $form->getValue('iphorm_2_4');

    if (isset($file[0])) {
    $file = $file[0];
    $filename = $file['text'];
    $path = $file['fullPath'];

    $wp_filetype = wp_check_filetype($filename, null);

    $attachment = array(
    'post_mime_type' => $wp_filetype['type'],
    'post_title' => sanitize_file_name($filename),
    'post_content' => '',
    'post_status' => 'inherit'
    );

    $attach_id = wp_insert_attachment($attachment, $path, $post_id);

    require_once(ABSPATH . 'wp-admin/includes/image.php');
    $attach_data = wp_generate_attachment_metadata( $attach_id, $path );
    wp_update_attachment_metadata( $attach_id, $attach_data );

    set_post_thumbnail( $post_id, $attach_id );

    And you also told me to make a change in this:
    $value = array(
    'url' => iphorm_get_wp_uploads_url() . '/' . $result['path'] . $filename,
    'text' => $filename
    );

    To this:
    $value = array(
    'url' => iphorm_get_wp_uploads_url() . '/' . $result['path'] . $filename,
    'text' => $filename,
    'fullPath' => $fullPath
    );

    Please can you tell me what might be the problem?

    in reply to: How to automatically create a post? #4217
    haritos
    Participant

    Hey Ally,

    Can you help me on how to insert an image tp the post uploaded via the form?

    You gave me this code:

    // Insert the post
    $post_id = wp_insert_post($post);

    // Add attachments
    $file = $form->getValue('iphorm_2_4');

    if (isset($file[0])) {
    $file = $file[0];
    $filename = $file['text'];
    $path = $file['fullPath'];

    $wp_filetype = wp_check_filetype($filename, null);

    $attachment = array(
    'post_mime_type' => $wp_filetype['type'],
    'post_title' => sanitize_file_name($filename),
    'post_content' => '',
    'post_status' => 'inherit'
    );

    $attach_id = wp_insert_attachment($attachment, $path, $post_id);

    require_once(ABSPATH . 'wp-admin/includes/image.php');
    $attach_data = wp_generate_attachment_metadata( $attach_id, $path );
    wp_update_attachment_metadata( $attach_id, $attach_data );

    set_post_thumbnail( $post_id, $attach_id );

    And you told me to add this:

    $value = array(
    'url' => iphorm_get_wp_uploads_url() . '/' . $result['path'] . $filename,
    'text' => $filename,
    'fullPath' => $fullPath
    );

    But it gives me an error!

    Please help!

    in reply to: How to automatically create a post? #4157
    haritos
    Participant

    Yes i saw it!

    Thank you!

Viewing 15 posts - 1 through 15 (of 19 total)
Be inspired. © 2025 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy