Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 14,226 through 14,250 (of 32,503 total)
  • Author
    Search Results
  • #134382

    In reply to: Allow HTML from users

    Earthman Media
    Participant

    I am having this problem with span and p tags showing up as code in the posts, after the latest update.

    I tried your advice above and added the following function, but it did not work (p and span tags are still showing, not parsing as html).

    Any advice would be greatly appreciated, please. A screenshot of the output can be viewed here: http://screencast.com/t/CKTLbqHVb

    
    
    add_action( 'bbp_kses_allowed_tags','pyg_kses_allowed_tags',999,1);
    function pyg_kses_allowed_tags($input){
    	return array(
    
    			// paragraphs
    		'p' => array(
    			'style'     => array()
    		),
    		'span' => array(
    			'style'     => array()
    		),
    
    		// Links
    		'a' => array(
    			'href'     => array(),
    			'title'    => array(),
    			'rel'      => array()
    		),
    
    		// Quotes
    		'blockquote'   => array(
    			'cite'     => array()
    		),
    
    		// Code
    		'code'         => array(),
    		'pre'          => array(),
    
    		// Formatting
    		'em'           => array(),
    		'strong'       => array(),
    		'del'          => array(
    			'datetime' => true,
    		),
    
    		// Lists
    		'ul'           => array(),
    		'ol'           => array(
    			'start'    => true,
    		),
    		'li'           => array(),
    
    		// Images
    		'img'          => array(
    			'src'      => true,
    			'border'   => true,
    			'alt'      => true,
    			'height'   => true,
    			'width'    => true,
    		)
    		
    		
    	);
    }
    
    #134376
    chuckingit
    Participant

    Hi – i just wanted to follow up with a recent workout of success in that David Chandra over at ThemeHybrid.com posted a thread that helped me greatly to get bbPress working 100% beautiful with my Shell child theme thus share as follows in case this helps …

    turns out that not only were my default forum and topics permalinks blown out, but also so were the author and topic tag defaults — meaning if i was in a forum and clicked a forum tag or a forum author, i would get a forum page that did not look like a forum but a generic blog post …

    so i ended up creating four custom child theme bbPress files and placed them in a bbpress sub directory off my child theme root … the four files were archive-forum.php, archive-topic.php, single-user.php, and taxonomy-topic-tag.php … i found that these four files worked if placed in my child theme root or if placed in my child theme bbpress sub folder but thought it best to keep in bbpress sub folder …

    the whole wierd bbPress create a topic form thing went away too given David Chandra’s approach … which was to use replace the child theme shell_get_atomic_template section with the bbp_get_template_part (see his example below) …

    BIG kudos to WP community of forums and those who share … viva the bb’s πŸ™‚ cordially, chuck scott

    ==============
    From this post David Chandra wrote -> http://themehybrid.com/support/topic/shell-bug-with-bbpress-forum-index-page#post-79074

    you can just use bbp_get_template_part to replace shell_get_atomic_template.

    1. create archive-forum.php in child theme,
    2. copy the content of index.php from shell theme to your child theme
    3. change shell_get_atomic_template( ‘content’, true ); with bbp_get_template_part( ‘content’, ‘archive-forum’ );

    if you need to modify the default bbpress template bbpress content-archive-forum.php you can copy the files from wp-content\plugins\bbpress\templates\default\bbpress and add it in your child theme in bbpress folder.

    for example you can add it in your-child-theme/bbpress/content-archive-forum.php, you can copy and files in wp-content\plugins\bbpress\templates\default\bbpress in your child theme if you need to override it and load it using bbp_get_template_part(); function.

    i usually just copy everything to my child theme, but it’s not really future proof, since bbpress tend to delete/add new functions in every release, so full bbpress template override might broke your site. just override the template you need to modify.

    your archive-forum.php in your child theme may be something similar to this:

    
    <?php
    /**
     * bbPress Archive Forum Template
     */
    get_header(); // Loads the header.php template. ?>
    
    	<?php do_atomic( 'before_content' ); // shell_before_content ?>
    
    	<div id="content">
    
    		<?php do_atomic( 'open_content' ); // shell_open_content ?>
    
    		<div class="hfeed">
    
    			<?php do_atomic( 'open_hfeed' ); // shell_open_hfeed ?>
    
    			<?php if (!is_singular() ){ shell_get_atomic_template( 'loop-meta' ); } // atomic context template, in "loop-meta" directory  ?>
    
    			<?php if ( have_posts() ) : ?>
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php bbp_get_template_part( 'content', 'archive-forum' ); ?>
    
    				<?php endwhile; ?>
    
    			<?php else : ?>
    
    				<?php get_template_part( 'loop-error' ); // Loads the loop-error.php template. ?>
    
    			<?php endif; ?>
    
    			<?php do_atomic( 'close_hfeed' ); // shell_close_hfeed ?>
    
    		</div><!-- .hfeed -->
    
    		<?php do_atomic( 'close_content' ); // shell_close_content ?>
    
    		<?php shell_get_atomic_template( 'loop-nav' ); // atomic context loop template, in "loop-nav" directory ?>
    
    	</div><!-- #content -->
    
    	<?php do_atomic( 'after_content' ); // shell_after_content ?>
    
    <?php get_footer(); // Loads the footer.php template. ?>
    
    #134367
    rxcosta
    Participant

    I found the following code being suggested to remove the forum search bar:
    /*Remove forum search above forum */
    .bbp-search-form {
    display:none;
    }

    It works on some themes, but not my current theme at villagepca.org. Any other suggestions?

    Thanks!

    #134337
    beardydan
    Participant

    Hello again.

    New problem – the shortcode post now can’t be found externally, though weirdly, when I’m logged in, it works fine.

    Be grateful for any thoughts.

    thanks
    dan

    #134335

    Topic: Latex in topics

    in forum Plugins
    Asif Somy
    Participant

    I tried many latex plugins but they work with normal posts and pages. I want to use latex code in topics and forums.

    Wordpress Version 3.5.1
    bbPress Version 2.3.2

    #134332
    fuseful
    Participant

    In my forum here http://systemsfortraders.com when I insert the short code bbp-topic-tags it works fine – As you can see it displays my tag cloud but when I click on one I get an error – e.g. http://systemsfortraders.com/forums/topic-tag/infographics/

    Please can someone help here ?

    #134331
    beardydan
    Participant

    Hi everyone

    I’m one of those novice newbies i’m afraid.
    Trying to create a simple forum site.
    Have selected great theme – Spun
    Using bbPress as forum plugin.
    When I redirect the permalink for post selected to contain the forum I get this view: but when I use the shortcode for the forum index it displays just as I’d like Though this isn’t navigable.

    It looks to me like it’s trying to fit the forum in one column. Could anyone tell me what code I’d need to create what I see using the shortcode on the /forums page so it’s usable? Or is there a way of running the forums using the shortcodes?

    Many thanks

    #134323
    fencer_x
    Participant

    It’s possible, and you probably could’ve found it with some searching, like I did: https://bbpress.org/forums/topic/bbpress-2-plugin-forum-order-doesnt-work-not-appearing-in-correct-order/#post-112828

    The file that’s referenced isn’t in the same place anymore–I believe it’s in plugins/bbpress/includes/forums/template-tags.php these days.

    Keep in mind it’ll get written over with the original code with each update, though.

    jrman
    Participant

    I don’t know if this is possible, but I was wondering if there was some way to automatically “close” or “hide” threads/posts after a certain period of time with no activity. I currently have about 8 pages of threads/topics on my site, sorted by freshness, and some of the older ones haven’t had a new comment/post in over a month.

    Instead of manually closing or trashing all of the older posts, I would love it if there was a piece of code that would automatically do that.

    *I found a way to do this by age of the topic, but not by freshness.

    (All up-to-date)
    Wordpress 3.5.1
    bbPress 2.3.2
    BuddyPress 1.7.1

    #134306

    In reply to: Activity Widget?

    chrishe
    Participant

    P.S. It is possible to achive the output I want by hacking the common/widgets.php file, (not that I am suggesting this is good, as will be overwritten on upgrades!)
    in widgets.php, changing the Topics widget query on lines 743 and 764 as below does what I want! Maybe not too hard for author to add customise this properly?
    HACK:

    			// Order by most recent replies
    			case 'freshness' :
    				$topics_query = array(
    					'post_type'      => array(bbp_get_topic_post_type(),bbp_get_reply_post_type() ), //HACKED!
    					// 'post_type'      => bbp_get_topic_post_type(),
    
    #134303
    chrishe
    Participant

    Hi, I am using bbPress as part of a wordpress site. I would like to show “recent activity” in a sidebar widget without using too much screen space. In other words a combination of the “recent topics” and “recent replies” widgets, e.g. as below (1 topic, 1 reply, but able to set number would be good also)
    “Recent Forum Activity”
    Latest Topic…
    Latest Reply…

    Is that possible with shortcodes? else maybe a way to combine the output of the two current widgets?
    Thanks

    #134302
    Stephen Edgar
    Keymaster

    I moved your reply in this topic to a new topic as they are separate issues.

    You shouldn’t have a problem with your setup if you follow the docs:
    https://codex.bbpress.org/import-forums/

    #134300
    Stephen Edgar
    Keymaster

    Currently the phpBB import script only supports phpBB v3

    https://codex.bbpress.org/import-forums/phpbb/

    You could upgrade phpBB v2 to phpBB v3 and then import to bbPress.

    You will still have issues with user passwords though and each user would need there password manually changed. This is due to different password algorithms between phpBB v2 & v3.

    #134298
    touqir76
    Participant

    hello,

    i want to remove a search bar from header can i delete this code from my website ( http://dramasonlinetv.com ).

    
    <div id="top-search">
    		<?php get_search_form(); ?>
    #134296
    Dignified Labs
    Participant

    @Karloy I have the same issue. please can you describe how you fixed this issue? What file did you edit and what code exactly was edited. Thanks in advance

    #134294
    Stephen Edgar
    Keymaster

    1. can more than 110 000 users be imported

    This should not be a problem.

    2. My website runs a specific version of phpbb SEO for allowing permalinks for every forum – will this be imported ? (so that there is not a lot of redirect)

    No, these will NOT be imported and you will need to manually set your permalinks and make some redirects using .htaccess

    3. My website stores custom profile fields for every user (more than just ICQ, but also custom ones). How could I have the same kind of functionalities using bbpress ?

    Currently when importing from phpBB we are importing and storing the default phpBB user fields as outlined here. You could modify the import script to include any of your custom user profile fields so they also get stored in wp_usermeta.

    After that you would need to find a WordPress plugin that supports extended user profile fields to utilize that data. I am not sure of any specific plugin that can really do that out of the box with bbPress at the moment but at least you ‘would’ have all of your users advanced profile data stored.

    4. What about performance – will it be better than phpbb. I know bbpress is very powerful for small forums, but I have no idea regarding huge ones. Can wp caching plugins work for bbpress as well ?

    There are some large sites running bbPress and I would suggest you setup a test site to see how it works for yourself personally.

    As to caching it appears that ‘WP Super Cache’and ‘W3 Total Cache’ do not work well with bbPress as discussed in this topic though there is ‘Lite Cache’ which appears to work with bbPress as per this topic.

    5. Is the entire UI translated in French – it doesn’t seem to me, but maybe I’m wrong.

    The current status of the French translation is at 11% translated with 879 strings untranslated though 734 of those strings have been translated and are waiting for the fr_FR translation validator to validate the translations.

    https://codex.bbpress.org/bbpress-in-your-language/

    6. Can I use any plugins writter for wp for bbpress ?

    I am not sure what you mean for this question

    Any more questions please ask away…

    #134292
    Stephen Edgar
    Keymaster

    The strings you mention from what I can see are all currently able to be translated.

    Take a look at this to get started with bbPress Translation files

    https://codex.bbpress.org/bbpress-in-your-language/

    #134281
    wcnomad
    Participant

    Hi.

    I am having the blank page issue. I tried adding a shortcode to it, but it stayed blank.

    I am using Widezine theme with a BBpress Child theme.

    website: westcoastnomads.com

    Can someone help, please?

    I’m a coding newbie, so please dumb it down. πŸ™‚

    Jill

    #134273

    In reply to: Allow HTML from users

    koreancandy
    Participant

    Before the upgrade I was using a TinyMCE plugin on my forum that was recommended by other BBpress users.

    Using that, the members could post videos and change font colour etc via the visual editor, but since the upgrade, when they do this, it just shows the html code and doesn’t display well.

    Is there any way to fix this? it’s highly frustrating as it was working perfectly before this upgrade.

    Thanks! πŸ™‚

    kitchin
    Participant

    My theme uses index.php in the main directory for most pages, by the way. (In other words, my theme does not have page.php, single.php, etc.) So you can sorta see what happened, it got overridden as in a subtheme.

    kitchin
    Participant

    I added a bbpress subdirectory to my theme and got a blank screen. I was using a “silence is golden” index.php file in the subdir and removing that fixed it. I guess the subdir acts as a subtheme or something (though it has no style.css file).

    Interesting thing is I could also fix it by dropping in the files from plugins/bbpress/templates/default/extras to my main theme directory, following the instructions here: `http://codex.bbpress.org/theme-compatibility/

    Posting this in case it helps anyone else.

    #134265

    In reply to: Allow HTML from users

    As of ~2.3, the “allowed tags” are filterable within bbPress.

    Look for the filter bbp_kses_allowed_tags. It’s in includes/common/formatting.php.

    #134261
    blg002
    Participant

    I’m wondering how I can make the 14×14 avatar images that are in the loop of topics on a forum landing page. I know I could just go into loop-single-topic.php and change the 'size' => 14. But I’m wondering if/how I could use an add_filter? in my functions.php (so it’s not blown away with an update) to make this change.

    I have a pretty basic understanding of add_filter but I’m not able to figure out how to get this working. Any help is appreciated

    #134253
    tharsheblows
    Participant

    Ah, ok, I understand what you want (I think). I have a page like that where I use the [all-recent-topics] shortcode : https://codex.bbpress.org/shortcodes/ . I’m going to try using it in a text widget* but when that doesn’t look like I want, will copy / paste / edit and make a new shortcode to use. (I like shortcodes.) I’ll probably get to it sometime this week and can post it if you’d like, with the caveat that you’ll need to adjust the styling for your site.

    *if you want to use shortcodes in text widgets add

    // Use shortcodes in text widgets.
    	 add_filter('widget_text', 'do_shortcode');

    to your functions.php file.

    #134244
    renai42
    Participant

    hi everyone,

    I didn’t used to have this problem, but upon upgrading to bbPress 2.3.2, it manifested. The [bbp-topic-form] shortcode now no longer allows un-privileged users to post. Seems like this bug hasn’t been fixed.

    Is there any update to this situation?

    Kind regards,

    Renai

Viewing 25 results - 14,226 through 14,250 (of 32,503 total)
Skip to toolbar