Search Results for 'code'
-
Search Results
-
Topic: Plugin help…
I’m interested in creating my fist plugin. I would like it to allow the user to see/edit the extra profile fields that are present in WordPress when a site has WP integration working. I’m asking for any help to get started on this that someone is willing to offer.
I’m not very experienced with PHP, though I feel I am a pretty quick learner. I have too many questions right now from the reading (http://codex.wordpress.org/Writing_a_Plugin) and from looking at other plugins. I don’t think these questions require more than a few simple pointers and explanations about the structure/basic principles of plugins.
Is anyone out there willing to throw me a bone or two?
Ok, what I want to do with the cookie is make it so that a someone logged into the forum gets special attention on my site…
So, I need to get this sorted: is the
random
alphanumeric code at the end of the cookie name (bb_pass_alphanumeric code
or bb_user_alphanumeric code
) just a per user specific or can I just copy and paste MY cookie’s name as the cookie name?… I have looked in what I would say is the logical place to put the set cookie bit but then again, i don’t know much about bbpress…
So can someone help me either find how to read the cookie per user or whether it is possible to just use the cookie name that is set for me…
Ok… Let me start off by saying I’m not your “average” user seeking help. I’ve spent the last 2-3 hours combing this forum and trying almost every combination of cookie configurations and tweaking.
My site is setup like this:
domain.com/blog
domain.com/forum
This is what I have thus far:
In my bbpress config.php
$bb->cookiedomain = '.domain.com';
$bb->cookiepath = '/';
$bb->sitecookiepath = '/';In my wpmu wp-settings.php around line 245
if ( !defined('COOKIEPATH') )
define('COOKIEPATH', '/' );
if ( !defined('SITECOOKIEPATH') )
define('SITECOOKIEPATH', '/' );
if ( !defined('COOKIE_DOMAIN') )
//define('COOKIE_DOMAIN', '.' . $current_site->domain);
define('COOKIE_DOMAIN', '.domain.com');Of course I replaced “domain.com” with my actual domain.
The result is I get a total of 4 cookies when I login into both sites.
Both sets are identical except expiration. (I even edited the expiration date with no avail, apparently bbpress is a full year and day off)
the cookie properties look like this:
website name path secure expires value
bbpress
.domain.com wordpresspass / no Mar 03, 2008 long_hash
.domain.com wordpressuser / no Mar 03, 2008 test
wpmu
.domain.com wordpresspass / no Mar 04, 2007 long_hash (same as the other)
.domain.com wordpressuser / no Mar 04, 2007 testThe only difference is the expiration date. As you can see bbpress has an issue with the date.
Perhaps I need sleep, or I don’t understand how the cookies are supposed to work. But I’m beat.. I can’t battle it anymore tonight.
I’m going to go get some sleep. Perhaps I’ll be able to figure it out from a fresh approach.
Any suggestions would be greatly appreciated.
Thanks,
Steven