wyclef
Forum Replies Created
-
Forum: Hacks
In reply to: Check wp-postpass_* auth cookieHello, I’m wondering if there was ever any resolution on this?
I have a similar situation that was working fine pre WP 3.4.2. This following no longer seems to work.
$urlSplits = explode('/', $_SERVER['REQUEST_URI']); if (isset( $_COOKIE['wp-postpass_' . COOKIEHASH]) && $urlSplits[3] == 'logout') { $pastdate = mktime(0,0,0,1,1,1970); setcookie('wp-postpass_' . COOKIEHASH, '', $pastdate, COOKIEPATH ); header('Location: http://www.myurl.com/my-section/password-protected'); } <? $sql = "SELECT post_password FROM wp_posts WHERE ID = '173'"; $result = mysql_query($sql) or die('Content was not loaded. Please refresh your page.'); while($post = mysql_fetch_array($result)) {$pagePass = $post['post_password'];} ?> <? if (isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) && $pagePass == $_COOKIE['wp-postpass_' . COOKIEHASH]) { ?> <a href="<? echo site_url('/my-section/password-protected/logout'); ?>" class="open">Member Logout</a> <? } else { ?> <a href="<? echo site_url('/my-section/password-protected/'); ?>" class="close">Member Area</a> <? } ?>Forum: Fixing WordPress
In reply to: Upgraded from 3.3.3 to 3.4.2 and password protection brokenis anyone familiar with the above code using wp-postpass?
Forum: Fixing WordPress
In reply to: Upgraded from 3.3.3 to 3.4.2 and password protection brokenTo simplify things it seems like the code I really need help with is the conditional I had set up to control the login/logout button. This no longer works.
<? if (isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) && $pagePass == $_COOKIE['wp-postpass_' . COOKIEHASH]) { ?> <a href="<? echo site_url('/members/logout'); ?>" class="open">Member Logout</a> <? } else { ?> <a href="<? echo site_url('/members/'); ?>" class="close">Member Area</a> <? } ?>Forum: Fixing WordPress
In reply to: Upgraded from 3.3.3 to 3.4.2 and password protection brokenit’s an older build and there is limited time. far too many things would break at once. trying to ease into the upgrades.
Forum: Fixing WordPress
In reply to: Upgraded from 3.3.3 to 3.4.2 and password protection brokenIt looks like someone in another post that’s been closed for replies touched on what I’m trying to work out but I don’t fully understand.
They said…
anyone else who stumbled upon this and has any pre-3.4 conditional code comparing $post_object->post_password with $_COOKIE[‘wp-postpass_’ . COOKIEHASH]: you must now use wp_check_password() instead, as the post password is (wisely!) no longer saved in plaintext in the user’s browser.
Forum: Fixing WordPress
In reply to: Upgraded from 3.3.3 to 3.4.2 and password protection brokenah, thanks for the link. it looks like the top bit of code is basically fine once I swap out the wp-pass.php. I need to have the extra code snippet because I’m customizing it some. As far as the bottom bit of code is wp-postpass_ no longer valid in 3.4.2?
well, i didn’t bother with the form-designer stuff as I am not using that but changing administrator to editor also did not work for me. i changed administrator to moderate_comments and that did work.
which files did you change?
do a multi-file search for ‘administrator’. change what you want for editor to ‘moderate_comments’. a bit of a hack but worked for me. i needed a fix pronto.
actually. this seems to go away if I refresh the events. weird.
specifically ‘Cannot load constant-contact-api.’ in editor role. really could use some help getting this to work for editor.
i’m wondering if this plugin has user roles built into it that aren’t being overridden by other plugins?
Forum: Plugins
In reply to: Trouble With White Label CMS v1.3 – Insufficient Privelegesdon’t everyone chime in at once
Forum: Plugins
In reply to: Trouble With White Label CMS v1.3 – Insufficient Privelegeswow. tough crowd. (insert cricket sounds here)
Forum: Plugins
In reply to: Trouble With White Label CMS v1.3 – Insufficient Privelegesthis is the page it’s trying to access when I get that permissions error.
/wp-admin/admin.php?page=wlcms-plugin.php&saved=true