Leaderboard
Popular Content
Showing content with the highest reputation on 07/22/2015 in all areas
-
http://blog.jquery.com/2015/07/13/jquery-3-0-and-jquery-compat-3-0-alpha-versions-released/ Please check your code for how you use the .show() and .hide() methods! I did a quick grep for a 2.6.9 site (has a dozen random modules) and the .js files listed below were using .show(). It might well be that some of them will break with jQuery 3.0. BatchChildEditor.js ProcessBatcher.js AdminThemeReno\scripts\main.js InputfieldFile.js InputfieldPageAutocomplete.js InputfieldSelector.js JqueryTableSorter\widgets.js JqueryWireTabs.js ProcessField.js ProcessModule.js ProcessPageAdd.js ProcessPageEditImageSelect.js ProcessPageEditLink.js ProcessPageList.js ProcessPageLister.js ProcessPageSearch.js ProcessTemplate.js SystemNotifications\Notifications.js templates-admin\scripts\inputfields.js templates-admin\scripts\main.js5 points
-
Agreed. I did some tests and while it could work the safest thing is adding the markup manually. In the meantime I added some cool things to make you FEEL better FEEL.popupSettings: settings to pass to Magnific Popup FEEL.wirePath instead of lightboxJSpath & lightboxCSSpath FEEL.stickSaveButton: set Save button position fixed to the top-right corner Multiple edit links Edit link positioning helper classes Simplified markup Preview of inline and fixed modes: This version is not released yet, I will create GitHub page with proper documentation.4 points
-
Hi Forum, I recently had a chat with a friend who was introduced to PW by me. He said: "brilliant cms, poor documentation." His comment makes me think about the cheatsheet: While we see new API methods introduced at a very fast pace, the cheatsheet doesn't seem to keep up. That's sad, because it's such a good resource. So, how can I (as a user with very limited PHP skills) help to update the cheatsheet? Is somebody skilled willing to team up with me - as kind of a supervisor - for the update tasks? Or are there any plans on behalf of the team to update the cheatsheet? Thanks!3 points
-
hi hansv, welcome to processwire visit your site unter /admin/page go to setup > templates click on filters > show system templates > yes go to family > allowed templates for parents > unselect "admin" now you can select template "admin" for the page /admin then go to /admin > edit process: ProcessHome and then set family for admin template back to "admin" that you can't select it again hope that helps3 points
-
Hi lokendra, ListerPro is a good option, but if the cost is an issue, there are certainly ways to accomplish all your requirements for free. As others have mentioned, probably nothing that is a "turn-key" solution. Check out the custom login topic. I'm not entirely sure what you mean by different logins, if you just want to style them differently, that is fairly simple. Can you describe what you mean a little more? This is possible using a small hook before ProcessHome::execute. Are you talking about a custom "Dashboard" page? You can probably modify Pete's Dashboard module to display specific information based on the users role (read: type). Are you talking about importing/exporting pages to excel? Adding Excel files to a page is simple with a files field, I assume you have a larger requirement. Can you explain a little further what you need to accomplish with these import/exports? I would check in with Kongondo about his module. There is also the Fieldtype JSON module by Martijn that might be worth a look3 points
-
You're welcome. I often use the cheatsheet to lookup stuff: http://cheatsheet.processwire.com/ Maybe the following works: $children = $page->parent->children(); $total = $children->count(); $pagePos = $children->getItemKey($page) + 1; // Assume the keys are zero based2 points
-
hi lokendra, welcome to the forum! [offtopic] two totally free things: 1) coding your own solution 2) asking politely (maybe ? instead of !! ) [/offtopic] besides that: thanks for bringing my attention to handsontable https://processwire.com/talk/topic/4147-excel-like-crud-in-pw-using-handsontable/ regarding your other questions: it totally depends on your skills. PW is in general not the click-click-and-ready thing. login-systems have been discussed several times, please search the forum https://processwire.com/talk/topic/6196-easy-search-on-pw-forums-with-google/ and go more into detail with your questions - i'm sure there are lots of skilled people here that are willing to help you. and listerpro was definitely a good recommendation. it's 40$ and imho totally worth the price (there are also discussions about pricing of the pro modules) good luck with your project2 points
-
please take a look at lister pro module - this has import/export features build in and for the different views per user it can be adapted with a hook. https://processwire.com/api/modules/lister-pro/ regards mr-fan2 points
-
Turn on config advanced mode, create template and select fieldgroup from another templates fieldgroup to share the fields but have a new template.2 points
-
This module is improved and extended successor to Version Control For Text Fields. It handles everything it's predecessor did -- providing basic version control features for page content -- and quite a bit more. Download or clone from GitHub: https://github.com/teppokoivula/VersionControl. This module requires ProcessWire 2.4.1 or later, mostly because of the file features, which require certain Pagefile and Pageimage methods to be hookable. There's no sensible way around this limitation; for those stuck with < 2.4.1, Version Control For Text Fields will remain a viable option. What does it do? While editing pages, fields with old revisions available show up with a new icon in their header bars. By hovering that icon you get a list of available revisions and by clicking any one of those the value of that particular field is reverted to that revision. No changes are made to page until you choose a revision and save the page, which means that you can keep switching between revisions to get an idea what's really changed without inadvertently causing any content to change. The module also adds a History tab to page edit. This tab opens a view to the history of current page in the form of "revisions" -- each of which is a group of changes to page fields processed during one page save (similar to revisions in various source control applications). There are three actions you can perform on these revisions: adding comments, live previewing what the page might've looked in that revision and restoring the page to specific revision. One specific feature that has been a big thing for me personally is support for file (and image) fields, as the original version control module felt rather incomplete without it. I'm hoping to take this a lot further performance, stability and feature wise, but as it stands right now, it's already included here and should be fully functional. Watch the video preview here I prepared a little screencast outlining most of this: http://youtu.be/AkEt3W7meic. Considering that it was my first screencast ever, I'd like to think that it wasn't that bad.. but I might give it another shot at some point, this time planning a bit before hitting "record" Upgrading from Version Control For Text Fields For those already using Version Control For Text Fields, I've added something extra. If you upgrade that module to it's latest version, you should see a new checkbox in it's settings screen saying "Don't drop tables during uninstall". If you check this, uninstall the module and then remove it's files (this is required in order to install Version Control), your old data should be automagically imported to Version Control. Import has only been tested with limited amounts of demo data. Proper tests are yet to come, so please be careful with this feature! Update, 21.6.2015: as of today, this module is no longer in beta. While all the regular warnings still apply (making changes, including installing any new modules, on a production site should always be considered risky) Version Control has gone through pretty extensive testing, and should be as stable as any other module out there.1 point
-
In some previous posts, I demonstrated a simple proof-of-concept CRUD “application” for PW using jTable. I really wanted to use DataTables since it is older, wiser and with a huge fan base. One thing I wanted was for the CRUD system to be as simple as possible and possibly be Excel-like (more below). With DataTables plugins, you can perform stuff like inline-editing and Auto-fill. The latter works just like in Excel and allows you to quickly populate cells (quick copy). But that’s as far as it goes. Google led me to other Table management systems. Some of the front runners include jqGrid and SlickGrid. SlickGrid is nice and using virtual rendering can display millions of rows with ease. Its support for displaying data delivered on demand (Ajax/server) is minimal; it requires you to download all your data before it starts manipulating it. Someone has created an Excel-like extension for it allowing copy-pasting between SlickGrid and Excel. Awesome! But, it still didn't rock my boat completely, especially the Ajax content issue. Then I stumbled upon Handsontable, a new kid on the block that describes itself as “a minimalistic Excel-like data grid editor for HTML, JavaScript & jQuery”. Though relatively new, it is as Excel-like as you can get. You can copy-paste from/to Excel [single to multiple cells and multiple to multiple cells], use the usual shortcuts (Ctrl-A, Ctrl-X, Ctrl-C, Ctrl-V, Ctrl-Y, Ctrl-Z - i.e., undo/redo, etc., and tab navigation, etc.), use Auto-fill (vertically and horizontally), freeze cells/columns, make cells/columns read only, Right-click context menus, insert/delete rows and columns, perform inline-editing, etc. Double awesome! Handsontable (HoT) is minimalistic but comes with a rich API. However, most of the implementation is down to you (sounds familiar?). It will render the Table and provide you with Methods/Events/Options to manipulate it. You just have to provide the data as an Array or JSON defining your columns and containing your data. Soma has a DataTable module that is currently read only; you cannot edit the displayed data directly in the table. It is also in lazy development . So, I started toying with the idea of using HoT as an Excel-like CRUD system (module) for PW. I wanted something that could quickly and easily do mass editing (Batcher-like). Imagine quickly creating basic pages/records by copy-pasting from Excel. Or quickly changing records by dragging (Auto-fill) or pasting new values over old ones. Well, the result can be seen in the screencast below. I’d like to hear your thoughts whether this is something that I should consider developing into a module; something that could be used by Superusers. Depending on implementation, it could be used by other users as well. All HoT needs is data. What you do with that data is up to you (the developer) and your code! This can be very dangerous if not implemented correctly, of course! You could easily delete important records! However, HoT does not touch your database! Deletions, insertions, etc., will not alter your database unless you specifically write the PHP code to do that. All it does is send data to the server via a method your specify (post, get, Ajax, etc.), and even that is your implementation. You do not need to implement deletions or additions. You can use it for updating content only or as read only, but where’s the fun in that ? In the screencast , apart from the table itself, all the other implementations are custom - the buttons, selects, auto-save (can be tricky? can DDOS your server?). The current implementation is not perfect; it is a demo after all. Certain stuff would need to be implemented differently . I didn't want to spend too much time on something that would not be useful in the end. All CRUD operations are via PW API and/or vanilla PHP. Deleted pages are Trashed and not permanently deleted. If there is interest for a module of this kind, I would request all the help I can get to develop it please. I would put it up on Github of course. In the demo, this is running off Diogo’s ACP module. Let me hear your thoughts please. Should a module like this see the light of day? Thanks Wasn't sure in which forum to post this...1 point
-
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 Screenshot1 point
-
Just in case anyone missed it... https://letsencrypt.org/2014/11/18/announcing-lets-encrypt.html The headline is: Let’s Encrypt is a new Certificate Authority: It’s free, automated, and open. Arriving Summer 2015 Extract: Let’s Encrypt is a new free certificate authority, built on a foundation of cooperation and openness, that lets everyone be up and running with basic server certificates for their domains through a simple one-click process. Mozilla Corporation, Cisco Systems, Inc., Akamai Technologies, Electronic Frontier Foundation, IdenTrust, Inc., and researchers at the University of Michigan are working through the Internet Security Research Group (“ISRG”), a California public benefit corporation, to deliver this much-needed infrastructure in Q2 2015. The ISRG welcomes other organizations dedicated to the same ideal of ubiquitous, open Internet security.1 point
-
Would like to mention that fieldtypeJson is build before the awesome profields and all data is in one blob of json. I wouldn't trust the json field for important data because javascript is the middle man here and potential data los can happen.1 point
-
That's really great, Wanze. I didn't think about getItemKey so that has helped me loads. Really appreciate the time here.1 point
-
Hi mr-fan and BernardB Thx for the quick response. Solution of mr-fan had no effect. The solution of BernardB is realy perfect. I still need to learn a lot! best regards hansv1 point
-
Just get that the missing backlink was there for processwire....now on http://browser-update.org/ homepage mission completed1 point
-
Hi Tom, Thanks. Simplest solution would be to include the file inside your PDF templates, like this: // We are in a template file under /site/templates/pages2pdf/, include /site/templates/_init.php include('../_init.php'); Cheers1 point
-
Hey, what I really would like to have are "virtual templates". It's already possible if you create a template via api but not via the admin backend. What is a "virtual template"? A virtual template is a template using a fieldset of an other template. So you can't define fields for it but you can create special template files instead of building a switch function into your template file. For example: For example you have a "grid" template which contains an image field and two textfields. Now you want to have a grid-sport and a grid-food gallery. But you want to have different appearances for them even if they need the same fieldset. Shouldn't be hard to implement and could make a handy addition1 point
-
1 point
-
Can it be something on the head.inc or upper_part.inc? What happens if you wipe everything from the home file?1 point
-
39 bugs....come on your kidding me. You're using a free CMS/CMF wanna some important Requirements and don't want to spend little money on it.... like BernhardB wrote code it yourself or bring in some work to contribute and/or as an exchange get help from some experienced coder. I'm not a pro so i'm dependent on help sometimes, too.....but i always do it in the same order search->ask->decide (buy or search for a programmer to give a helping hand)->contribute first (testing, translating, co-working)->get help->search..... This order should not be the only right way (that don't exist) and maybe we misinterpret your post (may some wrong insistence in the !! and the short words). So sort up your requirements and think what this end result of software should do for you/or your client and at least what is this achievement of your UI Interface build with PW worth for you and/or your client....and then decide what is to do. For shure there are other options but none is fitting your requirements like Lister Pro - so i thought to adapt any other free available solution to your needs whould cost more than 39$....but this depends on your hourly rate. best regards mr-fan1 point
-
Or download and install fieldtypeSelectFile. You can asign an other template file for that page to render. http://modules.processwire.com/modules/fieldtype-select-file/1 point
-
Just in case someone stumbles across this in the future - forceLogin() is now available (since 2.6.8): https://processwire.com/blog/posts/processwire-2.6.8-brings-new-version-of-reno-admin-theme-and-more/#new-session-gt-forcelogin-user-method-to-login-user-without-a-password1 point
-
Hi guys Some folks I've known for a long time are putting together a Web comic. It's not your average though - each page will consist of detailed panels and will be around 1mb per page with dozens of pages. In the background will be accompanying atmospheric music at about 3-5mb per track - it's quite the project and the site is being built in AngularJS and there's a big focus on making sure everything is served up as quickly as possible. It's going to get quite a lot of hits the first week, so given the media-heavy nature of it coupled with the fact that there will be global interest, can someone recommend me a good CDN that will handle a lot of traffic? Commercial is fine as they want the best for this project.1 point
-
Hi folks It seems like there's an issue with using arrays in field names. For example, when I submit this: <input type="text" name="extras[$event->id][$extra->id]" value="1" /> and print the contents of $this->input->post versus printing the contents of $_POST I get different results as below: // print_r($this->input->post) gives me this: WireInputData Object ( [stripSlashes:protected] => [data:protected] => Array ( [extras] => Array ( ) ) ) // Whereas print_r($_POST) gives me this, which is what I want: Array ( [extras] => Array ( [1504] => Array ( [1499] => 1 ) ) ) I'm happy to work with $_POST instead, but wondered if there was a reason why PW's version doesn't do multi-dimensional arrays from input fields?1 point