Search Results for 'code'
-
AuthorSearch Results
-
June 13, 2010 at 6:51 am #89281
In reply to: Same forum using http and https
eduardosilva
ParticipantHello again _ck_, sorry for not giving any feedback earlier, but in the last few days I’ve been busy with my work and I wasn’t able to test your modification.
I just made some tests with your modification, but the problem with bb-admin persisted.
Anyway, I’m happy with the current achievements, the forum working with SSL is pretty nice, and normally I just use the administration part at home or work (in a safe network).
Maybe one of us should fill a bug report for the https on the bugtracker?
Thanks for all the help and I’m glad to see you back in the forums.
June 12, 2010 at 5:03 pm #89561In reply to: How to unblock a user?
gadamiak
MemberExactly. After that I manually deleted
bbpress_been_blockedfromusermetatable for that user but it got back somehow.I just upgraded to latest revision from the trunk (2442), but the problem persists. This site is still in testing stage so I’m going to reinstall it and see if that helps.
June 12, 2010 at 4:13 pm #89552In reply to: Restrict Registration
kevinjohngallagher
MemberOne of the major things that bbPress doesn’t do well is make the forum easy to moderate in anyway. 7 clicks and 4 pages to delete 1 user, and no ability to mass delete is mental.
If you have a forum that needs constant moderation for any reason, bbpress might not be the best solution sadly
June 12, 2010 at 4:02 pm #89568In reply to: What. The. Heck. Is. Going. On!
kevinjohngallagher
MemberI am not happy about a lot of things with bbPress, specifically it’s management and communication; which have been shockingly bad for 2 years now. I also think tht Matt really dropped the ball on bbPress and then somewhat screwed us over with his comments against the “bbpress community” in his WordCap Keynote speech.
That said:
1) Don’t hide behind a fake profile. We all have opinions, and we all agree and disagree on many things. If you’ve got something to say, and you believe this is the place to say it, have the common decency to put your name to it.
.
.
.
2) One has to differentiate between Matt the person, and Matt the Founder/CEO/Employee of Automattic. I have no doubt that Matt 100% wanted bbPress to succeed and he did help reinvigourate the project for a little while, he just dropped the ball again; but breaking his own rules:
http://ma.tt/2009/08/kill-your-community/
As I said herein the link below, Matt should have delegated bbPress to someone and kept up communication as Matt is an insanely busy dude. There is no doubt that WordPress 3.0 would take priority over bbPress, and there’s all the other pies that Matt has his finger in.
https://bbpress.org/forums/topic/from-a-project-management-viewpoint
It’s not for you or me or anyone really to make demands of his or anyone else’s time. We can ask for information, especially really basic information that should be on this website – but Matt the person and Matt the head of Automattic doesn’t owe you/me/anybody anything.
.
.
.
3) I think Matt got it wrong and messed up. He did so a couple of times in a row imo. I think he then did really wrong by us publicly taking a go at the folks who keep this site going – I thought that was underhanded and a total slap in the face to all the moderators (sorry the ONLY moderator) and people who didn’t jump ship. I lost alot of respect for Matt the person when that happened.
I think he continues to allow this to spiral but not communicating with anyone in a moderator or higher position so that some of these same questions can be answered; but bbPress is not his focus, and really, thats his call to make not ours.
It’s not like it wasn’t like this for bbpress1.0’s release and bbPress0.9 release, and as Matt said, the’ve fecked this up before and nothing changes:
We’ve done this before. Relax.

— Matt
— https://bbpress.org/forums/topic/from-a-project-management-viewpoint#post-63315
.
.
.
4) I truly think this post covers my thoughts in a nice concise manner. And before making any posts like this, I strongly suggest reading it:
https://bbpress.org/forums/topic/whats-happening-with-bbpress/page/5#post-64410
It followed a post by Gautam, who’s done stellar work since Matt’s departure, and was followed by the only moderator left asking a simple question and then Matt leaving the project. I think it shows the difference from where “we” the community are and where Matt is. And that’s ok, we’re all allowed to be in different places.
But posts like this is never going to be helpful.
.
.
.
5) I think it’s very very wrong to state that Matt doesn’t have “heart, soul and brain”. The man is a really nice, wonderfully warm and smart human being. He’s just fracked up on this, and for teh first time in a long time, hasn’t looked at things objectively and help up his hands (which is one of the things I admire most about Matt over the years).
And bro, with all due respect to _ck_, without warning she left the project too and closed down her forum so we couldn’t access the code or discussions on it. I think _ck_ is an amazing amazing developer, and knows bbPress inside out; but I’m not sure on what you’re basing this presumption that she (or any of us) would be better at leading a community based project. _ck_ has in the past shown some signs of not being the happiest bunny when people start asking questions.
.
.
.
6) I’m still laughing at how childish your fake profile name is. “wtfmatt”. Ha, you really should have just called yourself “impatient13yearold”.
.
.
.
7) I was trying to reference this earlier. I wrote this alomst 18 months ago now. Crazy how much of it still holds true:
https://bbpress.org/forums/topic/how-to-help-us-help-bbpress
Take care,
Kev
June 12, 2010 at 10:09 am #34484Topic: How to unblock a user?
in forum Troubleshootinggadamiak
MemberHow to unblock a user, who once got blocked?
Changing user role doesn’t unblock. Removing
bbpress_been_blockedfromusermetatable doesn’t either. What’s the trick?Running 1.0.2.
June 11, 2010 at 11:09 pm #89489In reply to: In posts -> / appears unexpectedly!
ghettobsd
MemberThis is what i found:
From: https://bbpress.org/forums/topic/slashes-being-added-in-front-of-apostrophes
User: baptiste
Post: Easy fix (hack) in bb-includes/template-functions.php, update this function to look like this:
function get_post_text() {
global $bb_post;
return stripslashes($bb_post->post_text);
}
May be an artifact of the wordpress integration – not sure.
The above did indeed work. But I still looked at the other posts and problems others had.
https://bbpress.org/forums/topic/apostrophe-and-or-quotation-marks-cause-backslash-to-appear
user: arpowers
ok, found the answer wooooooo!
The ‘real’ reason this wasn’t working was….
‘magic_quotes_gpc’ is set to ‘off’ on my server (in php.ini)
All these other solutions are band-aids, my hunch is that making sure magic quotes is ‘on’ is the solution.
user: jackey
Putting “php_value magic_quotes_gpc 1” in my .htaccess file worked for me… for now.
The above also worked. So instead of editing the bbpress code, i just modified the .htaccess file (added to it), that 1 line fixed it. So I will go with it untill I see a problem.
Worth noting, someone said that by changing the code as per baptiste’s method could corrupt backups you make of sql. So, that was the reason I went with the .htaccess fix.
Thank you!
chrishajer: you are GhettoBSD Approved!
June 11, 2010 at 10:40 pm #89488In reply to: In posts -> / appears unexpectedly!
ghettobsd
MemberThanks to zaerl this is what i did to code:
So yeah that’s not what is affecting this problem. I will look into the links you pasted.
Thank you very much!
June 11, 2010 at 10:26 pm #89487In reply to: In posts -> / appears unexpectedly!
chrishajer
ParticipantWhat is the hacking to get rid of the backtick quote problem? I’m not sure what you were trying to solve there. Was that to fix the code and backtick problem?
The escaping of single quotes on integrated installations has been covered here before.
Apostrophe and or quotation marks cause backslash to appear.
https://bbpress.org/forums/topic/slash-text-issue-in-10-alpha-6-have-searched
Sounds that that is your problem – escaping single quotes in an integrated installation. The hacking you did is unrelated (I think.) I confused backticks with quotation marks.
I don’t think it’s related to the keys at all. They are not used that way when posting. The worst that ever happened was that bbPress did not support the complex keys (with escaped characters) that WordPress did. But that resulted in a 500 Internal Server Error.
June 11, 2010 at 9:35 pm #88530In reply to: WP 3.0 beta 2 integrated user registration
Rootside
MemberUpgraded to WordPress RC 3, still getting the same error.
print_r($_POST);gives me the following:Array ( [user_login] => hello [user_email] => xxxxxxx@rootside.com [user_url] => [from] => [occ] => [interest] => [Submit] => Register ยป )I obscured the email address here, but it is the one I have entered in the registration form above. So it seems that user_email IS defined.
Thanks for that hint. Maybe it’s a freakish bug – nobody else has chimed in with the same problem so far – but I don’t know how many people are testing WP 3 with bbPress yet, so I’m not quite ready to re-install the whole sermon from scratch again. I’ll try setting up the same combo on a different server as soon as I can find the time, but I’m still hoping that this can be tracked down, so I don’t have to fear for the worst with every future update…
Does the information above give any of you guys an idea?
Again, greatly appreciated.
June 11, 2010 at 9:22 pm #89435In reply to: Show only Parent Forums
driz
MemberI think I found a much better way to get around it. Just wrap the new tag with the old tag, as it check for the forums if none then don’t run the new code.
<?php if ( bb_forums( $forum_id ) ) : ?>
<?php if(bb_forums(array('where' => "where forum_parent = $forum_id"))) : ?>June 11, 2010 at 7:17 pm #89484In reply to: In posts -> / appears unexpectedly!
ghettobsd
MemberPlease see above!

I used a NEW (not related) db, i used both clean installs.
So basically, the problem is reproduced on the stock installs of wp,bb with integration on mysql. So nothing, not even the themes from before were used.
At first I thought it was because I changed the type of links (permlinks) and then did a stock install with no changes, but integration and it happened again.
I basically did many installs under different configurations/databases. And everything ended up the same every time.
I ruled out:
– The theme being the problem.
– The hacks …
– Perm link options …
– .htaccess …
– The database…
Maybe it has to do with the auth key info? That’s the only obvious thing.
I do have wp and bb installed else where and integrated without the same problem.
I used a generator that also generated the salt, could that be it?
June 11, 2010 at 4:59 pm #89475In reply to: No Filters or Actions ??
zaerl
Participantbb_update_forumis a function, not a hook. Like I said there is no way to fire custom actions when a forum is added/modified/deleted.June 11, 2010 at 4:18 pm #89474In reply to: No Filters or Actions ??
kevinjohngallagher
Memberooooh
bb_update_forum. Awesome find.thats the difference between someone who can actually code PHP and someon like me.
I’ll have to play with it though, and might ask you for some help, as in some re-ordering will fire that once for each forum is manually updated by an admin. I mean that won’t happen often ofc, but it’s (number of SQL calls my function makes * each function affected).
Currently, and in no way overly optimized, the “forum_family_tree_setup” script uses 2 + (3 * parent) SQL calls per per forum.
Even on my large football forum, (large in terms of number of forums) which has quite deep relationships, this is far less intensive than a recount. If this was to be multiplied by 3 or 4 times though (depending on how many forums are updated with a move), that might cause a hic-up.
I’ll do some benchmarks after the weekend – I’ve got 31 non-England teams to support in the World Cup this weekend

Cheers bro!
June 11, 2010 at 3:48 pm #89473In reply to: No Filters or Actions ??
zaerl
ParticipantSo you need to hook
bb_new_forum,bb_update_forumandbb_delete_forum. There is no way to set hooks after the db stuff. Or at least this is what I think after 20 mins of studying the core.June 11, 2010 at 3:04 pm #89472In reply to: No Filters or Actions ??
kevinjohngallagher
Memberdo_action( ‘bb_update_topic’, $topic_id ); actually is fired after all the db stuff and not before. Given the code of bb_insert_topic we have:
You’re a Legend.
Once again, Thank You.
I thought it might, but thats at least me down to 4 non-supported major features in my code:
1) Update family tree upon adding/removing forums or changing forums order
(the code is there, the trigger isn’t – right now I’ve just got a reminder in the readme and added it to the daily cron job on my servers)
2) Gives accurate counting for parent child relationship in terms of “total” forums/topics/posts/voices.
(Again, code is there and working, and runs on “recount”, but should also be activated upon adding/removing forums or changing forums order)
3) Addition of “Groups” instead of categories. Again, this is written and working, but I’d need to come up with some form of changeover script.
(Apparently to group forums together, you need to make it’s parent read only. But if you want to make a forum read only but not a ‘header/category/group’ you can’t. Don’t get me wrong it was a great hack by _ck_ when 0.8.3 came out, but man, why roll it into the core without any actual thought!! 0.8.3 was 3 years ago.)
4) Rewrite hooks for moderation to comply with other plugins (specifically to play nice and read yours and Nightgunner5’s), as right now it only natively reads my own plugins, which is daft.
June 11, 2010 at 2:29 pm #89434In reply to: Show only Parent Forums
zaerl
ParticipantYes I know. Unfortunately I had to fight with that piece of code also in my plugin zaerl Visibility. bbPress doesn’t allow zero forums.
June 11, 2010 at 2:10 pm #89471In reply to: No Filters or Actions ??
zaerl
ParticipantI’m basically wanting to know when someone changes the name/title of a topic. Which seems very simple to me (in theory).
do_action( 'bb_update_topic', $topic_id );actually is fired after all the db stuff and not before. Given the code ofbb_insert_topicwe have:db update
bb_update_topic
bb_insert_topic
in that order. If you intercept bb_update_topic the db must be already updated. At least if there isn’t something evil inside
wp_cache_*If you want something that works before the database is updated. See this:
add_filter('pre_topic_title', 'foo', 10, 2);
function foo($topic_title, $topic_id)
{
global $bb_post;
if($bb_post) echo "You changed me. How dare you.";
return $topic_title;
}but keep in mind that I’m not proud of this code nor I have run it. What actions do you want to take when a topic is renamed? You want to filter away the new title, changing the slug or what?
June 11, 2010 at 1:53 pm #85347kevinjohngallagher
MemberI’m really not a fan of the colours and layout, but I love that you’ve done so much with it and have a thriving community. From what I can see, signatures and image posting are working really well for you as have Avatars etc.
While my personal taste preffers your Kate Humble forums, its great to see you and your forums doing so well!
Keep us notified of any changes you make too, and well done
June 11, 2010 at 1:47 pm #89433In reply to: Show only Parent Forums
kevinjohngallagher
Memberoh for goodness sake, that code bug is really getting on my tits.
Driz, the main thing to remember is this. these forums are aimed at making the WordPress support forums. Once you try and venture outside the functionality they have, you’re going ot hit issues which will need you to be able to read/write/investigate the source PHP files.
June 11, 2010 at 1:46 pm #89432In reply to: Show only Parent Forums
kevinjohngallagher
MemberOk, so you’re trying to do something that bbPress can’t natively do.
You’re presuming, and we can all see why, that because this is forum software that it has native parent/child relationships; when it doesn’t really.
I’ve always found the best thing to do is to write my own forum subroutine in a page.
if ( bb_forums( $forum_id ) )
{
while ( bb_forum() )
{
global $forum;
global $forum_id;
print_r($forum);
// I output my own code here using
// $forum->forum_name
// $forum->posts
// To show children of forum
if($forum->forum_parent == $forum_id || empty( $forum_id))
{
//Output code here, it’s a child or you’re on the front page
}
}
}
To re-iterate, I’m coding the above from memory, so if there are errors you’ll need to check them yourself
June 11, 2010 at 1:05 pm #89470In reply to: No Filters or Actions ??
kevinjohngallagher
MemberWonderful Zaerl mate.
Issue 1:
bb_new_postandbb_new_topicactually cause me a world of issues, because they’re fired before all of the SQL/PHP is fired. It took me about 2 days to work out my copy and pasted SQL was producing different results in the PHP and the actual database.In the end, I had to move those functions to
add_action('bb-post.php')and then test if a topic was passed or not.(I’m guessing a little that this might have something to do with the
wp_cache functions, as in certain places we callwp_cache_flushandwp_cache_deletebefore thebb_new_post actions)bb_update_postthough seems like its exactly what I want, though am a tad concerned that the same thing will happen – at least if I have access to$_POSTI can hack it.I’m basically wanting to know when someone changes the name/title of a topic. Which seems very simple to me (in theory).
==========================================================
The second one is a bit more tricky.
I basically have a (half-baked) plugin that deals with the geneology of a forum, with true parent/child n-to-n relationships. For my non-flat websites, this (again half-hacked) plugin has really made my life easier.
Before I release it, I want to make sure I’m covering as many bases as possible, and these have been outstanding bugs for about a year now.
Whenever someone reorders their forums, or adds a new forum, or marks a forum as hidden; I’d like my plugin to know about it. Basically, I want my plugin to be fired AFTER the core has finished what it’s doing, and we’ve no action for that.
But there’s no action or pluggable function that gets called after, thre is only
bb_check_ajax_refererand thats called before any processing.I really apprecaite your help Zaerl mate, if you can think of anyhing else – please shout!
June 11, 2010 at 12:23 pm #89431In reply to: Show only Parent Forums
driz
MemberThis only works for forums that have subforums. If I have a forum that is just top level and has no subforums when I view it it blows up saying Invalid argument supplied for foreach() in /nfs/c03/h05/mnt/52704/domains/paperviewmagazine.com/html/forums/bb-includes/functions.bb-forums.php on line 84
If I switch the original if statement on instead it doesnt break, so it’s defo the new code. Any ideas? Thanks
June 11, 2010 at 11:57 am #89469In reply to: No Filters or Actions ??
zaerl
ParticipantI have a plugin that needs to be fired when someone edits a post.
bb_update_post,bb_new_postrespectively. Post ID is passed.Now beware of the magic (?) hack. Given
case 'order-forums' :you can use the the action fired bybb_check_ajax_referer:do_action('bb_check_ajax_referer', $action, $result);if
$action == 'order-forums'then you are in that particularcase.Now you can read $_POST or accessing other actions. What do you want to do?
p.s. at least in this way God doesn’t kill a kitten.
June 11, 2010 at 11:33 am #89430In reply to: Show only Parent Forums
zaerl
Participantif(bb_forums(array(‘where’ =] “where forum_parent = $forum_id”)))
Substitute the square bracket
]with the angular bracket. For great justice.June 11, 2010 at 11:24 am #89429In reply to: Show only Parent Forums
driz
MemberI tried the code zaerl posted, but it when viewing forums it requires the $forum_id within the function to display the correct stuff otherwise it will show the same as the front page and not the selected forums subforums. I need to use $forum_id with the array posted so I only get the top level forums within the chosen forum.
I tried doing this to see if it would combine the two:
if(bb_forums($forum_id, array(‘where’ => ‘where forum_parent = 0’)))
but it just showed all the forums for that forum and not just the parents
-
AuthorSearch Results