Search Results for 'theme'
-
AuthorSearch Results
-
August 30, 2010 at 11:48 am #90951
In reply to: Forums Page not Working Properly
rich! @ etiviti
Participant@per4mance – group forum extras only tested with bp-default theme, possible the theme you’re using does not include a proper filter where the css class needs to be injected.
sorry @hnla to go OT more
August 30, 2010 at 11:10 am #90950master-po
Memberhnia, hi, and thank you for your patience…
ehm… there is a little difference in the 2 files I have posted, in the second I wrote my-bp-language… (but I see the order was wrong) because I thought about create a folder “my-bp-language” in the plugin directory…
I would do like you have said:
“stick em in a new folder kept in /plugins/”so if I have (ops!) understood, is:
`define( ‘BPLANG’, ‘mysite’ );
if ( file_exists( WP_PLUGIN_DIR . ‘/buddypress-‘ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, WP_PLUGIN_DIR . ‘/my-language-files/buddypress-‘ . BPLANG . ‘.mo’ );
}`and I put a folder “my-language-files” IN the plugin folder… is it right?
reassure me, please…
sorry hnia I’m totally newbie, I promise you I go on amazon to search the dummy’s book!!!
(but the english too is not my cup of tea… sigh!)ciao! you are kind!
August 30, 2010 at 10:35 am #90941In reply to: aggregate activity stream from public groups
lorenzo
MemberRoger, thanks. i did look at this very document, but when i went to figure out where to define the additional filter i got a bit lost…
is there any document which is explaining in a bit more details which activities are included in the loop and which are not in the default theme and help to understand things?
as far as i can understand there are three files involved: the entry.php, the activity-loop.php and the bp-activity-templatetags.php, but, like in other places it is advised not to change the default theme, i’m trying to figure out 1) where to make changes and 2) how to achieve it without breaking anything. that’s why a couple of examples beyond what is in the codex would be particularly useful.August 30, 2010 at 10:32 am #90940In reply to: How to allow ONLY image posts?
Roger Coathup
Participant@adelack – two thoughts:
1. You can probably do this with the new WordPress custom post types. Build a theme that only gives your users an image upload post type
or:
2. Modify the activity status update to support image uploads, and use that instead of blogs for your users
August 30, 2010 at 10:22 am #90938In reply to: Nested Comments are not indenting
Hugo Ashmore
ParticipantFolks apropos of threaded comments/nesting there was an issue with nested comments and posts in the bp-default theme, nested/threaded comments can’t work correctly. This has been fixed and is included in 1.2.6 so hang on a short while for that release due any day now.
August 30, 2010 at 9:41 am #90933In reply to: Forums Page not Working Properly
Hugo Ashmore
ParticipantPlease folks, I stated ‘thread deemed closed’ for a reason. Just because a thread title is rather too generic doesn’t mean it’s ok to add in any ‘forum’ related issue, it simply gets too long winded and confusing. Proper action is for a new post to be created for your issue, it will tend to get more attention and be easier to follow and respond to for members.
@autoretailing you will need to re post your question and provide relevant info such as versions being used, whether using a custom theme.
If using a custom theme then switch back to the bp-default theme and disable all but absolutely necessary plugins and see if the issue still occurs if it doesn’t then you know the problem lies with the theme or a plugin – re-enable plugins one by one checking each time to see if the issue crops up, finally re-enable custom theme, this will help to isolate the issue.August 30, 2010 at 9:23 am #90930Hugo Ashmore
ParticipantYou have copied the same example twice and that’s the stock default directory for bp language files.
You want the second example below that one:
`define( ‘BPLANG’, ‘mysite’ );
if ( file_exists( WP_PLUGIN_DIR . ‘/buddypress-‘ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, WP_PLUGIN_DIR . ‘/buddypress-‘ . BPLANG . ‘.mo’ );
}`
if you want the files in their own directory then do:/my-language-files/buddypress-‘ . BPLANG . ‘.mo’
August 30, 2010 at 8:59 am #90921master-po
Memberthank you hnia, you are right, I have read more carefully the page… so I do create a bp-custom.php file ! argh!
something like this?
`<?php
//CUSTOM CODE FOR BUDDYPRESS
//PUT YOUR CODE HERE
define( ‘BPLANG’, ‘mysite’ );
if ( file_exists( BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ );
}?>`
like the example in the page, or do I do write my directory, like this for ex.:
`<?php
//CUSTOM CODE FOR BUDDYPRESS
//PUT YOUR CODE HERE
define( ‘BPLANG’, ‘mysite’ );
if ( file_exists( BP_PLUGIN_DIR . ‘/bp-languages/my-bp-language-‘ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, BP_PLUGIN_DIR . ‘/bp-languages/my-bp-language-‘ . BPLANG . ‘.mo’ );
}?>`
I’m sorry hnia, but I don’t understand very well…
can you please tell me a little more?thank you!
August 30, 2010 at 8:44 am #90919Roger Coathup
Participant@pjnu – unfortunately those “time since” messages are embedded quite deep in the core template tags used by the default theme, and are not the most obvious to remove / change.
It can be done however.
The time since text is inserted by a routine called bp_insert_activity_meta() that’s called from the tags the default template uses: bp_activity_action() and bp_activity_content_body().
There’s no easy way to filter those tags to alter the time presentation [EDIT: perhaps there is – see other comments], so the easiest route is to modify your theme taking out the calls to bp_activity_action() and bp_activity_content_body(), and replacing them with calls to get the parts of the message individually:
e.g. you can call bp_get_activity_date_recorded() to get the date as a datetime stamp which you can then format with the PHP date() function to display as you want it.
These template tags are all declared in bp-activity-templatetags.php
There’s no straight template tag to get the activity_action without the activity_meta (and timestamp) being added – so, we write our own function for that in bp-custom.php and call it from our theme:
function my_activity_action() { global $activities_template; return ($activities_template->activity->action); }
You could do something similar for activity_content_body as well.
Here’s a snippet of what a modified activity/entry.php looks like in one of our themes:
<div class="activity-header"> <p class="metadata"> <?php if (has_delete_permissions()) { echo bp_get_activity_delete_link(); } ?> </div>
I hope that makes sense!
August 30, 2010 at 6:23 am #90910In reply to: BuddyPress Share It button live
nit3watch
Participant@mercime Is this not something to do with wp 3’s menu’s. A while back I installed a theme and the menu’s listed vertically, when they were meant to be horizontal.. Google’d it and found that you had to add the ‘pages’ in a menu in the admin’s menu settings.. Was a while ago so don’t quite remember though maybe this is causing some conflict?
Edit: bleh, just read modemloopers ‘edit’. Soz bout that.
August 30, 2010 at 3:19 am #90894In reply to: Show: By Latest Post | By Group
LPH2005
ParticipantDone. Fixed the css and child theme so that the tutoring area looks acceptable.
http://www.thechembook.com/tutoring/
Here is the code in case someone else is interested. This is the [child-theme]/forums/index.php file
Hope this helps.
August 30, 2010 at 1:26 am #90889@mercime
Participantsee files messages-loop.php and notices-loop.php
https://trac.buddypress.org/browser/tags/1.2.5.2/bp-themes/bp-default/members/single/messagesAugust 29, 2010 at 8:23 pm #90861In reply to: Show: By Latest Post | By Group
LPH2005
ParticipantI’m back: fed and rested.
Thank you Boone for helping. I’m only looking for topics shown as sorted by group … So, let me repeat some of this back and see if my understanding was your intent.
First, [theme]/forums/index.php is the file to edit.
Second, if I only want topics sorted within groups then I can create a bp_has_groups() that includes the while statements you suggest.
Third, thank you (again!) for the short version. I’ll see what I can do to try to figure this out.
In the meantime, if someone already has code to share then please feel free to post.
August 29, 2010 at 7:21 pm #90852In reply to: Changing order of pages?
@mercime
ParticipantFirst, build a BuddyPress Child Theme
Then copy header.php from bp-default theme. Lines 45 – 79 show the main navigation links of BP components which you can reorder, and below that are the wp_list_pages and bp_nav_items for BP plugins to hook into.
August 29, 2010 at 6:53 pm #90850In reply to: Show: By Latest Post | By Group
Boone Gorges
KeymasterHere’s the short version.
In [theme]/forums/index.php, do a conditional check for $bp->current_action == ‘grouped’. (Depending on the URL structure of your site, you might have to use $bp->action_variables[0].) In other words, the ‘grouped’ code should only be displayed if ( $bp->current_action == ‘grouped’ ).
Then do a bp_has_groups loop for all the groups you want to appear. If that’s all your groups, you can just do bp_has_groups(). If you only want to do a certain number of groups, like on this site, do bp_has_groups( ‘include=4,5,6’ ) where 4, 5, 6 are groups that you want to include in the ‘grouped’ view.
Then, inside the `while ( bp_groups() ) : bp_the_group()` loop, do a normal forums loop. Something like
`if ( bp_has_forum_topics( ‘forum_id=’ . groups_get_groupmeta( bp_get_group_id(), ‘forum_id’ ) ) )`
plus whatever arguments for max number, etc you want.August 29, 2010 at 6:46 pm #90849Paul Wong-Gibbs
KeymasterA link like that won’t break the site. It must be something else. Is this something new since you’ve installed a plugin (other than BuddyPress) or changed theme? Most likely, I’d guess it’s an PHP memory error.
https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
August 29, 2010 at 6:09 pm #90846In reply to: bp-blog theme as default
dainismichel
Participantdid ya get those last two issues fixed…
wow, looks like buddypress has come a long way since i asked this however long ago…glad to see the phenomenal progress!August 29, 2010 at 5:37 pm #90841Roger Coathup
ParticipantWe came up with a solution to include the featured image (post_thumbnail) in the activity stream. The solution avoids the need to use switch_to_blog
It isn’t simple, but it might help:
We removed the action bp_blogs_record_post and replaced it with our own version that populates the content field with the post_thumbnail (you could also add the excerpt), i.e. `$activity_content = get_the_post_thumbnail( $post_id );`
Unfortunately, bp_blogs_record_activity then takes the image and mangles it. To get around this we had to implement our own version of bp_blogs_record_activity, and call that instead from our blogs_record_post function.
You can see the whole set of code here:
Then in your activity loop, just use bp_activity_content_body() to display the thumbnail / excerpt, etc.
IMHO – bp_blogs_record_activity() needs a rework in the core to give theme designers much more control.
August 29, 2010 at 2:33 pm #90834Hugo Ashmore
ParticipantIf you re-read the page it does say that you can place the files elsewhere to avoid them being overwritten I just stick em in a new folder kept in /plugins/
Flag the account issue to John James Jacoby or @DJPaul
August 29, 2010 at 12:16 pm #90812In reply to: Problem with Title Tag in Category and Tag
@mikey3d
ParticipantIt almost did works but…
There are two conflict codes for my title (/plugins/bp-custom.php) and your remove hyphens (/themes/my theme/function.php). The problem is your codes it only remove hyphen and it does not remove the first lowercase letter of second word. Ex:
The words New York:
1.) My title of category is “Category » New-york | My blog”
2.) Your remove hyphen title of category is “My blog| Blog | Categories | New york”
Can these codes put together in bp-custom.php if it could have two words with space, capital letter and my ways of doing the titles?
Thanks for your help, Mikey3D
August 29, 2010 at 9:15 am #90800In reply to: HTML newbie – q editing /activity/index.php
Hugo Ashmore
Participant@sophiew I’ve edited your post to add backticks for code display.
I would be inclined to heed Rogers advice though, if you are inexperienced with the basics of HTML markup and PHP scripting then modifying a theme is going to prove tricky.
August 29, 2010 at 1:06 am #90772In reply to: Custom Profile Page
modemlooper
ModeratorDon’t edit the default theme create a child theme http://bit.ly/d4vh2u
August 29, 2010 at 1:05 am #90771In reply to: HTML newbie – q editing /activity/index.php
Roger Coathup
Participant@sophiew – you can use backticks around your code to make it show up in the thread.
It’s probably not a good idea to try and rework your theme if you are newbie to HTML. They can be reasonably complicated, and also require some PHP knowledge if you are making substantial mods.
Learning on the job is a decent approach, but an HTML primer first might be a good idea. If you want to get started straightaway, I’d suggest switching to the BuddyPress default theme and working from there.. A child theme from the default will be a lot less code changing for you.
August 29, 2010 at 12:43 am #90768@mercime
Participant– Backup database and server files regularly, especially before any BuddyPress or WordPress upgrade
– Set up and maintain test installation/s which mirror/s live site/s. That’s where I check out all plugins and upgrades first before installing in live site. No rush to upgrade BP or WP install unless it’s a security release. Still, better to test first.
– Check out WordPress and BuddyPress forums for red flags re upgrades, plugins, etc.August 29, 2010 at 12:10 am #90765In reply to: Custom Profile Page
@mercime
Participanthttps://trac.buddypress.org/browser/tags/1.2.5.2/bp-themes/bp-default/members/single/profile.php where you can see calls to different parts of profile page lines 13, 16, 19
Line#19 – https://trac.buddypress.org/browser/tags/1.2.5.2/bp-themes/bp-default/members/single/profile/profile-loop.phpYou can change style in either 3 ways: a) tweak css only; b) customize BP files; and c) tweak css and customize files. Tweaking CSS is the easiest way. Customizing php file is more intensive. Install Firebug add-on for Firefox to help you find hooks to change layout/colours via CSS.
-
AuthorSearch Results