Leaderboard
Popular Content
Showing content with the highest reputation on 11/26/2017 in all areas
-
How to install a customized ProcessWire instance in less than a minute All you need is to copy one file to your server, then upload a kickstartfile like this: <?php return [ 'pwurl' => 'https://github.com/processwire/processwire/archive/dev.zip', 'dbName' => 'kick', 'dbUser' => 'kick', 'dbPass' => 'Kix8s08$', ]; and if you want to customize your instance after installation you can create recipe files like this: <?php $this->installModule('TracyDebugger', 'https://github.com/adrianbj/TracyDebugger/archive/master.zip'); $this->installModule('AdminOnSteroids', 'https://github.com/rolandtoth/AdminOnSteroids/archive/master.zip'); $this->installModule('Repeater'); it needs a lot more cleanup and testing but any thoughts and ideas are welcome until i can finish it... BTW: it's not only about saving time - this could also be very helpful to share whole instances for debugging.6 points
-
The easiest is probably to use a module like this https://modules.processwire.com/modules/import-pages-csv/ To avoid timeout errors, you maybe have to split your data into smaller chunks, and/or temporarily increase PHP script execution time + memory. Writing a script yourself would look a bit like this (of course you'd have to hold your data in an array and do a foreach) https://processwire-recipes.com/recipes/create-page-via-api/ Helper library for parsing CSVs: https://github.com/parsecsv/parsecsv-for-php3 points
-
2 points
-
2 points
-
Welcome to the forum @rareyush ... Sanitizer can help in this case which cleans up the text. https://processwire.com/api/variables/sanitizer/ https://processwire.com/api/ref/sanitizer/ https://processwire.com/api/ref/sanitizer/text/ Try the following: $p_body = $sanitizer->text($key->body,['maxLength' => 250]); echo "<p>{$p_body}</p>";2 points
-
2 points
-
@Robin S - not sure what you think, but I actually don't think that "View site" really belongs under the user's name. Maybe it should be reserved for Profile and Logout and we should have a "Home" icon over on the left, just to the right of "Access"? Not sure what to do about the Debug option - I don't ever use it so maybe I am biased, but I think the link at the bottom right of the page is enough. I don't feel terribly strongly about this - just some quick late night thoughts , but I do think that some users may struggle to find the "View Site" link - I don't really think I would ever think to look under my username to find it.2 points
-
Also the changelog: https://getuikit.com/changelog "3.0.0 beta 3 (January 17, 2017) Add support for data-uk- prefixed component attributes" But they keep fighting it as they tend to miss some tests of the "support" of data- prefix as the changelog lists various fixes regarding this issue. If they themselves were to use it as a default we would we see less bugs, I guess.2 points
-
Hello @desbest. Below I've added 2 short video how to install Blog profiles for Processwire: REGULAR SITE PROFILE: TWILIGHT PROFILE:2 points
-
You have more than 6000 options in the select field? I would say if that's the case you should switch to using Pages and Page Reference.2 points
-
Just noticed a few new options have sprung up in v3.0.82 when I checked out my image field. Now I only wanted to control the height but the use client-side says: When using client-side resize, please specify both max width <em>and</em> max height in the fields above, or max megapixels in the field below. Am I to presume I was using server-side resizing before updating PW? I didn't choose client-side, this is how it looked when I just checked out the field. Also, if I haven't set a max width, is server side resizing the fallback or does non occur? Does client-side mean the original will not be on the server? I don't want to set a max width because it may be the case that the height ends up less than 1200px. Bit confused with this one. Any more info about these options would be awesome, thanks.1 point
-
It doesn't really. But for that matter it doesn't make a lot of sense under the wrench icon on the default theme either. It's just something you discover by using it. The advantage as I see it in the default theme is that you can quickly go to the front-end just by clicking the wrench - you don't have to actually find and click the "View site" link in the dropdown. Like "View site", this doesn't really belong under the user profile menu. But I don't mind much because like you I don't use it. I think you're right. But my main concern is just for my own use - I use the "View site" link so often that I would like it to be easy to find and click. An icon on either on the left or the right of the masthead would be fine.1 point
-
Version 0.10.0 is in the module repository. This has a major behind-the-scenes refactoring to allow for remote repository adaptors (with result caching). Github is supported fully, and I've made a start on the BitBucket adaptor... This version also fixes a couple of issues that have been reported by @adrian and @matjazp.1 point
-
Thanks for the report @Federico. I believe the issue you are seeing is caused by problems in the PW core rather than being specific to the Custom Inputfield Dependencies module. I found problems with several of the inputfield visibility options when used with fieldset inputfields, and created a GitHub issue here: https://github.com/processwire/processwire-issues/issues/441 This is deliberate. It would be pretty easy for the module to hide inputfields via CSS, but by not rendering the inputfields the module allows for cases where it is critical that the inputfields not be seen or modified. The core inputfield dependencies feature works in response to other field values entered in Page Edit and hides/shows inputfields immediately. Therefore the core feature can only hide/show fields via JS and CSS, which may be manipulated by the user using their browser dev tools, or may fail if a JS error occurs. But the Custom Inputfield Dependencies module applies the dependencies via PHP before Page Edit is rendered, so I think it is an advantage to not render hidden fields at all. Hopefully the core inputfield visibility problems with fieldsets will be fixed, however I will also look at whether a workaround is possible within the module. In the meantime, I don't think the visibility dependency you want to set up requires Custom Inputfield Dependencies. You can achieve this using only the core inputfield dependency feature by setting the following for "Show this field only if": proj_code_valid=11 point
-
@adrian's Admin Actions module is a good starting point as well, take a look at source code files, most of them are short and good examples how to work with the API, you can create your own "action" and run from the admin if you want to:1 point
-
Your blog and the rest of the pages are on https in my browsers. Try changing your browsing browser or clear your browsing history1 point
-
@adrian please update to v1.7.2 and check module config options. Lete me know if that works for you.1 point
-
@ryan, would you consider making the top-level item in the AdminThemeUikit user nav configurable and/or hookable? I'd like to have the option to make this top-level link a "View site" link rather than an edit profile link, as per the default admin theme. It's much more common for me to want to quickly launch a front-end tab than to edit my profile.1 point
-
Not an answer, but just a clarification. Client-side image resize has been around since 3.0.63 Maybe the associated blog post answers your queries?1 point
-
or this one https://processwire.com/blog/posts/introducing-a-new-processwire-site-profile/1 point
-
That profile is pretty old now. Why not try this instead: http://modules.processwire.com/modules/process-blog/1 point
-
Hi @Donald, I recently used this Module and may have some tips, but I don't know it as well as others: I was able to send as many tests as I liked, as long as I had settings: Minimum time: 1 Maximum time: 300 (i.e. large) Restrict submissions: 300 (i.e. large) Exclude IP: 127.0.0.1 Sorry if you have tried exactly this and it doesn't help. In the GUI Admin, click Setup > Logs > simplecontactform-log This is a bit more involved, but essentially read the docs where it tells you how to use an 'options' array, populated with settings. One of the settings in naming the form and naming the fields that form is able to use. Then elsewhere in your template or another template, you do the same but the contents of the 'options' array is different, naming different fields from those available listed in the Module (where you add them). Essentially the Module GUI allows you to insert any fields that will be used across one or more forms and it's the calling of the forms in your code that determines which fields are rendered and used. I think I have got this correct and I hope it's helpful, very sorry if not. Good luck!1 point
-
Page Protector doesn't require access to the admin to work. It's easy to create your own logout link (https://processwire.com/talk/topic/684-client-logout-page/). Page Protector lets you style the login page however you want1 point
-
I would encourage to do that, it also means you can use something like Page Auto Complete so you don't have to scroll through a huge dropdown trying to find the airport you are looking for but instead you can just type it out.1 point
-
With the API, those 6k pages would be quickly created. There's open data around in various formats (CSV, JSON etc.) you can use, e.g. https://github.com/datasets1 point
-
Render UIKit list Here is another function to create various types of lists corresponding to https://getuikit.com/docs/list /** * Render a uikit list * * @param array $listitems All list items as an array, you can also use html inside the array (fe links) * @param array $options Optionally specify different options to list. * @return string * */ function ukList($listitems = array(), $options = array()) { if(count($listitems) == 0) return; $defaults = array( 'divider' => false, 'bullet' => false, 'striped' => false, 'large' => false, 'icon' => '', // icon to display before list items 'class' => '' // add custom class to list item ); $options = _ukMergeOptions($defaults, $options); $out = ''; $classes = array(); if($options['class']) $classes = explode(' ', $options['class']); if($options['divider']) $classes[] = 'uk-list-divider'; if($options['bullet']) $classes[] = 'uk-list-bullet'; if($options['striped']) $classes[] = 'uk-list-striped'; if($options['large']) $classes[] = 'uk-list-large'; if(count($classes)) { $class = ' ' . implode(' ', $classes); } else { $class = ''; } $out .= '<ul class="uk-list'.$class.'">'; foreach($listitems as $listitem) { $out .= '<li>'; $icon = (!empty($options['icon'])) ? ukIcon($options['icon']).' ' : ''; $out .= $icon.$listitem.'</li>'; } $out .= '</ul>'; return $out; } Usage examples: echo ukList($page->children); //creates a simple unstyled list of all child pages ids echo ukList($page->children, $options = array('icon' => 'heart', 'striped' => true, 'large' => true)); //creates a striped list, with heart icon in front and a larger margin1 point
-
$wire->addHookBefore('Inputfield::render', function(HookEvent $event) { $field = $event->object; if($this->process != 'ProcessPageEdit') return; $page = $this->process->getPage(); //... BTW, it would be better to hook a more specific inputfield render rather than just Inputfield::render. So something like InputfieldPageTable::render or whatever inputfield type you are targeting.1 point
-
<?php if ($page->check == 1) // 1 is checked, 0 is unchecked echo "some text"; echo $page->sometextfield; ?>1 point