Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jase347

    (@bastelheidi)

    Thanks @mdshak .
    Unfortunately, this is no solution in my case and kind of an overload. I have a custom password page that protects a custom post type. I’d need to buy the plugin’s premium version with the risk of not getting everything to work as before.


    I got it to work with:

    add_filter( 'post_password_required', function( $returned, $post )
    {
    
    
        
        if( $returned &&  get_current_user_id() == get_the_author_meta('ID'))
            $returned = false;
    
        return $returned;
    }, 10, 2 );
    
    Thread Starter jase347

    (@bastelheidi)

    Thanks, that helped! Got it to work ??

    function get_total_votes_count($user_id) {
        global $wpdb;
        
        // Query to retrieve the submissions of the given user
        $query = "SELECT p.ID
                  FROM {$wpdb->posts} p
                  INNER JOIN {$wpdb->postmeta} pm ON p.ID = pm.post_id
                  WHERE p.post_author = %d
                    AND p.post_type = 'contest_submission'
                    AND pm.meta_key = '_tc_votes'";
        
        $submissions = $wpdb->get_col($wpdb->prepare($query, $user_id));
        
        $total_votes_count = 0;
        
        // Calculate the sum of votes for each submission
        foreach ($submissions as $submission_id) {
            $votes_count = get_post_meta($submission_id, '_tc_votes', true);
            $total_votes_count += intval($votes_count);
        }
        
        return $total_votes_count;
    }
    • This reply was modified 1 year, 4 months ago by jase347. Reason: marked as resolved
    Thread Starter jase347

    (@bastelheidi)

    Hi, thanks!
    That would be great! I’m stuck and cannot retrieve received votes across all of one user’s submissions. I’m starting with learning. Is the table wp_totalcontest_votes existing originally but just empty and all data then within table wp_totalcontest_log?
    I appreciate any help ??

    Thread Starter jase347

    (@bastelheidi)

    Thanks @bcworkz
    I’m aware of the risk. It’s been carefully weighted so far to use additional other prevention tools (like wordfence, captcha, no auto-publish to name just a few) and the special need here to upload images without registration on the other hand (at least at this point of interaction with the website).

    I see many frontend post plugins in wordpress’ plugin directory with that capability though generelly known it is not recommended. I guess this applies specially to lack of further protection?
    It may not be representative but at least personally I observed definitely more unwelcome activities still at websites with mandatory registration (even with hidden wp-login.php) in direct comparison with a carefully protected website with visitor submission.

    Hi,
    content-blank profile pages (header/footer leading) on wordpress 6.01 and no plugin conflicts. Theme Twenty Twenty-Two 1.1.
    Content loads for user logged in on url/profile only.
    url/profile/userloggedinname shows no content as for all other users.

    Thread Starter jase347

    (@bastelheidi)

    Hi,

    needed to change the default user registration role to a role with editing capability.

    Unfortunately then the user is possible to create & edit other posts. Restricting it to own posts, still users are able to create new posts other than the add-location-post.

    Is this what it usually looks like by having any user role with edit_posts capability? If so, I guess a custom user role to create, edit & publish post & upload media ability for the add-location-post only, would be much appreciated.

    • This reply was modified 2 years, 7 months ago by jase347.
    • This reply was modified 2 years, 7 months ago by jase347.

    joining with same problem here.

    occurs like twohlgemuths description (“5 min inactivity error”) while zipping as tar.gz, although my backup is something tiny (only two plugins and a 500kb database).

    when zipping is set to .zip, the error written by Sonja occurs (“(ER_DELETED) Entry has been deleted”, https://www.ads-software.com/support/topic/ziparchive-returns-status-er_deleted-entry-has-been-deleted)
    In contrast to zipping with tar.gz a (nevertheless faulty) backup-mail is sent.

    max execution time 60sec here and I started the backup manually.

    is anyone having news?

Viewing 7 replies - 1 through 7 (of 7 total)