We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14951
    • 151 Posts
    I'm working on a 3PC for one of my clients and I'd like them to have the ability to select an image via the resource browser in the frontend of the site.

    Is this a possibility with MODX Revo 2.1.3?

    I used to be able to do it like this in Evo...
    			<!-- File Browser -->
    			<script type="text/javascript">
    					function OpenServerBrowser(url, width, height ) {
    						var iLeft = (screen.width  - width) / 2 ;
    						var iTop  = (screen.height - height) / 2 ;
    
    						var sOptions = 'toolbar=no,status=no,resizable=yes,dependent=yes' ;
    						sOptions += ',width=' + width ;
    						sOptions += ',height=' + height ;
    						sOptions += ',left=' + iLeft ;
    						sOptions += ',top=' + iTop ;
    
    						var oWindow = window.open( url, 'FCKBrowseWindow', sOptions ) ;
    					}			
    					function BrowseServer() {
    						var w = screen.width * 0.7;
    						var h = screen.height * 0.7;
    						OpenServerBrowser('/manager/media/browser/mcpuk/browser.html?Type=images&Connector=/manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath=/home/westpos0/public_html/assets/', w, h);
    					}
    
    						function SetUrl(url, width, height, alt){
    						    document.getElementById('evImg').value = url;
    						}
    			</script>


    Thanks for any advice!
    -Jared