Portal Administration Guide : Customize Xinet Portal : Adding an Uploader Distributor to a Site

Adding an Uploader Distributor to a Site
Note: This functionality will be removed in a future release. As of Xinet 19.2.1, we encourage users to use the Upload Only Pilot version for easy asset upload from third party asset creators. For more information, see:
Background
Xinet provides an Uploader Manager which allows administrators to pre-configure and distribute Uploaders to users who need to upload assets to the server. This, however, can be time consuming when many users require Uploaders with different settings. To solve this problem, Xinet Portal includes {DISTRIBUTOR_LINK} tag family, that when used in a site, makes it possible for users with proper permissions to download their own Uploaders on-the-fly.
While you can implement this with other variations, Figure  shows what the end user sees when the Uploader Distributor has been enabled in an Exhibit site tool bar.
To use Uploader Distributors, you must add your Xinet Portal server as a Managed Server within the Uploader Manager and set up a Default Uploader. The Default Uploader contains the constraints that will be used when Xinet Portal distributes Uploaders.
When configuring the Default Uploader, the administrator defines a Username/Password, the location to which uploads are allowed, and a variety of other settings (e-mail notification, proxy e-mail servers, etc.). When a Xinet Portal user requests an Uploader, the Xinet Portal server will generate a new Uploader application which the user can download. The Uploader application will contain most of the Default Uploader configuration settings (e-mail notification, etc.). The Username/Password in the Default Uploader configuration, however, will always be replaced by the Username/Password for the user who requested the Uploader. The location to which uploads are allowed depends on the template where you place the {DISTRIBUTOR_LINK} tag family.
Templates come in two varieties: those that are “working-directory-aware” and those that are not. For instance, the Browse, Search, and tool bar templates know which directory the user is working within. The Toplevel and Collection templates do not. When a user downloads an Uploader from a place on the site without a working directory, for example, from Toplevel or from inside a Collection, the Uploader will place files in the directory specified in the Default Uploader; if , however, a user downloads an Uploader from a location with a working directory, for example while browsing or searching, then that directory overwrites the upload location in the Default Uploader.
Important files
Base files for Uploader Distributor reside on the Xinet Portal server inside /usr/etc/portal/DISTRIBUTOR on Unix systems and C:\Program Files\Xinet\Portal\DISTRIBUTOR on Windows systems, with the Default Uploader configuration, residing in the configurations file.
The tag family {DISTRIBUTOR_ICON}, {DISTRIBUTOR_DISPLAY}, {DISTRIBUTOR_LINK}, {LANG_DISTDL} ship inside the toolbar.tmpl.html file in the base Exhibit sites. To enable it there, you simply use the Show Distributor button in the Site Manager’s Configuration page. To enable it elsewhere, place the tag family within one of the templates found in the .../Site_Name/templates directory.
Procedure
To add a Default Uploader:
1.
Mount the Macfiles volume from the Xinet server and copy the Uploader Manager.zip file to a client desktop.
2.
3.
Uncompress the zip file and double-click on the Installer to install the current version of the Uploader Manager.
4.
Launch the Uploader Manager and open its Preferences, as shown in Figure 4.
5.
Click the Managed Servers option, add a New Host by typing in the Xinet Portal server’s URL, then click OK to register the address.
This will close the Preferences and reveal the Uploader Manager again.
6.
Use the pop-up list in the Uploader Manager’s upper left corner to select the Xinet Portal server you’ve just added to the Managed Server list.
7.
Enter the PORTALADMIN password when requested to do so. If you haven’t already configured a Default configuration, you must do it now. (The configuration must be named Default.) If you already have a Default configuration, skip to Step 10.
Answer Yes to the question, Would you like to create one now? This will open the Configuration Creation Wizard.
8.
Enter the Xinet Portal Server URL (including the site name), a Username and its Password., then click Next.
Note: The Username and Password you enter will eventually be overwritten by the Username/Password of the user who downloads an Uploader from the Uploader Distributor.
9.
When you have finished you should see a Default Uploader configuration for your server in the Uploader Manager. If everything is working properly, after authentication, you should, as a test, be able to download a copy of the Uploader using:
http://url_to_server/PORTAL/DISTRIBUTOR.php
10.
Each site’s PORTALADMIN, Configuration page contains a Show Distributor button option under Display Options. (See Show Distributor button (DISTRIBUTOR_DISPLAY) in Portal Configuration: Display Options (2), Toggles.
Open the template where you want to insert the Uploader Distributor with an editor. and insert something like:
<a class="_img_pad button_container {DISTRIBUTOR_ICON} {DISTRIBUTOR_DISPLAY}" href="{DISTRIBUTOR_LINK}" title="{LANG_DISTRIBUTOR}" onClick="return confirm('You are about to download an Uploader application. Do you want to proceed?')"><label class="button_label">{LANG_DISTRIBUTOR}</label></a>
Configure More than One Default Uploader
It is possible to establish more than a single Default configuration. For example, you might want to have one setting for User A and another for User B. To do so, create Uploaders for each. Then include the PHP variable $configName in your site’s local.inc.php file, pointing users to the appropriate Uploader as shown in this example:
<?php
if(isset($_SESSION ['USERNAME'])) {
$user = $_SESSION ['USERNAME'];
}
 
if ($user == "demo") {
$configName = "settingA";
}
else {
 
$configName = "settingB";
}
 
?>
where demo would be the name of User A; settingA, the name of the Uploader to use with that user; and settingB, the name of the Uploader to use for the other user.
If you prefer to test by Primary Group rather than user, you can access the user’s group using:
$tmpl->SERVERINFO[$tmpl->user_wnhost][‘PRIMARYGROUP’]
Troubleshooting
Unix: /usr/etc/portal/DISTRIBUTOR/distributor.log
Windows: C:\Program Files\Xinet\Portal\DISTRIBUTOR\distributor.log
http://site_URL/PORTAL/DISTRIBUTOR.php?debug=true
Debugging information will be logged in the Apache error.log file.
To determine what version of the Uploader Distributor is in use:
http://site_URL/PORTAL/DISTRIBUTOR.php?uploaderversion=true