Forum Replies Created
-
I worked it out eventually:
`global $bp;
echo $bp->current_action;`I think my answer lies in `$bp->action_variables` but how do I pull the value from this array?
In reply to: Mark up validation errors in BP Default theme@hnla – I second all of that. Using a Transitional DTD is about as appealing to me as switching to IE6, and repeated use of the same id in the loop is plain wrong and nasty. I’ve tried to log into trac to post there with the same credentials as I use for logging in here, but it doesn’t work.
In reply to: Mark up validation errors in BP Default theme@boonebgorges not at all, thanks for response boone. I will.
I’ve just realised, through flushing cookies to check again, that these errors are thrown only for logged in users, and in a logged out state, several previous errors no longer get flagged (which is often the way when one thing is predominant in tripping up the validator). When I’m logged out, the output is entirely clean for Tranisitonal, and certainly tweakable for Strict.
In reply to: Mark up validation errors in BP Default themeI’ve just tested on a brand new install of WP3.1 and BP1.2.8 of the box.
In Transitional, the activity stream generates 3 validation errors for every update:
`required attribute “rows” not specified`
`required attribute “cols” not specified`
`id=”_wpnonce_new_activity_comment” already defined`this is out of the box without any mods of any sort. the lack of attributes I can fix. Also, if I run in transitional then unwrapped input fields won’t get flagged, and although I’ve always worked in strict that’s fine. But what I have no way of getting around is the mass of :
`id=”_wpnonce_new_activity_comment”`
global.js (line 330) contains :
`’_wpnonce_new_activity_comment’: jq(“input#_wpnonce_new_activity_comment”).val(),`
I’m not that great with js, but I’m wondering if the use of an id relationship could be swapped for a class relationship? If it’s just for targetting, then surely there’s no need to use an id in place of a class.
In reply to: BuddyPress-Links 0.4.x Releases and SupportVideo playback appears to have broken in WP 3.1
In reply to: [Resolved] How to remove ’Active xyz hours ago’ ?Thanks, just what I was looking for!
Could you repost the link in 2. please? (it’s missing its href).
In reply to: How to hide some profile fields from publicHmm, that’s strange. It’s working for me exactly as advertised.
What’s the history of your theme? Is it default, child, custom etc?Maybe cookies…
In the Admin, set “let user decide” for some fields.
Log out.
Clear your cookies, make sure to delete all cookies from the domain, and from any test domains, and any local domains (eg. mamp wamp etc. if you’re using that) that you’re developing the site on.
Log in as a subscriber level user.
What result now?In reply to: [Resolved] How to remove ’Active xyz hours ago’ ?Thanks, but I want to prevent “last active” data being echo’d into the template for the sake of user privacy. I was just wondering if anyone had their fingers on a function to do it. No biggie, it’s about time in my project development that I bit the bullet and get stuck into the codex…
In reply to: How to hide some profile fields from public“If I activate it and set a field (e.g. birthdate) to “users only” – nothing happens. There are also no settings for the users in the frontend of buddypress.”
If you set it to “users only” in Admin, you’re not giving your user the choice, and that’s why there is no selector in the front end. The user will only get the selector if you choose “let user decide”.
In reply to: How to hide some profile fields from public@philippmuenchen – it works fine. I’m guessing you’re trying to test it while you’re logged in as Admin? The privacy controls don’t apply to Admin. Admin can see everything. Log in as a regular user and then test.
Age calculation: http://code.hyperspatial.com/all-code/buddypress-code/buddypress-age/
@noizeburger – it works for all fieldgroups, not just Base.
In reply to: Find friends option?This is brilliant news, it’s a much needed functionality.
If email could import address book from provider (eg. gmail, hotmail contacts etc.) and the user’s local address book (Mac / PC) that would be an absolute winner!
Really looking forward to whatever you come up with.Solved my issue. It turned out to be related to directory permissions, and pilot error in not noticing my user avatar directory chmod changed to 755 when overwritten from a local > remote upload. Avatar directories have to be write-enabled for avatars to display… Hope this helps someone.
In reply to: Custom avatar path issue?Doh. It was a permissions issue. Somehow the user avatar directory and its subs had acquired 755 (pilot error, obviously)
Anyway, the point is, if BP custom avatar directories aren’t set to write-enable, the avatars won’t display. Who would know.
Scrap that. The fix is only superficial. It fixed user avatars, but destroyed every other type.
I’ve been having vanishing avatar issues over the past couple of days, and a little research points to a possibility that in some instances BP is generating bad avatar paths, not relative to the root of the site. I found this, it provided a fix, and might help some of you: http://theandystratton.com/2010/buddypress-avatars-not-displaying-with-wordpress-3-0/
In reply to: Some basic BuddyPress questions…Hi, I should preface this by saying that I’m not a BuddyPress developer as such, but have been coding WordPress themes professionally for a couple of years, and have been researching BP and putting together a BP-based startup for the past couple of months, so have been through these questions myself, and my own early steps may prove useful.
1. See https://wordpress.org/extend/plugins/bp-profile-privacy/
2. https://wordpress.org/extend/plugins/buddypress-private-community/ might be interesting. There’s another, more granular, privacy plugin that the community has its fingers crossed for, for further details see http://bp-privacy.com/
3. All of that should, and does, happen as a matter of course.
4. Semantics aside, they are all “subscribers” as far as WP is concerned, ie. members and commenters are one and the same.
5. BuddyPress themes contain extra template files for the parts of BP that are an extension on the WP template system (eg. activity, groups, user profile etc.) plus various css and javascript files. Running a regular WP theme with BP running won’t give you the framework to display that BP functionality. In order to achieve that, your WP theme needs the extra template files. You have two options, each with benefits and drawbacks:
a) Extend your existing theme with the required template files, javascript and css to enable and display the BuddyPress sections and functionalities. See https://wordpress.org/extend/plugins/bp-template-pack/ The drawback is that next time BuddyPress is updated, you might be faced with quite a fair amount of development getting your site aligned with the latest code base, new features etc.
b) Constructing a child theme. This relies on running the Default theme, and then adding your own css overrides and theme hacks as a non-destructive layer on top. The principle is that you can strip away your own additions, and you’ve still got the Default theme running beneath it, so in a sense it’s “unbreakable” and whilst you may need to modify your additions once BP is next updated, the underlying template will always function. With a decent caching strategy, unless you’ve expert level php behind you, I think it’s the way to go.
In reply to: How to change global Group forums slug?Brilliant, thanks.
@victor_moura – glad to help.
define(‘DB_NAME’, ‘whatevernameigivethedatabase’);
define(‘DB_USER’, ‘root’);
define(‘DB_PASSWORD’, ‘root’);
define(‘DB_HOST’, ‘localhost’);root/root is the default username / password combo for MAMP. Obviously you should never have it set like this on a live public server because it’s instantly hackable, but on your local MAMP (assuming you haven’t got it set up to actually serve a Live site for a client to see online) it’s fine.
(When setting up a brand new site from scratch, you can also change your database table prefix (the setting is found in wp-config.php) for extra security. Google this to learn why it’s a good idea.)
b) I use MAMP Pro which comes with phpMyAdmin built in. phpMyAdmin can be launched from MAMP Pro’s interface. When I’m setting up a site I create a folder in my browser bookmarks for local, and one for remote. Aside from the site URLs, I bookmark the phpMyAdmin interface for both local and remote, so I can get to either database in a single click. Obviously, with the remote database it will ask you to log in during the loading, since to bookmark it initially, you’ll need to access it from your website’s cpanel (or wherever you launch phpMyAdmin from at your web host) and to do that you’ll need to be logged in to your host.
So, go into phpMyAdmin, click “localhost” (top left of main content area) to check you’re on the “home” page, and you’ll see an input field (“Create new database”). Name your db, and click Create (that’s all, no need to touch anything). This will create an empty database (a “shell” if you like) ready to be filled. I find it helpful to name the remote and local dbs differently (otherwise it’s too easy to get confused / messed up) .
3. Then click “Import”, find your backup and load it. At this stage, absolute URLs in your site will be wrong (they’re pointing to the address of your remote web server, not at your local MAMP server). To correct this in one easy find and replace (whilst protecting the structural integrity of your database tables – very important!) use http://spectacu.la/search-and-replace-for-wordpress-databases/ (it’s a very powerful tool, treat with caution).
Once you’ve got the hang of it, it’s quick. From starting a remote backup to running that db as a local mirror takes me about 30 seconds.
i. when I’m loading in a remote db, I always delete the local one (to do this go to “localhost” in phpMyAdmin, click the name of your db in the left hand column and when it’s loaded click “Drop” – it means “Delete” – it’s top right, in red), make a new local one, and load the remote db into this fresh “shell” – just to make sure everything is exact. You can delete the local db from within phpMyAdmin. Incidentally, this usually isn’t the case on a remote database (usually, to delete the remote db if you need to, you have to go into cpanel and select “Database Tool” or something similar).
ii. When saving the remote db, I select these options (you should Google this stuff) :
Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT
Add IF NOT EXISTS
Complete inserts
Extended insertsSelect “save as file” and “gzipped”. Don’t mess around with the dump, or unzip it.
All of this works for me, with my particular setup. I can’t stress enough how important it is to do thorough testing, to be certain that the backups you make actually work.
There are several standalone tools out there for more comprehensive db management, but phpMyAdmin works great for me at this point, and it’s so convenient having it all in the browser. What makes MAMP Pro so good is being able to set up multiple virtual servers – sometimes I’ll run several local mirrors of the same site so that I can try out different things and easily compare the results.
In reply to: Activity stream ”Load More” looping contentSolved it. It’s down to a browser cookie called bp-activity-oldestpage. Flush that, and all is well with the world.
I’m not an experienced enough developer to know if this cookie has gotten set on me due to the work I’m doing on the site as an admin, or if this could happen to any random visitor. Can anyone advise? If that were the case, should this be reported as a bug?
In reply to: Activity stream ”Load More” looping contentBoone, yes that is the test I’ve done. All plugins and widgets off (except BP obviously) and bp-default (untouched).
If a plugin conflict has caused this, is it possible that the behaviour remains with the plugin disabled (ie. an altered option in database)?
I work with local mirrors on MAMP Pro. This is what I do :
1. Copy the remote files (the whole install) to my local machine (I do this so the file creation dates are the same).
2. Backup the remote database with phpMyAdmin (be sure to select Add DROP TABLE) as a gzip file.
3. Edit the local copy of wp-config.php for my local machine’s database connection.
4. Create a new local database and import the remote backup (I personally always destroy the local db and create a new empty one to import into – then I know it’s clean).
5. Use this tool to change all absolute URLs from remote to local: http://spectacu.la/search-and-replace-for-wordpress-databases/Then I’ll test new plugins locally before deploying. Also I update plugins locally, and then manually copy them to the server, having had a few past failures updating plugins on production servers. Once it’s running, the only files I normally have to backup from remote to local are all in wp-content (avatars etc., which can easily be sync’d).
Hope that helps.
I experienced the same issue on my local dev server, but once I enabled the plugin online it works fine.
I suspect the issue is down to which php modules are(n’t) enabled in my MAMP install, but are enabled on my host.In reply to: Conditional Profile FieldsI’d love to know if anyone’s made any progress in this area?