Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/09/2012 in all areas

  1. Site for my girlfriend who likes to paint. Since a couple of people kept asking for a website I made one for her. Some image are a bit blurry and will recieve a quality bump soon. Got some installations issues since it's installed in a folder with a .htaccess redirect, but soma and ryan helped me out fixing the issie. So thanks for that. The link to the site is here: annemieboer.nl. There will be some additional functionality like switching backgrounds, select a paiting by colour, size or frame. Those will be added later on.
    3 points
  2. slightly ot but whenever i get a chance i like to hotlink this xkcd classic
    3 points
  3. Micta (Mensink ICT Advocatuur) is a lawyer office based in Groningen, The Netherlands and specializes in internet law, intellectual property law and general IT law. You can safely press the accept/akkoord/accepteren button, it's a Dutch cookie thing. Link: micta.nl
    2 points
  4. Another update I worked on I commited just now. The theme has now a modules navigation dropdown. It shows all modules by section. Uninstalled modules have only a anchor link to the modules page, it will scroll to the module. If you're already on modules page it will also scroll to the module. All installed modules will get you to the edit screen of the module. Configurable modules are marked with the gear icon. Enjoy.
    2 points
  5. (Added by Soma) Note that this module is deprecated. The newer and more maintained version is found here: https://github.com/somatonic/Multisite/ You can get the current dev version here https://github.com/somatonic/Multisite/tree/dev (Original Post) Just pushed simple multisite module to github: https://github.com/a...ultisite.module What this module does? It allows you to run multiple sites with different domains run from single install, using same database. While you can easily do "subsites" like www.domain.com/campaign/, this allows you to turn that into www.campaign.com. This is nice stuff, when you have multiple simple sites, that all belong to same organisation and same people maintain. How to use it? Just create page with name like www.campaigndomain.com under your homepage, then edit this module through modules menu and add same domain there. If your domain resolves to same place where your main domain, it should just work. Please notice that if you have editing rights, it allows you to browse the site from www.olddomain.com/www.campaigndomain.com/, but users with no editing rights are redirected to www.campaigndomain.com (this is because session cookie is otherwise lost). Any problems? Not any real problems, at least yet known. Of course think twice when deciding should the site have own install instead of this. There are few benefits, like getting data from other sites, one admin view for all sites etc... but it can easily get out of the hands: number of templates, fields etc.. It is harder to maintain for sure. Isn't there multisite support in core? Yes, kind of. It is very different from this. It allows you to run multiple pw-installations with shared core files (/wire/ folder). This is totally different: this is single pw-installation which has multiple sites running from different domains. This is basically just a wrapper with one config field for this little snippet Ryan posted here: http://processwire.c...ndpost__p__5578 (so most of the credit goes to Mr. Cramer here). What it also does is that it manipulates $page->path / url properties to have right subdomain value.
    1 point
  6. I like to use the style of whatever system I'm working with, be it a language, app framework or CMF or whatever. I had been using the CodeIgniter style guide previously, where you use Allman-style indenting like: if (blah) { stuff { instead of if (blah) { stuff } I also had been using underscores in my variables. But I noticed that Ryan uses camel case and the non-Allman indenting (whatever it's called). So I started mixing the two sometimes and that's not good. Is there a style guide (external to the ProcessWire project) that fits this style? Guessing not, but just wondering since CodeIgniter has one.
    1 point
  7. Few days ago I've posted sneak preview of new admin template (it didn't have name then), so I've managed to squeeze some time to finish it and here it is... Ergo Admin Template DOWNLOAD https://github.com/nvidoni/ergo USAGE 1. Create folder named "templates-admin" under /site/ folder 2. Copy all files (including folders) into newly created folder 3. ProcessWire will load the new admin template automatically EXTRA If you would like to use custom TinyMCE theme created for this template, follow this steps: 1. Download TinyMCE Ergo theme from https://github.com/n...ni/ergo-tinymce 2. Copy "ergo" folder to /wire/modules/Inputfield/InputfieldTinyMCE/tinymce-3.4.7/themes/advanced/skins/ folder 3. Open /site/templates-admin/default.php and change in line 86 "default" to "ergo" If you find any errors please post them here so I can commit them accordingly. EDIT 1. Changes have been made according to diogo's and Soma's posts.
    1 point
  8. I've been working on a site recently that is in WordPress, and have wasted several hours on not noticing that the previous dev had used a mad-crazy image based menu system (should have inspected the CSS more closely). Since I'm not used to WordPress, I was trying to sift through the many (and, in a lot of cases for this site, unnecessary) plugins to find the fault. So okay, it was partially my fault for not noticing that, but just the whole rest of the experience has drawn a line in the sand - everything is so difficult and time-consuming to achieve that I think even if I knew it inside out it would still be long-winded So, no more WP clients for me, thanks all the same, even if there are big bucks on the table it's not worth my sanity any more and is too draining. I'd much rather roll out/update PW sites and enjoy myself rather than tear my hair out over the many and varied caveats of working with WordPress. Call me lazy, but I think it's more about using the right tool for the right job.
    1 point
  9. As anyone used MooTools? I like jQuery but this looks very interesting: var Animal = new Class({ initialize: function(age){ this.age = age; } }); var Cat = new Class({ Extends: Animal, initialize: function(name, age){ this.parent(age); // calls initalize method of Animal class this.name = name; } }); var myCat = new Cat('Micia', 20); alert(myCat.name); // alerts 'Micia'. alert(myCat.age); // alerts 20.
    1 point
  10. Hey, there are a lot of good posts that I would love to like but I "have reached my like limit" in this forum for today... Could someone - Pete - change this? / Nico
    1 point
  11. Can you create a field that holds a concatenation of those two fields? Then choose to display that single field? Just an idea.
    1 point
  12. Thanks Marc! I think that would do it. I'll report back on what I come up with.
    1 point
  13. Looks like you're right martind, sorry for the confusion. At least I got confused with this, so let's make things clear in case someone else stumbled across this sometime later: When dealing with FieldtypePage (a field of type Page in Setup -> Fields), it's ok to assign a single Page object to the field and things just work. If the field is set to be dereferenced as PageArray (edit the field -> details), the assigned page is added to the array. Otherwise the given Page object is naturally assigned to the field (field is set to be dereferenced as Page). On the other hand (this is what got me confused in the first place), when dealing with plain PageArray simple assign of a Page does not work, but add() method has to be used. It's the FieldtypePage that adds the magic. While it's great to have such convenience added here and there, one would expect things to work the same way where applicable. At least I would. This is actually why I was so keen on making sort, start and limit with WireArrays work more like they work when using selectors. I think there are some other cases as well where this kind of alignment could be a good thing.
    1 point
  14. Couple of things - 1.) I always just upload the whole site from my local install, install the DB, change the mySQL info in the site/config, and it always works great; this would mean you could avoid having to run the exporter, and then the PW installer...might save some steps; 2.) You site has some big issues; I would suggest to install the firefox web developer tools and look at the console; most of the problems you are having are related to soundcloud and a calendar script, but once you see the console output you'll know, because there are a LOT of errors, like these: [17:55:57.800] ReferenceError: Validator is not defined @ http://www.fem-k.com/_php/_php/_php/_php/calendar/calendar_form.php?objname=date3&selected_day=0&selected_month=0&selected_year=0&year_start=2012&year_end=2022&dp=1&da1=1346299200&da2=1661918400&sna=1&aut=&frm=&tar=&inp=&fmt=j%20F%20Y&dis=&pr1=&pr2=&prv=&pth=../_php/calendar/&spd=[[],[],[]]&spt=0&och=&str=0&rtl=&wks=∫=1&hid=1&hdt=1000:274 [17:55:58.945] GET http://www.fem-k.com/_php/_php/_php/_php/_php/calendar/images/iconCalendar.png [HTTP/1.1 404 Not Found 1068ms]
    1 point
  15. Using these module(s) it should be easy enough to build those things in templates (so no need to mess with module files). Extending or hooking into these modules is also possible (I am happy to add hooks if needed). And of course, we are here to help.
    1 point
  16. PW's coding style is visible in any core file. But it's the same idea whether we're talking about code, graphic design, architecture or really anything someone would create: When it comes to code, that translates mostly to not adding extra unnecessary bytes: Avoid having an opening bracket "{" on its own line. Instead, just use a single space before an opening bracket. Only closing brackets "}" should be on their own line. Avoid use spaces for indentation, just tabs. This is what tabs were made for, not spaces. Use just one tab per indentation, of course. Avoid extra spaces around parenthesis unless you think it's really necessary. For example, it's preferable to use function(a, b) not function ( a, b ) Put a space after a comma, just so the comma doesn't visually melt into one of the adjacent letters. Don't put a closing PHP tag "?>" at the end of a file. Use camelCase for most variable and function names except for when the variable resolves to a database column or ProcessWire 'name', then use lowercase and underscores. Use camelCase for class names except always have the first character be uppercase, i.e 'CamelCase' (there may be a more specific term for this). Put a space before and after the concatenation operator, as it's small and disappears (or becomes a sentence period) too easily. For example use "a . b" and not "a.b". And of course, comment as much as possible. Comments are bytes that are always appreciated for communication. Outside of internal comments within the body of functions/methods, PHPdoc style is the standard we prefer. Honestly the biggest one for me is just the opening bracket thing. I can't follow code that contains opening brackets on their own line. It makes the opens and closes so visually similar that I can't can't easily tell them apart. It could be that my eyes aren't great, but at least for me that coding style creates legibility problems. I have to "fix" code before I can read it. With the style I'm using, when I see a bracket on a line (before I see the nuances of the serifs), at least I know it is always closing something.
    1 point
  17. ProcessWire's API doesn't use SQL queries -- it uses selectors. SQL injection is a non-issue in ProcessWire. ProcessWire does not get involved with database abstraction layers, so if you are executing SQL queries then you are using PHP and MySQL (mysqli). You can always add your own database abstraction layers to do whatever you want. But typical usage of ProcessWire for developing a site does not involve SQL. If you are using SQL for something and you want to stick with the DB driver PW is using (PHP's mysqli) then you eliminate SQL injection by either using prepared statements or escaping your strings before putting them in a query. Use it the way you are supposed to and SQL injection is a non issue. Is it possible your company was asking about the security of the software itself? ProcessWire's own queries are well protected against SQL injection, of course. SQL injection is a problem of bad code. If one uses the database driver in the way it is supposed to be used, then you are never subject to SQL injection. Btw, I don't know about what CakePHP is doing, but the whole idea of trying to protect the user from SQL injection (outside of the DB driver) sounds like a security problem in and of itself. We've seen this with PHP's magic quotes, which was meant to protect the user from SQL injection. Anything that tries to protect you from yourself ultimately encourages bad programming practices by making security a grey area. That fosters an environment where many think they don't have to sanitize and validate input, which becomes an even bigger security problem.
    1 point
  18. Great! I need a very simple shopping solution with only invoice payment method. And with lots of design freedom in templates. So a ProcessWire shop seems ideal. But since this will be a German shop I’ll need to make quite a bunch of adaptions. We have quite detailed rules, how certain things have to look like, not to mention all the legal instructions which have to be placed in the right place. The module also needs e-mail messages sent I’m not a big fan of messing around with CMS core or module files. It makes updateing modules a pain. So how about extending the module, so that all the legal stuff can be activated and modified via the PW backend? I mean, if it fits weird and uber-strict German e-commerce laws, it should be OK to be used anywhere in the world ;-) I’ll try my best, but I’m not experienced with module programming (and backend programming at all). So I will definitely need help now and then. But I think, this is a great chance to make ProcessWire the perfect choice for small shops.
    1 point
  19. I've used MooTools before jQuery. I didn't enjoy the experience of asking a question on the forums once and getting shot down for it - especially since it was my first question, but that does sometimes come with the territory (though I had read the instructions and used Google, just probably wasn't searching for the right terms). I find jQuery to be easer to use, but that's just my personal preference and I don't get into complex classes with javascript at all, so opt for what I find to be the easier to use library for general daily use.
    1 point
  20. A pretty neat quick reference to (modern) PHP. With info for beginners but it can also be of use for those already 'in the know'. http://www.phptherightway.com/
    1 point
  21. Hi Guys, ran into this topic doing a Google search. I've been working on the blog for the past few months. Basically, it's to help out the community and have a database of quick scripts, ProcessWire developers, my friends and I can use. I appreciate you guys taking a look at the blog. Also, I'm open to contributors for new posts. If you're interested, please let me know.
    1 point
  22. Almost anything involving output of markup is not an ideal candidate for a core module (/wire/modules/), but always a great candidate for add-on modules (/site/modules/). The intention is that the PW core stays as markup independent as possible.
    1 point
×
×
  • Create New...