Consulting

Anyone interested in doing some side work consulting on making a few scripts/addins for Opus? If they already exist, will also pay you to find them and assist loading, etc.

1- Change the folders shown in the browser tabs. It currently shows the folder i'm in. I'd like for it to show that folder plus one level up.

2- add review/approval ability where i can add user initials and date to any folder showing the date it was reviewed and approved

If you link your account we can help with a lot of things for free.

  1. Go UP NEWTAB will do that.

  2. You want to add the current user's initials and current date to a folder name, or something else?

1- glad to hear we can do that! Unfortunately, I have no idea what "go up newtab" means or how to implement that.
2- I setup labels for various people based on their initials. we can use that to mark something as reviewed. This is working, but i also need to capture the date it was marked as reviewed. It is typically individual files getting marked as reviewed by someone (as opposed to folders). We do not need to use the label functionality to do it, it could be something completely difference, just need to show users initials and date they marked it as reviewed. There could be multiple people marking a file as reviewed too.

My directory is setup ROOT\CLIENT\YEAR and the files within the year.
I often have multiple clients open at a time, each within a tab. So currently I'll just have a bunch of tabs named "2021" and can't tell which client each tab belongs to. I'd like for the tabs to display as "Client\year" instead of just the current folder which is the year.

This add-in should do what you want (quick shot, might need refinement).

function OnInit(initData) {
    initData.name = 'TabAddParentname';
    initData.version = '2021-10-11';
    initData.url = 'https://resource.dopus.com/t/consulting/39552';
    initData.desc = 'Add parentname to tabname';
    initData.default_enable = true;
    initData.min_version = '12.0';
}

function OnAfterFolderChange(afterFolderChangeData) {
    if (!afterFolderChangeData.result) return;

    var tab = afterFolderChangeData.tab;
    var srcPathFirstLetter = String(tab.path).substring(0, 1);
    
    if (srcPathFirstLetter == ':' || srcPathFirstLetter == '/') {
        var newTabName = DOpus.FSUtil().DisplayName(tab.path);
    } else {
        var vecPath = tab.path.Split();
        var k = vecPath.count;
        var newTabName = (k > 2 ? vecPath(k - 2) + '\\' : '') + vecPath(k - 1);
    }

    if (newTabName == tab.displayed_label) return;

    var cmd = DOpus.Create().Command();
    cmd.SetSourceTab(tab);
    cmd.RunCommand('Go TABNAME="' + newTabName + '"');
}

EventTabAddParentname.js.txt (1015 Bytes)


How to use buttons and scripts from this forum

(edit: 2nd version handles special folders a bit better)

2 Likes

Maybe start a new thread and explain your workflow and how idiot- and villain-proof you want the solution to be.