Search Results for 'code'
-
AuthorSearch Results
-
August 18, 2009 at 5:02 pm #77604
In reply to: Cookie integration not working for wp 2.8.4
gerikg
MemberDid you….
-have the Cookies & Salt all the same? example BBpress side
define('BB_AUTH_KEY', 'ABCDEF');
WordPress sidedefine('AUTH_KEY', 'ABCDEF');
-include
$bb->bb_xmlrpc_allow_user_switching = true; in bb-config.php
before the ?>-install BBpress intergration plugin to get the Hash and cookie information to paste in wp-config.php after the
< ?php
?-Paste the same cookie information you did on the step before in bb-config.php (without the Hash line) after the
< ?php
?-Enable Pinbacks, trackbacks, and XML-RPC on BOTH WPMU & BBpress?
August 18, 2009 at 4:50 pm #78187In reply to: How Many Ways To Confuse The Issue?
johnhiler
MemberYou definitely want to use the same users table for both installs.
I’ve had to eventually integrate bbPress and WordPress users after not integrating them upfront, and you definitely want to do it sooner rather than later. It wasn’t fun, but it’s definitely doable.
There’s a good discussion on how to go about it here:
https://bbpress.org/forums/topic/integration-of-established-wp-and-bbpress-installations
August 18, 2009 at 4:45 pm #78166In reply to: Changing Topic ID
johnhiler
MemberIt all sounds good, but just out of curiosity – are you using pretty permalinks? Trying to figure out where the topic IDs might be visible to users…
August 18, 2009 at 12:30 pm #77069In reply to: bbpress and memcache?
usera
MemberI think you may be confused _ck_. memcache has it’s uses like php op_code. It does not take alot for it to have a benefit and the same applies to memcache. However I am not asking for a suggestion on avoiding memcache. I would like to see a better handling of objects in the same way you create a prefix for a database. If you set a large pool for memcache say 1gb. The idea of setting another instance and monitoring it with startup script gets a little bothersome especially when an array can be used to mitigate the possibility of one failed instance to drive your site down. In short I should say you don’t usually start another mysql to house a database nor would it be useful to do that with memcache.
Thanks samhaurs again. I just want to be sure there weren’t objects that are generically named that can be seen across bbpress installations like administrative or personal details that should be separate that some are improperly written to cache much like wordpress mu does at the moment.
August 18, 2009 at 10:48 am #77068In reply to: bbpress and memcache?
_ck_
ParticipantBecause of mysql replication, using the mysql cache is probably impossible on wp.com
Once you move beyond a single mysql server, things get complicated fast.
But that’s specifically the environment memcache was written for, not single server systems.
(by the way, how large is the wp.com memcache pool? I bet it’s massive)
However I find the MySQL cache has not been turned on for many VPS/dedicated servers. That’s a performance showstopper and makes a huge difference when the same queries are being done over and over on a typical bbPress install. A PHP opcode cache is the next largest performance improvement.
Here is the typical breakdown for MySQL vs Memcached performance:
Cache Type Cache Gets/sec (higher is better)
Array Cache 365000 (this is local memory, fastest possible)
APC Cache 98000 (this is common memory via apc/eaccelertor/xcache)
File Cache 27000 (this is using the local disk cache)
Memcached Cache (TCP/IP) 12200 <<<<====---
MySQL Query Cache (TCP/IP) 9900
MySQL Query Cache (Unix Socket) 13500 <<<<===--- (local mysql server, with cache)
Selecting from table (TCP/IP) 5100 (remote mysql server, no cache)
Selecting from table (Unix Socket) 7400 (local mysql server, no cache)August 18, 2009 at 9:58 am #77066In reply to: bbpress and memcache?
_ck_
ParticipantLet’s review this from scratch.
WordPress and bbPress 1.0 has what we call an object cache. That is simply a pool of users, forums,topics, and posts and meta as they are passed between mysql and the application (wordpress/bbpress). It’s just another layer between mysql and bbpress.
Typically these “objects” are lost after every page load because they are no longer in regular short-term computer memory and have to be fetched again from mysql.
On a single computer system with a fast mysql server and fast disk cache, this typically is not a big problem. As a site has to scale this does become a problem because there is only one mysql source and everything has to be fetched from it.
Using a poorly configured WordPress or bbPress system with badly written or improperly running plugins, if each page load requires 30-40 queries, and you have 1000 users connected simultaneously at once, that’s a huge problem.
Memcache is a common pool of memory that doesn’t go away after each page load. It’s centralized on one server so multiple servers can all find it easily. It was invented by LiveJournal after they hit a growth limit with mysql.
The Memcache to Object Cache interface plugin for WordPress/bbPress 1.0 allows the fetching from mysql to be skipped IF the user/forum/topic/posts happen to be in the previously accessed pool in that centralized memory. Every time a query is made, the resulting data is saved in the collective memory which is retained inbetween page loads. It’s a common, shared memory.
However Memcache was written to talk over tcp/ip between MULTIPLE servers. For a single server setup it’s pointless and stupid and way too much overhead.
Now, on a single server, you could still use a persistent object cache with one of the other lesser known plugins that mimic what the memcache interface does. There is one for Eaccelerator, one for APC and one for Xcache.
However, all of these caches do almost the same thing as MySQL’s cache. They are all tied to the particular kind of query that is done and if it matches the previous set of data. The object cache still has to de-serialize data if it’s serialized.
MySQL on a single server system does not use tcp/ip to communicate with bbPress if it’s properly configured (and most are unless your host is greedy and stupid and uses a central mysql server separate from your regular server). So MySQL with a properly configured cache is almost as fast on a single server setup than a persistent object cache (unless MySql is overloaded in the first place).
So in conclusion, if you are on a shared host, object caching is not a viable solution for you because you can’t get any of the persistant memory options installed anyway. If you are on a single server setup but not dealing with a large number of connections, the mysql cache is probably going to be near the performance of a persistent object cache, and the real memcache would never be used in the first place.
Memcache was meant for large, inefficient installs like WordPress.com
WP.com serves many thousands of people simultaneously from many different servers. It uses several dozen queries per page load. It absolutely cannot just rely on the mysql cache, even with dedicated mysql servers. The average wordpress/bbpress user does not face these problems typically.
If you have your own VPS or dedicated server you should be installing an opcode cache like Eaccelerator, APC or Xcache and turning on the shared memory pool option (typically during compile). Then you should make sure your mysql cache is ON and setup properly. Then you should make sure your pages are not using too many queries. If you’ve done all that and you have so many simultaneous visitors that your mysql is running too high a load and your pages are still too slow, then you can look at one of the persistent object cache modules for wordpress and port them to bbpress.
None of the bbPress installs in the Top 10, are using memcache or any kind of object cache for that matter (including wp.org which is using bbPress 0.9). So I sincerely question the need of anyone else using an object cache just yet unless they have made their install extremely inefficient somehow or have a horrible host.
August 18, 2009 at 7:59 am #77160In reply to: tranfer posts from another forum
x_maras
MemberI did it.
I thought it would be more difficult than it was.
An old version of joomla and an old forum called joomlaboard.
I dont know a lot as I m new to all this stuff, doing my internship here.
Thanks for the tip,
sometimes for people without experience (like me), it’s difficult to think even this
August 18, 2009 at 7:26 am #77793In reply to: Sometimes Less Is Just Less
Sam Bauers
ParticipantI didn’t say “trivial” to be snarky. It is actually a trivial amount of code. Probably no more than a few lines.
I’m working on a plugin that will do it comprehensively. Just waiting for the plugin repository to catch up with requests.
August 18, 2009 at 7:18 am #77064In reply to: bbpress and memcache?
Sam Bauers
ParticipantYou can setup a new memcached instance to avoid clashes with wordpress, but if you are sharing user tables then it shouldn’t matter.
If you add another memcached instance on a different port you can point bbPress to it by adding this to bb-config.php (default IP and port shown here)…
$memcached_servers = array( 'default' => array( '127.0.0.1:11211' ) );
August 18, 2009 at 6:22 am #31513Topic: hide subforms with crystal theme
in forum Themespikatore
MemberI have a problem, i don’t know what to do. I am using the crystal theme, which instead of having:
<?php if ( bb_forums() ) : ?>
it has
<?php if ($forums) : ?>
compared to the default theme.
I want subforums to be hidden on the front page. How do i modify code to do this?
August 18, 2009 at 5:56 am #74277Olaf Lederer
Participantright no session at all
@rareexample, just use the cookies created by bbpress (using firefox it’s easy to discover the cookies)
August 18, 2009 at 2:59 am #15343Topic: Number shows on the top of header
in forum ThemesVannak Eng
ParticipantHi,
I modified the default theme of bbpress and it worked fine at first but lately it shows the number like “6d53″ on the top of header. when i view the source code i see it is ‘<body id=”front-page”>6d53’. Please help to advise on that.
Regards,
Vannak
August 17, 2009 at 10:42 pm #78131In reply to: Announcement Forum
agibbins
MemberOh sorry, I thought you meant settings within the admin panel. Yes, I’ve edited the script and edited the templates as instructed.
global $read_only_forums,$bb_current_user, $bb_roles;
// edit users (and forums) by NUMBER below until an admin menu can be made
//$read_only_forums=false; // true = stop ALL members from starting topics in ALL forums
//$read_only_forums=false; // true = stop ALL members from replying to topics in ALL forums
$read_only_forums=array(5); // which forums should ALL members NOT be able to start topics
//$read_only_forums=array(9,15,22); // which forums should ALL members NOT be able to reply to posts
//$read_only_forums= array(1=>array(1,2,3,4,5,6,7), 2=>array(9,10,11)); // allow override for this member=>forums
//$read_only_forums= array(1=>array(1,2,3,4,5,6,7), 2=>array(9,10,11)); // allow override for this member=>forums
//$read_only_forums= array(54321=>array(1,2,3,4,5,6,7), 34567=>array(1,2,3)); // deny this specific member=>forums
//$read_only_forums = array(54321=>array(1,2,3,4,5,6,7), 34567=>array(1,2,3)); // deny this specific member=>forums
$read_only_forums=array(‘moderator’,’administrator’,’keymaster’); // these types of users can always start/reply
$read_only_forums=__(“Sorry, only moderators can start topics in this forum.”);
$read_only_forums = __(“Posting in this topic has been restricted.”);
// stop editing here
August 17, 2009 at 10:15 pm #78130In reply to: Announcement Forum
johnhiler
MemberThe instructions in the readme file should mention the settings?
* Until an admin menu is created, edit
read-only-forums.php
and change settings near the top as desired* Add the
read-only-forums.php
file to bbPress’my-plugins/
directory and activate.https://bbpress.org/plugins/topic/read-only-forums/installation/
August 17, 2009 at 10:15 pm #78171In reply to: Default Installation directory
Tomcraft1980
MemberThx for the immidiate answer!
That saves me a lot of time!
Kind regards
Tom
August 17, 2009 at 10:09 pm #78170In reply to: Default Installation directory
chrishajer
ParticipantYou can call that directory whatever you want. There should be no plugin that has the installation directory hard-coded. (I’ve never seen one in any case.) You can call it ‘discussions’ or ‘abcdefzyx’ or ‘forum’ or ‘forums’ and it should not matter.
August 17, 2009 at 9:59 pm #78127In reply to: Announcement Forum
agibbins
MemberThanks jonhiler. Problem is, this seems a tad buggy.
I’ve restricted a forum so no one but moderators+ can post in it, but at the bottom of the forum theres still: “New Topic in this Forum” for users. How can I remove this?
I also get errors like this:
Warning: in_array() expects parameter 2 to be array, null given in /forum/my-plugins/read-only-forums.php on line 62
August 17, 2009 at 9:34 pm #31520Topic: Default Installation directory
in forum InstallationTomcraft1980
MemberIs there for any reason a dafault directory name which should b used for installation? For example /forums because some early plugins use this name hardcodet?
Currently my forum is installed in /forum and I ask myself if I should change it to /forums
Any suggestions?
August 17, 2009 at 8:03 pm #78161In reply to: A button in header of bbpress
gerikg
MemberIt depends on the theme. Go into your theme folder in BBpress and open header.php. Figure out where the links are being created. Then just insert an html tag (no need for php) `<a href=””> blah</a> etc etc Just make sure you have the correct surrounding tags. Sometimes they use
<li> </li>
and throw in class=""..
An easy way to do it on WPMU is create a page the same as the directory. If it’s in http://www.website.com/forums then create a page call forums.
August 17, 2009 at 7:41 pm #31518Topic: A button in header of bbpress
in forum Themesnataliya1977
MemberHello!
I create e social network on WordPress MU+Buddypress+bbpress.
I want to create a button “Home” in header of bbpress to unite my social network and forum. And in header of Buddypress create a button “Forums”. How can I do it?
I’m not a programmer and I don’t know php-code veru well.
Help me!
August 17, 2009 at 7:31 pm #30616Topic: A plugin, which changes header or footer
in forum Pluginsnataliya1977
MemberHello!
I need a plugin, which can change header and footer in bbpress.
I create a social network. I use for it WordPress MU+Buddypress+bbpress.
I want to create a button “Home” in header of bbpress to unite WordPress MU and bbpress. And vice-versa I want to create a button “Forums” in header of Buddy Press.
I’m not a programmer and I don’t know php-code very well.
How can I do these changes?
Thanks
August 17, 2009 at 4:24 pm #77207In reply to: plugin and limited memory bbpress
Ipstenu (Mika Epstein)
ModeratorYes, it’s an issue with bbPress. It’s an issue with WordPress too. It’s an issue that means you need more memory. The memory limit (see the WP Codex for more on WP_MEMORY_LIMIT) means you need to increase your blog’s PHP memory limit. Why they call it limit and not something that implies ‘adding’ I don’t know.
Which usually means your webhost hasn’t allocated enough to run WP/BB. Which means it’s actually an issue with your webhost that MAY be work-aroundable with manual tweaking.
While you’re welcome to try
BB_MEMORY_LIMIT
(which is the logical name for it), I don’t think it exists.If you actually read the links I gave you, you’d know that PerishablePress (a fantastic resource) mentions you may be able to increase memory limits by editing wp-config.php like so:
<?php
@ini_set("memory_limit","16M");Try that on bb-config.php and see how it works.
You’re probably going to need to dig into your php settings to see how much memory you’ve got right now, and how much you have to play with. You’ll need to savvy up on your error logs too, to see where it’s barfing.
August 17, 2009 at 2:21 pm #77205In reply to: plugin and limited memory bbpress
Ipstenu (Mika Epstein)
ModeratorNo, it’s a known issue with WP and php memory, so I’m not surprised to see it crop up with bb as well.
Read here:
http://www.narfstuff.co.uk/2008/03/14/php-memory-and-wordpress/
But seeing as you don’t know how to do that now, I suspect you’ll need to talk to your webhost for help. If you have a good host, they’ll help you out
August 17, 2009 at 1:29 pm #77792In reply to: Sometimes Less Is Just Less
Ipstenu (Mika Epstein)
Moderator@sambauers Could you post that “trivial” code that allows for a BB login box in WP that will redirect back to the page after login?
This is where I think Shallow Integration has the upper hand. I have the bb login on the bb side, and the WP in-line login on the WP side, and no matter where my peeps log in from, there they are. All I do is redirect registration to the WP side, which kicks them back to the main WP page. And that’s okay, since 92% (I love stats) of visitors start there anyway.
As for includes on bbpress … Actually smilies, which are built into WP, would be nice, but they’d have to be easy to customize and expand. Some people like a million, some people like 10. Avatar upload isn’t going to happen unless Automattic dumps Gravatar. Quote ‘options’ would be a nice plugin.
August 17, 2009 at 12:16 pm #78045In reply to: What kind of server i need?
Olaf Lederer
ParticipantGo for the second, otherwise you have to move to a new one very soon.
I guess the prices for the servers are not very different
or take the first with more memory…
-
AuthorSearch Results