Search Results for 'code'
-
AuthorSearch Results
-
July 21, 2010 at 10:16 pm #91263
In reply to: What should be a Plugin, and what should be in Core
Greg
ParticipantRegarding Matt’s “”As for bundling multiple plugins with core — ultimately it’s a cop-out. If something is good enough to be included with the core download, put it in core!””
I agree with everything johnhiler said on this, plus I would add that the advantage of core plugins is that their coupling with the real core will be more well defined and probably minimized. Making something a plugin puts a clear boundary around the set of features that it adds. It also guarantees that the real core can work without this functionality.
Without this to enforce discipline on the design, things are far more likely to become highly coupled spaghetti.
A related issue is core bloat. Something like Windows or WordPress adds features in every release and seldom removes them. The result is that the code base is monotonically increasing in size and complexity. It will ultimately collapse under its own weight. This means that significant rewrites become necessary from time to time.
The Unix “small and decoupled is beautiful” approach is maintainable for much longer for this reason.
Higher coupling does have its advantages (performance, UX), but they are usually short term gains, winning the battle but losing the war.
July 21, 2010 at 7:05 pm #91544In reply to: Plugin alternatives?
zaerl
ParticipantAssuming that you are using the Kakumei theme open
/bb-templates/kakumei/topic.php. The plugin instructions: https://bbpress.org/plugins/topic/live-comment-preview/installation/ suggest a good place for inserting that snippet of code. Right after<?php post_form(); ?>(line 45 in Kakumeitopic.phptemplate file.)Remember: Never touch core files.
July 21, 2010 at 6:51 pm #91543In reply to: Plugin alternatives?
Joe Gibson
MemberZ – I got to thinking and decided I’d better double-check and found “topic.php” in the root directory, so I presume that’s the one he meant. I tried slapping all five lines of code into it in three different places and got a ‘Parse Error’ when clicking on a comment each time, so obviously I’m still missing something. Thoughts?
Joe
July 21, 2010 at 6:21 pm #91542In reply to: Plugin alternatives?
Joe Gibson
MemberZ –
Thanks for the replies.
“So I don’t see a reason why it should not function with my plugin.”
And, if I’d actually activated the dang thing, nor would I. Sorry about that. The activation process somehow slipped by me. Works terrifically in both browsers.
“zaerl URL preview”
No thanks to that, but I know people are going to start bitching about not having a ‘Preview’ button.
The only hitch (so far) with “Live Comment Preview” is that I can’t understand his instructions. Maybe you could set me straight:
__________________________________________________________
<?php add_live_comment_preview(“View Preview”); ?>
to your topic.php file, where you want to show the preview’s area.
ie. before the post form something like that
<?php if ( topic_is_open( $bb_post->topic_id ) ) : ?>
<?php add_live_comment_preview(“View Preview”); ?>
<?php post_form(); ?>
<?php else : ?>
__________________________________________________________
1. First off, assuming he’s referring to the bbPress file, it’s “topics.php”. And it’s a fairly long file. Would you have a suggestion on where the first line of code should be stuck?
2. And are the last 4 lines supposed to be part of it? His breaking up a block of code with commentary was somewhat unorthodox.
Much thanks,
Joe
July 21, 2010 at 4:17 pm #91453In reply to: One WordPress Vs Multiple bbPress
kevinjohngallagher
Memberwhy not no need of “www”? reason?
We’ve known that using “www” during installs has caused issues in the past. Especially if you used “www” for one isntall and not the other.
Cookies are/were (been a long time since i looked into this) using the full URL so “www.bbpress.org”‘s cookie would be different from “bbpress.org”‘s cookie if you didn’t specify.
99/100 it makes no difference. 1/100 it does

.
.
You are right that there was no need for the salts when bbPress1.0 was released, but we’ve had 3 WP releases since then. I find its better to be safe than sorry.
So I’m confuse why we need two separate authentications for both wp and bbP.
In theory: You do not.
In Practice: It doesn’t hurt at all.
Request:
Can you please create two demo files for wp-config.php and bb-config.php with authentication keys, and make live them to pastebin.com & paste links here?
Sure, i’ll do that tonight when I get home.
Am off to see Toy Story3 in 10 mins.
July 21, 2010 at 2:35 pm #90556In reply to: Good forum needs some feathures – New ideas!
kevinjohngallagher
MemberYes, there’s a plugin but It works only with older release bbPress
As do most plugins.
It’s just where we are I’m afraid
July 21, 2010 at 1:38 pm #91451In reply to: One WordPress Vs Multiple bbPress
kevinjohngallagher
MemberWell I can see some things I’d change. Will they make a difference? i don’t know, probably not, but again, they’re what I use.
(I wish the search function here was half decent so I could find the post I went into this in detail in…)
1) Get your authentication Keys from https://api.wordpress.org/secret-key/1.1/bbpress/salt/
2) Copy your WordPress authentications into your bbPrefig file
define('AUTH_KEY', '5G#If&OQrV:MfrjuU2;NKhfw|Z:|iU>@hw^LLTxv|~8KPC9S;-+r#J&|T=DS%#X8');
define('SECURE_AUTH_KEY', 'u.p|C]A*s*@M%VGr4;_Cc-*d|I:QjTT&p6kcTL:^X+tzUT)7k-S]h)q^c|||$uy;');
define('LOGGED_IN_KEY', 'xA+j,OZKD_*, 6|Jb7C6rS*3(oT4{-Y)R.E/|!xNtb8,GYzp,X-?i[HtTRE|81h=');
define('NONCE_KEY', '4h035-4lx6-W.>dtZzRtA=XA+&G5v)llX[B>4--:>hX0h:Ey$afw|&[r_1zHQnZ^');
define('AUTH_SALT', '+/poE0c>eRr#l54-r@:S.4HD^s3Zr%w-S;s++d,[ku5#Aj{N6g6T;.P>/UB8bIUn');
define('SECURE_AUTH_SALT', 'ck.^(0_T5tON$lTy>dkPZ#]1wZ~yKBkE0m>60H_FRG r6yXd#E|dhJAVvPDu5Kf.');
define('LOGGED_IN_SALT', 'Fz^)*aj<U[RxO3A][1K=pXX6a-4-<R7=[fe$1[hT5d!e-_onpNrk^t|j%!~a+;KP');
define('NONCE_SALT', 'TEdXdR+g]&YY9/YtZX^[,e{_U+^fSGcgt JqKB<[sh:3Jg<7RG~f_.xLX(9e5FXV');
define('BB_AUTH_KEY', 'f@X, B|4rcQ?sv#[]q+x;r =KO{r}i<|h%0=?>!/f|0A#[qzh9pNWdnZR8XadkFH');
define('BB_SECURE_AUTH_KEY', 'X0*%@*wpp(A[/(4RD(TWAnW7N[:gYBZ:@r}-z;w),|fptIbt5 Ro}8Tr?}-c-y+m');
define('BB_LOGGED_IN_KEY', 'cbal+zxea.]|C!ZsWQ6}cKy+?!eSs?@(t)qCz=H*4CDrZlXoC+-X#[h5Hl37LU~/');
define('BB_NONCE_KEY', '4{ZC+__k{]MPr[I{~q$Muta#XghduMPBRQvNZqFIm-~-4-DaH|vH$6W~)wD!^92X');
define('BB_AUTH_SALT', '?v&+?5?vnXoIPuc&%OQMNN#QP_Xf&ZA0J:FO;tY:JdEjT5xt^k$,-q!XvVS,E)$1');
define('BB_SECURE_AUTH_SALT', 'n(M15M~Y<qg(A!x8ov,7]:+HZ>q0ajV3!feD){dLPhn2upN?;fIRE.@~14xH?v!8');
define('BB_LOGGED_IN_SALT', '{Lu=[hq;BCEu j>n[Ejv%]w-k y?$@*sK@VcB<7E)wR/mrUIGj%9@*Q>.v]P|~#x');
define('BB_NONCE_SALT', '*9Dv~}=@+k<g-w$WIsEXdxULL0yz0D{]!9@HY/e$7Ru|^dv?QF$gy!}dcLIC>@5P');3. With no disrespect to that screencast, it is 19 months old, and we’ve had a whole new version of bbPress since then. For integration I always use http://wpbbpthemes.org/integration/ as a starting guide.
4. Check you’re not using “www” anywhere in the URLS you specify in the database, or that you installed any of the bbPress/WordPress systems while using “www”.
July 21, 2010 at 10:41 am #91449In reply to: One WordPress Vs Multiple bbPress
kevinjohngallagher
MemberIn your bb-config.php file put this code:
define( 'COOKIE_DOMAIN', '.your-domain-name.com' );
define( 'SITECOOKIEPATH', '/' );
define( 'COOKIEPATH', '/' );If you’re using WordPress, make sure you put the same in the wp-config.php too.
Now, I know this isn’t supported or well-liked or even neccessary these days (was it ever), but I still put this legacy code into my bb-config
$bb->wp_siteurl = 'http://www.my-wordpress-url.com';
$bb->wp_home = 'http://www.my-wordpress-url.com';
$bb->wp_table_prefix = 'wp_';
$bb->user_bbdb_name = 'my-database-name';
$bb->user_bbdb_user = 'my-database-username';
$bb->user_bbdb_password = 'my-password';
$bb->user_bbdb_host = 'localhost';
$bb->custom_user_table = '';
$bb->custom_user_meta_table = '';
$bb->authcookie = 'wordpress_';
$bb->cookiedomain = '';
$bb->cookiepath = '/';
$bb->sitecookiepath = '';
$bb->wp_table_prefix = 'wp_';Does it make any difference? I doubt it. But with all the integration stuff over the years, I’ve become a big fan of covering the bases.
July 21, 2010 at 8:32 am #91541In reply to: Plugin alternatives?
zaerl
Participantzaerl Editor just add a
<a>tag which is the standard way of doing things (nothing more). It seems that bb-open_in_new_window just scan the DOM searching foraelements and append a_blank. So I don’t see a reason why it should not function with my plugin.Checkbox for e-mail subscription
Here we have the trunk version of bbPress (1.1 or 1.0.3, we don’t know how to name it and this is a great problem, really) which introduce anonymous posting and subscribe to topics.
If you want a plugin that transform links the way you want I can send you the version 0.2 of my plugin “zaerl URL preview” which I have not uploaded to bbpress.org for several reasons (here there is only 0.1).
za AT zaerl.com
July 21, 2010 at 7:25 am #34749Topic: WordPress Supporting Theme
in forum ThemesDanial Hatami
MemberHi everybody,
I searched for the themes for my bbforum like this : http://wordpress.org/support/ but I found one theme that it named mimic, i guess. but the style and the color is not the same.
I need it ( this theme : http://wordpress.org/support/ ) for the Persian WordPress Supporting ( fa-wp.com ) …. Please Help Me … Please
(
July 21, 2010 at 6:06 am #91446In reply to: One WordPress Vs Multiple bbPress
_ck_
ParticipantYou don’t even need a plugin for this.
You just need to fix your cookie settings and it will work instantly.
Set all cookie paths to the root
/and make sure they are all using the same key/hash which is likely the problem.
You didn’t say which version of bbPress you are using, it appears to be 1.0.2
I don’t think I’ve ever bothered to figure out all the new variable names under 1.x which is why you can’t find them around here.
July 21, 2010 at 5:59 am #91406_ck_
ParticipantYes, there are already sites using it that way.
In fact if they are all using the same domain “example.com” then you don’t even need an extra plugin to do it.
Set all the cookie paths to the domain root.
/Point all the user tables to the same db.
Setup the same cookie keys/hash and done.
This wasn’t really a question for Matt unless in general people want to know how a bbpress plugin would handle multiple installs. As far as I could guess, you’d have to install multiple copies of WP.
July 20, 2010 at 5:30 pm #91381In reply to: Bavatars 0.4.1 plugin – avatar in post
pastorbobsforum
MemberHello.
Exactly what I wanted:
<?php post_author_avatar(); ?>I had some problems with my permissions for the avatar folder in the root forum. It’s set to 755 now.
Thank you.
Regards,
Bob
July 20, 2010 at 5:24 pm #91054In reply to: Latest on better editor?
Joe Gibson
MemberZ – Thanks, the ‘s’ did it. Very appreciated.
The one last thing that would really make this editor the cat’s ass would be opening links in a new window. Is there a PHP version of “Target=_blank” we can slip into the code?
Joe
July 20, 2010 at 4:33 pm #91380In reply to: Bavatars 0.4.1 plugin – avatar in post
Ben L.
MemberWhat you want is
<?php post_author_avatar_link(); ?>or<?php post_author_avatar(); ?>, depending on whether you want it to be a link to the user’s website or not.July 20, 2010 at 4:27 pm #85435In reply to: Solution for facebook connect
nickaster
MemberSo.. i guess this is a bump. How do i do the last step? “integrate a facebook connect button”? What’s the code for that? Do I just slap it onto my bbpress template?
July 20, 2010 at 3:58 pm #34768Topic: Bavatars 0.4.1 plugin – avatar in post
in forum Pluginspastorbobsforum
MemberHello.
I am using Bavatars 0.4.1 plugin in bbpress 1.0.2.
Now, I am trying to get my avatar (or every user’s avatar for that matter) shown next to every post that I (or they) make.
I have tried using something of the
<?php avatarupload_display(get_post_author_id()); ?>kind in my template’s post.php page, specifically in<div class="threadauthor">section, but I don’t know the exact function that I am supposed to call there. I got the idea from another plugin (Avatar Upload), where it seemed to be working fine.This is the function in Avatar Upload plugin
<?php echo avatarupload_display($user->ID, $force_db); if ($config->use_thumbnail == 1) { echo " " . avatarupload_displaythumb($user->ID, $force_db) . "</p>";}?>defined in avatar.php (from Avatar Upload plugin).Now, if I was to define the exact function in bavatars.php and call it in post.php, I guess it would work, but I cannot find my way round the Bavatars plugin.
Any ideas?
Thank you.
Regards,
Bob
July 20, 2010 at 3:23 pm #91348In reply to: Allow Images (0.9) Plugin – set permissions
pastorbobsforum
MemberHello.
What I wanted was to allow only certain users to post images. And following your advice, this is what I did.
function allow_images_allowed_tags( $tags ) {if (bb_current_user_can('moderate'))
{
$tags = array('src' => array(), 'title' => array(), 'alt' => array());
}
return $tags;
}
add_filter( 'bb_allowed_tags', 'allow_images_allowed_tags' );
?>
<?php
Worked just fine.
Thank you once again.
Regards,
Bob
July 20, 2010 at 1:53 pm #34785Brian Duffy
MemberI installed wordpress using simplescripts. I installed bbpress manually.
Everything works fine until I add the following line to bb-config.php
require_once(dirname(__FILE__) . ‘/../wp-load.php’);
After adding the above code I can no longer login to bbpress.
Instead I get the below error:
Fatal error: Cannot redeclare class PasswordHash in /home7/brianduf/public_html/wordpress/forum/bb-includes/backpress/class.passwordhash.php on line 38
If anyone could help to throw some light on this for me I would be over the moon : )
July 20, 2010 at 1:45 pm #91208In reply to: bbPress activity metrics
_ck_
ParticipantYeah I suspected as much. Thanks for switching it on Otto!
Sam did some work and then a great deal was copied over for bbpress.org 2.0
I noticed the xml generator was there and the flash element was on bbpress.org too.
Now if we could just get DD32 (Dion) to document the darn API for it as I have no clue how to use it and can’t find anything via google (other than downloading the ENTIRE dataset). https://api.wordpress.org/plugins/info/1.0/
Oh wait, here’s something http://wordpress.pastebin.com/raw.php?i=7Ji8rD2P
bingo – docs: http://comox.textdrive.com/pipermail/wp-hackers/2009-January/023505.html
Doesn’t seem to be on the bbPress side anyway after all that, oh well.
ps. I don’t suppose you can get tags working again in the plugin section – they are not being imported from the
readme.txtfile anymore. Is it because of the tag api name changes from bbpress 0.9 -> 1.0 ?ie.
add_topic_tagsbecamebb_add_topic_tagsbut that’s in the deprecated support, so not sure what else it might be
July 20, 2010 at 1:41 pm #91501yetanotherlogin
ParticipantThansk Kevin for the link.
I followed the whole procedure down to “3. Deep Integration > 8. Log into WP Dashboard”… but now, I can no longer log on (/wordpress/wp-login.php)

FWIW, it doesn’t say that the password is incorrect, but it loops back to Username/Password.
Tried Chrome and Firefox, same result. I did empty the browser cache, as asked in the procedure, same result.
FWIW2, I can still log on to bbPress as admin.
Any idea why I can no longer log on to WP?
BTW, when is “deep integration” needed? I’d simply like a link to the underlying bbPress forum to be displayed in the WordPress main UI.
Thank you.
July 20, 2010 at 1:37 pm #91207In reply to: bbPress activity metrics
Samuel Wood (Otto)
KeymasterStrangely enough, the code was all there to do stats, it just needed to be turned on and modified ever so slightly to make the graph work.
July 20, 2010 at 1:15 pm #91323Ivaylo Draganov
MemberWorks flawlessly now. Great thanks for that neat plugin and for the support. I am also in favor of keeping lightweight standalone bbPress
July 20, 2010 at 1:09 pm #91261In reply to: What should be a Plugin, and what should be in Core
citizenkeith
ParticipantAll this, while striving to be as light as possible
I liked reading that!

You guys are starting to win over this bbPress 0.9 user. See what communication can do for a community?
July 20, 2010 at 12:58 pm #91321_ck_
ParticipantOnce you get that settled, I’ll point out how year-long-cookies never executes, even though you have it installed. So just delete that old plugin.
So to make longer cookies when “remember me” is set, you’d have to edit the freshly-baked-cookies plugin, search for the number
1209600and change it to31536000which is a year. Optionally you could set it smaller like111600which is 31 days. -
AuthorSearch Results