Jump to content

Frank Vèssia

Members
  • Posts

    597
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Frank Vèssia

  1. @wanze I would like to avoid hack core files but if there are no other solutions I'll do it, thanks. Maybe if you can send me details of what files did you modifiy and where exactly I would appreciate that.
  2. I've read the post but i didn't come up with any solution...
  3. thanks WillyC, I installed and for "now" the problem is solved, but soon I will have the same issue, there is no way to use multiple directories for "/files/" folder?
  4. Hi guys, i reached the filesystem limit 32000 for subfolders on my server and the server support told me this limit cannot be increased. Right now i suspended all uploads by users, any idea how to solve this? Thanks
  5. thanks @joss but can't use that code on stackoverflow, and the case is opposite of mine...
  6. I made once, just replacing the wire folder, index.php and htaccess, same procedure for the upgrade but reversed
  7. Hi guys, I need to create fake subdomains for my users, right now my htaccess code is this one: RewriteCond %{HTTP_HOST} !^(www\.|cdn\.)?domain\.com$ [NC] RewriteCond %{HTTP_HOST} ^(\w+)\.domain\.com$ [NC] RewriteRule ^ user/%1%{REQUEST_URI} and it works pretty good except for one thing: this works => http://username.domain.com/subfolder this doesn't => http://username.domain.com/subfolder/ the trailing slash causes some issue...any idea? (I had to remove the trailing slash option from the template of "subfolder" page otherwise i get errors in both cases)
  8. What I did in few websites is to store the password right after the registration process in a field called clear_pass. It's not the best solution for security reasons but I needed a readable password for my users, of course you can do this if you have your own registration page.
  9. No errors. English is the alternative language. Where I can check these languages settings? Into "settings" of the page I have the alternative url path with the checkbox "Active" checked..no more...I'm using PW 2.4
  10. I noticed a strange redirect...I have 20 pages using the same template "category", all pages work fine except two of them, that redirect to the english version of the site (I use multi language)...it's so weird... domain.com/category = > en.domain.com I checked everything, deactivated also the processRedirect, I debugged the php, but it looks like the redirect starts before any template is called. Any idea ? Something I can check or a way to debug this redirection?
  11. The problem came when I upload an image using some iOs device. They overriding the original name, uploading everything with the name "image.jpg" so I have to rename the file immediately, right after the file is uploaded, otherwise there are good chances to overwriting files from different users, in my case...
  12. @adrian I ended up replacing the uploaded file with custom code, maybe i'm wrong but your plugin is executed after the file is uploaded because it uses the pw field and i needed to rename the file before was saved to the field. so this is my code <?php $u = new WireUpload('qqfile'); $u->setMaxFiles(5); $u->setOverwrite(false); $u->setDestinationPath($config->paths->root . "tmp_uploads/"); $u->setValidExtensions(array('jpg', 'jpeg')); $files = $u->execute(); foreach($files as $file){ $tempImg = $config->paths->root . "tmp_uploads/".$file; $newFile = $config->paths->root . "tmp_uploads/".$_POST['qquuid'].'.jpg'; @rename($tempImg, $newFile); $resizedImage = new ImageSizer($newFile); ...//other code } ?>
  13. Thanks Ryan for this new awesome upgrade. PW changed my life
  14. I'm going to implement it via API, I'll let you know asap, thanks for now.
  15. since upload on iOs returns filename "image.jpg", there is a way to hook the WireUpload "execute" function and pass custom filename for each uploaded images? <?php $u = new WireUpload('qqfile'); $u->setMaxFiles(5); $u->setOverwrite(false); $u->setDestinationPath($config->paths->root . "tmp_uploads/"); $u->setValidExtensions(array('jpg', 'jpeg')); $files = $u->execute();
  16. I ended up with this code, extract from the session db handler module, modified excluding guest users and focusing just on count: <? function onlineUsers(){ $mins = 1; $table = SessionHandlerDB::dbTableName; $sql = "SELECT COUNT(*) FROM $table " . "WHERE ts > '" . date('Y-m-d H:i:s', (time() - ($mins * 60))) . "' " . "AND user_id!=40 " . "ORDER BY ts DESC LIMIT 1000"; $result = wire('db')->query($sql); $row = $result->fetch_array(); return $row[0]; }
  17. @teppo i think it's the only way at the moment, thanks I'll try... my actual way is to add a custom field in user template and run this code on each page of my site: if ($user->isLoggedin()){ $lastActivity = time(); $user->of(false); $user->lastactivitypw = $lastActivity; $user->save(); $user->of(true); } Than I can use normal selector to get the list of online users based on 1 minute delay. My problem is I think this method is not correct or not optimized because I write the database on each page request...
  18. There's a built in way to get only loggedin users inside $users->find selector?
  19. I'm facing a strange behavior in pagination, I can't go after page999...page1000 return 404, it's a bug?
  20. Hi guys, happy new year to this amazing community. Anyone used Amazon Dynamo DB for caching data? I would like to have a starting point.
  21. Hi peterfoeng, thanks. I'll check into this issue . Regarding the pages, I use PW pages with some fields just for setup customization for the client. Example, the "team section" is composed as follow: Team - member 1 (page) - role field - facebook field - twitter field - google+ fields - member 2 (page) etc...
  22. mmm i'm using the latest chrome but on mac...strange, thanks btw
×
×
  • Create New...