Leaderboard
Popular Content
Showing content with the highest reputation on 05/19/2016 in all areas
-
Hi everyone I´m creating an AdminTheme based on Semantic UI framework. Here is the beta version. I 'm fixing bugs. Github here Changelog: 0.0.1 --- Fixed background color / image.9 points
-
I've just added the module to the modules directory. As soon as it's reviewed it'll be available here: mods.pw/Bm (is it a coincidence, that the shortcode is my name's initial letters)5 points
-
Thanks! FormHelper and FrontendUser are my first PHP modules. Written with a really basic knowledge of PHP and also PW (just after my first steps with it ). That's why the first approach ignored the PW hooks and used custom code for that... I learned how to use the power of the PW API and PW hooks. I surprised about the powerful and simple module creation with the PW API and PW hooks! At the moment I moved to some other topics (Linux, Docker, change IDE, ...). But I'll come back to PW soon, because I love PW and also the awesome community here!4 points
-
For 'experimental templates' I often use Select File Fieldtype, when that field is attached to a template, pages using that template can select a file that will be used as template. See the field settings for the options.3 points
-
Always open can be accomplished by using these styles e.g. with AdminCustomFiles: #main-nav > li > ul{ display: block !important; } #main-nav > li { background-color: #e2e9ef !important; }3 points
-
Just add: protected static $fM; at line #19 You'll also need to change line 94 from: self::$fM['type']($f, $fM['label'], $data[$f], $fM['desc']) to: self::{$fM['type']}($f, $fM['label'], $data[$f], $fM['desc'])3 points
-
I know this is very old, but I just stumbled across it - don't forget that AdminRestrictBranch (http://modules.processwire.com/modules/admin-restrict-branch/) will take care of #2 and #33 points
-
Hi Matt, I find nik's Selector Test module to be really useful when developing selectors. If you ever have a selector that isn't doing what you expect, it can really help. Highly recommended.2 points
-
@rick - I removed the links as advertising because your email address led me to a Youtube video about a product and it seemed a bit like advertising rather than relevant to the 2 year old request Nik originally made. If you do have some code and want to write an integration tutorial as suggested by adrian that's fine - please go ahead - but outright advertising is prohibited by the community guidelines: https://processwire.com/talk/topic/8234-community-rules-guidelines/2 points
-
You might also want to consider adapting one of these methods: Probably good for experimental purposes too: https://processwire.com/talk/topic/9638-different-templates-folder-for-different-usersroles/ Best for replacing (e.g. based on some sort for conditions) complete "front end themes": http://processwire-recipes.com/recipes/use-different-sets-of-template-files/ And we also have Adrian's Tracy Debugger which supports "hacking" the compiler cache of ProcessWire 3.x for temporay testing purposes. But this is probably not what you need in this case, I just mentiond it for the record. EDIT: "typo"2 points
-
<?php // Everything is in /subdir (not as practical, but explains the intent) $file = __DIR__ . '/subdir/' . $page->template->name . '.php'; if(file_exists($file)) include $file;2 points
-
By default it's not possible to use subdirs, but you can use the settings for each template to change the file the template is associated with. Either just update it for some of your templates or just associate any template with some kind of routing.php, where you can implement any custom logic to route requests to the correct files.2 points
-
Hi, if I'm not mistaking, the sources are included in the processwire github repository: https://github.com/ryancramerdesign/ProcessWire/tree/devns/wire/modules/AdminTheme/AdminThemeReno/styles2 points
-
I've set a custom image to replace the PW logo in the admin in "/site/modules/AdminTheme/AdminThemeReno/styles/images/logo.png". This worked fine until now, but since about v3.017 it doesn't show up, but the original PW logo. Is there a way to fix this? I'm using the Roboto color variations as explained here: https://processwire.com/blog/posts/processwire-2.6.8-brings-new-version-of-reno-admin-theme-and-more/#admin-theme-reno-roboto-colours However, it's a bit out of date, eg. the new dropdown buttons don't show correctly and other minor glitches appear here and there. Could we get the source scss (or less?) files for the Reno style, to customize them? I'm interested mainly in colors, and it would be even better if we could have a "color customizer" in the admin interface for the Reno theme. I've made this manually and there are only a few main colors, and by tweaking them the admin can match the client's color scheme.2 points
-
I'd suggest Robin's step 3 no matter if you need to match form submissions to payments or not. People might try to fake the form requests (if the CSRF token doesn't already do so) and with that hidden field you can always check things in hindsight should really something go wrong.2 points
-
Right. Previously the readme contained a wrong syntax for latte files "_('text')", but it shouldn't need the brackets. So if your syntax is also right it would work fine. Clearing latte cache is recommended though. But you should see at once whether it works or not2 points
-
Thank you, adrian. That fixes it. Just adding the curly braces around $fM['type'] was enough to avoid the error message. Before I read your reply I was doing $function = $fM['type']; $fields->add( self::$function($f, $fM['label'], $data[$f], $fM['desc']) ); which also worked.2 points
-
Good suggestions, by using Pia, you won't have to touch the slick code. If you would decide to convert some images to vertical, you would have some big headaches to change the css that you already defined for slick. If you do decide to go with vertical images, I would advise you to use the images as background of an empty element instead to make them responsive and avoid strange distortions. You can keep the proportions of an empty element with this very interesting but simple trick http://stackoverflow.com/questions/1495407/maintain-the-aspect-ratio-of-a-div-with-css, and then set the images as background with cover and contain sizes.2 points
-
This is a very beta version of the separate functions I use to generate srcset/bgset markups. There's some similar functions floating around in the forum but this one is a bit different because you can set "named image sets" which you can use easily site-wide. It's definitely work-in-progress so use it at your own risk. MarkupSrcSet Generate srcset and bgset markup for lazysizes. Features generate srcset/bgset markup for lazysizes set image sizes in JSON array add required JavaScripts automatically (optional) fallback to smallest image size if JavaScript is not available Usage Image sets JSON (in module settings): { "hero": [ [640, 210], [1080, null], [1920, null] ], "featured-image": [ [360, 240], 1.333, 2.667 ], "gallery-thumb": [ [240, 120], [480, 300], [800, 576] ] } Image methods $image->srcset(): <img <?php echo $page->featured_image->srcset('featured-image'); ?>> $image->bgset(): <div <?php echo $page->images->first()->bgset('hero'); ?>>Lorem ipsum</div> https://github.com/rolandtoth/MarkupSrcSet1 point
-
Hi Steve - sorry you had to waste a couple of hours troubleshooting that, but thanks for the detailed analysis of the problem and the solution. The latest version should take care of it - please let me know if there are any continued problems. Thanks again!1 point
-
There's a data integrity check available under "Action" tab when editing a field.1 point
-
Try: created_users_id= as the selector, rather than user.1 point
-
Hi Adrian, I think there's a problem when using your module with any other code or modules that use fgets() or file() - such as Horst's WireQueueTextfile module (and possibly others.) I've just spent a couple of hours tracking this down over IRC with a client. The init() routine of your module sets PHPs auto_detect_line_endings flag to true - which can have un-intended consequences on other code run after your module initialises. In my client's case, they are using WireQueue with the textfile storage and it was throwing up errors, with your module installed, while unserialising a line pulled from the queue file using fgets() at the end of the getItem() method that pulls an item from the Wire Queue. Commenting out the following in TableCsvImportExport.module; ini_set('auto_detect_line_endings', true); fixed things for us. I understand the attraction of making the exported/imported files cross-platform compatible, but I think your module has other options open rather than changing the PHP setting during the init() routine. Perhaps, at the start of the import routine, you could read the initial state of that flag, then ini_set() it to true while you do the import and finally restore it to the initial setting on exit from your routine? Thanks for your great modules and for considering this request!1 point
-
http://modules.processwire.com/modules/jquery-file-upload/ https://github.com/adrianbj/FieldtypeVideo1 point
-
https://processwire.com/talk/topic/12830-reaching-the-limit-of-pocket-grid-css/#entry1166101 point
-
I didn't test the theme thoroughly but I spotted some bugs, so, here's a quick feedback: The color background color doesn't change, and the info in the footer needs more space: Also, there is a flick when I go to another page. For a fraction of time the background is white and the elements are positioned differently.1 point
-
@diogo: this is a really nice one. Many thanks for sharing!1 point
-
1 point
-
Thank you all for your tips and answers. I think i might have explained things wrong. The only purpose i have is for me to have a way to organize things so its more clear. Like in my Editor or in my FTP client. Not that i wish to switch certain template files for specific templates and so on. Its purely a organization issue. But i thank you anyway. szabesz seems to come closest to what i was after. I will have a look.1 point
-
1 point
-
It is also possible for such easy things to create a own dashboard for this kind of one way administration and hide everything else...or change the Process/Settings of the Pagetree Adminpage to Lister Pro Process...1 point
-
Thanks @Sebii, I'll look into them. @szabesz I like the Reno theme better, even with its little quirks. It does have "dropdown" menus, at the end of the rows there's a flash-like icon. A very basic customizer would be FUN (and not FAN)1 point
-
Basic admin customizer feature request? I support it! +1 However, I'm still a fan of the classic theme, mainly because the Reno theme has no dropdown menus, which I miss a lot. I no not like clicking around too much, the accordion style menu is not much fun..1 point
-
@Neo, I might be misunderstanding the flow of events but if you don't want people who haven't paid to submit the form you only render the form after payment. This wouldn't require any special Form Builder feature, just normal template logic. So it would go like this: User submits payment to MercadoPago from a payment page on your website. You check the response from MercadoPago to see if payment is successful. There must be some method in the MercadoPago API for this. If the payment was successful you render the form, maybe populating a hidden field from a get variable if you want to match the form submission to a payment. User submits the form for moderation.1 point
-
I assume you are not able to upload and execute binarys on a shared host. I think it isn't allowed / is suppressed by the hoster. At least, that the GD-lib is invoked points to this. You also can force an image engine via API calls: $image = $image->width(500, array("forceEngine" => "ImageMagickCLI")); I think you need to ask the hoster where the IMagickCLI resides and take this path.1 point
-
v015 is uploaded to GitHub. Syntax for string translation in .latte files is changed to "{_'text, context, textdomain'}". In textdomain use "__()" if you need no context, and "_x()" if you do.1 point
-
I've to write a little love letter! I just play the whole day with your modules and i've to say that i'm very very overtaken by your simple modules with a real big benefit to rule API forms and user managment things! Thumbs up for your input on this topic! Until now, all i've done worked and i will use this for my first bigger community project website (about several hundred frontend users) and will report how fu() will work. But this modules follow PW basic rules - simple - easy to use so i don't see any rough edges... Just wanna say a real big thank you and make the suggestion to put the modules from "alpha" state to "beta" ...since many things are fixed the last few months and i think theese modules are indeed in production use... Best Regards mr-fan1 point
-
I suggest to use Pia. With Pia, you simply can define the (max) outerbox dimensions and it will return you an image with dimensions that fit into it. Means, if you define a 600x600 box you will get back an uncropped image variation where the larger side is 600, regardless if it is portrait or landscape. If you like to have larger landscapes than portraits, you can define width=800, height=600. It is simple. Examples with Pia: $thumbnail = $image->contain("width=800, height=600"); $thumbnail = $image->contain("square=600"); If you have many different aspect ratios with your images, you also should have a look to Pias option "weighten"!1 point
-
Hi kuba2, If you use ProcessWire to crop the image like this: $image->size(800,600);, you will not be able to get a portrait image. I have never used Slick Slider, but you need to change the way you adjust the size of the images in order to work with an image file which is higher than it is wide.1 point
-
While discussing categories, we must not forget kongondo's evergreen write up on the subject https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/1 point
-
Hi JeevanisM Oh, terribly, terribly old! No idea where those files are now, to be honest, but they were built with an older version anyway. However, it is not really necessary. Basically, the trick is in parent-child relationships. The simplest way to build a news portal is to create a home page and then create pages under that - one for each article. Using the PW API you can then list them on the homepage. See here: https://processwire.com/api/ref/page/children/ The first example produces all the children in an unordered list: <?php echo "<ul>"; // Render navigation for all child pages below this one foreach($page->children() as $child) { echo "<li><a href='$child->url'>$child->title</a></li>"; } echo "</ul>"; You can see that you could use any html markup you like, for instance your blocks. Processwire does not hamper what html/css/js you use - just think of the /site/templates/ folder as the root of your site and put it together as you would do for a static site - just with the API, if you get my drift. Now, that is the simplest example, but you can go lots of ways from there. If you wanted to have simple categories, then you can create category pages under your home page and then articles under those: home -- news -- -- I lost the election -- sport -- -- I won the race -- food -- -- I got fat That is the most logical site and you can use the parent-child relationships in the api to list things. With this sort of site, you can almost get away with creating just one template-file and using it for everything, as long as you want everything to look the same. However, you can get much more complicated. Using the Page Field, this allows you to list pages in your template that have a specific parent. So, for instance, you can use this for tags. Home -- tags (hidden page) -- -- tag1 -- -- tag2 By being hidden, the tags parent page does not appear in any menu structure you may create and nor is it accessible easily. However, the tag pages, the children are. Using a page field, you can now list those pages as a select dropdown. But you can also tell the field to allow you to create new pages from the dropdown - making it a perfect tagging system. Just a note: Don't be put off by the expression "page." In processwire, that is basically one data record. It can contain just one field or hundreds - doesn't matter. Basically, everything chunk of data that relates to a template is a page - but may not be used as a "web page" as such. However, it means all data, however simple, is treated uniformly throughout the entire system and is accessible using the API. There you go - not a tutorial as such, but maybe some clues for you. Good luck1 point
-
Good Day. I can only speak for my experiences and I am not a talented coder, like many others on this forum. Yes, this is one of the many great and helpful features of Form Builder That I am not completely sure, however I believe it's possible. Someone with more experience will have to chime in. Form Builder is a module that saves you time, when it comes to doing forms. It's a well thought out form solution. Ryan has a solid money back guarantee on this product, so you shouldn't be wary about making a purchase. You also gain access to the Form Builder VIP Forum, where you will have access to a treasure trove of information about Form Builder and different implementations. The customization features of Form Builder are there to help you implement the solution you desire. It's very convenient and I believe a solid time saver. Good luck in making your choice.1 point
-
Ben provided the correct hook here: https://github.com/ryancramerdesign/ProcessWire/issues/1832 So we end up with: $pages->addHookBefore("ProcessPageEdit::processInput", function($event) { $page = $event->object->getPage(); // apply job title if a quote is selected, apply customer address if customer selected if ($page->template->id == 48) { if ($page->page_quote && empty($page->title)) { $page->setAndSave("title", $page->page_quote->title); } if ($page->page_customer && empty($page->textarea_1)) { $page->setAndSave("textarea_1", $page->page_customer->textarea_1); } } });1 point
-
@Marcel Epp #1: Yes, the code is right here: #2: My German isn't great but I think you are referring to the Posted by Franz Beck on 11 May 2016. That comes from here, the option post_date_text. As you can see, it is an empty string. My reasoning was that you cannot translate an empty string (although I don't know how the translation parser works). Instead, the idea is that you provide the translation/text yourself like so: $content = $blog->renderPosts($page, false, array('post_date_text' => 'on'))// whatever you want 'on' to be @All Others... Hope to get some time soon to look into your questions...sorry...1 point
-
This evening I had some time to investigate the UI glitches I mentioned earlier this week and found some solutions. 1. Popover gets cut off The popover gets cut off because of the Ajax loading of the Repeater Matrix items. The items have the overflow set to hidden as an inline style, even when opened. I can avoid this by not loading the items through Ajax, although it would be nice if this could be fixed, because I think setting the overflow of the item to hidden is not necessary, once it is opened. 2. Mix-up in detail view The mix-up in the detail view happened, because in my template I have one image field for a thumbnail and the Repeater Matrix with the slides item mentioned above. Right now I have many pages where the thumbnail field and slides item contain an image with an identical file name. If I try to toggle the detail view of one of those two images with the identical file name, the detail view gets confused and shows details to only of those two images instead separate. I can avoid this mix-up by using different file names, something I should have done in the first place, but just wanted to let you now. I hope I have explained this well enough. Regards, Andreas1 point
-
None that I know of. Are you sure you have that file in the right place? Edit the template for your order pages in PW. Click on the title (invoice number) field and, on the input tab, set the visibility to whatever you need.1 point
-
I love beautiful apps. It seems the Mac guys are always getting the cool looking stuff. I discovered this today on reddit and installed it immediately. I develop on Ubuntu and absolutely love the GUI on this thing. Very nice looking. Still putting it through its paces. I don't have any complicated projects to really take advantage of all its features. I've always favored the CLI anyway. But it's nice to visualize my repos That are your thoughts amigos?!1 point
-
I find that editors with low web skills have difficulties working with the ProcessWire Admin interface. I am here talking about users who rarely write text and with low web skills. Also, my customers are Danish but see the ProcessWire Admin interface in English -- they are not all comfortable working in an English user interface (I can fix this in part by adding fields in Danish). The main reason for the usability challenges is that users are forced to work in the tree structure in the ProcessWire Admin interface as it is today. The Page tree can be hard to comprehend when getting back to Admin after 2 months or more. Below I offer observations on what I have seen customers do in the user interface, and based on that I suggest how usability may be improved. Note, this post is written in a positive spirit with the intention to improve ProcessWire. Observed user behavior 1. New pages. Users incorrectly place new pages at root level when they correctly should have been placed in - say - the "News" section. Observed behavior: Users log in to Admin, immediately see the "New" link and create a new page. The link is incorrectly being placed at root level. Correct behavior: Users log in to Admin, click "News", click "new" (next to "News"). Training users in doing the right thing is also hard. It is hard to explain users to: "1) log in to Admin, 2) click "News", 3) click "new" (next to the News link)." As a possible workaround, I can lock down the content types that can be created from the root level, but in my view that should not be stricly necessary. 2. Overview. Users find the admin interface hard to understand when getting back to it after 2 months. Some of the questions users (and me too) ask themselves are: "What can I do here?", "Under which section (segment1 nodes) should I add my new Product or Event?" Possible workaround: The web designer can spend time writing a guide, but I guess most would prefer that the admin interface answered the question "What can I do here?" -- possibly with a written instruction. 3. Clutter in the tree structure. As a web designer I have to store categories andother system nodes in a tree structure that is visible to end users. I create a "Value lists" node and put pages that I use in different Select boxes in other pages -- editorial users really don't need to see these "Value lists" in the main view. Better: Move system information to a secondary area as in many other CMSes (see suggestion 3 below). 4. User error risks. Users can mess up the entire site structure if they start moving around with root-level pages. For instance, Navigation will suffer when using the Simple Navigation module. Also entire sections can be deleted / moved by editors. Suggested Solutions 1. Buttons. As a web designer it would be nice to have the option to create "buttons" on the admin start page (/processwire/page/). Example Buttons: "New Article" - clicking the button will create a new page of type "Article" and place it under a specified parent page ("/articles"). "New Event" "New Product" "New Solution" "New Employee" 2. Apps. Pretend that the website contain many "apps". As a web designer I can create such "apps" in Admin. Apps can be as simple as a shortcut in a menu (right menu as seen here). 3. "Site system trees". The Page tree contain two very different types of data. The first is content, the next is "system nodes". I would like to move the "system nodes" to one or more "site system trees". As a web designer I can create a "system tree" for the site that contain non-content nodes. A link to the "site system tree" can be placed in the admin navigation (Pages, Setup, Modules, Access). Access to "system trees" can be restricted. My "system tree(s)" would contain information such as: Blocks Snippets Menus Site settings Search Admin 404 Page Not Found Trash PS: How do I create "Admin apps" in the Admin left menu (as in this example)?1 point
-
When I need a calculated field that will be used for sorting, I like to add a hidden (or regular, doesn't matter) field to the template to store the calculated value. The value gets automatically calculated on page save. A hook like this in your /site/templates/admin.php can do the work for you: $pages->addHook('saveReady', function($event) { $pages = $event->object; $page = $event->arguments(0); if($page->template == 'rider') { $miles = 0; foreach($page->rides as $ride) { $miles += $ride->miles; } $page->miles_ridden = $miles; } }); Then when it comes to sorting, you just sort on your calculated field: miles_ridden. If you are adding this to an existing PW installation, then you'd need to establish the initial values for each rider's miles_ridden. This could be done with a quick bootstrapped script: /setup-riders.php <pre><?php include("./index.php"); foreach(wire("pages")->find("template=rider") as $rider) { $rider->save(); echo "$rider->name: $rider->miles_ridden miles ridden\n"; } Then you'd just load domain.com/setup-riders.php in your web browser, and then delete the file when done.1 point