-
Posts
4,054 -
Joined
-
Last visited
-
Days Won
67
Everything posted by Pete
-
Not seen Flux before so will take a look. Vanilla has been around and is good for basic needs, plus it has a good-looking API I could easily look at the simpler ones - I know what you mean Antti and I do find that many forum features are simply not used or useful in larger software.
-
I'd forgotten about Angular et al - thanks for the reminder. Basically, +1 to what boundaryfunctions said Javascript will get you an extremely fast interface for any web-capable device. Just remember though there are considerations like barcode scanners to think about. Though a USB barcode scanner essentially just a keyboard that types the code and presses enter (I've tried it, that's all it does once it's converted it to numbers ) I'm not sure whether it would be the same on a hand-held barcode scanner that runs your web app - it might not be that easy to talk to the scanner. Certainly for a smartphone you wouldn't be able to talk to a third-party barcode scanner app easily, but theoretically it could work on a "proper" handheld device for shops.
-
I've talked about this at various points over the past year or so and have a lot of code related to the forums software used here - Invision Power Board. What I would like to know from people is what level of interest there is in such a module. It's ideal for community-driven sites and blurs the line between site and forums. I'll admit I've gone slightly overboard with my own personal needs on one site and have a list of the following working, but not in a packaged state as of yet until I know if there is interest: Login integration (logins validated against forums, PW account created if one doesn't exist) Member bar (the one at the top of the screen here, but on your PW site) Create new posts Fetch posts from forums Reply to topics - this and the above two points allow you handle comments via forum topics instead of the Comments module - if you have privileges you can also edit and delete comments Access to all member info from the forums Latest topics list (per user-group so members don't see staff topics) Users online list Forum statistics (could be used alongside page statistics to show how many articles are on your site along with members, topics etc - you know, pointless stats that look pretty ) ...and some others I've probably forgotten I'm also interested in hearing if you would like the module to be written for other forum software as well as whether you would be happy paying for a small fee. Answers to these two questions will dictate whether I package it so it's easy to configure for other forum software as well and also whether I could afford to branch it out to other software It will have templates for some basic things too like the member bar so I just need to think of the best way to package those as well - probably have them in the module folder and moved to the templates folder during installation would be neatest.
-
Awesome news, congrats ryan! I nearly wet myself Must be a combination of ___smoothTalker() and ___giggity()
-
I've often thought about this and have a few projects that might need a custom landing page - dashboard anyone?
-
There is a module that's a work in progress for this particular forum software to handle member integration and registrations that I use here: http://www.strategycore.co.uk but I've not released it yet. I should probably start a thread asking for what features people want because I went a bit overboard with that one and used forum topics for comments for articles etc which was all a bit overkill so I should probably release a stripped down version at some point It does make me feel good when people ask if the forums are part of ProcessWire though as it means I've integrated the skin (not my design, not taking credit) reasonably well (taking full credit ) - not easy with any forum software as those of you who have worked with forums will know. Certainly everything is a chore compared to ProcessWire No forum software ever seems to come with a decent API which irks me, but ProcessWire does spoil us in that regard.
-
I can answer most of those: It takes the rendered page and creates a HTML file, yes. It does this when someone first visits the page rather than creating them all which makes sense so they are created as they are needed. It is caching in the sense that it completely bypasses all PHP and mySQL queries, so pages load many times faster (they appear almost instantly). The .htaccess entry is a mere 5 lines long and covers all pages in the site. It essentially says "Look here for a cached file" and if it doesn't find one it defaults to loading a normal version of the page (which will then be cached for the next person) - essentially it's as scalable as your server is in that it creates physical pages/folders as necessary in a cache directory, so I don't think you'll have any trouble. Content in iframes will be unaffected as they're usually from external sources. All the other things you mention usually pull in from external sources that feed back to the page what they should be showing. The only difficulty you will have is if any of this is PHP as it will cache the PHP output, but I think all you're talking about here is usually a mixture of external javascript (for banner ads, Twitter widgets etc) and iframes. It should perform fine with millions of pages even. Since it's not doing any queries it's just loading static HTML pages so your server will love you for taking the load off. Varnish sounds like it would be a good addition if you need even more speed (better description here on Wikipedia than their own page) but it should be speedy with ProCache alone to be honest. Varnish seems to be more about storing frequently accessed content in memory to be quickly served, so on popular pages (assuming I understood it correctly) you will see an additional speed boost but I don't know enough about Varnish to be honest. There are loads of settings in ProCache - default is to wipe the whole cache when you save a page which makes sense purely because that page may be referenced dozens of times elsewhere, but it is totally configurable by template or section etc. On one website (sadly can't share the link) it is loading pages in half a second or less, making the site seem really snappy (obviously images take time to load first time for each page - no way around that). I would say it's definitely worth the minimal investment.
-
I think for the beginner (and my preference as well) the way it's set up by default is easier to follow. In your example above, what's in topnav.inc could easily just be in head.inc instead - no need to split it out since I assume the top nav is the same on every page.
-
Ah man, not sure how I missed that
-
I could, I just didn't want to do it that way. Just me being awkward
-
Hi Antti I knew this module existed but was looking for it in the modules section or on modules manager - could you add it please? It's perfect for a site I'm about to launch to map a few stray URLs
-
Thinking about it, this could just be a case for MarkupCache, then it doesn't matter so much if I do it the longer way, or even saving something to a cache file on each user save maybe. Seems there are other options, though some more selector functionality would fall under the category of "nice to have"
-
I personally think that for a ticket system you will be adding front-end forms for submitting tickets and displaying helpful articles (in the system I'm building at least) that I would add the management side of things to the front-end too. The page tree in the admin doesn't really lend itself to listing tickets, though I realise it is simple enough to add another page there. My other reason is I would like to add lower level users in to reply to tickets and want to keep the interface as simple as possible for them. Actually, reading that back they're all pretty weak excuses for not doing it in the admin, but I guess my main thought was that keeping it all front-end managed allows for more consistency for less experienced users, and the large intranet I'm building this to run inside already has a look and feel that is identical when adding content or viewing content.
-
Although I think I was writing PHP without knowing this myself for about 5 years diogo, but yes - I would also have learned this if I'd started reading PHP books at an earlier stage
-
This topic is a little redundant in that this page on the site supersedes it: http://processwire.com/about/roadmap/ (not your fault as it's not been mentioned here!) Your answer is most likely the first on the list for ProcessWire 2.5: "Support for maintaining separate draft and live versions of any page." I've edited the very first post to inform people to go there to see the latest roadmap.
-
I'm with teppo - I always use the semicolon, and he's right on it being optional (though I would suggest it should be standardised on the default template for those not as familiar with PHP as well as for consistency). But then again I always stick my curly brackets at the end of a line as well rather than on their own like all the cool kids, so I'm a heathen
-
Ditto on however many projects I've said I'm working on
-
Hey folks I'm pretty sure it's not possible, but is there a way to mimic mySQL's SUBSTR() function using a selector in ProcessWire? I've created fields for forename and surname and added them to the users template, but I'd love to be able to get unique initials for the surname so I can have a list of A-Z links linking to pages containing surnames that start with that letter. I know there's a longer-winded way of doing it simply by iterating through all users but wondered if there was a quicker way? The mySQL way is as follows in case anyone was interested, and it is lightning fast (0.0006 seconds): SELECT DISTINCT SUBSTRING(surname,1,1) AS letter FROM yourtable As much as 0.0006 seconds is nice, I'm less worried about speed but just don't want to load all users into memory just for this since it will add a chunk of overhead as more users are added I also realise I could just create pages for all letters with links and display a "no users found" message on pages with no users whose surname begins with that letter, however I like to be neat and not have a link on the letters where I don't need to
-
Ah yes, Soma is of course correct that since it runs on page save and saves the page at the end it will go on FOREVER. Like I said, it wasn't tested Changing $item->save to $item->save('sort_title') will of course work like he says.
-
Well it's sort of specific to the template/fields evan has on his site, so no point in submitting it really unless you're reproducing his exact same structure. All it is is his function inside the default helloworld module that comes with every PW install (check inside site/modules directory, and read more here: http://processwire.com/api/modules/ ). You'll be up and running with your own little helper modules in no time
-
No probs. On a few sites I've ended up creating a little site-specific module like this to check for various templates and do certain things after page save among other things and they can be really useful.
-
Pricing is very difficult to be honest and unless you are looking to create many of the same types of site (homepage, services page, gallery, contact page for example) you can't really set a price up-front. Even with those types of sites I've often found the client will ask for something unique that means any pricing I might have had at the beginning is automatically different as a result of the unique needs. With that in mind I don't list prices myself and prefer to quote based on at least an initial spec. An analogy would be a plasterer, plumber or electrician trying to have a pricelist for clients without the client first telling them what they need - other trades don't do it and I don't think our industry is much different in that respect. What you can do once if you are in the situation after a few websites that many of them are similar is work out a rough price and put the words "starting from" in front of that price once you're more confident about it, but even then I would worry about potential clients ignoring the "starting from" and focusing on the figure next to it At the end of the day, to most people browsing the internet a website is a website - they just don't know how a "simple" request can mean hours (or on occasion days) of coding or alterations which is, again, a reason why I don't list prices personally. A possible idea for yourself is to work out how much money you need to survive, then take a look on job websites at how much web developers are getting paid near to you and work it out based off those two figures. You should at least be able to work out from a job advert what an average hourly rate is for a developer working at a larger company, though by all means feel free to charge higher than this since you are essentially being designer, developer, salesman and managing director and saving on overheads - you may also find you work longer hours than a normal day job so your fees should take things like that into account if you're trying to give a client a total price for the job up front rather than an hourly fee. Long story short, there is no right answer with pricing, but the world will definitely need more, better websites for the foreseeable future
-
With just a little more work you could put that function into a module that runs on page save which would then be ideal for your needs For example, something like this: <?php class SortPageTitles extends WireData implements Module { /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array * */ public static function getModuleInfo() { return array( // The module's title, typically a little more descriptive than the class name 'title' => 'Sort Page Titles', // version: major, minor, revision, i.e. 100 = 1.0.0 'version' => 100, // summary is brief description of what this module is 'summary' => 'Sorts pages by title by second word if first word is "a, the, an" etc.', // Optional URL to more information about the module 'href' => 'http://processwire.com/talk/topic/3306-sorting-by-page-title-with-some-complexity/', // singular=true: indicates that only one instance of the module is allowed. // This is usually what you want for modules that attach hooks. 'singular' => true, // autoload=true: indicates the module should be started with ProcessWire. // This is necessary for any modules that attach runtime hooks, otherwise those // hooks won't get attached unless some other code calls the module on it's own. // Note that autoload modules are almost always also 'singular' (seen above). 'autoload' => true, ); } /** * Initialize the module * * ProcessWire calls this when the module is loaded. For 'autoload' modules, this will be called * when ProcessWire's API is ready. As a result, this is a good place to attach hooks. * */ public function init() { // add a hook after the $pages->save, to sort certain pages if necessary $this->pages->addHookAfter('save', $this, 'sorttitles'); } /** * Hooks into the pages->save method and sorts pages with a certain template based on certain criteria * */ public function sorttitles($event) { $page = $event->arguments[0]; // Only run if the page we just saved has the "item" template if ($page->template == 'item') { $items = wire('pages')->find('template=item'); foreach ($items as $item) { if ($item->sort_title=="") { $item->setOutputFormatting(false); $new_title = (preg_match( "/^(the|a|an)\s/i", $item->title)) ? substr(strstr($item->title," "), 1) : $item->title; $item->sort_title = $new_title; $item->save(); } } } } } I've not tested it, but it's based on the helloworld module, so if you download it (attached) and put it in your /site/modules folder it should work for you, and hopefully be a good example of how easy it is to write modules too SortPageTitles.module
-
Ah right, I didn't think you'd posted a mistake but it's one I've not personally seen before
-
pewpewpewpew.pw A site for 1980's sci-fi laser sound clips