Forum Replies Created
-
Did any of the proposals work for you?
The problems are still unresolved:
++ Cfr. regarding problem A. (Making xProfile fields required only for members with a certain user role):
https://wordpress.org/support/topic/making-bp-xprofile-fields-required-for-certain-user (posted today)
++ Hide theses xProfile fields for members with other user roles:
https://wordpress.org/support/topic/bb-xprofiles-acl-does-not-work (posted one week ago)
++ Cfr. regarding problem D. (Making answers unchangeable):
https://buddypress.org/support/topic/how-to-make-some-xprofile-field-to-uneditable/#post-206808 (posted two days ago).
I asked my question now as well in the BuddyPress-Sub-Forum of the German WordPress-Forum:
http://forum.wpde.org/buddypress/134280-benutzer-innen-namen-neu-verlinken-new-post.html
The folders are:
1) buddypress
2) css
3) js
The file is buddypress-functions.php.Sorry, you are right. The folders css and js are on same level as buddypress; not below. My mistake.
If (buddypress.js) path is:
/MYDOMAINNAME.com/html/wp-content/plugins/buddypress/bp-templates/bp-legacy/js
and I want to edit this in my child theme, I have to create js folder inside my child theme. The path will be:
/MYDOMAINNAME.com/html/wp-content/themes/ChildThemeName/js
But in reality the path is:
wp-content/plugins/buddypress/bp-templates/bp-legacy/BUDDYPRESS/js/buddypress.js
Therefore the path for the copy must be:
wp-content/themes/ChildThemeName/BUDDYPRESS/js/buddypress.js
typing the code in directly finally worked!
Cool.
I added the code to the bottom of the classipress child theme, saved it, refreshed my screen and nothing happened. maybe because i used cut-paste instead of typing it in.
I guess this could be not the reason, maybe it was because the browser or server cache.
1st:
we don’t want BuddyPress to be our theme
What I have described there did not make ‘BuddyPress’ my theme – and if you adapt my description to your case, it will also not make ‘BuddyPress’ your theme.
(Anyway BuddyPress is no theme, though it concists of the bp-theme-folder. But ignore this folder.)
2nd:
real theme which is ClassiPress.
That implies: Everywhere were I have written ‘reddle’ within my decription, you have to write ‘ClassiPress’; and were I have written ‘reddle-child’, you have to write ‘ClassiPress-child’.
so when you say I have to activate our child theme in the Admin panel, I’ve seen this and have tried the preview and it takes over our real theme which is ClassiPress.
Parent and child theme work the following way:
If there is a style definition for e.g.
h1
in the parent theme as well as in the child theme, then the style definition of the child theme forh1
is used.Is there only a definition in the parent theme for
h1
, then the parent theme definition is used.And the same regarding BuddyPress:
If you write nothing regarding
#buddypress div.item-list-tabs ul li.selected a
into your child theme, then the BuddyPress-definition is used; otherwise the definition, which you make in your child theme, is used.Or saying the same thing in a more abstract way: The child theme does not substitute the entire parent theme, rather it has primacy in the case of contradictory style-definitions for the same element.
this goes back to my original question, we already have a theme and are running a child-theme of that.
That’s fine. Then insert there your code:
#buddypress div.item-list-tabs ul li.selected a, #buddypress div.item-list-tabs ul li.current a { background-color: #eee; color: #555; font-weight: bold; border-radius: 0px, 0px, 4px, 4px; }
I’m still interested in a solution for this. –
The current URLs are:
The content at: http://1a-spielwiese.de/mitglieder/fan1/, http://1a-spielwiese.de/mitglieder/kampfsportlerinnenneuwied/ etc.
My objective is:
The names of my users should be not linked to the above mentioned URLs, rather:
- ‘Fan 1’ to: http://fan1.1a-spielwiese.de/
- and ‘Kampfsportlerinnen Neuwied’ to: http://kampfsportlerinnenneuwied.1a-spielwiese.de/
etc.
Cfr.: http://1a-spielwiese.de/mitglieder/?bp_profile_search&field_124=Team
and
http://1a-spielwiese.de/wp-content/uploads/2014/10/Verlinkung_d_Namen.jpg
I had a look on your registration page where you have a few countries for members to select, but when I choose one, the same dropdown menu appears.
Yes, a better solution I do not have for the moment.
the only way I can see to do it is to add, UK, then a list of counties. USA and then a list of states, and so on which would mean I would have a list a mile high of all the different countries and local areas.
Yes – if you do not trust in the old plugins, which @noizeburger recommands:
https://buddypress.org/support/topic/resolved-different-profile-types-and-different-user-roles/ –
or trust in them, but find (like me) no way, to make them working as they should.
Reminder:
still I would prefer, if the URL of the content at issue would be not
http://1a-spielwiese.de/members/balletttaenzerinnenkrzbg36/profile/,
rather:
Recte:
Section 1st:
“and a folder wp-contentent/themes/reddle-child” – and not: “themees”.
Section 4th:
@:
http://1a-spielwiese.de/wp-admin/themes.php
and
http://1a-spielwiese.de/wp-admin/network/themes.phpOf course, you have to substitute my domain by your domain.
1st:
is the child theme folder in the wp-content/themes/ folder
The child-theme folder is, were you have placed it.
The child-theme folder should be on the same level of your folder-structure as your parent-theme (“comprehensive theme”)-folder.
E.g.:
- I have a folder wp-content/themes/reddle – for my parent theme
- and a folder wp-contentent/themees/reddle-child – for my child.theme
2nd:
Theme Name: BuddyPress_GSN
Template: buddypress
I don’t know, whether it should work your way as well, but I do not refer on the BuddyPress-theme, rather on my WordPress-parent-theme – so, in my case the style.css of my child-theme beginns with:
/* Theme Name: Reddle Child Template: reddle */
3rd:
You have to connect child- and parent-theme – in my case it is (as next line of my style.css) on the one hand:
@import url("../reddle/style.css");
And on the other hand you need a functions.php within your child-theme-folder as well. In my case it starts with:
<?php
/** * Enqueue stylesheet */ function reddle_child_theme_stylesheet() { wp_enqueue_style( 'reddle-child-themestyle', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', 'reddle_child_theme_stylesheet' );
4th:
Finally you have to activate your child-theme. You do this within the admin panel of your WordPress-installation:
http://1a-spielwiese.de/wp-admin/themes.php
In the case, that you have installed WordPress MultiSite, you have to activate it on the network level as well:
http://1a-spielwiese.de/wp-admin/network/themes.php
Cfr.: https://buddypress.org/support/topic/buddypress-2-1-bp-language/page/2/#post-200308 (section 2nd).
5th:
I don’t know, whether it is state of the art – anyway it works for me:
I insert as well my changes regarding my WordPress parent-theme as well as my changes regarding BuddyPress into my
wp-content/themes/reddle-child/style.css
.Further reading:
https://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme
only the stuff that you want to change?
Yes, indeed.
I also need help with restyling my register-page…
Can anyone tell me where to start?1st:
Restyle you can it via a WordPress-Plugin like ‘Simple Custom CSS’ or the
style.css
within your child-theme-folder:https://codex.wordpress.org/Child_Themes
Helpful is as well a plugin like Firebug for Firefox.
2nd:
For reshaping the content as well you have to deal with the
wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/register.php
3rd:
Regarding further questions it would be helpful, if you would describe precisely, what you want to change:
Post a link to your blog and a jpg-file (modified screenshot), where is high-lighted, what you want to change.
A less elegant, but working solution regarding locations within states you can find on my registration page (section: ‘Profile Details – Teil III: Geographisches’):
http://1a-spielwiese.de/registrieren/
You can ask at first:
- In which state (USA or UK?) do you live?
- In which US-federal state respec. in which UK-county to you live?
- and finally you can introduce the names of the federal states of the USA with ‘US-‘ and the names of the counties of the United Kingdom with ‘UK-‘.
and then:
(You can ask this questions within the ‘base group’ of your xProfile fields – then they get displayed on your registration page automatically. Or you can make your further xProfile fields displayed on your registration page as well:
https://buddypress.org/support/topic/reshaping-the-registration-page/#post-203615 [section 2nd].)
Yes, there should be a way, but I was not able to follow the instructions / to realise that way.
The basic idea is:
- Create two (or more) new WordPress user roles, e.g.: Users-UK and Users-USA.
- Then you can assign one xProfile-field, ‘In which [federal] state do you live?’, exclusively to your users with the user role Users-USA; and another x-Profile, ‘In which county do you live?’, to your users with the user role Users-UK.
—
The instructions for that solution you find there:
https://buddypress.org/support/topic/resolved-different-profile-types-and-different-user-roles/
(The user roles there are ‘bands’ and ‘fans’).
And my report about my attempt to apply that instructions you find there:
https://buddypress.org/support/topic/different-profile-types-and-different-user-roles-part-ii/
My user roles are (sport) ‘teams’ and ‘fans’.
—
But unfortunately, I was not able to hinder, that ‘fans’ get displayed the questions (xProfile-fields) for ‘teams’ was well; and the ‘teams’ the questions for ‘fans’…
—
Further problem:
Even if there is a solution regarding later profile edits – even complicate seems to be, to make already the registration page “input senstive”, because during registration the new user isn’t yet registered (i.e.: has no user role yet).
Cfr. there:
http://forum.wpde.org/buddypress/133961-registrierungsseite-umgestalten-anleitung-und-fragen.html (section 4. – unfortunately in German).
You have to insert just that changes (i.e.: new style-definitions), which you want to make.
E.g.: I intended to change the background color of my BuddyPress-menus. Therefore I inserted into my style.css, which is placed within my child-theme-folder:
#buddypress div.item-list-tabs { background: #008080 } #buddypress div.item-list-tabs#subnav ul li { background: #DCDCDC }
Doing that, the original background-color
transparent
is substituted – in the first case – by#008080
and in the second case by#DCDCDC
.The result you can see there:
http://1a-spielwiese.de/neuigkeiten/
In the corresponding way I inserted the #008080-borders.
1st:
I tried now:
'field_id=70'
instead of
'field=A:Bezirk oder Statutarstadt; CH: Bezirk o.ä.; D: LANDKREIS oder KREISFREIE STADT; Li: Gemeinde'
It did not work. Than I changed it back to field name – and… it works now. – That the old version did not work, was maybe because there a blank was missing (‘A:Bezirk’; correct is: ‘A: Bezirk’). – But I guess, that not in all my earlier attempts this blank was missing.
2nd:
However, for the other field at issue still nothing else than ‘Jahr’ works.
(I tried a lot of field names ‘Jahr der Teamgründung oder Geburt’, ‘Teamgründungs- oder Geburtsjahr’, etc. Always I used copy- & paste between the profile field and the php-file, but still the longer field names don’t work.)
Still it does not work; my users can still editing their entire profiles:
http://1a-spielwiese.de/wp-content/uploads/2014/10/Weiterhin_editierbar_8-10-14.jpg
And that’s my bp-custom.php:
http://1a-spielwiese.de/wp-content/uploads/2014/10/bp-custom_8-10-14.jpg
2 is the field “Geburtsjahr”
124 is the field “Mitglieder-Kategorie (Team oder Fan?)”
and 134 is the field “Geburtstag”.
I have tried it as well with ‘2’ only – also not working.
For me also not:
I tried it with
Mitglieder-Kategorie (Team oder Fan?)
instead of
'name of your field'
as well as with
'Mitglieder-Kategorie (Team oder Fan?)'
But my users can still change the values for this field. –
I tried as well – already before and now again – this code of @noizeburger:
//hide the user role select field in edit-screen to prevent changes after registration add_filter("xprofile_group_fields","bpdev_filter_profile_fields_by_usertype",10,2); function bpdev_filter_profile_fields_by_usertype($fields,$group_id){ //only disable these fields on edit page if(!bp_is_profile_edit()) return $fields; //please change it with the name of fields you don't want to allow editing $field_to_remove=array("User Role"); $count=count($fields); $flds=array(); for($i=0;$i<$count;$i++){ if(in_array($fields[$i]->name,$field_to_remove)) unset($fields[$i]); else $flds[]=$fields[$i];//doh, I did not remember a way to reset the index, so creating a new array } return $flds; }
It works neither with
"Mitglieder-Kategorie (Team oder Fan?)"
nor with
Mitglieder-Kategorie (Team oder Fan?)
nor with:
'Mitglieder-Kategorie (Team oder Fan?)'
However, not only dots are a problem: with ‘oder Entsprechendes’ (instead of ‘o.ä.’) it doesn’t word as well.
As well it does not work with ‘Jahr der Teamgründung oder Geburt’.
So, maybe the length of the field names is the problem. –
Therefore again: Is there a possibility to address profile fields by other means than with their field names? Are there e.g. id-numbers or something like that, which I could use (instead of the names)?
“then simply edit the page title under the “Pages” menu in the WP dashboard.
No, this does not work:
My page titles there were – already before changing the bp-activity-loader.php and the bp-groups-loader.php – (and are there still) ‘Neuigkeiten’ and ‘Gruppen’:
http://1a-spielwiese.de/wp-content/uploads/2014/10/WP-Seiten-Titel.jpg
und
http://1a-spielwiese.de/wp-content/uploads/2014/10/Neuigkeiten.jpgNevertheless, in the frontend was displayed ‘Side-Wide Activities’ and ‘Groups’:
http://1a-spielwiese.de/wp-content/uploads/2014/10/Page-Titles.jpg
And there is displayed now ‘Gruppen’ – because I changed it inside the bp-groups-loader.php.
And it is displayed ‘Neuigkeiten aus dem 1a-Spielwiese-Netzwerke’ (and not only ‘Neuigkeiten’) – because the bp-activity-loader.php (and not the WP Admin-Panel) is decisive.
Therefore again:
How can I prevent, that my changed bp-activity-loader.php and bp-group-loader.php files will be re-changed through the next BuddyPress-Update? – Would it work to place them somewhere into my child-theme-folder? And if so: Where precisely inside that folder I would have to place them?
It’s difficault for me to determine, whether theses issues are only similar symptoms or rather have the same – or at least similar – causes as well.