We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6531
    • 154 Posts
    Pikachu:

    1. Yes, the site is online
    2. No, the page is set to ’Public’

    update:
    3. I just tested in Firefox, and it does partially work. It does NOT work in Safari and IE7. In FF, I get the ’flash’ boxes; but after queuing and clicking ’upload’, it appears to upload for some time, but at the end I get ’PATH NOT FOUND’

    4. It looks like the colors are hard-coded into the upload queue; how do I apply CSS to make things legible? The default font color on my site is white, so I can’t see anything since the background is set to white.
      • 36571
      • 145 Posts
      I also had this problem, and managed to solve it by making the path absolute i.e. instead of using [~[*id*]~]?relPath=[+relPath+] i just used /[~[*id*]~] and it seems to have solved things.

      Let me know if it works out for you.
        • 36571
        • 145 Posts
        Is there a way to set the filename of the uploaded file dynamically.

        For example, on page id 13 I have the FancuUpload snippet call. The user then uploads an image called CIM0056.JPG, which is then saved as 13-1.jpg, where 13 is the id, and 1 is the picture number (which changes incrementally).

        I’m assuming this would involve quite a few additions to the snippet code.
          • 6531
          • 154 Posts
          daniel - I tried your suggestion, but it didn’t help. Now I get ’Internal Server Error.’

          Surely there’s some other way to get upload progress in MODx???
            • 23383
            • 138 Posts
            Quote from: danielw at Jul 25, 2008, 03:45 AM

            I also had this problem, and managed to solve it by making the path absolute i.e. instead of using [~[*id*]~]?relPath=[+relPath+] i just used /[~[*id*]~] and it seems to have solved things.

            Let me know if it works out for you.

            Indeed, " [~[*id*]~]?relPath=[+relPath+] " was for an example with FileDownload and relative directories.
            Mosts users only need [~[*id*]~]


            Quote from: danielw at Jul 25, 2008, 06:21 AM

            For example, on page id 13 I have the FancuUpload snippet call. The user then uploads an image called CIM0056.JPG, which is then saved as 13-1.jpg, where 13 is the id, and 1 is the picture number (which changes incrementally).

            The upload is done by the function "HandleUpload()" in the class. What you could do is
            1) store the previous number in a text file/db and change the move_uploaded_file part of the class with your needs.
            2) browse all files of your folder incrementally and check the first ""non-existing". Change the move_uploaded_file part of your class.
            3) maybe other things, but I’m tired and I don’t have many ideas :s

            Quote from: danzg at Jul 24, 2008, 10:59 PM

            I just tested in Firefox, and it does partially work. It does NOT work in Safari and IE7. In FF, I get the ’flash’ boxes; but after queuing and clicking ’upload’, it appears to upload for some time, but at the end I get ’PATH NOT FOUND’

            I’ll write down here what I wrote to you, it could help someone :
            Always check if there is no problem of compatibility between mootools and scriptaculous/prototype.

            Yes, firefox is far more indulgent than other browsers (about JS). It could be something to dig.

            Quote from: danzg at Jul 24, 2008, 10:59 PM

            It looks like the colors are hard-coded into the upload queue; how do I apply CSS to make things legible? The default font color on my site is white, so I can’t see anything since the background is set to white.
            Someone has given an example in this thread. You should look at it.
              • 6531
              • 154 Posts
              pikachu told that to make FancyUpload work, I should try to (1) disable prototype and (2) scriptaculous, and make sure i have (3) the latest mootools.

              I don’t want to bug him -- so can anyone tell me how to do any of the above? I don’t see anything about it in the repository or docs or wiki or my installation...

              help!
                • 23383
                • 138 Posts
                Sorry, I hadn’t the time to reply before :s

                You should look first at your template code : if you have some includes like prototype.js or scriptaculous, remove those lines and try again.
                If it’s not on the template, look at the snippets you are using. Maybe some snippet includes those libs as dependencies. Remove them and try again.

                Are there errors you can see with web developper/firebug for firefox ?
                  • 6531
                  • 154 Posts
                  Yes, there were includes for prototype and scriptaculous; I took them out, and it still doesn’t work. Help!

                  Here’s the source of my page; maybe someone can figure why it doesn’t work:

                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
                  	<head>
                  		<base href="http://xxxx.tv/v2/" />
                  		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
                  		<meta http-equiv="cache-control" content="no-cache" />
                  		<meta http-equiv="expires" content="3600" />
                  		<meta name="revisit-after" content="2 days" />
                  		<meta name="robots" content="index,follow" />
                  		<meta name="distribution" content="global" />
                  		<link rel="stylesheet" type="text/css" media="screen,projection,print" href="assets/templates/flex/css/global-float2.css" />
                  		<link rel="stylesheet" type="text/css" media="screen,projection,print" href="assets/templates/flex/css/text.css" />
                  		<link rel="stylesheet" type="text/css" media="screen,projection,print" href="assets/templates/flex/css/colors.css" />
                  		<!-- <link rel="stylesheet" href="assets/templates/flex/css/lightbox.css" type="text/css" media="screen" /> -->
                  
                  
                  
                  
                  		<title>xxxx - testing</title>
                  		<script type="text/javascript" src="assets/snippets/AjaxSearch/AjaxSearch.js"></script>
                  	<script type="text/javascript">
                  		<!--
                  		stripHtml = 1;
                  		stripSnip = 1;
                  		stripSnippets = 1;
                  		useAllWords = 0;
                  		searchStyle = 'partial';
                  		minChars = 4;
                  		maxResults = 6;
                  		showMoreResults = 1;
                  		moreResultsPage = 8;
                  		as_language = 'english'
                  		extract = 0;
                  		liveSearch = 0;
                  		docgrp = '';
                  		highlightResult = 1;
                  		-->
                  	</script>
                  	<script type="text/javascript" src="assets/snippets/FancyUpload/mootools-release-1.11.js"></script>
                  	<script type="text/javascript" src="assets/snippets/FancyUpload/Swiff.Base.js"></script>
                  	<script type="text/javascript" src="assets/snippets/FancyUpload/Swiff.Uploader.js"></script>
                  	<script type="text/javascript" src="assets/snippets/FancyUpload/FancyUpload.js"></script>
                  <script type='text/javascript'>
                  		//<![CDATA[
                  		window.addEvent('load', function(){
                  	    var input = $('fancyupload_input_data');
                  	    var upload = new FancyUpload(input, {
                  			
                  			swf: 'assets/snippets/FancyUpload/Swiff.Uploader.swf',
                  		    types: { 'Files (*.jpg; *.png; *.gif; *.pdf; *.txt)' : '*.jpg; *.png; *.gif; *.pdf; *.txt' },
                  		    limitSize: 52428800,
                  		    limitFiles: false,
                  		    queueList: 'fancyupload_queue',
                  		    container: $('fancyupload_container')
                  		});
                  	    
                  	    $('fancyupload_status').adopt(new Element('a', {
                  	      href: 'javascript:void(null);',
                  	      events: { click: upload.clearList.bind(upload, [false]) }
                  	      }).setHTML('Clear completed files'));
                  		});
                  		//]]>
                  		</script>
                  </head>
                  
                  <div id="bgImg1"></div>
                  <div id="bgImg2"></div>
                  <div id="bgImg3"></div>
                  
                  <!-- Global IE fix to avoid layout crash when single word size wider than column width -->
                  <!--[if IE]><style type="text/css"> body {word-wrap: break-word;}</style><![endif]-->
                  
                  <body class="MainPage">
                    <!-- Main Page Container -->
                  		<div class="page-container">
                  			<div id="menubar">
                  				<div class="menu">
                      <ul>
                          <li><a href="http://xxxx.tv/v2/" title="welcome to hybrid films">home</a></li>
                  
                  
                  <li><a href="/v2/index.php?id=55" title="about hybrid films">about</a></li>
                  
                  
                  <li><a  class="hide" href="/v2/index.php?id=56" title="shows">shows</a>
                      <!--[if lte IE 6]>
                      <a class="sub" href="/v2/index.php?id=56" title="shows">shows
                      <table><tr><td>
                      <![endif]-->
                      <ul>
                      <li><a href="/v2/index.php?id=82" title="current & recent shows">current & recent</a></li>
                  
                  
                  <li class="last"><a href="/v2/index.php?id=57" title="past shows">past</a></li>
                  
                  
                  
                  </ul>
                  
                  
                      <!--[if lte IE 6]>
                  	</td></tr></table>
                      </a>
                      <![endif]-->
                  </li>
                  
                  
                  <li class="hide"><a href="/v2/index.php?id=58" title="casting calls">casting</a></li>
                  
                  
                  <li class="hide"><a href="/v2/index.php?id=83" title="jobs & internships">jobs</a></li>
                  
                  
                  <li class="hide"><a href="/v2/index.php?id=88" title="online facilities">hybrid post</a></li>
                  
                  
                  <li class="hide"><a href="/v2/index.php?id=90" title="sales">sales</a></li>
                  
                  
                  <li class="last"><a href="/v2/index.php?id=6" title="contact">contact</a></li>
                  
                  
                  
                      </ul>
                  </div>
                  
                   
                  
                  				
                  				<div id="AjaxSearch">
                  					<!--search_terms--><a name="search"></a>
                  		
                  		<form id="ajaxSearch_form" action="index.php?id=8" method="post">
                  			<label for="ajaxSearch_input">
                  				<input id="ajaxSearch_input" type="text" name="search" value="Search here..." onfocus="this.value=(this.value=='Search here...')? '' : this.value ;" />
                  			</label>
                  			<label for="ajaxSearch_submit">
                  				<input id="ajaxSearch_submit" type="submit" name="sub" value="Go!" />
                  			</label>
                  		</form>
                  		
                  		<div id="ajaxSearch_output" style="opacity:0;"> </div>
                  				</div>
                  			</div>
                  			<div class="main">
                  				<div class="main-navigation">
                  					<h1><a href="index.php?id=2">news</a></h1>
                  						<div id="news">
                  							<strong><a href="index.php?id=87" title="Parking Wars resumes">Parking Wars resumes</a></strong><br />
                  Shooting for A&E's popular series Parking Wars resumes in April<br /><br /><strong><a href="index.php?id=79" title="New Site Launches!">New Site Launches!</a></strong><br />
                  Hybrid announces new website<br /><br />
                  						</div>
                  					
                  					<h1>sign in</h1>
                  						<div id="sidebarlogin">
                  							    <script type="text/JavaScript">
                  
                          function getElementById(id){
                              var o, d=document;
                              if (d.layers) {o=d.layers[id];if(o) o.style=o};
                              if (!o && d.getElementById) o=d.getElementById(id);
                              if (!o && d.all) o = d.all[id];
                              return o;
                          }
                      
                          function webLoginShowForm(i){
                              var a = getElementById('WebLoginLayer0');
                              var b = getElementById('WebLoginLayer2');
                              if(i==1 && a && b) {
                                  a.style.display="block";
                                  b.style.display="none";
                                  document.forms['loginreminder'].txtpwdrem.value = 0;
                              }
                              else if(i==2 && a && b) {
                                  a.style.display="none";
                                  b.style.display="block";    
                                  document.forms['loginreminder'].txtpwdrem.value = 1;
                              }
                          };        
                          function webLoginCheckRemember () {
                              if(document.loginfrm.rememberme.value==1) {
                                  document.loginfrm.rememberme.value=0;    
                              } else {
                                  document.loginfrm.rememberme.value=1;
                              }
                          }
                          function webLoginEnter(nextfield,event) {
                              if(event && event.keyCode == 13) {
                                  if(nextfield.name=='cmdweblogin') {
                                      document.loginfrm.submit();
                                      return false; 
                                  }
                                  else {
                                      nextfield.focus();
                                      return false; 
                                  }
                              } else {
                                  return true;
                              }
                          }
                      </script>
                      <div id='WebLoginLayer0' style='position:relative'> 
                  
                  <!-- login form section-->
                  <form method="post" name="loginfrm" action="/v2/index.php?id=80" style="margin: 8px; padding: 0px;"> 
                  <input type="hidden" value="0" name="rememberme"> 
                  <table border="0" cellspacing="0" cellpadding="0">
                  <tr>
                  <td>
                  <table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                  	<td><b>User:</b></td>
                  	<td><input type="text" name="username" tabindex="1" onkeypress="return webLoginEnter(document.loginfrm.password);" size="5" style="width: 100px;" value="" /></td>
                    </tr>
                    <tr>
                  	<td><b>Password:</b></td>
                  	<td><input type="password" name="password" tabindex="2" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);" size="5" style="width: 100px;" value="" /></td>
                    </tr>
                    <tr>
                  	<td><label for="chkbox" style="cursor:pointer">Remember me:  </label></td>
                  	<td>
                  	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  	  <tr>
                  		<td valign="top"><input type="checkbox" class="checkbox" id="chkbox" name="chkbox" tabindex="4" size="1" value=""  onClick="webLoginCheckRemember()" /></td>
                  		<td align="right">									
                  		<input type="submit" class="button" value="Login" name="cmdweblogin" /></td>
                  	  </tr>
                  	</table>
                  	</td>
                    </tr>
                    <tr>
                  	<td colspan="2"><a href="#" onclick="webLoginShowForm(2);return false;">Forget Password?</a></td>
                    </tr>
                    <tr>
                  	<td colspan="2"><a href="index.php?id=5">Register</a></td>
                    </tr>
                  
                  </table>
                  </td>
                  </tr>
                  </table>
                  </form>
                  </div><div id='WebLoginLayer2' style='position:relative;display:none'>
                  
                  <!-- ________________________________________ -->
                  
                  <!-- Password reminder form section -->
                  <form name="loginreminder" method="post" action="/v2/index.php?id=80" style="margin: 8px; padding: 0px;">
                  <input type="hidden" name="txtpwdrem" value="0" />
                  <table border="0">
                  	<tr>
                  	  <td>Enter the email address of your account below to receive your password:</td>
                  	</tr>
                  	<tr>
                  	  <td><input type="text" name="txtwebemail" size="24" /></td>
                  	</tr>
                  	<tr>
                  	  <td align="right"><input type="submit" class="button" value="Submit" name="cmdweblogin" />
                  	  <input type="reset" value="Cancel" name="cmdcancel" onclick="webLoginShowForm(1);" /></td>
                  	</tr>
                    </table>
                  </form>
                  
                  </div>    <script type="text/javascript">
                          if (document.loginfrm) document.loginfrm.username.focus();
                      </script>
                      
                  						</div>
                  					<hr class="clear-contentunit" />
                  
                  				</div>
                   
                        <!-- B.1 MAIN CONTENT -->
                  <div class="main-content">
                  				
                  
                  					<h1 class="pagetitle">testing</h1>
                  					<h1></h1>
                  					<div class="column1-unit">
                  						<br />
                  						<quickedit:content /><div id="fancyupload_container"></div>
                  <form action="index.php?id=80" method="post" id="photoupload" enctype="multipart/form-data">
                  	<input type="file" name="Filedata" id="fancyupload_input_data" />
                  	<div class="halfsize">
                  			<fieldset>
                  					<legend>Queue</legend>
                  					<div class="note" id="fancyupload_status">Please check files and start upload</div>
                  					<ul class="fancyupload_queue" id="fancyupload_queue">
                  							<li style="display: none" />
                  					</ul>
                  			</fieldset>
                  	</div>
                     <div class="footer">
                  			<input type="submit" class="submit" id="profile-submit" value="Start upload"/>
                  	</div>
                   </form>
                  					</div>
                  			<div class="footer">
                  				<p>copyright © 2008 <a href="/#mce_temp_url%23">hybrid films inc.</a> | all rights reserved | design by <a href="#mce_temp_url#">zinclabs</a> (adapted from <a href="http://1234.info/" title="Designer Homepage">1234.info</a>)</p>
                  			</div>
                  
                  					<hr class="clear-contentunit" />
                  				</div>
                  			</div>
                        
                  		</div>
                  		</div>
                  	</body>
                  </html>
                  
                  
                    • 6726
                    • 7,075 Posts
                    I have an issue when trying to set up the snippet on a private page (tested when I make the page public : works like a charm)

                    I have followed instructions :

                    1) Created a (uncached) page for the frontend (ID: 239) which has this call :
                    [tt]
                    [!FancyUpload? &FancyTpl=`FileUploadForm` &uploadpath=`telechargement/` &backendpageid=`240` &extensions=`jpg,png,gif,pdf,txt,doc,xls,ppt,zip,rar,rtf,txt,odt` &maxsize=`16777216` &uploadgroups=`pargade,partenaires` &userelpath=`true` !][/tt]

                    2) Created a non cached backend page (ID: 240) :

                    [tt][!FancyUpload? &mode=`backend` &frontendpageid=`239`!][/tt]

                    But when I try to upload a file, I get a "Upload failed (401)" message (unauthorized access code, if I remember correctly).

                    Where did I go wrong ?

                    Thanks !
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l&#39;outil id
                      • 23383
                      • 138 Posts
                      Is there something in your manager log?
                      When I’ll have the time, I’ll work on a new version.