Forum Replies Created
-
UP !
is this question already open ?In reply to: How to show code in forum posts?I got it at least…
What i need is the possibility to copy/paste some code in my forum posts.
The code on the pastebin is globally correct, but as boone says, “it’s not totally reliable”.The first thing, i you want to use it, is to copy paste the given code into your child theme function.php file.
Then you add a filter to deactivate the (damned) default typographical double cote wp filterremove_filter( ‘bp_get_the_topic_post_content’, ‘wptexturize’ );
here the code you find on pastebin
in the function bporg_decodeit, retrieve <code> in the if statement
`if ( ‘' == $matches[1] )`
Should be
`if ( '' == $matches[1] )`
In the function bporg_code_trick, there are 4 backticks, we have to change this a little
In the first callback, replace the FIRST backstick by & # 96 ; (without space)
In the second callback, replace the SECOND backstick by & # 96 ; (without space)
That's it ! Now you can copy most of php code with backstick and the right double cotes.
view the result here:
http://bp-fr.net/groups/groupe-de-tests/forum/topic/php-complexe-test/In reply to: How to show code in forum posts?it seems that i have a character conflict with backstick and UTF8/Mysql input/output
& # 96; ( the html entity) is readed as a “real” backtick in the browser,
but injecting a “real” backtick like a php code copy/paste action, is not rendered correctly.In reply to: How to show code in forum posts?I’m using a standard BP theme as child theme , and only for translation purpose.
As you can compare with what is on pastebin, some code is wrong, also here on bp.orgthe return contains $text between backstick, but they are converted to < code >
In reply to: How to show code in forum posts?i give a try here, using backticks
`
function bporg_decodeit( $matches ) {
$text = $matches[2];
$trans_table = array_flip(get_html_translation_table(HTML_ENTITIES));
$text = strtr($text, $trans_table);
$text = str_replace(‘
‘, ”, $text);
$text = str_replace(‘‘, ”, $text);
$text = str_replace(‘‘, ”, $text);
$text = str_replace(array(‘&’,’&’), ‘&’, $text);
$text = str_replace(”’, “‘”, $text);
if ( ‘' == $matches[1] )
$text = "n$textn";
return "`$text`";
}
`
on my forum it is showing this
http://bp-fr.net/groups/groupe-de-tests/forum/topic/another-test/In reply to: How to show code in forum posts?Sorry, it’s not ok !
view here, i tried to insert with backtick and [code, but pre tags are missing in the example….
http://bp-fr.net/groups/groupe-de-tests/forum/topic/code-test-code/In reply to: How to show code in forum posts?No solution ?
it is possible that your theme is refering to one of the 3 deprecated activity tables ?
3 in the past, actually 1, with another name.Have you a conflict with your chat plugin ? Deactivate it and see if it works.
In reply to: How to show code in forum posts?i think there is a error in function bporg_decodeit
`$text = str_replace(”’, “‘”, $text);`
i also tried this code but it doen’t work for me. I added it in bp-forums-filter.php. Probably the wrong place.
In reply to: html on profile page? can it be done?perhaps if you read this you can do what you want:
https://codex.wordpress.org/Function_Reference/wp_filter_kses
https://codex.wordpress.org/Function_Reference/wp_filter_post_ksesMaybe you have an old BP table on your DB ? What versions from are you updating ?
De nada !
In reply to: sub domain problemthe site urls are setted in WP.
go to your main site dashbord.
in super admin menu, is the link to all your blogs
Under your main site name click on edit
in the first area, enter http://www.emailaya.com (no ending slash)
in the area named path, enter /
in the area in wp1_options, texarea home, enter http://www.emailaya.com/ (with ending slash)
save your changesNow go to wp-config.php
i suppose you are under sub-domains.
If yes you must see this somewhere/** The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ”);
define(‘VHOST’, ‘yes’);
$base = ‘/’;
define(‘DOMAIN_CURRENT_SITE’, ’emailaya.com’ );
define(‘PATH_CURRENT_SITE’, ‘/’ );
define(‘SITE_ID_CURRENT_SITE’, 1);
define(‘BLOGID_CURRENT_SITE’, ‘1’ );normally all is ok now !

Ooooh, i think this is a normal behaviour of BP. The page is called side wide activity, not each blog user activity.
you probably could use this plugin:
https://buddypress.org/community/groups/bp-import-blog-activity/
or ask @boonebgorges for further detailsIn reply to: Add content under group avatarsomething like here ? ttp://bp-fr.net/groups/test/
– the text “twitter” is under de mods list
– the text “facebook” is under the group descriptionHi,
What do you exactly want to do: change the icon size or use your own icons ?In reply to: Club Belote@rogercoathup Utilise le patch pour résoudre le problème.
In reply to: limit users per groupand use bp-custom.php to make what you need.
Maybe

Have you read this :
https://trac.buddypress.org/ticket/2171Control the path of the main site in wp-admin/yoursite ->edit
means that you have to show at this in your admin !I suggest to you to read the codex to understand how bp works before hacking the core as a wild

I don’t know exactly what you did, but the link to the register path is going to a wrong url
http://exaholics.com/?bp_pc_redir_to=%2Fregister
instead of
http://exaholics.com/register/Control the path of the main site in wp-admin/yoursite ->edit
In the first lines you will see the actual pathView also in your wp-config….
In reply to: Search and sort commentsBasically this is a WP question.
Anyway, did you read this, perhaps you can do something
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/i think it would be better that you code your php in english
The output with accent is ok without hacking on
See here where is a demo field with many acdcented and special characters, without touching the core code.
http://bp-fr.net/members/admin/profile/public/In reply to: White Screen of Deathwhite space errors are generally at the end of a php file. After the ending tag ? > there must be NO line