Search Results for 'code'
-
AuthorSearch Results
-
June 3, 2010 at 12:29 pm #87815
In reply to: Whoa! (bbPress.org 2.0 is live)
kevinjohngallagher
MemberYeah, If you edit with CODE in place it causes issues.
Before hand we just used to put code in BLOCKQUOTES, but now it’s got that daft graphic it’s not helpful at all (imo).
June 3, 2010 at 12:26 pm #89079In reply to: Internet Explorer problem
kevinjohngallagher
MemberMaybe
Codejust doesn’t like me
Thanks for trying to fix this Chris
June 3, 2010 at 12:25 pm #89105In reply to: s2member integration
kevinjohngallagher
Member<br />
<pre><code>// Line 358 if ($ccaps) /* Add custom capabilities. */
foreach (preg_split ("/[rnts;,]+/", $ccaps) as $ccap)
if (strlen ($ccap)) /* Don't add empty capabilities. */
$user->add_cap ("access_s2member_ccap_" . trim (strtolower ($ccap)));It’s the ” $user->add_cap ” That adds the capabilities to wordpress.
That said, I think the best thing to do would be to follow this:
1) Select * from wp_capabilities where User_id = User_id
2) for each ($row) insert into bb_capabilites blah blah blah
that way you don’t need to know what the s2M is doing, you just need to copy the data from wp_cap to bb_cap when you’re done
June 3, 2010 at 12:12 pm #89104In reply to: s2member integration
wood2695
MemberThat helps. This seems to be the code that is placing the custom user role into the wp_capabilities (from register-access.php, for ref). I suppose I could amend this to make all s2M members simply a “subscriber” which would serve my immediate needs (in theory). But I’d prefer to keep the custom roles for later down the road.
else if (is_admin () && preg_match ("/wp-admin/user-new.php/", $_POST["_wp_http_referer"]) && preg_match ("/^(subscriber|s2member_level[1-4])$/", ($role = $user->roles[0])))<br />
{<br />
$processed = "yes"; /* Mark this as yes, to indicate that a routine was successfully processed. */<br />
/**/<br />
$level = ($role === "subscriber") ? "0" : preg_replace ("/^s2member_level/", "", $role);What I can’t figure out is how to add to this a bb_capabilities row/value.
June 3, 2010 at 11:55 am #87814In reply to: Whoa! (bbPress.org 2.0 is live)
chrishajer
ParticipantBut then, the code in this post is fine:
Maybe the previous one was edited and that’s where the trouble started?
June 3, 2010 at 11:49 am #87813In reply to: Whoa! (bbPress.org 2.0 is live)
chrishajer
ParticipantCheck how backticks and work to format a post.
https://bbpress.org/forums/topic/internet-explorer-problem-1?replies=8#post-69386
Was initially written with backticks, and rendered as GT and LT, so I tried to edit it to replace backtick with [code] but it’s still messed up.
Someone mentioned that re-editing also introduced paragraphs or breaks, IIRC. When I first edited the post, every line of code and a [BR] after it.
[code] work to format a post.
https://bbpress.org/forums/topic/internet-explorer-problem-1?replies=8#post-69386
Was initially written with backticks, and rendered as GT and LT, so I tried to edit it to replace backtick with but it’s still messed up.
Someone mentioned that re-editing also introduced paragraphs or breaks, IIRC. When I first edited the post, every line of code and a [BR] after it.
[code] but it’s still messed up.
Someone mentioned that re-editing also introduced paragraphs or breaks, IIRC. When I first edited the post, every line of code and a
after it.June 3, 2010 at 11:47 am #89078In reply to: Internet Explorer problem
chrishajer
ParticipantOf course in my post worked fine. Argh. See it working above?
[code] in my post worked fine. Argh. See it working above?
June 3, 2010 at 11:46 am #89077In reply to: Internet Explorer problem
chrishajer
ParticipantBackticks and
did not work for formatting Kevin's post. I tried to fix it. Really I did.Basically, remove the top three lines of the file (header.php?), and the last line (footer.php?).
June 3, 2010 at 11:27 am #89102In reply to: s2member integration
wood2695
MemberAnd you’re darn quick on the reply… I LIKE THAT!
Lemme poke around for what you suggested. I’ve tried looking for those a bit, but they’re clearly not coded as clear as “wp_capabilities”. I’ve found the labels for the roles that I suspect might be where it’s generating the table data, but don’t see the code that specifies where to populate it. Even then, I see no mention of the table prefix (wp_) so I’m not sure that if I even found capabilities, I’d know how to add a bb_capabilities.
My gut says that the hack to the s2M files is the way to go, so I’ll keep looking there.
Thanks.
June 3, 2010 at 11:17 am #89101In reply to: s2member integration
kevinjohngallagher
MemberNah that sounds good mate. It’s basically what I was suggesting here:
2) Write some custom code for the s2Member callback API (which it supports) to add a field to the bbPress database.
Basically, what you want to do is look for the bit of code in the s2M files that writes to the wp_capabilities table, and copy it on a new line with bb_capabilities.
Or if you don’t want to go hacking around (totally understandable), make your “landing page” when people finishing paying/signing up via s2M have a bit of code that copies the last row from the wp_capabilities into bb_capabilities. This method means you wouldn’t have to touch the core of WP/bbP/s2M – but would still work.
Doesn’t matter that this isn’t a core question mate, you’re helping us break a bit of new ground here, and we’re always interested in that. bbPress isn’t feature rich, so we like to know when it’s bene extended in a way we all hadn’t thought of
And you’re polite – we like that
June 3, 2010 at 10:36 am #89161kevinjohngallagher
MemberHi Guys, thanks for the info. It’s always good to rule things out

Basically, I’d attempt the following:
1) Log out of wordPress and clear your cookies and cache.
2) Upload and overwrite your existing files with a newly dowloaded version of bbPress
3) If that doesn’t work, set all permissions to 777 and see if it makes a difference.
4) If that doesn’t work. start again with the new files.
I know it sounds annoying, and sorry, but at this stage we’re just covering the bases.
Oh, could you also tell us what server host you’re using?
Thanks !
June 3, 2010 at 10:31 am #89076In reply to: Internet Explorer problem
kevinjohngallagher
MemberOk found the reason why.
This site works best in Google Chrome.
<div id="container">
<title>theCollegehunt-Best colleges,Best coaching classes,Career guidance,Examinations,Examination papers,College romance,College dating</title>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<title>theCollegehunt</title>
Basically you need to remove
<div id="container">
<title>theCollegehunt-Best colleges,Best coaching classes,Career guidance,Examinations,Examination papers,College romance,College dating</title>
and the bottom DIV
</body>
</html>
</div> <
REMOVE THIS ONEJune 3, 2010 at 10:26 am #88917In reply to: WordPress Header on bbpress
mr_pelle
ParticipantI use this in my template:
global $is_bb;
$is_bb = true;
get_header(); // call WP's header$is_bb = true;tells WP that current page is a bbPress page. If you need to load different content depending on that, just use:if ( $is_bb ) {
// bbPress-related code
} else {
// WP-only code
}June 3, 2010 at 10:13 am #87812In reply to: Whoa! (bbPress.org 2.0 is live)
mr_pelle
ParticipantPlugins directory not updating: Fixed.
Seems it’s not retroactive… I mean, Zaerl’s last plugins are now listed correctly, but all other plugins did not get updated (yet): it looks like my last plugins update was a month ago!
June 2, 2010 at 9:19 pm #89075In reply to: Internet Explorer problem
chrishajer
ParticipantIf that’s it, it’s always good to start by making sure the code is valid. My guess is there is a closing div missing or otherwise invalid code.
http://validator.w3.org/check?verbose=1&uri=http://www.thecollegehunt.com/
June 2, 2010 at 8:08 pm #89158eschickel
Memberlooks like my error logs were disabled.
i guess i can drop my tables and reinstall, but i’m certain i didn’t do anything wrong during the install.
June 2, 2010 at 6:47 pm #89156rickkettner
MemberThanks for the reply!
1. WP 2.9.2
2. Just bbPress with new install of WP… nothing else.
3. Yes, using PHP5
4. I just went through the steps in the BB install. Was going to do the rest in the bb admin, but can’t get there.
5. Not sure where to look for the error log
June 2, 2010 at 4:24 pm #89033In reply to: OneMoreThing.nl
kevinjohngallagher
MemberI doubt anyone needs to release it as a theme, it’s just a custom front page (although a good one for sure).
It just loops through Categories / Forums and then outputs the last topic and last post for each forum with it’s gravatar next to it. The code to do it yourself is already in front-page.php
( I say that without taking away from the excellent work done by lukepuuk and others on the theme )
Exit mate, If you want your bbPress to be/act different than all the others, you’ll have to change more than the CSS/Background. But realistically you don’t need much/any plugins to enable your forum to be unique while staying cool and usable
June 2, 2010 at 2:05 pm #89098In reply to: s2member integration
kevinjohngallagher
MemberbbPress has no way of setting up roles to forums like every other forum out there has.
So if you’re hoping to say set “contributors” to see everything and then set your s2M to move people from members to contributors on the WordPress side I’m afraid you can’t – bbPress doesn’t come with that basic forum functionality.
In that regard, and with all due respect (you’d be amazed how very few people are as polite as you are), doing anything out-with the “plug and play” variety with bbPress unless you really know your way around PHP/WP-theming and functions is not going to happen.
Now you may be able to take one of Zaerl’s plugins which allows the setting of show/hide/moderate certain forums and adapt it. Or you could contact Zaerl for some custom work (i’ve no idea if they do this btw – its just where I’d start).
If you’re going on your own, keep posting back, we’ll help when and where we can
June 2, 2010 at 1:20 pm #89095In reply to: s2member integration
wood2695
MemberThanks for the quick response. I’ve already done the deep integration, so I’m partially there on number 1, I guess. I’ll look into how to accomplish your suggestion before I ask you to hold my hand

At the same time, if you’ve got a link/resource that might point me in the right direction, that would be sweet too.
Thanks man.
June 2, 2010 at 12:54 pm #89094In reply to: s2member integration
kevinjohngallagher
MemberIn theory, you’d need either:
1) Deep Integration with WordPress, so you could query the WP DB on forum load
or
2) Write some custom code for the s2Member callback API (which it supports) to add a field to the bbPress database.
Shouldn’t be horribly difficult; but so far, no-ones asked about it here so I can’t point you towards any examples.
June 2, 2010 at 11:06 am #89012kevinjohngallagher
MemberI’m going to do something strange here AmplifiedShock, I’m going to ask you NOT to do that.
The “bbPress” that BuddyPress uses is not the same as this “bbPress”. It is heavily heavily modified. Basically the whole of BackPress is removed and replaced by custom functions, and then some of the middle tiering has been rewritten, and a little bit of the front end output and default theme.
A large chunk of the support requests we deal with each day/week is people coming here because BuddyPress calls their forums “bbPress”. We need to be able to tell people honestly and without looking like we’re being difficult, that if they use BuddyPress we can’t help them.
I’m sure it’s technically possible to do anything. I’m sure once it’s technically possible, it’s easier to write a guide for people to follow. You seem to be good enough to do that
But with bbPress being turned into a WP plugin and Matt publicly telling people not to use this software; inviting more support queries that end in “we simply can’t help you” isn’t going to help us at all.Now if you felt like writing more tutorials on converting from other forums to bbPress, I’m sure there would be a good market in that for you!
And, as always, thanks for your time
June 1, 2010 at 6:03 pm #88977In reply to: BB-Admin won't let me in
kevinjohngallagher
MemberMamikaze,
What versions of bbPress and WordPress are you using?
Did you install and use the WP/bbP integration plugin?
Have you tried logging in from both sides?
Have you checked to see if you’re using the same user tables?
Have you checked roles in your database?
Basically, give us as much information as possible, and we’ll try and help
June 1, 2010 at 4:46 pm #87801In reply to: Whoa! (bbPress.org 2.0 is live)
June 1, 2010 at 12:58 pm #87325In reply to: Direct code to post url
zaerl
ParticipantI have created a plugin that expose permalinks to posts. But I’m not very sure that it’s what you want. I have uploaded it five minutes ago. Grab it (if it’s what you need) when the SVN refresh:
https://bbpress.org/plugins/topic/zaerl-post-permalink/
It exports a function:
za_post_permalink($id = 0)which returns a link in the form:
http://domain.com/post/number if mod_rewrite is used
http://domain.com/?post=number otherwise
if you pass
0or nothing to the function it takes the current post ID (if any).Have a nice day.
-
AuthorSearch Results