-
Posts
2,236 -
Joined
-
Last visited
-
Days Won
47
Everything posted by netcarver
-
Ok. Anything obviously slow in the network load time graph in your browser developer tools? (I generally use Chrome or FF for this as I don't know Safari at all.)
-
@Peter If you are talking about the DB diagnostics pages of ProcessDiagnostics then the warning about the need for optimisation is down to reclaiming wasted space in the tables - not about how fast queries will run. Have you tried setting debug to true in your config file and looking at the timings in the foot of the offending admin page?
-
@kixe I forked your repo and made a few tentative commits. The results are here. Changes include more options for the backup period and a hookable filename generation method. I haven't submitted any pull requests as I unified the indentation and line endings first and you might not want those changes.
-
@kixe Thank you for this module - I don't know how I managed to overlook it until now. It should come in very useful. Is there any chance you could either add an option to allow the automatically generated filename to include the creation date, or move the filename generation into a hookable method so people can supply their own name generator if needed? Regardless of the above request, thank you again!
-
You can get it in a PHP section of your template files like this... $ref = $_SERVER['HTTP_REFERER']; Be aware that this variable can be unreliable as it is up to the visiting browser to send it and it can also be forged. Most of the time it will be correct though. More info here.
-
I just built a server for a customer using a combination of a low-end intel nuc (a DCCP847DYE) with 4GB of ram and a 30GB eSATA micro SSD. This is for running a sports-club's admin system that I built with PW on top of a Ubuntu server LTS LAMP stack. I am very impressed with the whole set-up so far - from size of the package (smaller than the club's ADSL modem), the speed of the celeron + SSD (boots & serves PW pages quickly) through to the low power usage (6W idle to ~14W under load.)
-
@mrkhan As you found out, that only removes part of the settings page. Sorry to say that there is no simple way to do this yet on a per-role basis. There is a way you can do it for a template regardless of role but it needs a little code. To Remove The Tab Regardless Of Role... To remove the whole tab you need to set the 'noSettings' property on the template used by those pages. If you already have a template file set up for that template then paste this in, edit as needed, and view any page that uses the template... $temp = $page->template; $temp->set('noSettings', 1); $temp->save(); When you next edit any pages using that template in the admin interface, you'll find that the settings tab has gone. To get it back change the 1 to a 0 and re-view the page in the front-end and the tab will be back in the admin interface. If you don't have a template file attached to the template just create one and add it to the template, view a page, and remove the template file afterwards. Edited to add: Actually, there might be a hook that can be used for this. I'll see what I can find later if no-one else gets to it first. Here's a working idea - totally untested and probably not working... <?php class AdminHelperHooks extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'My Admin Helper Hooks', 'version' => 1, 'singular' => true, 'autoload' => true ); } public function init() { $this->addHookBefore('ProcessPageEdit::buildForm', $this, "removeSettings"); } function removeSettings(HookEvent $event) { if(wire('user')->hasRole('webmaster')) { wire('page')->template->set('noSettings', 1); } } }
-
@MarcC, @Richard Cook This might not be exactly what you want but, not long ago, repeaters gained the ability for you to give them custom title strings by hooking the renderRepeaterLabel() method. Can that get you any closer to your goals?
-
You could always create an "issue" for this feature over on github. Might be a while before it happens but at least it will be more obvious on Ryan's radar over there.
-
Module Upgrades and DB Schematics
netcarver replied to Mike Rockett's topic in Module/Plugin Development
@Mike I don't think there is a "standard" way but the best I've seen so far is this, from one of Teppo's modules. You should be able to get the idea from the code. -
This API withdrawal just hit my latest project pretty badly and, consequently, I've switched over to fullcalendar as I find that the big players like Amazon and Google deprecate some of their APIs frequently and it makes those services a pain to work with. For what it's worth, the latest version of fullcalendar does have google calendar API v3 integration but I've gone down the route of using the fullcalendar event handlers and a little ajax for creating/reading/updating/deleting events and storing them as pages in PW; so now my calendar-based projects can work without the need for a connection to google. I hope to get round to releasing this as a stand-alone module eventually.
-
Thanks for the feedback - looks like I'll be giving SSDs a go soon. I've been holding back as I remember a few horror stories about them packing in with no warning. BTW, I have a really nice Anker external USB3 SATA-drive docking station that takes bare 2.5" and 3.5" drives - it works great and has saved third party business accounts (along with SpinRite) - highly recommended bit of kit!
-
@Pete What's the reliability of SSDs been like for you so far?
-
Oops - just noticed, you said your image field is called "images" but you are using the default settings for this - which look for a field called "image" (no 's' at the end.) If you try this... $settings = array( 'pages' => wire('pages')->get("template=slides")->children(), 'title_xforms' => "scale(1.0) translateY(300px)\nscale(1.0)\nscale(1.0)\ntranslateY(300px)", 'image_field' => 'images', ); ...does it fix it?
-
Ah, OK, can you go to setup > fields and edit you images field. Look at the "Details" tab and let me know what the value is for the "Formatted Value" setting. That should help me reproduce this problem.
-
Released: PadLoper (commercial eCommerce platform for ProcessWire)
netcarver replied to apeisa's topic in Modules/Plugins
I believe it uses stripe's JS solution - so it should be PCI compliant. -
Looks like the module cannot access the image field from the pages you are passing in. Can you let me know what the name of your image field in these pages is and also post your code for calling the module. Hopefully we can track it down from that.
-
@BFD Calendar, Are you talking about the demo site or one you've tried setting up on your own PW installation? If it's your own installation can you look at your dev tools in the browser and reload the page and let me know if there are any 404s for the images. Thanks!
-
A proof-of-concept session handler module for PW that uses Redis as the session database. You'll need access to a Redis server (IP address and Port) and you can configure the session prefix, the Redis DB that the sessions will be stored in and a time-to-live for the sessions. Please let me know if you run into any issues with this module. Here it is on Github. Here it is in the modules repository.
-
Module Module: Matrix Fieldtype & Inputfield
netcarver replied to kongondo's topic in Modules/Plugins
@kongondo Great example. Timings look fine to me. Memory usage looks to be well within the default PHP ini setting for maximum memory assignment. -
Module Module: Matrix Fieldtype & Inputfield
netcarver replied to kongondo's topic in Modules/Plugins
@kongondo Sorry about the delay in completing my reply to your question about array size in PHP. I intended to post this link pretty quickly for you - but I got side-tracked. -
Not having JS enabled really effects the page tree more than other pages as that screen is almost entirely JS rendered. Do you have some extension like NoScript (in Firefox) or ScriptSafe (in Chrome) enabled? The other thing that comes to mind is perhaps it's the admin theme you are running. Does the default theme work ok? Updated to add: Another line of enquiry - open your browser's developer tools (or install them if not installed) and check if there are any errors loading the page tree.
-
I've seen this before. It happened when I disabled JavaScript on one of my sites. Can you confirm that JS is enabled for your site?
-
Hello waak, Welcome to the forum and thanks for the holiday greetings. Do you seriously have a site of that scale? If so, how many views per minute does it need to serve and is it mainly of static pages? In the meantime, there are links on google to answers to similar questions to yours. You may find what you need in those replies.
-
Do you have access to the filesystem on the host computer? If you do, then you can use a program called grep on *nix type systems and something like WinGrep on Windows to search all the files in the site root folder (and sub-folders) for the text you are interested in.