1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Why is No Prefix an option where a prefix is required?

Discussion in 'XenForo Questions and Support' started by Stuart Wright, Aug 2, 2013.

  1. Stuart Wright

    Stuart Wright Well-Known Member

    This is frustrating because I have a forum where a prefix is required, and the default is set to one of the defined prefixes.
    Except No Prefix is still a selectable option.
    Why? And how do I remove it?
    Thanks
     
    0ptima and CyclingTribe like this.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It is an option but on post submit the member will see an error.

    The following error occurred:
    Please select a prefix.

    The no prefix option exists as moderators are able to override the option - to post a sticky thread for example.

    Adding this to EXTRA.css will remove it from the list:
    Code:
    .node32 .prefix.noPrefix {
    display: none !important;
    }
    Change 32 to the actual node ID.
     
    0ptima, Chris D and Kevin like this.
  3. Stuart Wright

    Stuart Wright Well-Known Member

    Awesome, thanks Brogan.
     
    Last edited: Aug 2, 2013
  4. Stuart Wright

    Stuart Wright Well-Known Member

    This is probably a very easy css thing, but I've looked and can't find a solution which works. How do I efficiently do the above for 20 nodes?
    I tried
    HTML:
    .node51, .node62, .node85, .node99, .node142, .node153, .node154, .node185, .node198, .node199, .node241, .node243, .node329, .node330, .node338, .node339, .node340, .node341, .node343, .node344, .node353, .node358, .node379, .node380, .node394, .node402, .node409, .node476, .node492 .prefix.noPrefix { display: none !important; }
    But it didn't work.
    Note to self - add css to the php, mySQL, JS, Zend and jQuery courses I have to book myself on to.
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    You have to do each selector like so:

    .node32 .prefix.noPrefix,
    .node33 .prefix.noPrefix,
    .node34 .prefix.noPrefix,
    .node35 .prefix.noPrefix {
    display: none !important;
    }
     
    Chris D and The Forum Heroes like this.
  6. Stuart Wright

    Stuart Wright Well-Known Member

    Ok, thanks (y)
    This worked.

    Code:
    .node51 .prefix.noPrefix, .node62 .prefix.noPrefix, .node85 .prefix.noPrefix, .node99 .prefix.noPrefix, .node142 .prefix.noPrefix, .node153 .prefix.noPrefix, .node154 .prefix.noPrefix, .node185 .prefix.noPrefix, .node198 .prefix.noPrefix, .node199 .prefix.noPrefix, .node241 .prefix.noPrefix, .node243 .prefix.noPrefix, .node329 .prefix.noPrefix, .node330 .prefix.noPrefix, .node338 .prefix.noPrefix, .node339 .prefix.noPrefix, .node340 .prefix.noPrefix, .node341 .prefix.noPrefix, .node343 .prefix.noPrefix, .node344 .prefix.noPrefix, .node353 .prefix.noPrefix, .node358 .prefix.noPrefix, .node379 .prefix.noPrefix, .node380 .prefix.noPrefix, .node394 .prefix.noPrefix, .node402 .prefix.noPrefix, .node409 .prefix.noPrefix, .node476 .prefix.noPrefix, .node492 .prefix.noPrefix {
    display: none !important;
    }
     
    Last edited: Aug 2, 2013
  7. 0ptima

    0ptima Well-Known Member

    Im glad you asked as this was bugging me too.
     
  8. ge66

    ge66 Active Member

    I tried this in xf1.3 and it hides the whole prefix choosing when creating a thread?! Anyone know why.
     
  9. ge66

    ge66 Active Member

    I just tried another solution to this, I removed the first line:
    Code:
    <option value="0" data-css="prefix noPrefix" {xen:selected '{$selectedPrefix} == 0'}>({xen:phrase no_prefix})</option>
    in the title_prefix_edit_options template.
     

Share This Page