-
Posts
4,054 -
Joined
-
Last visited
-
Days Won
67
Everything posted by Pete
-
Ah, you're right for the majoirty of fields - my issue appears to be with a very specific field I have. I have a select field called "category" with hardware and software as options (these are pages created using a config template) and depending on which one you pick a select field appears for subcategories for either hardware or software. When I edit the page in my custom module, the subcategory field doesn't load any options or show my selected option after save. If I go to edit the same page in the normal way, without saving it, the options are there in the subcategory field and the correct value is selected. Something about using the "custom selector to find selectable pages" option for this subcategory field isn't populating in my custom module. That selector looks like this (not that I think this is the issue): parent=/config/kb-subcategories/, kb_category=page.kb_category
-
I want to include the page edit form in another module. This can be achieved by doing something like this and the edit form loads perfectly: public function executeEdit() { // Change the breadcrumbs to be something related to our custom module instead of Admin > Pages > etc $this->fuel->breadcrumbs = new Breadcrumbs(); // start with a fresh breadcrumbs list $this->fuel->breadcrumbs->add(new Breadcrumb($this->config->urls->admin . 'myeditpage/', "My Awesome Edit Page")); $processEdit = $this->modules->get('ProcessPageEdit'); return $processEdit->execute(); } However when you save the page it says it has saved but none of the changes are saved. Any ideas what I might need to do to get this working? It's basically for an Intranet system where I don't necessarily want people to have access to the Page tree but want to be able to use the normal PageEdit form to save effort on replicating its functionality unnecessarily.
-
Has he been having an 18 year snooze or something?
-
Oh, and the other panicky information I hate at the moment is that some sites are recommending change passwords immediately when the correct course of action is probably to change them in a few days so services you use have a chance to patch their servers - otherwise you may get complacent and think you're safe but the server may still have been compromised. It's a bit of a mess to be honest, but most companies seem to be reacting swiftly. One thing I will be trying to do is keep a comprehensive list of sites I have an account with in future.
-
I know Servint updated servers as soon as the patch was released, but if you want to check for yourself and are on a Linux server then this is really useful: http://blog.servint.net/2014/04/08/patching-heartbleed-bug-openssl/ There seems to be a lot of panic over it to be honest and not enough clear information that mainly affects Linux servers, and not enough helpful links like the one I just posted to see if you're affected. If in doubt though, contact your Web host.
-
His is the one I was talking about - read his first line of code and re-read my post EDIT: specifically his first line of code should say $_SERVER and not $_SEVER in it.
-
Well this is a problem as it should say $_SERVER on that first line and not SEVER (a bit severe to be severing things if you ask me): <?php echo $_SERVER['PHP_SELF'] ; ?> Though I would personally do this instead: <?php echo $page->url; ?>
-
Nice site! Just because I'm feeling super helpful, attached is that homepage image after I ran it through https://tinypng.com/ - much smaller (79% smaller in fact!) and there's only very slight differences as far as I can tell - they're there if you compare them side by side, but less obvious if you view this one on its own.
-
$users->setCurrentUser() does not give desired result
Pete replied to Harmster's topic in API & Templates
So would this make sense then Soma? // $user is initially the user at time of page load // ... some code $users->setCurrentUser($u); $user = $users->getCurrentUser(); // ... carry on using $user as normal Unless maybe you could do $user = $users->setCurrentUser($u) but I don't know as I've not tested any of this - just thinking out loud. -
No worries. Just for info if you do anther map-related project in future, I found that http://leafletjs.com/ is a very good map library that's much easier to use and configure than Google or Bing (to me at least). There are a lot of similarities but I find Google can get a bit tricky once you stray too far from the basic functionality. There are also a wide variety of other mapping providers you can use: http://leaflet-extras.github.io/leaflet-providers/preview/index.html Not a suggestion that you should switch, just worth mentioning since this is a topic related to mapping and it's saved me a tonne of time recently.
-
That's a really nice site - fantastic work. My only comment as I'm typing this on a tablet with hi-res display is that the site is crisp in all areas except the map markers. I would suggest recreating them at twice the size and loading them at 50% size to counteract that. Everything else is perfect
-
Hi t2t2 You can also do this: like this if you like: $t = new TemplateFile("/path/to/your/template.php"); echo $t->render();
-
You can't actually get Windows 7 any more unless you buy OEM (technically voiding your license straight away). They stopped manufacturing retail discs late last year so expect Windows 8 to be the only option before long for Windows users. Not really surprising since Windows 9 is rumoured to be making an appearance late next year (note I used the word "rumoured" - I don't tend to trust many of these so-called news sites and their "reliable sources").
-
Are you adding markup inside the render function in the class directly? That's how I'm reading it from your post above. All of that should be done in the /site/templates/ file for the relevant page template. This tutorial will help you understand rather than picking apart something more complex: https://processwire.com/talk/topic/693-small-project-walkthrough-planets/
-
Thanks to Manfred and others who reported this - now finally fixed.
-
I agree with Joss. A lot of people don't realise just how much stuff there is to consider with a forum. If I were building one for a paying client I would set aside about 4 months of time to develop it (a basic one) and would be asking many thousands of pounds for it. Something like IPB has taken a team of developers years of time.
-
This sounds great and means I can do away with a custom module I use for this.
-
I was just thinking that myself Adrian.
-
Mouse pads for the win!
-
Any module that has a requires line is saying it requires those other modules first in order to work. Perhaps it should display a toolkit on hover of the greyed out button or something to make it clear.
-
I once had a whole site design ripped off about a decade ago. It bothered me greatly at the time, but I was changing the whole design about twice a year at that point learning new stuff - it was just a very early version of my gaming site. If someone did it nowadays though... well I'd go the same route as Joss and lawyer up as it would likely be another business stealing my templates. One I built last year is a bit of a grey area though as it's a slightly modified Foundation profile with not much added to it: http://kidderminster-husum-twinning.co.uk/ - I'm not sure I'd have much of a case if I wanted to sue someone because I'd put a box around some Foundation styling and changed some colours (though obviously there's more to it than that)
-
Strange 403 Forbidden calling the assets/files folder
Pete replied to Luis's topic in General Support
$user by default is always the user viewing the page. You should never overwrite that for stuff like this - instead use something like $myuser = $users->get(... and then you won't cross-contaminate your $user variables. I marked your workaround as "unsolved" purely because it's unwise and not an ideal solution - please don't be offended but we don't want people using this as a solution. -
In which case developers should really be required to pick a license (and include it in their repo - you have to include the full text somewhere don't you?) before a module is approved. A bit of a pain for those already on there, but I'm sure we could check them all between us. That or a nice automated email from ryan to those who submitted the modules which lists their modules and asks them to include a license and update the module page, then perhaps go so far as to remind people who've not updated it within 60 days to do it again, then after another 60 days take them down? Then again I've not had my coffee this morning yet so that's probably far too severe. It would be fantastic for people to actively respond to such requests if we send them one - it would at least show who is looking after their own modules (though admittedly I can be slow with Github pull requests at times!).