Leaderboard
Popular Content
Showing content with the highest reputation on 09/19/2015 in all areas
-
Place the below in your /site/config.php // Honour goes to Raymond Geerts for the idea ! $config->templates = array( 'dev.foobar.com' => 'devtemplate', // domain => templates folder name ); if (isset($_SERVER['HTTP_HOST']) && isset($config->templates[$_SERVER['HTTP_HOST']], $config->templates)) { foreach ($config->templates as $host => $folder) { if ($_SERVER['HTTP_HOST'] === $host) { // set new paths $config->urls->templates = "/site/" . $folder . "/"; $config->paths->templates = dirname(__DIR__) . $config->urls->templates; break; } } }3 points
-
Update: Latest release and documentation is available here: https://github.com/rolandtoth/FrontEndEditLightbox Modules directory: http://modules.processwire.com/modules/front-end-edit-lightbox/ ----------------------------------------------- Just implemented my front-end edit feature, minimal style I know there's many other solution to this but I tried making something much simpler to implement. The result is one JavaScript snippet - no css, external js dependency, module, etc. It uses the admin's Magnific Popup because it's always at hand and works just fine. The page automatically reloads on closing the lightbox, but only if the page was saved (via localStorage). You can also list jQuery selectors to hide items in the admin (see "selectorsToHide"). Usage Add the edit link to your template file (see code below) and copy the following to your main .js file.2 points
-
I just need alcohol when dealing with other CMS's than PW (this sub-forum is hidden, right?)2 points
-
I've been celebrating *hic* by drinkin' scotch every day since *hic* I started using ProcessWire.2 points
-
Thanks, tpr. My current plan is to, at the very least, get a base-functional module up soon. I have quite a bit of work coming up really soon (not dev-related), and so won't be able to put much time into it for a little while after the initial release. However, this will be a good time for user-feedback that I can look at when I continue development. Whilst there are proven solutions out there, I haven't seen one as flexible as this (other than FormBuilder, of course). I have actually given some thought to Pete's suggestions, and will be going ahead with some kind of HTML builder for each form. @everyone: There are so many ways one could go about building each form as automagically as possible. So I'm going to put together some ideas and share them with you. As stated before, I'm going to make this available as an opt-in feature - you'd be able to choose between something like $forms->render('contact') and rendering the form manually. I think that one of the best approaches would be to allow the developer to specify what kind of form-output is needed for each form. Choices would include 'bootstrap', 'foundation', and 'processwire' (using Inputfields). Based on that specification, the render() method would pick out the applicable HTML blueprints/builder-methods and render the form from there. Of course, and based on the rendering spec, each field would need to have certain properties defined - only properties that make a difference to each spec would be required. Anyways, let me give this some more thought. In the meantime, I'm going to change the directory structure, and release a prototype for feedback purposes as soon as its ready.2 points
-
Filetype is JPEG you said? If you change things for testing purposes, you can add a param "forceNew" => true to an options array to always override previous versions. And if you want check filesize compared to quality settings you can use the suffix setting for a complete check loop like that: $img = $page->images->first(); // grab you an image (change code to match your setup) $newWidth = ($img->width == 2500) ? 2499 : 2500; // set a width value different than the original image size! (is needed for the test only) $qualities = array(100, 90, 80, 70, 60, 50, 40, 30, 20, 10); foreach($qualities as $q) { $options = array('forceNew'=>true, 'quality'=>$q, 'upscaling'=>true, 'sharpening'=>'soft', 'suffix'=>"quality{$q}"); $variation = $img->width($newWidth, $options); echo "<p>variation: {$variation->name} :: " . filesize($variation->filename) . "</p>"; } Code is written in browser, if it doesn't work as expected, please check for typos or come back here and tell me. And if it works, please drop a note about the result.2 points
-
Hi usually I don't create topics until i feel they are necessary but this is really become a chore for me in development phase, The issue is the Developer Documentation; its really hard for me to get the necessary information I need. I have to go through various topics and navigate through conversations just to find what am looking for. Just today I was looking for the API for the PageField to save a page as a value and I have no luck, I feel this can increase development time to those new to Processwire. i found out there's a site called wiki.processwire.com but it's been last updated 2012 and the cheatsheet.processwire.com doesn't go indepth enough for me to understand what's going on. ADVICE: I feel we can have a documentation page where users can edit and contribute text to it gradually, there's recipe.processwire.com but its still not enough, it would cool to have something like this http://framework.zend.com/manual/current/en/index.html Forgive my rant I come from a country where electricity is not guaranteed so its a big deal for me when I have to spend alot of time looking for information. I don't mind contributing examples or if we can find ways to allow community update the wiki.processwire.com. THANKS GUY Still looking for how to use code to save a PageFieldtype with another page1 point
-
1 point
-
Just some ideas among others (in no special order)... It could start with the release of ProcessWire 3(.x) master. It could then be the same day each year, or the day of the release of a new master branch (assuming there is one, no more no less). It could be a day where everyone who wants chooses a specific action to promote ProcessWire (the same day or as soon as one has some free time). We have to be careful not to duplicate things. We all have ideas and can have more ot them... A marketing/communication "team" (and/or section) could be created... A nice ProcessWire article could be written for opensource.com, by someone(s) who knows it well enough, after the release of ProcessWire 3. Please see here: https://processwire.com/talk/topic/2311-processwire-on-the-web/?p=101825 The person who manages the open cms column is waiting for an article , as ProcessWire is already listed at http://opensource.com/resources/projects-and-applications. There could be a "hackathon" to create profiles separately, or to create one functionality/module/profile for a specific "industry" website... Or to make the skyscrapers website responsive (with PocketGrid, etc.). Or to check if everything is fine on the ProcessWire website, to see what can be improved, etc. I have started something (small) yesterday. If I have a positive answer from Google, I will post (about) it so that everyone can help improving it.1 point
-
You can build logic upon a permission. if ($user->hasPermission('just-a-permission')) { // do something } Every user has role. (A Role extend Page, so behaves like a page)Every role can have multiple permissions (A Permission extends Page, so behaves like a page) Every user can have multiple roles. When you ask $user->hasPermission('something'), ProcessWire will loop all roles and see if one of those roles has that permission. And it returns a boolean true or false on it's findings.1 point
-
The cheatsheet is a bit outdated.. Don't be surprised if you don't find everything in there, but most of it is.1 point
-
1 point
-
May it's time for a special PioneerWomen Coffe (couldn't resist in google PW Coffee)1 point
-
1 point
-
1 point
-
you mean counting like this? $kids = $pages->find("template=poi, has_parent=$page"); $interests = new PageArray(); foreach ($kids as $k) $interests->import($k->interests); $iTotal = count($interests); foreach ($interests as $i) $i->useCount = count($pages->find("interests=$i")); echo "<h3>Interests ($iTotal)</h3>"; echo '<ul>'; foreach ($interests->sort("-useCount") as $i) { echo "<li><a href='interest/$i->name'>$i->title</a> ($i->useCount)</li>"; } echo '</ul>';1 point
-
No, I did not know fredi until the past 10 minutes Of course I've heard about it but never tried. Mine (petname FEEL) is a very simple addition - only a JavaScript file (or snippet) and a link markup is needed. I was using a similar solutions in my previous projects and finally decided to make it public, that's all. The other answer is "because I had to check if it's possible" It is simple so it doesn't have many settings unlike modules like Fredi has (or will have). If it fits your (or your client's) needs, then use it, otherwise look for more advanced frontend editors.1 point