Search Results for 'code'
-
AuthorSearch Results
-
April 16, 2013 at 2:59 am #133288
In reply to: Roles and Capabilities in bbPress 2.2
John James Jacoby
KeymasterNot entirely sure how you arrived at that solution, but I can’t imagine any of it ever working correctly. 🙂
The
wpaction happens before WP_Roles is called, so it’s too soon in the stack. You’re also missing a bunch of sanity checks thatbbp_set_current_user_default_rolealready does for you; no sense in duplicating only some of that work.You could try hooking into
initbut, again, I suspect something in the iMember360 plugin is interfering and won’t allow that to work correctly either.You *should* actually be debugging the
setup_current_useraction, to see ifbbp_set_current_user_default_roleis even firing, and if it is, where it’s failing.If you’re looking for a brute-force kludge, something like this is probably closer to what you need:
function earthman_force_current_user_caps() { global $current_user; // Only for logged in users if ( ! is_user_logged_in() ) return; // Reload the current user with correct capabilities $current_user = bbpress()->current_user = get_user_by( 'id', bbp_get_current_user_id() ); // Try to give them a role on the site, if they need one bbp_set_current_user_default_role(); } add_action( 'bbp_template_redirect', 'earthman_force_current_user_caps', -99 );April 16, 2013 at 2:48 am #133287In reply to: Roles and Capabilities in bbPress 2.2
Earthman Media
ParticipantWell I got this far, but every time I try to call the function you suggested, or try to add the role manually, it breaks. Any ideas what I might be missing, please?
add_action( 'wp', 'bbp_check_user_role_on_load' ); function bbp_check_user_role_on_load() { global $user_ID; //do they have a role set already? $has_bbp_role = bbp_get_user_role( $user_ID ); if(!$has_bbp_role){ //nope, add default BBP role //tried this but it breaks it //bbp_set_current_user_default_role(); // Load up bbPress once $bbp = bbpress(); $new_role = 'participant'; //this breaks too - wtf? //$bbp->current_user->add_role( $new_role ); } }April 16, 2013 at 2:20 am #133282In reply to: Roles and Capabilities in bbPress 2.2
John James Jacoby
Keymaster/wp-content/plugins/bbpress/includes/users/capabilities.phpThanks for the kind words. WordPress core doesn’t need a ton of work in this regard; a few small fixes would go a long way.
April 16, 2013 at 2:03 am #133270Stephen Edgar
KeymasterThe new shortcode is actually [bbp-stats] https://codex.bbpress.org/shortcodes/
April 16, 2013 at 1:55 am #133267In reply to: 404 simple redirect with bbpress
John James Jacoby
Keymasteri seem to be a newbie at this, can you please walk me through the steps?
You’ll want to search bbPress’s files for the above function, and test to make sure it’s working correctly. If you’re operating a site as the main developer, you’ll want to know how to touch files on the server (with an code editor, FTP program, etc…)
Then, you’ll want to search the web for common PHP debugging techniques (var_dump(), echo(), die(), debug_backtrace(), etc…) so you can gain a better understanding of how the code you’re trusting to make your site function works.
This is one of those times where, hopefully, a little tough love will pay in dividends for you later.
April 16, 2013 at 1:49 am #133265In reply to: bbPress 2.3 now available!
premitheme
Participant@johnjamesjacoby So, when I’m working on bbpress on MAMP (not pro) and while I’m working, I found the 2.3 update notice, then I hit “update now” link. After the update I just tried to post topics or replies and all what I get is the “Are you sure …” ERROR. What is the reason in your opinion?
The update works good on XAMPP for example as well as the build-in localhost I setup on mac, I just wonder what’s happened, is it bug in the code? MAMP configuration issue? php version?
April 16, 2013 at 1:44 am #133262In reply to: TAGContent error
Stephen Edgar
KeymasterI have only had access to test vBulletin 4.x to test importing into bbPress.
Does vBulletin 3.8.x support topic tags at all?
Also this doc has any other known issues https://codex.bbpress.org/import-forums/vBulletin/
April 16, 2013 at 1:19 am #133252In reply to: Users deleting their own posts
John James Jacoby
KeymasterThe reason users aren’t allowed to delete their own posts, is because in the traditional forum sense, allowing users to modify or delete their content far after the fact can actually have negative consequences for the entire site, manipulating search results, causing 404 issues, and other URL hacks.
If this is a feature that you need as part of your community, you’ll need to invest in having this custom feature built, or read through the code and learn how to do it yourself like the rest of us. 🙂
April 16, 2013 at 12:57 am #133245In reply to: Hyperlink "Logged In" on notifications
ehong33234
ParticipantHi, did you ever find a solution for this? If so, would you kindly share what code you used and where? Thank you!
April 15, 2013 at 11:58 pm #133235In reply to: Users deleting their own posts
Stephen Edgar
KeymasterCurrently a ‘Participant’ cannot delete their own posts as per https://codex.bbpress.org/bbpress-user-roles-and-capabilities/
See this thread on customizing your roles https://bbpress.org/forums/topic/add-forum-roles/
April 15, 2013 at 10:20 pm #133220In reply to: bbPress 2.3 now available!
Stephen Edgar
Keymaster@alexiousrahl Search is enabled by default, you should be able to see the search form at the top of your forums list eg. http://example.com/forums/
I have also updated the Shortcodes and Widgets codex pages.
April 15, 2013 at 7:27 pm #133209In reply to: bbPress 2.3 now available!
Stephen Edgar
Keymaster@themattman Can you please start a separate topic so we can go through your vBulletin issues.
When you start this new topic can you please include the exact details of the error messages you are seeing.
You also should not be running the ‘repair tool’ whilst the converter is still running, you run it after the conversion has finished. You may also want to check the docs here for any known issues with vBulletin conversion.
April 15, 2013 at 2:42 pm #133198mmattrw
ParticipantI upgraded to 2.3 and now the content of forum categories are showing up in lists, however, sub forum categories only show their titles and not content.
Is there a setting for this? (Didn’t see one)
I figured I’d ask here before I peak through the code looking for a hook.April 15, 2013 at 11:18 am #133177In reply to: bbPress 2.3 now available!
realhood
Participant@trip62Â Â Â @alex-ye
when I check the codes of @jezza101 ‘s website ,I  find the problem 。
so I try change the codes in the chrome app ,the Developer Tools,it works.
like change http://127.0.0.1/search/ to   http://127.0.0.1/forums/search/
my forum link is http://127.0.0.1/forums so add /forums before the/search/
as like http://www.nxtab.co.uk/forum/search/
so ask:how to solve this problem
(Hope understand my Chinese English)

April 15, 2013 at 10:14 am #133174In reply to: Php print ip without ( )'s need advice
perineo
Participantdylan helped me with this one, it works 100% it shows a flag using ip of the replier under the avatar (dance)
you will need third plugins like quick-flag to work with this code, good luck
April 15, 2013 at 8:09 am #133168In reply to: bbPress 2.3 now available!
jezza101
ParticipantGreat, thanks for the new release. Always exciting to see new bbpress updates :)! Couple of comments from me.
Search
I’ve traditionally used Google search to search across my whole site, is there an easy way to switch the new form off? It appears to be forced upon the main forum list page.It is also not looking great on my sites main forum page, what’s the easiest way to style this, what can I add to my CSS file to change the look? See here.
Stats
For those looking, the Stats shortcode is [bbp-stats], there is also a widget. https://bbpress.trac.wordpress.org/ticket/2052Is it possible to style the output?
Can I control which stats are shown? For example “empty tags” isn’t something I really want to boast about on my forum!April 15, 2013 at 7:54 am #133166In reply to: Php print ip without ( )'s need advice
perineo
Participantit works ! prints the ip of the reply user inside of its shortcode, and it works inside the posts (with plugins enable BBCODE GD BB TOOLS and stuff…) but, can I use do_shortcode for making the shortcode work other than in the reply content?
something like this?
this dosnt work, but how could i use it? thanks in advance
April 15, 2013 at 7:45 am #133165jezza101
ParticipantThe new shortcode is:
[bbp-statistics]
Is it possible to style this or control which stats are visible? For example “empty tags” and “hidden replies” aren’t really stats to share about (are they?!)
How is the “who’s online” done?
April 15, 2013 at 4:41 am #133151In reply to: bbPress 2.3 now available!
Erlend
ParticipantThanks so much! Seems to have updated without a hitch (well, see below). Tested the forum search right away and it appears to be working fine, although I’m still aching for those search results to be presented as excerpts.
I did also find that I had to resave permalinks in order to see posts again, or else I would end up with a “topic not found”. That gave me quite the scare!
We’ll be checking out those improvements to code posting now.
April 15, 2013 at 3:21 am #133150In reply to: bbPress 2.3 now available!
AlexiousRahl
ParticipantHello and thanks for the help!
Two questions for a noob, though: how to enable the search? Also, where is the statistics shortcode? I can’t find it here. https://codex.bbpress.org/shortcodes/
Thanks again!
April 15, 2013 at 1:36 am #133145JayFoster
ParticipantI’m not a website developer. I’m just a user of WP for two sites. I have a third site that I had a developer set up which is a forum and it is run with phpbb (he said this is what I should use).
What frustrates me is the huge DIFFICULTY in installing a “mod.” I don’t want to have to contact my web developer to install a mod every time I need one. That’s why ALL my websites (except this forum one) are run on wordpress – I can install/change just about anything on it myself within seconds.
What I’m wondering is, if I switch to bbpress is the installation of plugins just like wordpress? I don’t have any problem with that because it’s just click on a couple of buttons. Phpbb on the other hand, requires me to edit files and write code for a “mod” installation. It’s time-consuming and drives me nuts.
My forum is http://www.ForumJudo.com if that matters to your recommendations. I just basically want a site where users can send/receive private messages, vote on posts, post video/audio files, start topics, mods can delete posts & ban users, etc., and possibly a chat feature in the future.
I just know that phpbb is too difficult to install “mods.” I don’t want to learn code.
Thanks for any advice on this!
April 14, 2013 at 11:24 pm #133139In reply to: Php print ip without ( )'s need advice
John James Jacoby
KeymasterThere is no easy on/off switch to enable/disable this, unfortunately. It would take a bit of code to make it work (a custom plugin, etc…)
April 14, 2013 at 11:18 pm #133135In reply to: Php print ip without ( )'s need advice
John James Jacoby
Keymasteri have to pay for this?
Hopefully not. A quick Google search found this plugin, though I’m not sure how well it works.
April 14, 2013 at 11:10 pm #133129In reply to: Php print ip without ( )'s need advice
perineo
Participantyes but with third plugins i can re-open this right? i have to pay for this? Thank you in advance
not even with do_shortcode? globals, im very newbie in php understand my syntax mistakes 🙂April 14, 2013 at 11:08 pm #133127In reply to: Php print ip without ( )'s need advice
John James Jacoby
KeymasterbbPress disables shortcode execution within it’s output, so that non-privileged users can’t gain access to all of the shortcodes available within WordPress. The problem is that shortcodes don’t come packaged with role/capability restrictions on their usage, allowing anyone that can create topics or replies to use any available shortcode. This is risky, so we globally disallow them.
-
AuthorSearch Results

