Search Results for 'code'
-
AuthorSearch Results
-
March 8, 2015 at 9:15 am #159339
In reply to: less distance – left margin between threaded replies
peter-hamilton
ParticipantHui
I dont use threaded comments so can not check the exact code, but should be easy with css.
Check out @media queries for your stylesheet, then you could add styles to remove comment/reply avatars and change the margins.
Perhaps another member has better details for you.
March 7, 2015 at 11:05 pm #159331In reply to: Image code question
Mizagorn
ParticipantI am looking at why the ‘img’ shortcode is making URLs have encoding in them so that the browser will not load an image.
Anyway, the shortcode code is in
bbcodes.phpin lines 487-502. That might get you started, but I don’t think that has the part where it actually generates the “src” and “alt” tags.What I usually do is use “Inspect Element” in FF or Chrome, find the class or ID for the element, then use grepWin to search for that within the WP code files. That would work only if you have FTP’d the files to your local rig, though.
March 7, 2015 at 10:39 am #159323In reply to: Forum Page ID's
Alice Kaye
ParticipantYeah, it’s just very difficult to get it to work the way I want sometimes.
Anyhoo, I put it in my themes custom css box. Though now in hindsight that seems foolish. I suppose what I really need to do is make a copy of the bbpress stylesheet and then update that with this code and upload it to the bbpress folder inside of my child theme/bbpress.
Am I on the right track? Sorry for any typos. Writing this on my cellphone.
March 7, 2015 at 9:56 am #159322In reply to: bbpress.pot is missing line
Robin W
Moderatorthe following works
//This function changes the text wherever it is quoted function change_translate_text( $translated_text ) { if ( $translated_text == '<strong>ERROR</strong>: Your topic needs a title.' ) { $translated_text = '<strong>CHYBA</strong>: Vaše téma musí mít název.'; } return $translated_text; } add_filter( 'gettext', 'change_translate_text', 20 );but equally well, the line is in the pot on line 3727 as
Line 3727: msgid "<strong>ERROR</strong>: Your topic needs a title."so you could just use then normal translate !
March 7, 2015 at 3:51 am #159319In reply to: Forum Page ID's
Robin W
ModeratorI’ll admit CSS is not always my friend
Whilst really useful I hate this as well.
Where are you putting that code?
March 6, 2015 at 7:07 pm #159314In reply to: Forum Page ID's
Alice Kaye
ParticipantHi @robin-w,
I just realized that you responded to this. I’m not sure how I missed this!
I just tried to give this a go (man sometimes this stuff isn’t easy to find) and it’s so far not doing what I want. I’ll admit CSS is not always my friend.
The code I’m using is below:
.forum bbpress single single-forum postid-20 #fixed-background { background: url('http://www.heartwoodgaming.com/wp-content/uploads/2015/02/ffxiv-background.jpg'); }I was hoping that would be how I needed to set it up, but I’m starting to think, not…
Could you take a look at that and let me know where I might have gone wrong? Let me know if you need access to my site to see my bbPress, I have a test account set up for situations such as this! 😛
Thanks in advance!
March 6, 2015 at 3:54 pm #159308Topic: A Login/Logout link in another menu
in forum TroubleshootingJoseph
ParticipantI needed to add a Login/Logout link in one of my navigation menus.
Using this from the bbpress docs got my link to work, but how would I add this link into another menu? For example, the link went into the menu below my logo in the header, but I would like to use it in my very top menu (above the logo).
March 6, 2015 at 11:52 am #159291In reply to: Forum does not show properly
Robin W
Moderatorits a theme issue,
Try the alternate methods here
March 5, 2015 at 12:38 pm #159269In reply to: wrong sidebar on topics page
Robin W
ModeratorMarch 5, 2015 at 5:56 am #159262In reply to: widget side
Robin W
ModeratorThe link you gave
Sidebar on left for Forums, then right for Forum and Topic – Why?
had this as his solution
Just swap the floating elements from left to right, where content becomes right and sidebar becomes left. Remember to end with the !important to override any other CSS. Code is thus:
.bbpress.single-forum #main #content {float:right!important;} .bbpress.single-forum #main #sidebar {float:left!important;} .bbpress.single-topic #main #content {float:right!important;} .bbpress.single-topic #main #sidebar {float:left!important;}You need to put the code in your style.css
March 5, 2015 at 5:32 am #159260In reply to: widget side
Robin W
ModeratorI meant adding his code to the style.css ?
March 4, 2015 at 3:20 pm #159241In reply to: bbpress.pot is missing line
mvasicm
ParticipantAm I right that I should put this code into functions.php file in my theme right?
Im still getting english version.
March 4, 2015 at 3:03 pm #159240In reply to: bbpress.pot is missing line
Robin W
ModeratorI just looked and it’s actually in the code as
<strong>ERROR</strong>: Your topic needs a title.and the translate works on exact !
which might explain why it didn’t work in the pot
you can try it as one phrase, and if that doesn’t work, then make it two
ie
//This function changes the text wherever it is quoted
function change_translate_text( $translated_text ) {
if ( $translated_text == ‘ERROR:’ ) {
$translated_text = ‘CHYBA:’;
}
if ( $translated_text == ‘Your topic needs a title.’ ) {
$translated_text = ‘Vaše téma musí mít název.’;
}return $translated_text;
}
add_filter( ‘gettext’, ‘change_translate_text’, 20 );The same is probably true of the POT file, so you try all that there first !
March 4, 2015 at 2:57 pm #159239In reply to: bbpress.pot is missing line
mvasicm
ParticipantI changed syntax and the code is ok, but nothing happen on the page.
//This function changes the text wherever it is quoted
function change_translate_text( $translated_text ) {
if ( $translated_text == “ERROR: Your topic needs a title.” ) {
$translated_text = “CHYBA: Vaše téma musí mít název.”;
}
return $translated_text;
}
add_filter( ‘gettext’, ‘change_translate_text’, 20 );?>
March 4, 2015 at 2:54 pm #159238In reply to: bbpress.pot is missing line
mvasicm
ParticipantHello Robin,
thanks for quick response.
I tried to add manually into .po file, but it doesnt work I dont know why…
#~ msgid “ERROR: Your topic needs a title.”
#~ msgstr “CHYBA: Vaše téma musí mít název.”Then I tried your way, function file, but there seems to be error in your code. It says:
Parse error: syntax error, unexpected ‘:’ in /data/web/virtuals/82697/virtual/www/domains/investplanet.cz/wp-content/themes/sahifa/functions.php on line 139
March 4, 2015 at 2:09 pm #159236In reply to: bbpress.pot is missing line
Robin W
ModeratorI hope the theme authors read this.
In the meantime either add it manually and keep a note
or add this to 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 );just put the old and new words to change ‘old test’ and ‘new text’
March 4, 2015 at 2:04 pm #159235In reply to: bbpress ranking
Robin W
Moderatoryou’d add this code in the theme function`’s files
March 4, 2015 at 2:03 pm #159234In reply to: bbpress ranking
Robin W
ModeratorYou cuurentl show the bbpress user roles under the avatar on each topic/reply
you can either change the display name or add new roles to achieve this
see
https://codex.bbpress.org/bbpress-user-roles-and-capabilities/
March 4, 2015 at 8:30 am #159228In reply to: User registration on multisite
Nicolas Korobochkin
ParticipantI’ve posted the long article about this question on my blog with source codes, examples and screenshots (on Russian language): https://korobochkin.wordpress.com/2015/02/10/rukovodstvo-po-sozdaniju-stranicy-registracii-v-multisajte/
March 4, 2015 at 5:33 am #159224In reply to: Changing breadcrumbs from "topics" to "forums"
mattvr
ParticipantMarch 3, 2015 at 10:18 pm #159217Topic: Image captions not displaying in forum posts
in forum TroubleshootingPewit
ParticipantIf I add an image with a caption using the tinyMCE editor it generates the code below which is displayed properly in the WP editor and if I preview the post from outside the forum.
[caption id="attachment_683" align="alignnone" width="300"]<a href="/wp-content/uploads/2014/08/IMG_0089.jpg"><img class="size-medium wp-image-683" src="/wp-content/uploads/2014/08/IMG_0089-300x225.jpg" alt="An image description" width="300" height="225" /></a>My image caption[/caption]However, once the post is added to the forum, I get the image but the caption codes are ignored.
[caption id="attachment_683" align="alignnone" width="300"] <my image here> My image caption[/caption]I have tried switching Themes to Twenty Fiifteen and Twenty Thirteen but the problem persists.
My site here
WP Version 4.1.1
BB Press Version 2.5.4March 3, 2015 at 10:07 pm #159215In reply to: Changing breadcrumbs from "topics" to "forums"
Robkk
Moderatorcommon issue with yoast breadcrumbs.
/** * Filter to call default bbPress breadcrumbs */ add_filter( 'bbp_get_breadcrumb', 'myfix_bbp_get_breadcrumb', 1, 3 ); function myfix_bbp_get_breadcrumb($trail, $crumbs, $r){ // This will remove wordpress-seo filter to disable bbPress breadcrums by default remove_all_filters("bbp_get_breadcrumb",10); return $trail; }use this to enable bbPress breadcrumbs
March 3, 2015 at 7:44 pm #159213In reply to: BBPress | Consant Contact Plugin issue
Robin W
Moderatoryes you’ll need to enable debugging and have a play to see where the error is
see
March 3, 2015 at 4:55 pm #159207In reply to: widget side
March 3, 2015 at 4:24 pm #159204In reply to: Changing breadcrumbs from "topics" to "forums"
-
AuthorSearch Results
