|
|
Thread Tools | Display Modes |
|
#1
|
|
|
Scripting dude-volunteer
|
Customization to limit what assistant login can do
This customization limits what the assistant login for a pro account can see in the UI. It hides everything except create gallery, upload photos and gallery maintenance. Specifically, it hides all the stuff that changes the homepage, the galleries page, the bioBox, etc...
It isn't entirely foolproof so this is done more to keep assistants from stumbling into things they shouldn't be messing with rather than as real security, but if you let outsiders upload photos via the assistant password, this should keep them from messing with your site (accidentally or intentionally) in ways you don't intend. To install this customization, put this code in your bottom javascript: Code:
//----------------------------------------------------------------------------------------------
// Script to hide lots of UI things when logged in via assistant password
//
// Version 1.0.
//----------------------------------------------------------------------------------------------
YE.onContentReady("toolsButton", function()
{
var isOwner = false;
try {
isOwner = SM.buttons.toolsButton.config.owner;
} catch (e) {}
if (!isOwner)
{
YD.addClass(document.body, "notOwner");
}
});
Code:
/* hide stuff when logged in as assistant */
body.notOwner.homepage #toolsButton,
body.notOwner.category #toolsButton,
body.notOwner.homepage #buyButton,
body.notOwner.category #buyButton,
body.notOwner #themesButton,
body.notOwner #visitorView,
body.notOwner #homepageLayoutButton,
body.notOwner #bioBox .boxTop,
body.notOwner .boxSettings,
body.notOwner #categoriesBox .boxTop .boxNote {display: none;}
There is one disclaimer about this customization. If Smugmug changes the design of the UI to administer the site, this customization may break. If it does, it will have to be modified to adapt to the changes.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question Last edited by jfriend; Feb-16-2011 at 08:04 PM. |
|
|
|
|
#2
|
||
|
Photographer
|
Thanks for this John.
This is perfect for what I need. Just one question though, It works when I am logged in as the assistant and I cannont see anything but the create album tab. However when I go to my assistans page it brings back all the options once again. Is there a way to make it work on all galleries or do I have to input it for each gallery individually. Website is http://www.phillipcullinanphotography.com/ and the assistants webpage is http://www.phillipcullinanphotography.com/Monkey Well Done and once again great work Phil
__________________
Phillip Cullinan http://www.phillipcullinanphotography.com Quote:
|
|
|
|
||
|
#3
|
||
|
Scripting dude-volunteer
|
Quote:
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question Last edited by jfriend; Feb-17-2011 at 08:07 AM. |
|
|
|
||
|
#4
|
|||
|
Photographer
|
Quote:
John Thanks for the prompt reply as usual. I think that I have nutted out what had happened. I should have stated that my assistants page is just one I created for him in his own catagory so he shouldnt access any of mine. What had happend with the other stuff is I think I had the auto login set to on so when it asked for the password it defaulted back to my pro account. sorry about the confunsion mate. Well done Phil
__________________
Phillip Cullinan http://www.phillipcullinanphotography.com Quote:
|
||
|
|
|||
|
#5
|
|
|
Major grins
|
John,
Thanks for once again taking the time to write this up...works great! I'm currently using this for a high school football team, to let a few other parents upload photos. |
|
|
|
|
#6
|
|
|
Scripting dude-volunteer
|
You're welcome. It has worked well for me as well. I'm anticipating breakage when the new UI hits though.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
|
#7
|
|
|
Big grins
|
Thank you, this thread has been really helpful. I'm wondering if there's a way to remove the option (for those who have assistant access) to "Organize: hide" for the slideshow feature on my homepage. Thanks again for all the useful information and codes!
__________________
Fulbrightkorea.smugmug.com |
|
|
|
|
#8
|
||
|
Big grins
|
Quote:
I also wonder if it`s possible to hide more buttons for the "assistant", like Style, Share, Buy and View Cart? Best regards, Arnstein www.naturogbilde.com |
|
|
|
||
|
#9
|
||
|
Scripting dude-volunteer
|
Quote:
body.notOwner #buyButton, body.notOwner #cartButton {display: none;} The Style button is available for everyone (including regular viewers). If you want it to go away for everyone, then set the viewing style in gallery settings to something other than "Viewer Controlled". There's no point in hiding the style button just for the assistant since it's available to everyone. When properly logged in as an assistant, my site lets me edit keywords as the assistant so if you're not seeing that, then it must be something unique to your site. Since I can't see your site as an assistant, I don't know what it could be.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#10
|
||
|
Big grins
|
Quote:
Thanks again! -Arnstein |
|
|
|
||
| Tell The World! | |
| Similar Threads | Thread Starter | Forum | Replies | Last Post | ![]() |
| Differentiate between assistant login vs. site owner login? | jfriend | SmugMug Customization | 13 | Feb-16-2011 06:27 PM | |
| The Facebook - SmugMug login Thread | Andy | SmugMug Support | 0 | Oct-01-2010 04:47 AM | |
| Login Issues with IE6 | TBT | Bug Reporting | 3 | Jan-25-2010 04:51 AM | |
| Customization curiosity | Harrzack | SmugMug Customization | 9 | Jun-01-2008 09:58 AM | |
| Perhaps get rid of the 48 megapixel size limit? | fuzzybabybunny | SmugMug Support | 3 | Apr-13-2008 08:32 PM | |
| Thread Tools | |
| Display Modes | |
|
|