Forum Replies Created

Viewing 15 replies - 1 through 15 (of 101 total)
  • Thread Starter chrispink

    (@chrispink)

    @jandembowski

    MY POST MAKES NO SENSE WHATSOEVER NOW. EITHER RESTORE THE EDIT OR DELETE THE POST.

    WHICHEVER YOUR INTERFERENCE IS IGNORANT AND RUDE

    YOU HAVE NOW PUT A KNOWN MALWARE LINK INTO A “Site I need help with”

    • This reply was modified 6 years, 10 months ago by chrispink. Reason: Because he's an idiot I should feel compassion rather than anger
    Thread Starter chrispink

    (@chrispink)

    It’s not my site.
    Do me the courtesy of reading the topic before being so rude.

    The reason for putting the url in the topic is that is what I searched for. This is the spurious link injected into my site. I have edited my post to make sense (to those who can be bothered to read it)

    I am scrupulous about security, updates and the use of secure plugins and code so that this was injected into my site should be of wider concern to the WordPress community.

    If you’re not interested, fine.

    Thread Starter chrispink

    (@chrispink)

    It certainly should do. It’s working on this page; goo.gl/9ck5ZG

    So it might just be a code error.

    The function looks like this – dependent on jQuery – hides the form and presents a download button.

    add_action( ‘wp_footer’, ‘wp2485722_wpcf7_on_sent’ );

    function wp2485722_wpcf7_on_sent() { ?>

    <script type=”text/javascript”>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    if ( ‘11875’ == event.detail.contactFormId ) // FORM ID {
    jQuery(‘#download-button’).slideDown();
    jQuery(‘.inline-breakout .wpcf7’).hide();
    }
    }, true );
    </script>

    <? }

    • This reply was modified 7 years ago by chrispink.
    • This reply was modified 7 years ago by chrispink.

    There’s almost certainly a space or a line break after your username

    Also I am not sure that a downgrade really can be described as “resolved” – can this thread be marked unresolved please as attention is urgently needed by the developers.

    The other issues with this ‘update’;

    the email templates are scrambled
    the confirmation email triggers an unsubscribe rather than a confirmation

    Thread Starter chrispink

    (@chrispink)

    I am really struggling with this and would be so grateful for some help.

    I have two problems;
    1. The code in the answer above works but it deletes the file after attaching it.

    2. I can’t seem to pass a variable to this function. It seems to ignore global variables. I have a shortcode that gets an attachment. I can manipulate that attachment on the page but I can’t pass it’s path to this function.
    In my shortcode I have;

     global $file_path;
      $file_path = get_attached_file( $postid );
      echo $file_path;

    and in the function above I have ;

    global $file_path;
     $submission = WPCF7_Submission::get_instance();
     $submission->add_uploaded_file('pdf', $file_path);

    But it doesn’t work.

    Help!

    Thread Starter chrispink

    (@chrispink)

    add_action( 'wpcf7_before_send_mail', 'wpcf7_file_download' );
    
    function wpcf7_file_download($cf7)
    {
      //check if it is the right form
      if ($cf7->id()==11869)
      {
        $uploads = wp_upload_dir();
        $submission = WPCF7_Submission::get_instance();
        $submission->add_uploaded_file('pdf', $uploads['path'].'/MandW-Case-Study.pdf');
        }
    
    }

    Not sure where the error came from earlier but this code works.

    • This reply was modified 7 years, 2 months ago by chrispink.
    Thread Starter chrispink

    (@chrispink)

    Thing is, I have no problem whatsoever with being corrected and, I admit,I missed the simple thing the moderator picked up on. If he, publicly, had said “you’re wrong, here’s the right solution” I would have reviewed my answer and, if necessary, removed it.

    Look at it the other way round. I’m not a moderator. I don’t have the power to remove wrong posts. All I can do is disagree and offer an alternative solution.

    I work with WordPress all day every day, I’m happy to come along at the end of the day and offer guidance and solutions when I can. Yes, I sometimes get it wrong but if I’m not treated with respect then I simply won’t do it.

    Forum: Fixing WordPress
    In reply to: Site Migration

    Do you have your original SQL export?

    If so, then drop all tables in the receiving database (retain the database) and then try the import again.

    Add <meta name=”viewport” content=”960px”> to your header.php – replacing the one that’s there

    960px is, of course, whatever fixed size you need. The site will then scale on a smaller viewport.

    Most of the big boys seem to use third-party survey sites like surveymonkey.com, this is probably the route I would take, why re-invent the wheel?

    get_userdata() is a function in WordPress Core so should always be available. My instinct would be to reinstall WordPress as a clean install and migrate your existing wp-content and database but you might find that complicated.

    The other option is some kind of security plugin or manual manipulation hiding the WordPress core but I would expect other errors if that were the case.

    Your URL is a little strange too.

    Ask the developer?

    You would need the same OS on the new server (e.g. if Linux now running mySQL then the easiest migration is with that OS on the new server)

    The easiest way to migrate a WordPress database is to

    export your old database using the default settings

    set up a new install on the new server then, using phpMyAdmin, drop all the tables in the database and import the old one.

    on the old server, compress the wp-content directory and download it. Then, on the new server, replace the newly-installed wp-content with the old one.

    One last step; once this is done, log in to admin, go to Settings > Permalinks and press Save.

    This will clone your site seamlessly.

    .site-header .sub-menu .sub-menu {
        margin-top: -36px;
    }

    Going off the screen is a bigger question ?? I would rearrange your menu.

Viewing 15 replies - 1 through 15 (of 101 total)