Skip to:
Content
Pages
Categories
Search
Top
Bottom

Displaying a custom string only changeable by admins


  • kjgbriggs
    Participant

    @kjgbriggs

    I recently made the change from a plugin called WPSymposuim (may have heard of it), and was a little shocked to realise there is no field for a custom profile header (its a custom title you give to staff), which is displayed at the top on the profile page and on forums above or below the profile info such as profile pic and forum role.

    This is mostly for staff such as you may have an orange one (styled the same as the forum role box), displaying the word “Developer”, or “Staff” for example, this is different to a role as all it does is display words and does not control anything but it is only addable and available to those with the Keymaster role for example.

    To make this a little easier to understand, I have Photoshopped a shot of WPSymposium with a shot of what I want this to look like.

    http://kylebriggs.co.uk/wp-content/uploads/2015/06/forumstuff.png

Viewing 10 replies - 1 through 10 (of 10 total)

  • danbp
    Participant

    @danbp

    You’ve better to ask this on WP Symposium support if you don’t know how to handle this or on bbPress support. You’re on BuddyPress support here !


    kjgbriggs
    Participant

    @kjgbriggs

    I think this is a BuddyPress thing as it would not be limited to forums but displayable on the profiles page and users in admin, which im pretty sure is BuddyPress stuff.


    danbp
    Participant

    @danbp

    Please give details about your install, it’s unclear
    https://buddypress.org/support/topic/when-asking-for-support-2/


    kjgbriggs
    Participant

    @kjgbriggs

    1. WordPress 4.2.2

    2. Main Directory Install

    3. Root

    4. No

    5. Yes

    6. 2.3.2.1

    7. No

    8. BBPress, WooCommerce

    9. ? Divi

    10. No

    11. No

    12. 2.5.7

    13. My Host Does Not Provide Access To Error Logs

    14. 1and1

    15. Linux & Apache

    ————————————————–

    I am unsure of how this would be able to help me add a feature but here are the answers you requested.


    danbp
    Participant

    @danbp

    The problem when asking many question in different topics, is it lead to confusion.
    As you exlained (later) here, you switched from WP symposium to BP… so asking you for plugin list was a first step.

    Now it’s clear… at least at your install level.

    How and where are “developper” and “staff” items used/created ?
    With xprofile field ? A plugin ?


    kjgbriggs
    Participant

    @kjgbriggs

    At the moment, we have no list for this, or any way of displaying this, as we have a small staff list I was just going to go through them and add it manually.

    I thought the best way to do this would be to have a field on the users profile (which only an admin can see) that allows for a string to be inputted which is displayed on the users profile and below them on BBPress forums.

    This could obviously be done with forum roles as well but I was trying to steer clear of that as it generally means another plugin running.


    kjgbriggs
    Participant

    @kjgbriggs

    Additional:
    If I add the “Header Label” (the field I am talking about) as a Profile Field, how do I make it visible to ONLY admins, but display it’s data on the profile page and forums to all?

    To show you what I mean, I have made a snapshot of the field.

    http://kylebriggs.co.uk/wp-content/uploads/2015/06/ForumField.png

    It looks like this from the frontend.

    http://kylebriggs.co.uk/wp-content/uploads/2015/06/ForumFieldFrontend.png

    What I want to do

    I would like to :

    A. Make this field ONLY editable by administrators.
    B. IF the field has anything in, display it in 2 places (listed below)
    B1. At the top of the profile page (as shown in the WPSymposium shot at the top)
    B2. On the forum page, shown in the bottom mockup of the first image


    kjgbriggs
    Participant

    @kjgbriggs

    Update

    I have managed to get a custom profile field only visible by admins, now all I need to be able to do is display that information in those places listed, I’m hoping someone knows how.


    danbp
    Participant

    @danbp


    kjgbriggs
    Participant

    @kjgbriggs

    I am unsure of how to use the data I now have for the profile field.

    I am sure it is not hard to display somewhere but I am having trouble working out how to do this without editing the core BuddyPress or BBPress files, otherwise when I update I will lose all of this.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Displaying a custom string only changeable by admins’ is closed to new replies.
Skip to toolbar