Jump to content

Pete

Administrators
  • Posts

    4,040
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by Pete

  1. Just a quick note to say that whilst I have little idea about the technicalities of the difficulties you're having, I'm following this topics closely as I was seriously considering using PW for an intranet and the type of functionality you're talking about Antti would remove one large obstacle from my way
  2. Oddly enough I'm having a similar issue right now with a different system and I'm sure it's because of conflicts between two and I'm 100% sure it's because of this: http://php.net/manual/en/language.oop5.autoload.php Not sure what the solution is though, but any suggestions would be much appreciated.
  3. Oh, but I'm now seeing an issue with where it's trying to pull content.css from when I look at Firebug. NetworkError: 404 Page Not Found - http://localhost/pw/wire/modules/Inputfield/InputfieldTinyMCE/tinymce-3.4.7/themes/advanced/skins/ergo/content.css Soma - can you confirm there's an error there? I'm not sure how to solve it though as it's not as simple as adding another line for the content_css variable
  4. Soma - this was exactly what I was trying to work out the other day so thanks a million With the joys of localhost versus live site folder structures however this is now probably better if it's put back in the default.php template file just before the closing </head> tag as this: <script> if('undefined' != typeof InputfieldTinyMCEConfigDefaults){ InputfieldTinyMCEConfigDefaults.skin = "ergo"; InputfieldTinyMCEConfigDefaults.editor_css = "<?php echo $config->urls->adminTemplates; ?>themes/ergo/ui.css"; InputfieldTinyMCEConfigDefaults.popup_css = "<?php echo $config->urls->adminTemplates; ?>themes/ergo/dialog.css"; }; </script> Then it'll work in every environment. Thanks again for working most of that out - I really think this is the ultimate way now of overriding the TinyMCE template for themes and not having to worry about the TinyMCE module being updated or overridden so I'm very happy with this
  5. Yes - just as a hint more than anything as I don't think it will do any harm. Maybe even mention the default skins you can switch between too (default, o2k7 and highcontrast from what I can see). That would be great
  6. I'm working on a module where I use MarkupCache within the module. Normally you would use MarkupCache in a template, but I fancied putting it in the module as it needs to use some 3rd party classes and it's just a lot of code to dump into a template. What the module does is my own version of pulling and caching X tweets from Twitter. The problem I had was clearing the cache when I'd changed the number of tweets to store in the module's config and saved the config. With help from netcarver it became apparent that you can hook into saveModuleConfigData, but it then took me a while to work out how to hook it. The answer was in InputFieldPageName.module on lines 134-7: static public function getModuleConfigInputfields(array $data) { $modules = wire('modules'); $modules->addHookBefore('saveModuleConfigData', null, 'InputfieldPageName_saveModuleConfigData'); So not in the init() where I'd been trying to put it, but in the getModuleConfigInputfields function instead. Because it's here though, you have to put the function that's called outsite of the class' scope, but that's not an issue really. In that same module you can scroll to the bottom and after the last closing curly-brace is this: function InputfieldPageName_saveModuleConfigData(HookEvent $event) { $arguments = $event->arguments; if($arguments[0] != 'InputfieldPageName') return; $data = $arguments[1]; $name = 'replacements'; if(!is_array($data[$name])) $data[$name] = InputfieldPageName::replacementStringToArray($data[$name]); $arguments[1] = $data; $event->arguments = $arguments; } You can still use the wire class from in there as well, so you can still pretty much do what you like. In my case it was this simple two-liner (setting the cache to 0 seconds effectively wipes it): $cache = wire('modules')->get("MarkupCache"); $cache->get("latest_tweets", 0); Just thought that might be useful to someone else in future So thanks again to netcarver, and also to ryan for having had the need to do this before and making saveModuleConfigData hookable!
  7. Oh now that's just perfect - had no idea it would be that simple diogo! It works just as well in the admin template's main.js file too! @ryan - any chance it could be included in the main.js by default? I know it doesn't necessarily need setting for the default theme, but having the prompt there that you can change it would be handy!
  8. Thanks, that certainly helps it stop being reset on upgrade! It would still be ideal if there were a way of setting the value somehow within a theme package though.
  9. Can I make a suggestion that the default skin for TinyMCE should actually be "default" and not "o2k7"? The thing is, whilst "o2k7" fits in with the default ProcessWire admin theme, the theme called "default" fits in better with almost every other theme produced so far. I can see a couple of options here - switch the theme to "default" for new downloads from now on and override the colours for the default PW theme, or else make that a configurable part of the module (though the second option doesn't help if you want to set it with your admin theme). I realise what I just suggested above for the default PW theme - overriding the CSS in the admin theme - is another possible way to do it but it's just that every other theme looks fine with the theme "default" and only the original PW admin theme looks fine with "o2k7". Another alternative would be a simple way to override the setting outside of InputFieldTinyMCE.js but I can't think of one off the top of my head. It just gets a little annoying at present to have to remember not to override the setting I change with each new PW upgrade Not a big issue of course, just one that bugs me a bit
  10. @yellowled - it would end up being a long list of those that we don't recommend. I've had the misfortune to work with about a dozen such companies over the years
  11. In the PW admin you can simply change the URL of the admin page itself to be something completely different. Just remember you'll need to remember what you changed it to in order to type that URL in the address bar and log in again afterwards!
  12. I found the X-Wing... under the ground... I've only gone left from the original starting point on that one so far - this is HUGE!
  13. Doesn't look like I will get the time for at least a few weeks, but what I had in mind for making an awesome newsletter module for ProcessWire is things like this: Building templates in PW's template system (duh) Being able to reference content from elsewhere on the site (like check out X amazin product/service) - essentially a repeater field for Service Title (if you want to override the page title you're referencing) short description (again, only if you want to override that page's summary), image from that page and then being able to drag and drop that sort of content quickly into any order. And so on It's really exciting when you think about all the possibilities of what you can do just by creating each newsletter content as a normal page and template combination, so I think that any such module should leave that completely separate and just focus on: Subscribes/unsubscribes - a default system to store subscribers as users with a guest and newsletter role (I think it should be this anyway) and make the class so it can easily be extended to add/remove/deal with subscribers any other way someone can think of Sending mail Dealing with bounces (from systems like Mandrill, although if you read the info it deals with a lot of this itself if you forget to remove bad addresses - it just won't send to them again to keep you compliant and will notify you, which is nice) These are the basics and I think it could just be a case of keeping it this basic - everything else is a case of PW pages and templates then, plus a bit of a headache in terms of making all your styles inline once again like back when you didn't know what a stylesheet was For that reason alone, perhaps it should ship with a default page, some fields and a template as an example? It could well be that this is complex enough to warrant another paid module, especially when you start thinking about shipping it with a selection of templates, or considering ways to make it easy to download new templates from within the module (probably a version 2 feature!).
  14. Thanks Joshua - I've still experienced this on occasion on one site. Same conditions as you - reading pages into a page array then sorting by a date field. Most of the time it works fine, but I've size learned to do an additional sort of -id which is fine in most cases but not ideal for queuing posts up for future publication. Every so often I see pages display in a weird order, like the sort hasn't sorted properly on one page load, but then later on its fine. Most odd - I'll try your suggestion and see what happens. I suspect nobody else has come across this as you have to have a very specific set of circumstances for it to happen.
  15. Yes, I'm not saying its a bad thing as You're both right that it would be a nightmare without it. I just remember a time when there was a chance of answering it correctly on the first attempt whereas as Apeisa says it can take multiple attempts nowadays so whilst the forms no longer get spammed I really worry about how many people are simply giving up. The Turing test of a simple Q&A has worked well for me elsewhere, even if they're simple things like "The Beagle probe crashed into Mars. which planet did it crash into?" you're keeping it simple and automated spammers are kept out. This forum software actually allows us to enter several such questions and loads a random one, so the more the better as if a spam program is taught only one answer there's still some level of protection. For example, it would take only a short amount of time to come up with a few dozen simple questions and I think that would solve the problem as well as reCaptcha. Sorry, I'm thinking more about the FormBuilder now than the CMSCritic form but these are purely meant as helpful suggestions
  16. For US sites StormOnDemand if you need the power, or lower down the ladder from the same parent company, LiquidWeb's offerings are great too. For me it's all about managed hosting and hardware/software faults being fixed whilst I sleep in about 2 minutes on the rare occasion they occur, as opposed to my experience with UK hosts which is you don't know all your sites have been down for 8 hours until you get out of bed. LiquidWeb and ServInt are just so far ahead of the game in terms of looking after customers that all the awful hosts I've use in the past should be ashamed.
  17. It is a lot of fun when you get playing with it. I've been building some test forms earlier this evening to try it out and will build some more serious ones later in the week. It's powerful, impressive stuff which seems to be the ProcessWire way
  18. I'd be suspicious of things stopping working like that. have you installed any modules or was it simply a case of working when you left it yesterday and suddenly not today? If it's the latter, I'd suggest contacting the host and asking them.
  19. There should be a setting in the /site/config.php file where you can change file permissions if that's stopping it working? The default is: $config->chmodFile = "0666"; On some hosting you may need to change that to 0777, and on other hosting it can be because of other reasons. I think in older copies of PW that line was even commmented out, but that could just be my bad memory making things up.
  20. Yep - basically you would install that module (really easy, just drop the file into the site/modules directory, login to the PW admin and install it) and one of the settings for it allows you to point non-logged-in users to any page on your site. What arjen is suggesting is to then create a page and a new template with your current content and tell the module to direct any non-logged-in users directly to that page. This way, you can go to yoursite.com/processwire and log in and get access to the whole site, whilst everyone else only sees that page. That way you also don't have the headache of your one page being index.html and ProcessWire's index.php conflicting with each other, which is quite likely going to cause you issues.
  21. I would suggest looking into Mandrill from those chaps at MailChimp. It's basically the sending/stats/bounce part of Mailchimp, leaving you to build the newsletter and subscriber database in ProcessWire. Basically it's another alternative to what Antti mentioned above, and one I'm really curious to look into myself if I ever get time! Colour me biased, but the pricing and features in Mandrill might be more appealing too (first 12,000 emails sent per month free).
  22. That idea never occurred to me, so +1 for thinking outside the box
  23. I can happily recommend ServInt - the company ryan uses. I've got a VPS in their Amsterdam datacentre and the service is great, sites load quickly and it's cheaper and better managed than UK VPS hosting (I've found that a lot with the better US hosting). The only drawback thus far is only being able to pay in US Dollars, but if you're fine with the conversion rate being in our favour for the past however many years then you can overlook the fact that pricing therefore fluctuates a little due to the exchange rate. It's all a small price to pay for better service and more cost-effective hosting I think.
  24. I've had two lots of hosting where I asked the host to switch it to suPHP - there are only a few minutes of downtime during the process, if that, and the permissions side of things suddenly makes infinitely more sense, so +1 to ryan.
  25. When you go to post a new topic there is a checkbox on the right-hand side to follow the topic immediately. I can't see a setting to have this checked by default and don't want to set it globally in the template but I'll see if it's possible to add such a setting. No promises though as it's nowhere near as easy to tweak as ProcessWire
×
×
  • Create New...