• Hello All, I am working on a forum on my website, but I want the edit profile to be with the theme instead of taking the guests to WP-Admin. How can I do this? If that is not possible, how can I block users from accessing certain panels on Wp-Admin. Website located here. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • First, ordinary users (subscribers) are blocked from accessing just about everything in wp-admin. Subscribers get a truncated Dashboard and can access their ‘Profile’ page. That’s it.

    You can redirect users on login– one method is a simple core hack but I’ve done this with a hook as well, wp_login maybe (can’t remember)– but if you are generating an editable profile form outside the wp-admin directory I’d worry about security even more than I’d worry about it if it were inside wp-admin. The built in profile stuff should be buttoned down decently well, at least.

    You can also reformat your wp-admin to look more like your blog front end, though not exactly like most likely. Look into ‘admin themes‘.

    Thread Starter themacfeed

    (@themacfeed)

    It still shows Counterize 2 stats, I want that to be saved for only our advertisers. How can I block that?

    The dashboard widget, you mean? That would be in the Counterize 2 plugin. Look for add_action('activity_box_end', 'counterize_dashboard'); in counterize.php about line 1367. You’ll need to put a switch around that so that only those users of some certain level or better (whatever your advertisers are) can see it.

    Thread Starter themacfeed

    (@themacfeed)

    what exactly would I insert?

    Thread Starter themacfeed

    (@themacfeed)

    ? Can you help, I am not that great with code?

    Replace the line mentioned above with :

    global $userdata;
    if (!in_array('subscriber',array_keys($userdata->wp_capabilities))) {
    add_action('activity_box_end', 'counterize_dashboard');
    }
    }

    This will cause the function to not print the stats for anyone who is ‘subscriber’ status. Everyone else will see it.

    Thread Starter themacfeed

    (@themacfeed)

    Hmm, that didnt work. Here is that part of my code what exactly do I replace this all with?

    {
    	# Set it up... - add to Dashboard and options-page.
    	add_action('activity_box_end', 'counterize_dashboard');
    	add_submenu_page('edit.php',__('Counterize II'), __('Counterize II'), 8, __FILE__, 'counterize_manage_page');
    	add_options_page('Counterize II Options', 'Counterize II', 8, basename(__FILE__), 'counterize_options_page');
    }

    Looks like I pasted in an extra }.

    {
    	# Set it up... - add to Dashboard and options-page.
    global $userdata;
    if (!in_array('subscriber',array_keys($userdata->wp_capabilities))) {
        add_action('activity_box_end', 'counterize_dashboard');
    }
    	add_submenu_page('edit.php',__('Counterize II'), __('Counterize II'), 8, __FILE__, 'counterize_manage_page');
    	add_options_page('Counterize II Options', 'Counterize II', 8, basename(__FILE__), 'counterize_options_page');
    }

    That is only going to exclude ‘subscribers’ though. You will have to modify it to exclude other, or different, roles.

    Thread Starter themacfeed

    (@themacfeed)

    It worked. I was also accidently “Updating Links” in Dream Weaver which I guess is not good to do.
    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Forum Issue Need Help!!’ is closed to new replies.