Search Results for 'code'
-
AuthorSearch Results
-
November 27, 2013 at 6:15 pm #139557
In reply to: Stylesheet Issues
Stephen Edgar
KeymasterIt looks like you have patched the file correctly.
Can you view the source and get the stylesheet path and paste it here:
eg.
A ‘failed’ example
<link rel="stylesheet" id="bbp-default-css" href="http://localhost/wordpress37/wp-content/C:devhtdocswordpress37wp-contentpluginsbbpress/templates/default/css/bbpress.css?ver=2.5-5199" type="text/css" media="screen">A ‘working’ example:
<link rel='stylesheet' id='bbp-default-css' href='http://127.0.0.1/wp-content/plugins/bbpress/templates/default/css/bbpress.css?ver=2.5-5199' type='text/css' media='screen' />November 27, 2013 at 6:09 pm #139556In reply to: Subscribe to forum link
Cars10
ParticipantFunny, exactly what I ended up doing. Okay, I afterwards garnished the visibility a bit more:
#subscription-toggle a { font-weight: bold; padding: 0 2px 0 2px; border: 1px solid navy; background-color: white; }Two mind, good idea – thanks for replying 😉
November 27, 2013 at 5:53 pm #139553In reply to: Stylesheet Issues
Stephen Edgar
Keymaster@focallocal Thanks, looking at your code now.
What software package and version are you using? eg. XAMPP 1.8.3
November 27, 2013 at 5:47 pm #139551In reply to: Stylesheet Issues
focallocal
Participantfunction bbp_enqueue_style( $handle = '', $file = '', $dependencies = array(), $version = false, $media = 'all' ) { // No file found yet $located = false; // Trim off any slashes from the template name $file = ltrim( $file, '/' ); // Make sure there is always a version if ( empty( $version ) ) { $version = bbp_get_version(); } // Loop through template stack foreach ( (array) bbp_get_template_stack() as $template_location ) { // Continue if $template_location is empty if ( empty( $template_location ) ) { continue; } // Check child theme first if ( file_exists( trailingslashit( $template_location ) . $file ) ) { $located = trailingslashit( $template_location ) . $file; break; } } // Enqueue if located if ( !empty( $located ) ) { $content_dir = constant( 'WP_CONTENT_DIR' ); // IIS (Windows) here // Replace back slashes with forward slash if ( strpos( $located, '\\' ) !== false ) { $located = str_replace( '\\', '/', $located ); $content_dir = str_replace( '\\', '/', $content_dir ); } // Make path to file relative to site URL $located = str_replace( $content_dir, WP_CONTENT_URL, $located ); // Enqueue the style wp_enqueue_style( $handle, $located, $dependencies, $version, $media ); } return $located; } /** * Enqueue a script from the highest priority location in the template stack. * * Registers the style if file provided (does NOT overwrite) and enqueues. * * @since bbPress (r5180) * * @param string $handle Name of the script. * @param string|bool $file Relative path to the script. Example: '/js/myscript.js'. * @param array $deps An array of registered handles this script depends on. Default empty array. * @param string|bool $ver Optional. String specifying the script version number, if it has one. This parameter * is used to ensure that the correct version is sent to the client regardless of caching, * and so should be included if a version number is available and makes sense for the script. * @param bool $in_footer Optional. Whether to enqueue the script before </head> or before </body>. * Default 'false'. Accepts 'false' or 'true'. * * @return string The script filename if one is located. */ function bbp_enqueue_script( $handle = '', $file = '', $dependencies = array(), $version = false, $in_footer = 'all' ) { // No file found yet $located = false; // Trim off any slashes from the template name $file = ltrim( $file, '/' ); // Make sure there is always a version if ( empty( $version ) ) { $version = bbp_get_version(); } // Loop through template stack foreach ( (array) bbp_get_template_stack() as $template_location ) { // Continue if $template_location is empty if ( empty( $template_location ) ) { continue; } // Check child theme first if ( file_exists( trailingslashit( $template_location ) . $file ) ) { $located = trailingslashit( $template_location ) . $file; break; } } // Enqueue if located if ( !empty( $located ) ) { $content_dir = constant( 'WP_CONTENT_DIR' ); // IIS (Windows) here // Replace back slashes with forward slash if ( strpos( $located, '\\' ) !== false ) { $located = str_replace( '\\', '/', $located ); $content_dir = str_replace( '\\', '/', $content_dir ); } // Make path to file relative to site URL $located = str_replace( $content_dir, WP_CONTENT_URL, $located ); // Enqueue the style wp_enqueue_script( $handle, $located, $dependencies, $version, $in_footer ); } return $located; } /** * This is really cool. This functionNovember 27, 2013 at 2:48 pm #139542In reply to: bbPress 2.5 is out!
focallocal
Participanti added the 2481.01.2.patch but bbpress still breaks my site when active (it was fine before the update)
and here’s screenshots of what’s happening on my site: http://imgur.com/a/4SNAC
sorry, i have learned from this to wait a few weeks before updating – but if anyone could help me to see what what i’ve done wrong here that’d be a huge help.
EDIT: As your issue is fixed I removed the huge code chunk you posted. Netweb 3rd Dec
November 27, 2013 at 1:56 pm #139539In reply to: SMF Import to bbPress
Nizam
ParticipantErm.. it should be custom BB Code. 😀
Yeah.. sometime, in custom BB code, we do use a ; ‘ : | } ] [ * , or any other character . As myself had little bit PHP knowledge, (always do wp theme code myself and for clients), those character might broke some code if there’s no escape clause like \ (backslash) before some character ie: :\’\ etc …. As your note = shouldn’t but could be.
I’ve tried Rows Limit to 50 and 20 .. but not yet to 1. I’ll try that later.
I want to try it on localhost / my own pc. But when I think about my 500mb forum database file .. yeah.. you know.. I feeling down.. lol.
November 27, 2013 at 1:45 pm #139537In reply to: bbPress 2.5 is out!
focallocal
Participantthanks for the style sheet fix. any idea how long before its officially fixed in bbpress so i can decide whether to have a go at it myself or to wait?
i’m a little nervous about messing around with code as updates seem to break the things i change.. ironically in this case.
November 27, 2013 at 1:12 pm #139534In reply to: Change font type in forum-index
Robin W
ModeratorYou might need to play a bit, and come back if this either works or doesn’t, I’ve only had a quick look, and suspect there’s a much better way…but
You main theme uses ‘Helvetica Neue’,sans-serif and the forum is using Arial
I’m still on 2.4.1 so can’t tell you which lines you need in version 2.5
So in the bbpress.css file you’ve correctly copied to theme’s folder, do a search for “font-size” and where you find it, add a line
font: ‘Helvetica Neue’,sans-serif;
That will take it in common with the main theme’s font.
for instance
#bbpress-forums div.bbp-forum-title h3, #bbpress-forums div.bbp-topic-title h3, #bbpress-forums div.bbp-reply-title h3 { background: none; border: none; font-size: 16px; line-height: 1em; margin: 8px 0; padding: 0; text-transform: none;you’d alter it to say
#bbpress-forums div.bbp-forum-title h3, #bbpress-forums div.bbp-topic-title h3, #bbpress-forums div.bbp-reply-title h3 { background: none; border: none; font-size: 16px; font: 'Helvetica Neue',sans-serif; line-height: 1em; margin: 8px 0; padding: 0; text-transform: none;November 27, 2013 at 12:39 pm #139532In reply to: Stylesheet Issues
Tadas Krivickas
ParticipantHi,
This is definitely a bug in bbp 2.5 on Windows. 2.4.1 does not have this issue. You can reproduce it by reverting to 2.4.1 (works again) -> update to 2.5 (doesn’t work again).
<link rel="stylesheet" id="bbp-default-css" href="http://localhost/wordpress37/wp-content/C:devhtdocswordpress37wp-contentpluginsbbpress/templates/default/css/bbpress.css?ver=2.5-5199" type="text/css" media="screen">Windows 7 x64, httpd+php+mysqld, latest stable WP, BP, BBP
November 27, 2013 at 8:59 am #139520In reply to: Menu link to Profile
Robin W
ModeratorDiggories,
Some great tips there.
mm, the upgrade will have overwritten the change – as per first post
Of course you’ll need to make a note of this change, as it is lost whenever you upgrade bbpress versionsI haven’t upgraded yet, let me know if putting it back fixes it !
November 27, 2013 at 5:38 am #139514In reply to: Menu link to Profile
Sloppy Buns
Participantoh if you want it to go directly to the edit profile section just add
/editat the end like this<a href="http://yoursite.com/forums/users/[hana-code-insert name='BB Profile' /]/edit">My Profile</a>November 27, 2013 at 5:31 am #139513In reply to: Menu link to Profile
Sloppy Buns
ParticipantI don’t know if this will help or not however I have found a simple way to do a text link in a page or post.
I use the below PHP to call the current user
<?php global $current_user; get_currentuserinfo(); echo $current_user->user_login . ""; ?>And then surround it with a standard html link.
<a href="http://yoursite.com/forums/users/<?php global $current_user; get_currentuserinfo(); echo $current_user->user_login . ""; ?>">My Profile</a>I use a plugin called Hana Code Insert to place it in posts and pages using the following steps:
1.) Take the php code
<?php global $current_user; get_currentuserinfo(); echo $current_user->user_login . ""; ?>and place it in the “New Entry” box in the Hana Code Insert plugin and give it a name like “BB Profile” or what ever you want.
2.) Tick the “Evaluate as php code.” check box at the bottom of the “New Entry” field.
3.) Click “Create New Entry” and this will produce a shortcode something like this
[hana-code-insert name='BB Profile' /]4.) Then on the page or post you want to place the link just place the following
<a href="http://yoursite.com/forums/users/[hana-code-insert name='BB Profile' /]">My Profile</a>That’s it, hope it helps and I.m sure someone here can figure a way to use this in a menu link, I am still trying to figure that out.
November 27, 2013 at 5:25 am #139512In reply to: SMF Import to bbPress
Stephen Edgar
KeymasterSomehow, I just notice or suspecting that.. it might be related to either :
1 – post with custom BBtag.
2 – post/topic that has Poll option.What is the custom ‘BBtAg’ is it ‘BBtag’, I can try to replicate this as we do use a 3rd party library to convert some BBCode and it could be a conflict there (shouldn’t be but could be)
I will also setup a ‘poll’ to try the import with.
Another thing I haven’t tried yet though this just came to me as an idea, when the conversion stops change the value of
Rows Limitfrom100to1and click start again, causing it to go one row at a time.This way when it stops and won’t go any further you should be able to look at
_bbp_converter_startin thewp_optionsdatabase and add a1to that number. This in affect will make the converter start again on the next row rather than the row it is failing on.Once it gets past the problematic topic, you could click
stopagain, change it back to100and start again so the remainging 200k posts are not imported one by one.November 27, 2013 at 4:37 am #139508In reply to: Display topics younger than X
Stephen Edgar
KeymasterTake a look at the Data Parameters of
WP_Queryhttps://codex.wordpress.org/Class_Reference/WP_Query#Date_ParametersYou can also create custom views in bbPress eg.
function ntwb_register_custom_views() { bbp_register_view( 'popular-topics', __( 'Popular Topics' ), array( 'meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value_num' ), false ); bbp_register_view( 'unpopular-topics', __( 'Unpopular Topics' ), array( 'meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value_num', 'order' => 'asc' ), false ); bbp_register_view( 'random-topic', __( 'Random Topic' ), array( 'orderby' => 'rand' ), false ); bbp_register_view( 'closed', __( 'Recently Closed' ), array( 'post_status' => 'closed' ), false ); } add_action( 'bbp_register_views', 'ntwbc_register_custom_views' );November 27, 2013 at 4:32 am #139507In reply to: No Forum subscriptions (update to 2.5)
FreeWPress
Participantyes topic subscriptions are ok.. it work fine..
I don’t have
bbpress.phpin my child theme folder…November 27, 2013 at 4:30 am #139506In reply to: No Forum subscriptions (update to 2.5)
Stephen Edgar
KeymasterEdit: Just read your reply on Trac
Also check if you have a
bbpress.phpfile in your child theme folder.November 27, 2013 at 4:17 am #139502In reply to: No Forum subscriptions (update to 2.5)
FreeWPress
ParticipantI don’t have any custom
bbpress-functions.phpin my theme and i have copy entireuser-subscriptions.phpin my child theme. And it not work… I see only: You are not currently subscribed to any forums.But i have subscribed three forums…
November 27, 2013 at 4:05 am #139497In reply to: Can't find these plugins
Stephen Edgar
KeymasterI am pretty sure you are looking for the widgets https://codex.bbpress.org/widgets/
November 27, 2013 at 3:57 am #139495In reply to: No Forum subscriptions (update to 2.5)
Stephen Edgar
Keymasterhttps://bbpress.trac.wordpress.org/ticket/2480 has been updated with some more info.
Also if you have a custom
bbpress-functions.phpin your theme that also needs to be updated.November 27, 2013 at 12:12 am #139492Topic: Stylesheet Issues
in forum TroubleshootingBright Thought, LLC
ParticipantAfter I updated bbpress to version 2.5 the stylesheet for the default theme is not being linked correctly.
<link rel=’stylesheet’ id=’bbp-default-css’ href=’http://localhost/wordpress/almostaveragegamers/wp-content/C:xampphtdocswordpresswp-contentpluginsbbpress/templates/default/css/bbpress.css?ver=2.5-5199′ type=’text/css’ media=’screen’ />
This is the way that the link is showing up when I look at the source code for the site which I am designing on a local host server. When I click on the link to see what is displayed this is what it is showing me below.
November 26, 2013 at 2:55 pm #139480Topic: Display topics younger than X
in forum TroubleshootingCory
ParticipantI’m trying to create a version of the Popular Topics widget that will only display posts that are less than a certain age.
I’ve been able to query popular posts with this:
$query = new WP_Query( array( 'posts_per_page' => 5, 'post_type' => 'topic', 'meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value', 'order' => 'DESC' );But I would like to weed out any posts that are, let’s say, older than 1 week.
Is it possible to do this?
Can I somehow use an additional meta query and access each topic’s freshness?November 26, 2013 at 1:04 pm #139478In reply to: BBPress Grey text
FreeWPress
ParticipantHi, is correct because you have closed topic and bbpress use ccc colors text for closed topics..
If you want to change it, open bbpress css at line 66 and find:
#bbpress-forums .status-closed, #bbpress-forums .status-closed a { color: #CCCCCC; }change in #000000 or other colors…
November 26, 2013 at 11:38 am #139476In reply to: No Forum subscriptions (update to 2.5)
FreeWPress
ParticipantLink must be placed in content-single-forum.php and it show link.. But when i click on subscrive link it works, but if you go in subscrived section in your profile it show: You are not currently subscribed to any forums.
I have been updated user-subscriptions.php file with new code..is bad!! :/
November 26, 2013 at 7:42 am #139469In reply to: Menu link to Profile
mmichael1991
ParticipantHi, I used the first solution.
But after when I looked at the code of my site, I noticed something strange.
It shows the text behind the logout button.
Pic (link to dropbox): https://dl.dropboxusercontent.com/u/17971771/site.pngSo has this something to do with my theme? Or can I simply fix this within bbPress?
Thanks for your help!
November 26, 2013 at 5:52 am #139463In reply to: No Forum subscriptions (update to 2.5)
FreeWPress
ParticipantIf you use a children template you must to add manually new link…
<?php bbp_forum_subscription_link(); ?> -
AuthorSearch Results