Search Results for 'code'
-
AuthorSearch Results
-
October 15, 2014 at 3:38 am #153342
In reply to: Crayon Syntax Highlighter not working / tags issue
Peter Kriegel
ParticipantI post only to confirm that I have a similar issue.
I have enabled the Crayon Button to Post code over the crayon Popup.
It inserts allways the pre Tag with a class attribute.
If I Post as Admin with Crayon Syntax Highlighter in bbPress all is fine.
If I post as a User the angle brackets of the preliminary pre Tag are geting masked like so:
& lt; pre class=”lang:arduino decode:true crayon-selected” & gt;If I remove the class attribute and put in a simple < pre > all works fine.
@netweb Thank you for your workaround I will Ty it!October 15, 2014 at 2:31 am #153341In reply to: How do I extract a topic/reply excerpt?
naaatasha
ParticipantWhere can I insert this long code? I’m beginner in bbpress 🙁
October 14, 2014 at 2:00 pm #153330In reply to: Two forum index pages?
Robin W
Moderatorbbpress has two ways to display the forums – see
You just have a page called chat, whilst the slug is still set to forum, so the latter is what the breadcrumb shows.
so you need to do two things
1. change the slug to chat
2. get bbpress to use your template with a sidebarI was trying to fix no. 2 first
Suggest you refer the issue to you theme provider
October 14, 2014 at 12:46 pm #153328In reply to: Customize Text or change language
Robin W
Moderatorso if you wanted to change ‘Create New Topic’ to ‘hello mother’ you would do
//This function changes the text wherever it is quoted function change_translate_text( $translated_text ) { if ( $translated_text == 'Create New Topic' ) { $translated_text = 'hello mother'; } return $translated_text; } add_filter( 'gettext', 'change_translate_text', 20 );October 14, 2014 at 10:21 am #153323In reply to: Search form in the Sub forums
Toby
ParticipantNot quite sure if I understand exactly what you want, but one of these should help..
If you want to display a search form at the top of single topics add the following to your functions.php file:
function my_bbp_topic_search_form(){ ?> <div class="bbp-search-form"> <?php bbp_get_template_part( 'form', 'search' ); ?> </div> <?php } add_action( 'bbp_template_before_single_topic', 'my_bbp_topic_search_form' );If you want a search form at the top of single forums (or sub forums) use the following in your functions.php file:
function my_bbp_forum_search_form(){ ?> <div class="bbp-search-form"> <?php bbp_get_template_part( 'form', 'search' ); ?> </div> <?php } add_action( 'bbp_template_before_single_forum', 'my_bbp_forum_search_form' );If you want to limit results to the topic or forum in question that will be a little more tricky but the following post will point you in the right direction (it shows you how to limit searching to a single forum – you’ll need to customise further to apply it to a single topic): http://sevenspark.com/tutorials/how-to-search-a-single-forum-with-bbpress.
Hope that helps.
October 14, 2014 at 9:28 am #153317In reply to: Two forum index pages?
Robin W
Moderatorok, make a copy of this file and rename it bbpress.php
put this file in the root of your theme
ie
wp-content/themes/%yourthemename%/bbpress.php
where %yourthemename% is the name of your theme!
Then amend as follows
change
// Sidebar ///////////////////////////////////////////// if ($themify->layout != “sidebar-none”): get_sidebar(); endif; ?>to
// Sidebar ///////////////////////////////////////////// get_sidebar(); ?>This will then force bbpress to use a forum with a sidebar
October 14, 2014 at 1:15 am #153302In reply to: Request: Topic title link to latest post
akyboy
ParticipantHi Guys,
I would like to see link to last post in my Forum Widget but i cannot figure out.
This is the code for widget i use:
<!-- This file is used to markup the widget for Recent Topics info --> <table><!-- AKKI - dodao alajment left AUG 22 2014 --> <tr align="left"> <th>Topics</th> <th>Posts</th> </tr> <?php while ( $widget_query->have_posts() ) : $widget_query->the_post(); $topic_id = bbp_get_topic_id( $widget_query->post->ID ); ?> <tr> <td> <a class="bbp-forum-title" href="<?php bbp_topic_permalink( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a> </td> <td> <?php echo bbp_get_topic_post_count($topic_id, false);?> </td> </tr> <?php endwhile; ?> </table>If you can please tell me what should i replace to get link to last post on my forums?
Thanks
October 13, 2014 at 11:39 am #153284In reply to: Plugin Search Block Comments
NLBlackEagle
ParticipantI found the way to fix the gray out issue for most people. However this didnt worked for me.
In this folder:
/wp-content/plugins/bbpress/templates/default/css
Open up bbpress.css andfind #bbpress-forums .status-closed,I changed color: #ccc; to #000;
This should have fixed the gray out issue. However it did not worked =/
This is a paste of the bbpress.css file: I changed line 59
October 13, 2014 at 9:48 am #153280In reply to: Two forum index pages?
Robin W
Moderatorthis is probably a theme page issue
see
depending on your theme, you may need to do some renaming and editing of files – reda the article and then come back if you need further help
October 13, 2014 at 9:30 am #153277In reply to: Customize Text or change language
Robin W
ModeratorPut the following in your functions file
//This function changes the text wherever it is quoted function change_translate_text( $translated_text ) { if ( $translated_text == 'old text' ) { $translated_text = 'new text'; } return $translated_text; } add_filter( 'gettext', 'change_translate_text', 20 );you can put in multiple lines eg
if ( $translated_text == 'old text1' ) { $translated_text = 'new text1'; } if ( $translated_text == 'old text2' ) { $translated_text = 'new text2'; }October 13, 2014 at 7:42 am #153275Topic: Two forum index pages?
in forum Troubleshootinglmcookie62
ParticipantHi, i’m getting in a twist trying to sort out my forum index page. It seems like i have 2 versions of it.
When i setup my forum i created a new page called ‘chat’ and added the [bbp-forum-index]shortcode to it. Everything at first looks to be working great but when i click the index page in my breadcrumbs it takes me to a different index page called ‘forum’ which doesnt have the custom side bar that i set up (which is visible on my ‘chat’ index page and topic pages. One interesting thing is that this ‘forum’ index page picks up my theme styles nicely but my ‘chat’ one loses my theme font.
I have tried changing my forum slug to ‘chat’ to match my new page and this does resolve the breadcrumb/2 index page issue. BUT i then lose my custom side bar and still dont have the font styling.
I’m confused on what is going on here so i’m not clear where i need to head to get this sorted out. Should i be making my slug and forum page be named the same or is it that i need to work out why i have two index page? Any advice would be massively appreciated.
As a note, i used wp tweaks for my custom side bar although i already had SimplePage side bars installed which i use elsewhere on my site. Also, my site uses a custom permalink structure that includes category/post name rather than just the standard postname structure
I am using wp 4.0, bbpress v2.5.4 and here is a link to my site
Many thanks
October 13, 2014 at 7:25 am #153273In reply to: Cannot access abc/forums
xprt007
ParticipantHi
If you mean “3. Creating a forum page”, method 2, I tried that & was able to create this forum using the shortcode => [bbp-forum-index].
On the Forum settings page & “/wp-admin/post-new.php?post_type=forum” page, it seems this only deals with the forum supposed according to the bbpress default settings to appear at /forums, but consistently wont.
Does it mean all the forums & subforums have to be created using shortcodes (if so, any link where to find them?).
This problem is not being experienced on another site sharing the same web hosting account, and has a separate domain. In the root of this particular, problematic site is some web directory. I wonder whether its moved the site to?
I had a similar issue of consistent failure of accessing /recipes, generated by the recipepress reloaded plugin showing the recipe archive page, even with recommended default settings & permalinks, but just like the bbpress forum at /forums, it had the right url, but content of the site/blog front page. The plugin author, though said it was a bug in the plugin & changes in the code corrected the problem described here. Correct link now here.
Could there be anything in this root folder .htaccess of the web directory (unrelated to WordPress), which may be causing this & affecting the functioning of bbpress (& not other plugins like Buddypress & co) or WordPress proper & in directory.com/wordpress & even in wordpress.directory.com? I ma not conversant with .htaccess & co. 😉
So just wondering what to do next.
Thank you for taking the time to look into this.
Kind regards
October 13, 2014 at 2:59 am #153267In reply to: Customize Text or change language
October 12, 2014 at 2:14 pm #153255In reply to: [Help] User can be close topics
janfeng
ParticipantThere codes looks complicated. Can u tell me which capabilities is allow user close their’s topics. @_@
October 12, 2014 at 1:58 pm #153252In reply to: Shortcode on the page php
galiulinr
ParticipantOh great, Robin. It works for me. Thank you very much!
<?php
$idbbp = get_post_meta($post->ID, 'idbbp', true);
$forum_id = bbpress()->current_forum_id = $idbbp;
$x='[bbp-single-topic id ="'.$forum_id.'"]';
echo do_shortcode($x);
?>
October 12, 2014 at 1:53 pm #153251In reply to: [Help] User can be close topics
Robin W
Moderatoryou won’t be changing subscriber – that is a wordpress role – bbpress has it’s own roles, and probably that is participant.
I’m sure you can , but haven’t tried so don’t have code offhand.
Suggest you just create a new custom role, and then set your bbpress user to it.
October 12, 2014 at 12:44 pm #153249In reply to: Shortcode on the page php
Robin W
Moderatorok, well without spending hours recreating your issue, I’d suggest you try
<?php $idbbp = get_post_meta($post->ID, 'idbbp', true); $forum_id = bbpress()->current_forum_id = $idbbp; $x='[bbp-single-forum id forum id ="'.$forum_id.'"]‘ ; echo do_shortcode( $x);October 12, 2014 at 11:35 am #153247In reply to: Shortcode on the page php
galiulinr
ParticipantI installed the plugin Easy digital downloads that creates custom record types post_type = download. I edited single.php file removed <? Php comments_template ();?> And I want to insert the code to show the theme of the forum bbpress renamed to the new file single-download.php
In the custom field on the product page I insert ID Forum.October 12, 2014 at 8:57 am #153244In reply to: [Help] User can be close topics
Robin W
Moderatorsee
https://codex.bbpress.org/bbpress-user-roles-and-capabilities/
and you’ll see a capability for a user to close their own topics.
you need to either amend the participant role, or create a new role with this capability
October 12, 2014 at 8:29 am #153242In reply to: Shortcode on the page php
Robin W
Moderatorsorry but what is the ‘page comment form ‘, where on ‘each page’ are you putting the code, and what is ‘each page’
I am trying to hep you, but you do need to do a detailed response so that I can help.
For instance
” I go into dashboard and select forums and then edit the xx forum and change the content from … to….”
or
‘I edit the page.php file and in line xxx I add YYY’
October 12, 2014 at 7:28 am #153236In reply to: Shortcode on the page php
galiulinr
ParticipantHi, Robin!
I want to replace on the page comment form on the relevant topic in the forum. To do this, on each page I create a custom field in which prescribe ID created threads.
echo do_shortcode( ‘[bbp-single-forum id forum id =”custom_field”]‘ );
does not work.October 12, 2014 at 3:49 am #153233Robin W
Moderatori have created custom role’s (parent and teacher)
How have you done this – using a plugin or by coding?
set dynamic role for bbpress forum itself
October 12, 2014 at 3:43 am #153231In reply to: Shortcode on the page php
Robin W
ModeratorPossibly lots of things.
I appreciate that you English may not be good, but can you explain in more detail what you are trying to do?
Also
1. php won’t work in a page without a plugin
2. there is no shortcode display_forum
2. normally you’d use[bbp-single-forum id=$forum_id]
in a page and in php you’d use
echo do_shortcode( ‘[bbp-single-forum id forum id =”5”]‘ );
October 12, 2014 at 3:34 am #153230In reply to: Hueman theme issue
October 12, 2014 at 3:25 am #153228In reply to: Cannot access abc/forums
Robin W
Moderatorok, some themes don’t like this way to display.
so I try
look at item 3 and try method 2.
If that doesn’t work then come back
-
AuthorSearch Results