Jump to content

Sergio

Members
  • Posts

    530
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Sergio

  1. Hi! Maybe the Installation, Moving and Troubleshooting post can help you: https://processwire.com/docs/tutorials/installation-moving-and-troubleshooting/ Update: I forgot to say that you can download any previous versions on Github: 2.5.3 -> https://github.com/ryancramerdesign/ProcessWire/tree/2.5.3 Direct link for download: https://github.com/ryancramerdesign/ProcessWire/archive/2.5.3.zip
  2. Digital Ocean provides that feature now. You can assign access for developers. Didn't try yet.
  3. You can create a .htaccess redirect rule for that, a non-permanent redirect. And disable it when the translation is ready. Yep.
  4. If you just created a new language, edit you homepage settings and set that language as Inactive there. But if you already have a language activated and some pages translated, you will need to inactivate the language in all pages I think.
  5. You can just create a loop to render the product info and have a javascript masonry script take care of the client side display, showing different heights and widths automatically based on the content length.
  6. Seems you have a problem reading the .htaccess file that is responsible for handling the link structure PW uses. This file is present in the installation as a .txt but need to me renamed to .htaccess (without extension) and mod_rewrite must be enabled.
  7. Peter, Diogo explained the basic procedure and you can take a look on a post I did to show how to import Flickr album text and images. You can see how to save the images for each page.
  8. What blog? Ryan's? Blitz.io free plan is good enough for your scenario of testing 3 page impressions per second. You can try loader.io free plan as well.
  9. It is totally doable if you follow Ryan's tips here: https://processwire.com/talk/topic/3987-cmscritic-development-case-study/ It will be a good thing if you have imported the posts keeping somewhere the old ID, did you?
  10. I'm no expert, but adding to Pierre-Luc suggestions, I would do this (considering a budget as low as US$30/month): A Digital Ocean 2GB RAM VPS for the the PW installation (with a 2 or 4GB swap file); A 1GB VPS for the mysql db Procache to create static version of the website Nginx or other instead of Apache, for a small ram footprint Free plan on Cloudflare to have a CDN for static assets blitz.io to load tests (easier to use than jmeter IMHO) You can always increase the VPS's specs easily on DO, but you will need to shutdown them before that, so it's better to do it before production.
  11. Just a brainstorm here: maybe have the mobile app talk to a Firebase database via json, and PW could talk to it, parse the json and store in the MySQL db? https://www.firebase.com/docs/rest/ https://github.com/ktamas77/firebase-php
  12. Hi Dave! I'm almost on the same situation, a Wordpress site using the qtranslate plugin. Would you mind sharing your import module so I can take a look how you did it?
  13. I'm running a vagrant box with nginx and varnish and got this same problem. All folder on 777. The problem was that in the Varnish `default.vlc` I was disabling cookies from the admin url (/processwire). I commented the line and restarted the service and it worked.
  14. I need to get back to this custom dark version. I stopped working on it several months ago due to others projects, but I'm still in the mood to finish it. Bear with me. In the meantime, you can have a simple darker version of Reno Theme with a few lines of CSS 3 and the module Admin Custom Files. I think its a good option to work under dimmed light. Note: unfortunately it will not work on Internet Explorer (any version) 1. Install the module: http://modules.processwire.com/modules/admin-custom-files/ 2. Create a file and paste the CSS code below. 3. Save the file as `AdminThemeReno.css` on the folder `templates/AdminCustomFiles` that was created by the module. 4. Reload admin Note: You can tweak the colors a bit by changing the hue-rotate values. body {background: #222} #main {-webkit-filter: invert(100%) contrast(70%) hue-rotate(0deg)} #sidebar {-webkit-filter: invert(100%) contrast(90%)} .notes {-webkit-filter: hue-rotate(90deg)} #sidebar #main-nav a.current:not(.parent) {-webkit-filter: hue-rotate(120deg)} .ui-button-text, .InputfieldImagePreview {-webkit-filter: invert(100%)} Screenshots attached.
  15. Maybe Horst module will help you: http://modules.processwire.com/modules/page-tree-add-new-childs-reverse/
  16. Hello everyone, greetings from Belo Horizonte / Brazil. I'm on the process of converting a site from WP to Processwire, this one: http://www.ricardo-vargas.com I needed a simple Flickr Gallery and tried to find a way to create album pages via API and download the images to the local filesystem (just a few, for cache purposes). So I created yesterday a simple script that, given an album ID, download its data using cURL and save the photos to a temp dir. After that, add them to a new page under /pictures/ Feel free to comment on the code, I'm a designer, not a developer, and this is my first time using PW API You can grab it on GitHub: https://github.com/sjardim/processwire-simple-flickr-album Instructions Download the files Put the templates/get_flickr_sets.php on your templates/ folder. Create a page on Processwire using this template Create or edit the page where the albums will be created. In my case it was /pictures/ IMPORTANT: Add guest edit/create permissions to this /pictures/ page, otherwise the script won't work Create a temp dir on your server and set it on the previous file Get a Flickr API on https://www.flickr.com/services/apps/create/ Add one or more Flickr album IDs on get_flickr_sets.php Open the page using the get_flickr_sets.php template on your browser <?php include "../lib/curl.class.php"; // You will need to get a Flick API Key // Get it here: https://www.flickr.com/services/apps/create/ // Load it on the file below include "../lib/flickr_album_utils.php"; function download_file($url) { // Save the image on local filesystem (You need to create this folder first) // On your server it can be /var/www/name_of_folder/ $tempdir = '/Users/XXX/phpFlickrCache/'; $fp = $tempdir . basename(parse_url($url, PHP_URL_PATH)); // if we already downloaded the images for some reason (like testing), just return it if (!file_exists($fp)) { $fh = fopen($fp, 'wb'); $curl = curl_init($url); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_BINARYTRANSFER, 1); curl_setopt($curl, CURLOPT_FILE, $fh); curl_exec($curl); curl_close($curl); fclose($fh); } return $fp; } // Get some public album id to test $albumID = ["72157636029541784"]; //$albumID = ["72157649576832173", "72157633296236495", "72157644132091553", "72157636029541784"]; // Load ProcessWire API $pages = wire('pages')->get('/pictures/'); /* -------------------------- GET ALBUM INFO FROM FLICKR -------------------------- */ foreach($albumID as $album) { // Via GET, return album and its photos info $album = fa_get_album($album); // create a new post $page = new Page(); $page->template = 'picture_album'; $page->parent = $pages; // disable page output formatting $page->of(false); $page->name = wire('sanitizer')->pageName($album['title'], true); $page->flickr_album_id = $album['id']; $page->title = $album['title']; $page->generic_integer = $album['total']; //total number of photos on flickr album – OPTIONAL //My client albums descriptions have two phrases, one in English and other in Portuguese // let's separate then by the period, but sometimes there is no period, so the PT description will remain blank $description = explode('.', $album['description']); $en = $languages->get("default"); $page->summary->setLanguageValue($en, $description[0]); $pt = $languages->get("portuguese"); $page->summary->setLanguageValue($pt, $description[1]); $page->set("status$pt", 1); //activate portuguese page $page->save(); // We need to save the page BEFORE adding images /* ------------------------------------ DOWNLOAD AND SAVE IMAGES FROM FLICKR ------------------------------------ */ $images = array(); $i=1; $maxImages = 11; foreach($album["all_images"] as $f) { //we do not want all the photos, just a little bit if ($i >= $maxImages) break; // mount the flickr photo url using its attributes $photo_url = 'https://farm'.$f["farm"].'.staticflickr.com/'.$f["server"].'/'.$f["id"].'_'.$f["secret"].'_b.jpg'; // download and return the image file in the filesystem $images[$album['id']][$i] = download_file($photo_url); // add images to the current page in the loop $page->images->add($images[$album['id']][$i]); $i++; } $page->save(); echo "<p>Created page for album: <strong>".$album['title']. "</strong></p>"; // Tip: Now, after we saved the images to ProcessWire /site/assets/files/, we can safely delete them from the $tempdir if needed } print "<pre>"; print_r($images); print "</pre>"; Admin Screenshot
  17. Nice simple website, Michael! Great write-up about the modules and decisions made on the project, they will help PW newbies a lot. One thing I noticed is that the main image on homepage flicks on load (even on reloads). It appears bigger (upscaled) and resizes to the final format right after. I'm on Mac, Chrome Version 41.0.2272.118 (64-bit) Thanks for sharing!
  18. Extremely useful recipe and tips, Felix! I was planning to do that (critical css) for my next project and you just saved me precious time with your recipe. Thank you very much! One more thing I'd like to add is the removing of unused CSS on the whole project, using gulp uncss from Addy Osmani. Especially if you are using a front-end framework (Bootstrap, Foundation etc) or working on someone else's code: https://github.com/addyosmani/gulp-uncss-task You can get a great reduction on your final css file size, even 90% reduction sometimes.
  19. Foundation Interchange js is a nice one too, truly responsive because it lets you use different image resolutions. http://foundation.zurb.com/docs/components/interchange.html
  20. jlahijani, I'm looking forward to this WPxPW videos! My suggestion, if you have time, is to include a comparison between mysql queries response times and memory usage for complex operations and others under the hood performance metrics.
  21. Great job indeed! Would you mind showing some admin screenshots? I would like to see how you organized the accessories templates and relationships. I'm always interested in seeing how did you guys build the admin templates and how the content is organized; see what fields where used and so on. Sometimes creating an easy to use ('client-proof') content structure is more difficult than design and develop the frontend.
  22. Reno if by far my favorite admin theme. Many kudos for Tom and Ryan! The only thing I miss is a dark skin, so I'm creating one. It is in alpha state, there is a lot of details to do. I'm planning to share it here when finished if anyone is interested.
  23. Hi Juergen. I'm a newbie, but I think you can get the profile language using the user ID, like this: $userID = 41; $profile = $pages->get($userID); if ($user->language != $profile->language) { //if the user session language is not the same of his/her profile. echo "User language is different from session"; } else { echo $user->language->title; echo '<br /> '.$user->name; }
  24. Semantic UI has an example of responsive tabs: http://semantic-ui.com/modules/accordion.html
  25. Hi all, today I finally managed to get everything working together properly. Now here is my Foundation 5 dropin template: https://github.com/gebeer/pwfoundation5. It uses Foundation 5 SCSS files. There's a quite extensive readme file with instructions. Cheers gerhard gerhard, many thanks for this updated profile! I noticed two problems on your files. First, in the readme file, the link for the new Zurb gem (version 5) is: http://foundation.zurb.com/docs/sass.html If you just run `gem install zurb-foundation` , the gem v4 will be updated instead. It's also good to mention the new upgrade instructions: http://foundation.zurb.com/docs/upgrading.html The other problem is in config.php. ProcessWire's 2.4 has change this file a lot. I kept this new version and changed the lines 50 and 58 to make your profile work: /** * prependTemplateFile: PHP file in /site/templates/ that will be loaded before each page's template file * * Uncomment and edit to enable. * */ $config->prependTemplateFile = '_init.php'; /** * appendTemplateFile: PHP file in /site/templates/ that will be loaded after each page's template file * * Uncomment and edit to enable. * */ $config->appendTemplateFile = '_main.php'; Cheers!
×
×
  • Create New...