flicknut
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: Adsense 3 blocks per pageThe best way I’ve found to have adsense ads in posts is to use the “more” tag, and place the ad block below it.
This is a really stupid idea. You would have to put the adsense code into each and every post. Instead, if you just put the code in your themes, you only have to do it once.
Forum: Plugins
In reply to: Setting Cookie from Outside WordPressOkay here are some adjustments to the code…there was a bug with destroying the cookie when logging out.
You put this code immediately after you check authentication on your main site (in this case https://www.fantasyblitz.com/login/):
// Begin WordPress Cookie Handling require_once("blog/wp-includes/pluggable-functions.php");
$blogurl = "https://www.fantasyblitz.com/blog";
$cookiehash = md5($blogurl);
define('COOKIEHASH', $cookiehash);
define('USER_COOKIE', 'wordpressuser_'. COOKIEHASH);
define('PASS_COOKIE', 'wordpresspass_'. COOKIEHASH);
define('COOKIE_DOMAIN', false);
wp_setcookie($user_username, $login_password, false, $blogurl, $blogurl, $remember);
// End WordPress Cookie Handling
Here’s the code for logging out:
// Begin WordPress Cookie Handling
require_once("blog/wp-includes/pluggable-functions.php");
$blogurl = "https://www.fantasyblitz.com/blog";
$cookiehash = md5($blogurl);
define('COOKIEHASH', $cookiehash);
define('USER_COOKIE', 'wordpressuser_'. COOKIEHASH);
define('PASS_COOKIE', 'wordpresspass_'. COOKIEHASH);
define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', $blogurl . '/' ) );
define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', $blogurl . '/' ) );
define('COOKIE_DOMAIN', false);
wp_clearcookie();
// End WordPress Cookie Handling
Forum: Plugins
In reply to: Setting Cookie from Outside WordPressOkay here is the solution:
// Begin WordPress Cookie Handling require_once("blog/wp-includes/pluggable-functions.php");
$siteurl = "https://www.fantasyblitz.com";
$blogurl = "https://www.fantasyblitz.com/blog";
$cookiehash = md5($blogurl);
define('COOKIEHASH', $cookiehash);
define('USER_COOKIE', 'wordpressuser_'. COOKIEHASH);
define('PASS_COOKIE', 'wordpresspass_'. COOKIEHASH);
define('COOKIE_DOMAIN', false);
wp_setcookie($user_username, $login_password, false, $siteurl, $siteurl, $remember);
// End WordPress Cookie Handling
Firefox is great for troubleshooting problems with your cookies. Just login to WordPress the regular way, and then compare that cookie to the one you are trying to create outside of WordPress.
Forum: Installing WordPress
In reply to: Permalinks Pulling Up 404 PageI would like to take everything back about Schlueterica’s plugin. It’s excellent, and everything works great now.
Forum: Installing WordPress
In reply to: Permalinks Pulling Up 404 PageI have Apache 1.3.33
I tried Schlueterica’s plugin as noted in the documentation, but it’s a joke (https://isaacschlueter.com/plugins/i-made/lucky-13-rewrite/). If this plugin wasn’t free, it would be sold at Wal-Mart with “Made In China” stamped at the top.
Forum: Installing WordPress
In reply to: Permalinks Pulling Up 404 PageOkay I can get permalinks to work if I don’t use %category% in the permalink. However, I want my permalinks to be /%category%/%postname%/
What can be the problem? Thanks.