- 
                Posts868
- 
                Joined
- 
                Last visited
- 
                Days Won1
Everything posted by DaveP
- 
	ProcessWire Conference 2013 / London / CambridgeDaveP replied to ryan's topic in News & Announcements My feelings are somewhat in accord with Pete's (except for the new family member - congratulations, Pete), and I'd love to go depending on cost etc.
- 
	While it might be 'correct' to throw a 401, I see no practical reason why a 404 wouldn't be acceptable. You won't want search engines indexing any of these pages, or any other user agent responding specifically to a 401, so a 404 would work just as well.
- 
	I think a similar effect can be achieved with http://code.google.com/p/minify/. I tend to get everything working without minify, just calling css and js in template files as required and then when everything works, minify into grouped css and js files as per the Minify docs.
- 
	Just a quick heads up about a gotcha that had me going for a few minutes this morning (and a note to Ryan). One of my sites was getting battered with comment spam this morning, so I searched the forum for Ryan's description of spam proofing the comments module, so I used the search and found the thread and copied the code and it didn't work, at least the javascript that Robert Zelnick posted didn't seem to. It turns out that the highlighting of search results seems to have munged the code - Whereas it should look like this - Note that one instance of #CommentForm has been un-PascalCased to #Commentform and Robert's code was perfectly good. (I have said before that I didn't care for search term highlighting and now it looks like I have a got a good reason other than personal preference. )
- 
	Just spotted (via Google Webmaster Tools) that I had the same problem on one of my sites that had been migrated from Joomla. I had put 301 redirects in the .htaccess file, and must have tested them at the time, but they were having the '?it' parameter added as well. To be honest, I have no idea why I didn't use Antti's excellent plugin in the first place, but I have now and of course everything now works as it should.
- 
	It's easy enough to revert (which I've done), as has Ryan, previously. I expect that there is the facility to block IPs etc in the software, which maybe should be looked at?
- 
	Very good points. Some consensus on this would be most helpful. FWIW my feeling would be to reuse forum content, and link back from wiki entries to original forum threads, in case users wanted to see the original context. In terms of language skills, whether because English is a second language or because a native speaker is just not confident, sensitive editing to improve readability in a wiki context should be acceptable to all. (See, my English is rubbish, and I am English! ) And anyhow, given the multilingual abilities of PW, there is no reason why the wiki shouldn't eventually have content in other languages. (?)
- 
	Show highlighted search keywords in search results?DaveP replied to MarcC's topic in General Support Diogo, thank you very much indeed! It works perfectly. And it prompted another Forum thread - http://processwire.c...arklets/!
- 
	Prompted by a post in http://processwire.c...lts/#entry13115, I got to wondering which bookmarklets others used. Here's a list of mine- Nofollow? : Highlights nofollowed links on a page. zap : removes a lot of irritations on a page - flash, animated gifs, and turns black backrounds with white text to white b/g and black text. View Passwords : shows contents of password inputs as plain text. SpriteMe : allows building of CSS sprites WhatFont : shows what font is used for an element. and Unhighlight : which does what it says on the tin with highlighted search terms in this very forum (kindly provided by Diogo ) Tell us about yours?
- 
	Show highlighted search keywords in search results?DaveP replied to MarcC's topic in General Support The major advantage to the js approach is that you can easily provide an option to hide highlighting without a fresh page load. I often hate reading when search terms are highlighted with a yellow background and look for a way to turn it off. (This forum, for example )
- 
	Ryan, just as a matter of interest, do you have any plans for the look of the admin area?
- 
	<offtopic> I can't read 'Lemonstand' without thinking 'lemonparty' and shuddering.</offtopic>
- 
	Having used Joomla (and Mambo before it), Wordpress, CMSMS and others in the past (and CodeIgniter if you need a nuke to crack a walnut), there is one real problem with the markup-generating systems, and that is that once you install a few extras, the markup becomes hideous. I can't remember who said that if the amount of markup is more than the actual content in your source, then you have a problem, but they were surely right. That, for me, is the great strength of PW, that I have absolute control over what is sent to the browser. Just look at the source of an average Wordpress blog, and then look at the sparse but functional source of (for example) one of Ryan's PW powered sites (http://processwire.c...tes/#entry12888 has three excellent examples). For me, a page that renders quicker in the browser and is easier for search engines to understand must be beneficial. That said, there might be scope for a few output 'helpers'...?
- 
	The trouble was, the second example produced a 'Property of a non-object' type error at the line if($user->hasRole('customer')){ so, in my case at least, the $user object wasn't being fully set for some reason. It was only when I explicitly set $user (as in the first example) that it worked. Don't know why, can't imagine it's to do with server config or anything.
- 
	I think I found a small error in the Cheatsheet. $session->login($name, $pass) returns a user, not just boolean true, so $user = $session->login($name, $pass); if($user) { // login successful if($user->hasRole('customer')){ $session->redirect("/customers/"); } elseif($user->hasRole('staff')){ $session->redirect("/staff/"); } } works, while this if($user = $session->login($name, $pass)) { // login successful if($user->hasRole('customer')){ ...snip... doesn't.
- 
	http://www.vetsnet.co.uk/ Formerly done in Joomla 1.5, I have just finished migrating the site to PW 2.2. It uses a couple of modules- MapMarker for geocoding for the map thumbnail links Comments (which was why I was pestering Ryan on GitHub the other day 8) ) Email obfuscator <edit>Broken at the moment, so disabled</edit> It is based on the Skeleton framework and is responsive. I would appreciate some feedback on the design. I wanted it plain and lean, and non-fussy, but have I overdone it?
- 
	JeffS's link seems to have the protocol in twice - it should be http://www.w3.org/community/respimg/wiki/Main_Page
- 
	Just to add that this is really good - I love the plain look of Foundation. Totally agree. Maybe anyone out there with a bit of time on their hands should have a go at creating a new /site/templates/ for this blog profile, which would effectively be a new theme. Oh, and http://phptrackback.sourceforge.net/ may help with trackback support. B)
- 
	I use nearlyfreespeech.net for my own blog (I like their pricing model), which runs Wordpress and, while I haven't tried PW there, if WP will run I can't see PW being a problem.
- 
	Completely agree, some great moments. Don't want to go into any detail for fear of spoiling anyone's entertainment who hasn't seen it yet. A friend of mine has seen it twice at the cinema already.
- 
	Coincidence - I just downloaded 'Getting Real' a couple of days ago. It's now a freebie - http://gettingreal.37signals.com/.
- 
	Absolutely right. I tend to try for 'self-documenting' code, in other words (exactly as you say), naming things based on meaning. This is for templates, fields and other variables. What I also do is use includes in templates for common page elements (which I am sure everyone does) and name them meaningfully. Also grouping template files by purpose is useful. For example, I'll name my includes inc.head.php, inc.foot.php etc, so they are grouped together in any list or file selector. While I was writing, I see apeisa got in before me! I also try to keep things in English, but even for a native English speaker sometimes you wouldn't think I was!
- 4 replies
- 
	- 2
- 
					
						
					
							  
 
- 
	
		- convention
- templates
- 
					(and 1 more) 
					Tagged with: 
 
 
- 
	This thread may have the information you need - http://processwire.c...opic/81-images/
- 
	Ideas for a dashboard / widget system?DaveP replied to MadeMyDay's topic in Module/Plugin Development Just a couple of suggestions from off the top of my head - Server stats (maybe using http://phpsysinfo.sourceforge.net/) Admin messaging system (am I getting carried away here?) Depending on installed modules, latest comments etc, or provide an interface for other module developers to add widgets (I really am getting carried away)
 
            
         
                     
                    