Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/17/2016 in all areas

  1. Table Cells Selection is a great addon to CKEditor tables: http://ckeditor.com/addon/ckeditortablecellsselection https://github.com/likemusic/CKEditorTableCellsSelection Make sure to download latest from GitHub, there's a Js error fix in it.
    4 points
  2. ImportPagesPrestashop You can download it here: ImportPagesPrestashop With this module you can import your categories, products, features and images of the products to your new Processwire website! What does it? Once you've installed this module, a new tab will be under the Setup named Import Products from Prestashop. When you click on it, you can make connection with your Prestashop DB. After making the connection you can import first the categories, followed by products and the features and the images will be inserted in the fields of the product that is linked to these features and images. You can choose whether you import your categories et cetera in as much languages as possible or only in your default language. You can also choose to import the EAN-number and/or the products and the Reference code of the products. Requirements Only tested it so far on Processwire 3.x. Installation Download the zip file, upload it to your Processwire site and install it. Languages If you want this module to run as smooth as possible, name your languages like in the screenshot below. If you want to execute this module in dutch, download the .zip file, go to your languages tab in processwire, go to your dutch language and upload that .zip file to your site translation files. Credits to djuhari NL-Translations.zip
    3 points
  3. A: They're both big in Germany Not a scientific measure for sure, but for forum members who choose to disclose their location Germany seems to be the most common country. I'm curious about why ProcessWire would be especially popular in Germany. Was PW featured in a popular German-language publication or something like that? For German members (or any members actually): how did you first hear about PW?
    3 points
  4. a simple way of caching (nearly) everything using wirecache and 2 page render hooks in site/ready.php // the next ensures that the following code will only run on front end (otherwise back end would get cached, too which results in problems) // make sure to place anything you need in the backend before this line or change it to your needs.. if ((strpos($page->url, wire('config')->urls->admin) !== false) || ($page->id && $page->is('parent|has_parent=2'))) return; $cacheName = "prefix__$page->id-$page->template-{$user->language->name}"; if ($urlSegment1) $cacheName .= "-$urlSegment1"; if ($urlSegment2) $cacheName .= "-$urlSegment2"; if ($urlSegment3) $cacheName .= "-$urlSegment3"; if ($input->pageNum > 1) $cacheName .= "-page$input->pageNum"; // if already cached exit here printing cached content (only 1 db query) $wire->addHookBefore('Page::render', function() use($cache, $cacheName) { $cached = $cache->get($cacheName); if ($cached) { exit($cached); } }); // not cached so far, continue as usual but save generated content to cache $wire->addHookAfter('Page::render', function($event) use($cache, $cacheName) { $cached = $cache->get($cacheName); if (!$cached) { $cache->save($cacheName, $event->return); } unset($cached); }); of course not the same as a proper flat file cache like procache but at least saving many database queries make sure to adjust the $cacheName as needed, you can even cache query strings, almost everything you'd like and you could wrap everything in a condition to only run if no incoming post or query strings so form submits keep working example if (!count($input->get) && !count($input->post) && !$config->ajax) { // cache logic from above } have fun
    3 points
  5. Have you tried the table-option inside CKEditor? I find it really good for simple tables like yours. Just insert a table and anything you need to adjust after inserting can be achieved trough right clicking inside the table (insert, connect etc.). No need for HTML knowledge. For more complex tables there is of course ProFields Table, but for your needs it should be enough. Regards, Andreas
    3 points
  6. First of all, your question is asking to compare apples to bananas. ProcessWire is first and foremost a CMS, but with a great (smallish) framework beneath it, whereas Laravel and the others you named are big feature-rich frameworks. But to answer it anyways: (In it's role as framework) I've never regretted choosing ProcessWire for what it does, but if so rather for what it doesn't. E.g. tests are first class citizens in other frameworks out there and ProcessWire doesn't have that. Also ProcessWire's core is not the kind of framework which does come with all batteries included. If you need more advanced features e.g. like queueing stuff for later processing or handling notifications it's often more manual work, than it might be in your alternatives. On the other hand you'll get great data-modeling tools and the accompanied backend nearly for free. If you rather want to compare ProcessWire to other CMSs the bullet-points would certainly be quite different, as the use-cases are probably quite different.
    3 points
  7. I highly recommend reading the second post, too before implementing anything, as it might simplify a lot, depending on your setup.. Because I just updated all MarkupCaches with newer WireCache, couple of weeks ago, and really like it, I thought why not share it. So I got _init.php as prependTemplateFile, and _out.php as appendTemplateFile. But let's check out the interesting part, for example an article.php template. but for some pages, for example blog, it makes sense to include all children ;-) You can include any page you like, or define a time or a template as expiration rule. Here my defaults from the _init.php $cacheNamespace = "hg"; $cacheTitle = "$page->template-" . $sanitizer->pageName($page->getLanguageValue($en, "title")) . "-$page->id-{$user->language->name}"; $cacheTitle .= $pageNum ? "-$pageNum": ''; $cacheExpire = $page; I'm not exactly sure if there is any benefit in using a namespace, you can omit the namespace part and if needed just prefix the cache title. Works both. You'll see why I added the namespace/prefix a little later ;-) For the title I'm getting, the template, english page title (you can of course use the language title and omit the language name part, but I liked it better to have the caches grouped.. After language name I'm adding the page number if present. If you need you can of course create a different, more or less specific cache title. Add get parameters or url segments for example. Then I have $cacheExpire already set to $page as default value, so I don't need to set it in every template So my markup (only the important parts) looks like this: //You can have anything you like or need uncached above this $cacheExpire = $page->chilren(); $cacheExpire->add($page); $cache->getFor($cacheNamespace, $cacheTitle, "id=$cacheExpire", function($pages, $page, $users, $user) use($headline) { // as you can see, within the function() brackets we can pass any Processwire variable we need within our cached output. // If you don't need any you can of course leave the brackets empty // and if you need any other variable wich you had to define outside this function you can pass them via use() // so here goes all your markup you want to have cached // for example huge lists, or whatever }); // Then I have some more uncached parts, a subscription form for example. // After this comes another cached part, which gets -pagination appended to the title. Otherwise it would override the previous one. // It's not only caching the pagination, I just needed a name for differentiation. $cache->getFor($cacheNamespace, $cacheTitle.'-pagination', "id=$cacheExpire", function($pages, $page, $users, $user) use($headline) { // so here comes more cached stuff }); After this your template could end or you can have more uncached and cached parts, just remember to append something to the cache title ;-) Now comes, at least for me, the fun part haha In my prepended _init.php template file I have the following code under the cache vars: if($user->isSuperuser() && $input->get->cache == 'del') { if($input->get->clearAllCaches == "true") { $allCaches = $cache->get("hg__*"); foreach($allCaches as $k => $v) $cache->delete($k); $session->alert .= "<div class='alert alert-success closable expire'>All (".count($allCaches).") caches have been deleted. <i class='fa fa-close'></i></div>"; } else { $currentPageCaches = $cache->get("hg__$page->template-" . $sanitizer->pageName($page->getLanguageValue($en, "title")) . "-$page->id*"); foreach($currentPageCaches as $k => $v) { $cache->delete($k); $session->alert .= "<div class='alert alert-success closable expire'>Cache: $k has been deleted. <i class='fa fa-close'></i></div>"; } } $session->redirect($page->url); } So when I append the parameter "?cache=del" to any URL all cache files within my namespace and beginning with the predefined $cacheTitle will be removed. Means all language variations and the "-pagination & -comments" caches will be deleted, too. This is the else part. But if I append "&clearAllCaches=true", to the first parameter, it will get all caches within my namespace and clear them. Without the namespace it would clear Processwires caches (like the module cache), too. I'm storing a little success message in a session called "alert" which is closable by the FontAwesome icon via jQuery and expires after some seconds, means it will remove itself, so I don't have to click ;-) Maybe it makes more sense to change the cache title and have the page->id first, so you could select all related caches with $cache->get("hg__{$page->id}*"); I liked them grouped by template in the database, but maybe I change my mind soon because of this For not having to type those params manually I have two buttons in my _out.php template file. I have a little, fixed to the left bottom corner admin menu with buttons for backend, edit (current page), and now clear cache button which unveils the clear all caches button on hover, so it's harder to click it by mistake. When someone writes a comment, I added similar lines as above, after saving the comment, to clear comment caches. Ah, the comment caches look like "-pagination" just with "-comments" appended instead. I don't know if there is an easy way to expire a cache when a new children (especially backend created) is created, other than building a little hook module. With MarkupCache it could be a pain to delete all those folders and files in /assets/ folder, especially with slow connection. The database driven WireCache makes it much faster, and easier when set up those few lines of code to make it for you. more about WireCache http://processwire.com/blog/posts/processwire-core-updates-2.5.28/#wirecache-upgrades https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/WireCache.php Hope it helps someone and is okay for Tutorial section, if you have any questions, suggestions or ideas feel free to share. Hasta luego Can
    2 points
  8. A fix I found is to add a pseudo-element :before to make the dropdown list overlap with the button.
    2 points
  9. Agreed Padloper is great if you need to keep it all in PW. There is also FoxyCart - great system, rock solid, flexible, easy to use, and a breeze to implement on Processwire.. (see katonahartcenter.com, ohmspeaker.com for examples)
    2 points
  10. alternatively this could be interesting: https://processwire.com/talk/topic/14511-e-commerce-tutorial-with-processwire-snipcart-your-thoughts/
    2 points
  11. Your if-statement probably has not worked, because you don't have an input type submit in your form. Instead you have an button with the type submit. Then your original if-statement should work. if ($input->post->submit) { // Form was submitted } else { // Form wasn't submitted } Also I would recommend again to get and sanitize the input from code like mentioned above. Especially if you want to use it as a page name, the corresponding sanitizer is meant for this. You can set a new value for an existing field using the API like this: $p->of(false); // Shortcut for setOutputFormatting(false) $p->set("title", $sanitizer->text($input->post->title)); $p->save();
    2 points
  12. if Padloper doesn't meet your needs, I would go the Shopify Button route.
    2 points
  13. Hi @Junaid Farooqui, and thank you @adrian. Till now there isn't an Arabic language pack for processwire. I have fully translate and helped translating some web applications in the past (private and public projects). sometime for apps that I didn't even like But why I didn't start making an Arabic language pack for processwire till now? (and I am in deep love with processwire) I am not going to say I didn't get the time to do it just yet or something like that, even it's true. It is because of Mr.Ryan, He made it so easy and simple to have a localize your admin area even if you don't have a language pack (this man is not just a normal programmer or developer) he is a magician I made a small website for someone don't understand English and he don't need/want full accesses to admin so I just install language module in the core and translate whatever he needed only and everybody is happy I have a plan to make an Arabic language pack but I can't tell any estimate time for it but that just me. However, if you need any help I will be happy to assist. And sorry for my bad English expression.
    2 points
  14. I dont know. To test an upgrade, just make a backup of your database, rename the directory Blog to .Blog (in site/modules path) and past the new Blog folder from the ZIP you downloaded from github, copy the content of modules/Blog/template-file folder in your templates folder, then go to in backend > modules then click Refresh and see what happen. Edit: It dont work. The module have some dependencies not fixed, it do not copy the content of certain files, and some problems appear due to namespace. We must wait comment from BitPoet.
    2 points
  15. I have translated processWire 3.0.x nearly from scratch, as I felt the current "official" translation was way too outdated. So if anyone is interested: https://github.com/biojazzard/pw_spanish Enjoy. .a
    2 points
  16. Added the hint to use the hook before "save" to get the changes saved to the user.
    2 points
  17. How about an online tool like this one which can also accept pasted content, so your clients can also edit the table later on: http://htmltablegenerator.com/ Not a perfect solution, but at least it can help a lot.
    2 points
  18. Ok, the new version supports adding files and images. It works in both standard and field pairings modes. I haven't added support for descriptions/tags yet - will wait to see if anyone has the need. It should work for local server paths to files/images, as well as remote urls. Please test and let me know if you have any problems.
    2 points
  19. For one site I did this... Created two roles - member and pro-member (pro-member is user with active subscription, with permission to view certain pro-only pages). Added expiry field to user template, as adrian suggested. Users can register for free - they get the basic member role with permission to post comments, limited view permission, etc. If a member purchases a (non-renewing) subscription via PayPal: pro-member role is given to user expiry date is set according the duration they purchased and pro-member role is given to user Daily Lazy Cron job: checks for users with subscription expiring in next three days and emails a reminder to renew subscription removes pro-member role from users with expired subscription
    1 point
  20. Interesting thread and nice picture. Maybe you should make a request for ProcessWire to include more breast hair. In my case, I was introduced to PW by an co-worker who saw, that it won the CMS Critic 2014 Award for Best Free PHP CMS. At this time he was looking for a flexible field based CMS similar to Contao, which we used before. I quickly became a fan, because I only used to know WordPress and enjoyed the freedom I had as an developer + the friendly community. Or like The Hoff used to say:
    1 point
  21. Thanks for the tip - will try that for the main menu dropdowns.
    1 point
  22. You shouldn't get yourself in a situation where you have some children that are part of a menu and some that are part of a PageTable field - it will be a terrible mess. Avoid this by designating an alternate location for storing the pages for the PageTable field - somewhere under a hidden parent, or even under a dedicated parent under Admin.
    1 point
  23. Thank you for clarifying. I never developed a module or tried the Smarty for the TemplateEngineFactory module, so I'm not very helpful. But here are some ways on how to bypass the file compiler. Maybe adding // FileCompiler=0 in your module files will do the trick. Also there is a core module File Compiler Tags which is maybe similar to Smarty. As to your question on how to develop modules using an IDE, the latest blog posts could be interesting for you: https://processwire.com/blog/posts/processwire-3.0.39-core-updates/ https://processwire.com/blog/posts/processwire-3.0.40-core-updates/
    1 point
  24. This may be caused sub-pixel rounding, creating a 1 pixel or sub-pixel gap between the button and the dropdown. The main menu dropdowns in the default admin theme have a similar issue (in Firefox anyway), causing the menu to collapse as you move to the submenu unless you do it quickly. Looking for a fix for this is on my todo list.
    1 point
  25. Should probably be noted that this depends a bit on whether you want to disable their entire account after the subscription is over (in which case you should follow Adrian's suggestion or take a closer look at Login Scheduler) or if you actually prefer to keep the account usable and only deny access to specific pages. In other words, is the subscription an "all-or-nothing thing" or can one user subscribe to different types of content? One solution to the latter need would be storing pairs of users + subscription lengths in a Repeater field attached to the page they are subscribed to. Instead of Repeater you could use a PageTable field – or Table, if you don't mind the commercial aspect of ProFields – and instead of the subscription target you could store said data on the user account. There are many solutions, and the best one depends on your specific needs
    1 point
  26. Add an expiry_date field to the "user" template and then check the user's expiry date against the current date before showing them the page.
    1 point
  27. Hello @floridaDev, if you try to find thousands of pages, have a closer look at the findMany-function. Also can PHP7 boost your performance significantly, if its available for you. Regards, Andreas
    1 point
  28. Welcome @LimeWub, that is what the module compiler is for. If you are using PW 3.x.x it adds the ProcessWire namespace to the module files to make them compatible with PW3. If you don't want to deal with namespaces there is also PW 2.8.x available. But it is only recommended to use for existing projects. For new projects PW 3.x.x is the way to go. If you want to disable the module compiler, you would have to add the namespace in the module files by yourself to resolve the issues you mentioned above. But do you want to debug modules or are you trying to debug your template files? If that is the case, you could try to disable the template compiler in your config or in your templates. Regards, Andreas
    1 point
  29. What are some other projects that you follow or find interesting? For example in open source world? Here are some that I find interesting Godot engine - open source, relatively new game engine... when reading through tutorial they are explaining working with scenes and nodes, as it makes this engine kind of different from others, it works in a tree structure, everything can be a scene, and it is something that is very powerful after you understand it ... you know, that reminded of something Red lang - different kind of programming language that you can cross compile, with native GUI ... you can be download it, it is under 1MB ...on their website they mention that they are fans of eve-lang which is also interesting. Open source ecology - not a software, but they are building houses, in 5 days, self-sufficient on energy, water, with greenhouse, which can produce more food than a family needs, so you can sell it. ad it is still cheap. But not only that. They are also developing tractors, 3d printers, wind turbines and what not. Like PW these projects seems to be all very well thought out, something that is not yet fully understood by a lot of people, but there is a future in them... kind of genius projects ... i don't know how to explain simply, for me they are in similar category like PW.
    1 point
  30. ServiceWorker - Gives websites the power of native apps, like push notifications, background sync and offline experience. Here is an funny and informative introduction.
    1 point
  31. Thanks, @adrian! I was already using it, but didn't realize it took over the wireMail(); calls!
    1 point
  32. Hi, in before better answer, check this small thread from yesterday :
    1 point
  33. I was not aware of this section's existence, and since I've submitted a number of sites to the site submission page, I thought it may be good to post them here, too. So, over the past couple of years I've been using ProcessWire, I've had the opportunity to build a decent number of ProcessWire websites. I initially didn't like the idea of using ProcessWire when I was first required to use it, but I soon came regret even thinking that - ProcessWire is now my favourite CMS! Here are some sites where I've been the primary/sole developer (I must say, I did not design these sites, I just turned the designer's visions into reality: PROGRESS: A Creative Agency This is the second iteration of the company I work for's website. it was built to reflect our amended brand identity and scope as an agency. Hilton Extraordinary F&B This website is access only, so you will be unable to see the site in action, however, I have linked to our case study on our website which has some screenshots. Note that the app is being discontinued, since they want a single sign on system. So for one, it just wasn't going to be simple to do the SSO system on the app. And two, the app was kind of pointless anyway, and they just fell for the old "we need an app for that", when a responsive website is just fine for their needs. The Extraordinary F&B site also protects many important static files by restricting access to them, and using Apache X-SendFile to allow access to them when the user is authorised. TY Logistics This website is four a courier company based in the UK. The animating lines was fairly challenging, but I got there in the end. The animating lines work by generating an SVG path string on the fly, using various elements as reference points, setting the stroke-dasharray and stroke-dashoffset to the path length, and then animating stroke-dashoffset to zero. It utilises ScrollMagic for managing the scroll-based animations. Guy Hollaway Architects This website was built for an architects based in London and Hythe, UK. Folkestone Harbour Arm This was created to list events and information about the newly refurbished and converted Harbour Arm in Folkestone, United Kingdom. Unfortunately, there are no events on the site right now, which makes some areas look rather bare. However, there is a screenshot available on the page for this site on the sites directory. Visit Romney Marsh This was a budget-wise project to promote the Romney Marsh in the south-east of England. It features a Google Maps integration for the listing of attractions and accommodation. And has another, very similar map for events on and around the Romney Marsh. Hythe Care Homes This has to be one of the coolest care home websites I've seen! We developed a site for Hythe Care Homes, a care business consisting of three separate homes for old-aged people. More to come soon when I have time. On my lunch break right now, you see.
    1 point
  34. Always visible pagelist actions - this is what you have thought of?
    1 point
  35. filemtime() will return the time a file was modified. So maybe there's something wrong with the file / filesystem.
    1 point
  36. Have you added TextformatterHannaCode to the blog_body field's configuration?
    1 point
  37. Ah yes - I didn't mention all the errors in the instructions.php file because the functionality of the module seemed to be fine
    1 point
  38. @tpr: Hah, - you are more than welcome to contribute in this regard, Mr. AOS!
    1 point
  39. @bernhard This has came up earlier too, and could be useful without doubt. But it would require a different structure plus a well thought-out system that allows such modularity. In current state of AOS this is a no-go, and if someone would start it I would recommend to start with creating a new admin theme instead of patching Reno (or Default).
    1 point
  40. Like this? I am actually tempted to submit this functionality as a PR to the PW core. Perhaps if you guys agree you could post some support for the idea over on that thread so I can show that others want this functionality.
    1 point
  41. https://github.com/processwire/processwire-issues/issues/87
    1 point
  42. Dunno if it may help, but after two weeks of ProcessWire usage, I feel sorry not to have found it before, I wasted a lot of time learning other CMS (even Laravel based, although I do think that Laravel is amazing)
    1 point
  43. That is a great topic! Hope to find out about more of the cool stuff from you people, so please keep it coming! Here is my little addition to the list: Deployer - a deployment tool written in PHP. I am working with it deploying PW projects. Think of it a s Capistrano on PHP. The project is mostly a one man show similarly to ProcessWire. The author asked for support recently. I am the first and pitifully the only one on the bakers list yet. As I like the project a lot I encourage you to try it out in your deployment process and give it a little support if you can afford it and find it useful. ERPNext - an open source python+js based ERP from India. I like a lot playing with it but just do not have the courage to start using. It is configurable, said to have easy and powerfull API just like PW and looks good. And it is true opensource comparing to competitors. Zabbix - a powerful infrastructure monitoring service from Russia. Something like nagios but fully opensource. A thing to monitor your servers uptime and site availability.
    1 point
  44. Blender! 3D just around the corner! I kind of also like Wings3D even though clearly not as popular as Blender, it has a very interesting proposal as a 3D modelling tools.
    1 point
  45. If you want to teach your kids programming or just want to put together games easily, then GDevelop is highly recommended: http://compilgames.net/
    1 point
  46. You can use selectors inside children(), eg. $entries = $page->children("limit=10, sort=-sort"); $pagination = $entries->renderPager(); echo $pagination;
    1 point
  47. Hey Macrura! Your post got me going in the right direction. I had to modify it a bit. $config->urls->root->httpUrl returns an error, so I had to use 'https://' . wire('config')->httpHost . '/'. I'm also looking for links without the http:// and adding that in so that they'll work either way. Instead of just targeting the assets folder, I'm replacing all instances of relative links ('href="/' or 'src="/') and adding in the site's base URL. It seems to be working. $base_url = 'https://' . wire('config')->httpHost . '/'; $placeholders = array('class="align_left"', 'src="/', 'href="/', 'href="www.', 'src="www.'); $replacements = array('style="float:left;margin-right:20px;"', 'src="' . $base_url, 'href="' . $base_url, 'href="http://www.', 'src="http://www.'); $body = str_replace($placeholders, $replacements, $body);
    1 point
  48. $config->httpHost should do the trick
    1 point
  49. RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] Just for the record, you might want to consider the benefits of using www-subdomain before doing this, though.
    1 point
×
×
  • Create New...