Search Results for 'code'
-
AuthorSearch Results
-
December 16, 2013 at 6:37 am #140354
In reply to: Can't remove "Topic Status:" and "type"
ronthai
ParticipantIt might be in form-forum.php (bbpress/templates/default/bbpress)
It has these lines, have not tried it and be sure to have a backup:
<p> <label for="bbp_forum_type"><?php _e( 'Forum Type:', 'bbpress' ); ?></label><br /> <?php bbp_form_forum_type_dropdown(); ?> </p> <?php do_action( 'bbp_theme_after_forum_form_type' ); ?> <?php do_action( 'bbp_theme_before_forum_form_status' ); ?> <p> <label for="bbp_forum_status"><?php _e( 'Status:', 'bbpress' ); ?></label><br /> <?php bbp_form_forum_status_dropdown(); ?> </p>December 16, 2013 at 6:24 am #140353In reply to: Can't remove "Topic Status:" and "type"
eitayz
ParticipantThank you π
Of course,I will help to translate the strings.
But I would like to remove those two strings that I have marked.
I can’t use “display:none” since it’ll remove all the “label” or “p” in the page.
So I have to remove it from the PHP code. But I can’t find the code spot to do so.December 16, 2013 at 12:20 am #140347In reply to: Sidebars in BBpress profile
Sloppy Buns
ParticipantOk i think I have found where the problem is, take a look at the Body Class snippets from different pages on bbpress, paying particular attention to the sections after the word bbpress in each snippet.
The top two are from pages I am able to get sidebars to appear on and the bottom two I can not.
In the top two notice after the word bbpress you see a description of the type of page it is “single single-topic” and “archive” respectively.
In the bottom two this does not happen so my theme “Hueman” doesn’t know what sort of pages they are and therefore is unable to place the sidebars on these pages, now all I need to know is how to rectify this?
<body class="topic bbpress single single-topic postid-976 logged-in admin-bar no-customize-support topbar-enabled full-width gecko"> <body class="forum-archive bbpress archive post-type-archive post-type-archive-forum logged-in admin-bar no-customize-support topbar-enabled full-width gecko"> <body class="bbp-user-page single singular bbpress logged-in admin-bar no-customize-support topbar-enabled full-width gecko"> <body class="bbp-view bbpress logged-in admin-bar no-customize-support topbar-enabled full-width gecko">December 15, 2013 at 9:26 pm #140342In reply to: List user post total
ronthai
ParticipantI got it working and also Guests Posts (Topics and Replies) don’t return and empty value.
Might not be the best way, but all I got:<?php if ( bbp_is_topic_anonymous() ) { echo "<br>Guest Post"; } elseif ( bbp_is_reply_anonymous() ) { echo "<br>Guest Post"; } else { $post_count = ( bbp_get_user_topic_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) ); echo "<br>Total Topics: " . $post_count; $post_count = ( bbp_get_user_reply_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) ); echo "<br>Total Replies: " . $post_count; } ?>December 15, 2013 at 8:32 pm #140339In reply to: List user post total
ronthai
ParticipantNope, that does not seem to be working.
I tried several different ways, but all just output the same.I got to this code, but still outputs the Totals for guests without a value/number:
<?php if ( bbp_is_anonymous() ) { echo "Guest Post"; } else { $post_count = ( bbp_get_user_topic_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) ); echo "Total Topics: " . $post_count; $post_count = ( bbp_get_user_reply_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) ); echo "Total Replies: " . $post_count; } ?>December 15, 2013 at 8:15 pm #140336In reply to: Replies not showing up in forum
Stephen Edgar
KeymasterI see this at the bottom of your site when viewing a topic
add_shortcode( 'member', 'member_check_shortcode' ); function member_check_shortcode( $atts, $content = null ) { if ( is_user_logged_in() && !is_null( $content ) && !is_feed() ) return $content; return ''; }December 15, 2013 at 7:52 pm #140334In reply to: Sidebars in BBpress profile
Sloppy Buns
ParticipantI have worked part of this out and have implemented a is_bbpress format for forum pages so I can choose what sidebars to put on my forum pages however I am still not able to get sidebars to show up on profile or most popular topics.
What I require is the is_ codex for these pages so I can write a script to place sidebars on these pages, I have found that the User profile has these html body classes:
bbp-user-page single singular bbpress
is_bbpress() does not workand Most Popular Topics:
bbp-view bbpressThis should be is_bbpress() however is_bbpress() does not work.
Any help would be greatly appreciated.
December 15, 2013 at 7:10 pm #140325In reply to: bbPress 2.5.1 is out!
Stephen Edgar
Keymaster@cyberdrone See this to get the translations or get started with translating bbPress. https://wordpress.org/plugins/bbpress-protected-forums/
@david7h6 What shortcode is broken?
December 15, 2013 at 6:03 pm #140316In reply to: List user post total
Stephen Edgar
KeymasterTry
bbp_is_anonymousto check if it’s an anonymous user before outputting the post count.December 15, 2013 at 9:02 am #140292In reply to: Two breadcrumbs are showing up
Lynqoid
ParticipantYou could hide the bbPress breadcrumb with some CSS.
.bbp-breadcrumb { display:none; }December 15, 2013 at 8:29 am #140288In reply to: List user post total
ronthai
Participantany idea where to add the code to have it show under the avatar in topics/replies?
I think the count works, just can not get it placed correctly
December 15, 2013 at 6:36 am #140287In reply to: List user post total
Lynqoid
ParticipantGive this a try:
$post_count = ( bbp_get_user_reply_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) ) + ( bbp_get_user_topic_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) ); echo "Total Posts: " . $post_count;December 15, 2013 at 5:12 am #140285In reply to: List Of Shortcodes
ronthai
ParticipantDecember 15, 2013 at 4:57 am #140284Topic: List Of Shortcodes
in forum Themessimon_loke
ParticipantI need a list of shortcodes such as Profile edit,activity,user members and others..
I want to have every shortcode to place different page.December 14, 2013 at 12:33 pm #140270In reply to: Request: Backticks optional?
Hansaplastique
ParticipantHi Stephen,
In my search for a “fix” I totally forgot about the popup “Crayon Syntax Highlighter” offers.
I’ve been playing around with this for about a year now and ended up using “CodeColorer” as I was creating my own WYSIWYG editor. I think I’ll explore the Crayon option again.As for the editor; I don’t know how to start such a wider discussion.
I agree that ideally you’d like to use the editor that comes with WordPress, even if it’s just to stay more consistent (comments vs forum posts).
How would one go about that?December 14, 2013 at 6:59 am #140261Topic: List user post total
in forum Troubleshootingcomagnum
ParticipantI’ve searched everywhere, to no avail. There used to be a plugin for this for older versions of bbpress (post count pro I believe it was called) but there aren’t any plugins for this anymore. I’m limited on my code knowledge, but I’d really like for this to be accheived. We’re a compeitive gaming community and vBulletin has been a staple of our professional/amateur gaming life since the beginning. I’ve decided to make the move to bbpress to have a more seemless site integration between users, posts, and news. My ultimate goal is to make the forums as similar to vBulletin as possible, but all of the plugins that accheived this goal do not work with the newer versions. I’d like for the post total to be listed under the users name when they post, as well as in their profiles. In addition custom user roles would be a plus, but not requred. If anyone can point me in the right direction, I’d be very grateful.
December 14, 2013 at 4:09 am #140258In reply to: Forum Index + Topics by Freshness
Simon Barnett
ParticipantThanks for the detailed reply, Stephen. I probably meant Forum Root rather than Forum Index, but the way you describe it is exactly what I’m after.
I had considered what to do about the list getting too long and it will almost certainly be a matter of listing only the freshest 10 topics per forum. Clicking the Forum title would take you to the full list.
Now that I know where to begin I’ll probably figure it out eventually (new to BBPress but not afraid of code), but if you have some suggestions on where to get started or even a block of code to copy-paste I certainly wouldn’t object to using it : )
If get around to it first I’ll post my findings here for the knowledge base.
December 14, 2013 at 3:23 am #140256In reply to: Arabic bbpress Language in english website
Stephen Edgar
KeymasterArabic is 96% translated already, see this to get you started https://codex.bbpress.org/bbpress-in-your-language/
December 14, 2013 at 3:18 am #140253In reply to: No way for users to register and login
Stephen Edgar
KeymasterYou can add some widgets to your side bar or shortcodes to a page
https://codex.bbpress.org/shortcodes/ https://codex.bbpress.org/widgets/
Also there are a few other docs on the codex worth looking at
December 14, 2013 at 2:40 am #140252In reply to: get a replies parent forum
Stephen Edgar
KeymasterCool, that will work, thanks for the follow up and code example π
December 14, 2013 at 2:32 am #140251Stephen Edgar
KeymasterThanks for adding the Codex page @jwarren π
December 14, 2013 at 2:27 am #140250In reply to: Forum Index + Topics by Freshness
Stephen Edgar
KeymasterI just updated that page to ‘Topics β How many topics to show per page’
As to combining the ‘Forum Index with Topics by Freshness’ I’m not exactly sure what you mean by this, for example look at the following two pages here on bbpress.org
https://bbpress.org/forums/forum/installation/ <- That’s the ‘Instalation’ forum 25 topics/page
https://bbpress.org/forums/forum/troubleshooting/ <- That’s the ‘Troubleshooting’ forum 25 topics/pageIf you wanted to have something like below on a single page then you would have to customize your templates or use some shortcodes on your page to get the layout you want. It is quite doable but once you get 50 topics for example in a forum finding ‘Forum B’ or any other forums below that list will be extremely difficult.
-
Forum A
- Topic 1
- Topic 2
- Topic 3
- … etc
-
Forum B
- Topic 1
- Topic 2
- Topic 3
- … etc
December 14, 2013 at 12:06 am #140248In reply to: miniBB – Import only latest
Stephen Edgar
KeymasterSome seriously nice work in your script π
I have just merged your changes into mine
https://gist.github.com/ntwb/7889409/revisionsAnd I forked your Gist and merged those changes into yours https://gist.github.com/ntwb/7955389/revisions
Both files are the same and you can download either to use and test, using the /revisions it should show you a little clearer the changes I made.
In summary the main updates were:
* Fixes PHP Class name – FromExample_ConvertertominiBB
* Includes forum slug
* Uses thecallback_topic_reply_countfor topic/reply counts
* Added topic Author IP
* Added topic slug
* Added topic status (Open/Closed) and callback
* Added reply post id
* Added reply title and reply title callback
* Added reply slug
* Updated password verify classminiBB
* Stores custom user profile_bbp_minibb_user_instantmessenger,_bbp_minibb_user_occupation,_bbp_minibb_user_location&_bbp_minibb_user_interestsinwp_usermetaDecember 13, 2013 at 11:37 pm #140247Topic: support for sms message when there is a forum update
in forum Installationijourneaux
ParticipantI have bbPress up and running but was wondering how I might be able to allow users to get an sms text message when there is a new forum post. I have played around with the WordPress Text message plugin but Wasn’t able to figure out a way to incert the codes onto the form pages.
Ian
December 13, 2013 at 9:17 pm #140246In reply to: Request: Backticks optional?
Stephen Edgar
KeymasterI see where you are coming from, I just went and took a look around backticks in Crayon Syntax Highligher.
Tex uses backticks and appears to render fine based on this http://aksandbox.webege.com/?p=92, I also tried some MySQL with backticks and that also rendered correctly.
You can also add/create your own languages for Crayon:
https://github.com/aramk/crayon-syntax-highlighter/blob/master/langs/readme.mdSome more background on the issues in the past can be read in these two tickets and this was one the main reasons
backtickswere implemented.
https://bbpress.trac.wordpress.org/ticket/2091 & https://bbpress.trac.wordpress.org/ticket/2317While looking for a solution I noticed that Iβm not the only one experiencing this back tick problem β frankly; the editor for bbPress needs some serious reconsideration β¦ isnβt it time for a capable WYSIWYG editor?
I also think we do need a better editor in bbPress, or more so a better editor in WordPress itself that we can use in the ‘front end’ of bbPress.
The install base and use of bbPress is quite large and varied and we try to make it work for all of these cases and is one of the reasons recommending to use plugins that work with bbPress to support your own use case.
Maybe we should have a wider discussion on the bbPress editor and the options available to us.
-
AuthorSearch Results