Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

customadmin.css not called on Role edit page

Hi,

I noticed a bug where the customadmin.css is not being called only on one page, the role edit page.
It works well on all others. If I add the custom css into the admin.css it works on all pages correctly.
Makes me think there is a function that could be added to correct this.
It is no big deal just wondering why it is doing it...

Comments

  • peregrineperegrine MVP
    edited December 2012

    there may be more pages - this is an example how to change for future issues with certain pages.

    this will solve the problem you found:

    around line 24 in default.php

    change 
    
    
         (preg_match("|settings\/plugins|", $Surl)) ||
    
    
    
    to
    
    
         (preg_match("|settings\/plugins|", $Surl)) ||
         (preg_match(" |role\/edit|", $Surl)) ||
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited December 2012

    That worked thanks you are awesome, I don't think there are anymore pages I checked them all, but if I find more I will know what to do :)

  • @peregrine here is a list of all of them so far:

       if ((preg_match("|dashboard\/|", $Surl)) ||  
        (preg_match("|settings\/plugins|", $Surl)) ||
        (preg_match(" |role\/edit|", $Surl)) ||
        (preg_match(" |plugin\/embed|", $Surl)) ||
        (preg_match(" |plugin\/mobilethemeswitcher|", $Surl)) ||
        (preg_match(" |plugin\/flagging|", $Surl)) ||
        (preg_match(" |settings\/applications|", $Surl)) ||
        (preg_match(" |settings\/advanced|", $Surl)) ||
        (preg_match(" |settings\/floodcontrol|", $Surl)) ||
        (preg_match(" |settings\/managecategories|", $Surl)) ||
        (preg_match("|plugin\/admintheme|", $Surl)))  {
    

    :)

  • you could try this instead - it may not work - but feel free to test.

    this
    
     (preg_match(" |settings\/|", $Surl)) ||
     (preg_match(" |plugin\/|", $Surl)) ||
    
    
    instead of
    
    (preg_match(" |plugin\/embed|", $Surl)) ||
    (preg_match(" |plugin\/mobilethemeswitcher|", $Surl)) ||
    (preg_match(" |plugin\/flagging|", $Surl)) ||
    (preg_match(" |settings\/applications|", $Surl)) ||
    (preg_match(" |settings\/advanced|", $Surl)) ||
    (preg_match(" |settings\/floodcontrol|", $Surl)) ||
    (preg_match(" |settings\/managecategories|", $Surl)) ||
    (preg_match("|plugin\/admintheme|", $Surl))) {
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited December 2012

    It works, and it makes total sense, it is even loading way faster !!
    I was wondering why it took forever to load after adding that code for the other pages...
    You rule :)

  • you may have a problem with it bleeding over into other plugin views with only

    (preg_match(" |plugin\/|", $Surl)) ||

    whatever works for you. depends on the plugins added.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Well I want all the views to be the same all around so far they all are and it seems to work at optimum . If that is what you mean by bleeding? I like the blood...

  • peregrineperegrine MVP
    edited December 2012

    e.g. if you add the "extrapages" plugin or the "members list enhanced" plugin you will see what I mean.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Ah yes I see what you mean.
    what if

    (preg_match(" |plugin\/ExtraPage|", $null)) ||

  • peregrineperegrine MVP
    edited December 2012

    you could use after line 22

    if (preg_match("|plugin\/[A-Z]|", $Surl)) return;

    you could also replace the preg_matches with string searches and it would be faster, - a million ways to skin the cat.

    make all the suggestions you see fit, but I am probably going to end it here. "whatever works for you is the best" :)

    there is no all encompassing answer, tune it as you wish.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited December 2012

    Actually the solution to that is within css capabilities, all I did was add the counter css to the ExtraPage css that way it does what I want.

    for example, the problem areas:

    #Body {
    background:transparent!important;
    border-bottom: none!important;
    color:#adadad!important;
    }
    

    I recon that any plugin which has it's own css sheet will have to be amended like this. And it's not a problem in that case :)

    Thanks again for your plugins !

    BTW, How does one mark this answered ?

  • peregrineperegrine MVP
    edited December 2012

    peregrine said:

    a million ways to skin the cat.

    according to this idiomatic phrase

    @vrijvlinder ,you now have 999,999 more posts left to add to this thread! post away.


    On the other hand - according to this idiomatic phrase

    a cat has 9 lives or 7 lives depending on the country the cat lives in.

    @peregrine's last cat life on this thread was used up several comments back. over and out and good luck.


    if i hear admintheme or customadmin.css again

    they may cause the same reaction as "niagara falls" in the "niagara falls" and "slowly I turned" on youtube.

    http://www.google.com/search?&q=abbot+and+costello+niagara+falls

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited December 2012

    If a mod @Lincoln can mark this thread Answered I would appreciate it thanks !!

Sign In or Register to comment.