Leaderboard
Popular Content
Showing content with the highest reputation on 04/25/2015 in all areas
-
Today we've relaunched the website of one of the most beautiful castles in Germany: "Castle Marienburg". The Castle was built as a birthday present of King George V of Hanover (1819-1878) to his wife Queen Marie (1818-1907). Located right next to neuwaerts hometown Hanover and being one of the greatest Tourist attractions in our region it was a real pleasure to be allowed to bring the feeling of this venerable building to the digital age. // Some parts of the website are not yet translated. We know about this I'll add some details and technical notes next week (if anyone is interested).7 points
-
Thanks, felix! New on develop branch: $ wireshell status (Replacing ShowAdminUrlCommand, ShowVersionCommand)5 points
-
4 points
-
3 points
-
your first sentence is arguable. For years we have all used page fields for selects, radios, group checkboxes. it's part of what you need to do, and once you know how to do it fast and easy, then you just do it and don't get caught up in that sort of "too much for simple case" mindset; it just works. nevertheless, Ryan introduced the options fieldtype for when you want to avoid the page field: http://lmgtfy.com/?q=processwire+fieldtype+options the first 3 results should explain it all.3 points
-
https://cloud.google.com/launcher/details/bitnami-launchpad:processwire?gclid=CjwKEAjw9uypBRD5pMDYtsKxvXcSJACcb9AYQYmo3gq6uBZnB--Gx_25FwkcigJ4YaYbR7TNh-OF_hoCMwnw_wcB2 points
-
2 points
-
That's a good idea! Instead of status:submodule I'd suggest to add it as options, like: $ wireshell status --php --filesystem --image --webserver ...and output each block/topic as a separate table (see screenshot above). Without options wireshell status would just return the PW and wireshell info. Either way: I'll look into Diagnostic Tools as soon as I finish 0.4.0 and the project microsite. Of course pull requests for this, maybe from the Diagnostic Tools creators & contributors themselves, would be highly appreciated2 points
-
2 points
-
Hey, as I often just copy someone else's (sometimes my own) modules structure as a starting point for a new module I thought there has to be a better way to archive that. That's why I created the "ProcessWire Module Generator": modules.pw If something missing? Or some more wishes for options or best practices? Let me know Here's a screenshot:1 point
-
In my opinion, ProcessWire bundles everything you'll need to create awesome sites, like you've described above. Due the development process, you will maybe reach a point, where you want to "power-up". Your first, own module isn't far...The most things you'll need, are already done by other, great devs. Everything else is entirely up to you (and this forum, of course). PS: If you like to buy some "Pro Fields" or such, do it! PPS: I haven't slept last night, please don't slap me for my dialect.1 point
-
I knew that this would cause conflict because there are so many different ways of implementing script loading. So your comments on this are more then welcome. I read and revived this discussion about how to best approach script inclusion when developing a module. And chose a mixed approach because I'm really not sure myself how to best do it and to experiment with different methods. The original approach of the Google Maps module just didn't seem perfect since it forces users to include stuff in the head. So what to do as a user if you don't want to have scripts in <head>. But then I guess there is no perfect way. Main reason for injecting the "inline script" at the very end: wanted to make sure that scripts get loaded in the right order. @Soma why wouldn't you want to have it before </body>? @Wanze thanks for clarifying the terminology. I'm quite new to PW module development. So I really appreciate any input that I can learn from.1 point
-
@adrianmak, read this: http://processwire.com/blog/posts/processwire-core-updates-2.5.28/1 point
-
1 point
-
What Adrian said is right and this Q has been asked a lot of times. You need to first create a field, not of type checkbox. you need to use options field or page field. then you will be able to select checkboxes as the input field to select those options or pages.1 point
-
Either use a Page field or the new Options Fieldtype and then choose the Checkboxes Inputfield. Checkboxes as an Inputfield is very different to the singular "Checkbox" fieldtype.1 point
-
Nice site there. I love castles. I made some 3d models back then for a german company. I found this strange on homepage meta tag: <meta name="canonical" content="http://localhost/">1 point
-
marcus I really like where this is heading. keep up the great work!1 point
-
It's rarely I build 'websites' with ProcessWire, most projects I've done this year are of the type application, tool or generator. It has taken a while before I recognised that the admin area is full of potential and could be easily used as starting point. The starting point in the admin is really well designed. You have the ability to hook, to build process modules where you want it, gain access access to or forbid. Easy implementation of Ajax, the ability to use Inputfields, Fieldtypes breadcrumbs tables etc etc and a wide variety of caching possibilities... The thing about everything is a page is a plus. Pages are API wise very well designed, you can use it and take advantage of it or drop it when you don't want to use them. When I have the option to use pages I will do it the pages way. If it makes more sense to go the plain SQL way you could go that way. But I do remember I mistakenly chosen SQL ones where pages were a way better fit.1 point
-
I managed to get cropped images working in CKeditor. Here is the code, in case any one is interested in such a hack. If you know a better way to do this, let em know. It would be cool to dynamically get this list of crop settings (thumb, portrait, etc) from the croppedImage field, but, all in all, this seems to work surprisingly well. Using the latest dev branch of processwire: 2.5.27 Copy: /wire/modules/Process/ProcessPageEditImageSelect/ to /site/modules/ProcessPageEditImageSelect/ Made these changes: //CHANGES TO ALLOWS IMAGE SIZES FROM CROP IMAGE IN RTE $acceptedCropImageSets = ['thumb','portrait','landscape','thumb']; foreach($images as $image){ list($imgBase,$ext) = explode(".", $image->basename); foreach($acceptedCropImageSets as $set) { $cropedImagePath = wire('config')->paths->files."{$page->id}/{$imgBase}.-{$set}.{$ext}"; if(file_exists($cropedImagePath)) { $images->add($cropedImagePath); } } $cropImagesGlobSearch = wire('config')->paths->files."{$page->id}/{$imgBase}.-thumb.{$ext}"; } //CROP IMAGE CHANGES - END foreach($images as $image) { $numImages++; $key = $page->id . ',' . $image->basename; // page_id,basename for repeater support $allImages[$key] = $image; }1 point
-
Added a check to make sure the user downloading a PDF has view permission, thanks again Bernhard for finding/suggesting this! https://github.com/wanze/Pages2Pdf/commit/30810213ae939ccc3fc033765570c91c9be47cdd Cheers1 point
-
1 point
-
sometimes clients need landing pages for marketing/seo that need to live off the root. all of these pages would make a mess in the page tree, so they are stored under /landing-pages/ I always do a hook (as was demonstrated in the CMS Critic Case Study) wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'landing-page') { // ensure that pages with template 'landing-page' live off the root $event->replace = true; $event->return = "/$page->name/"; } }); on the landing page template: // if someone tries to access this page at it's real location in the page tree, redirect to the fake URL: if(!$input->urlSegment1) { $session->redirect($page->url); } i should also add that on the homepage there is this: /** * First, check to see if there is a URL segment off the homepage * this is used to generate custom landing pages, for marketing etc.. * with a shorter URL, living off the root. * */ if(strlen($input->urlSegment2)) { // we only accept 1 URL segment here, so 404 if there are any more throw new Wire404Exception(); } else if(strlen($input->urlSegment1)) { // render the landing page named in urlSegment1 $name = $sanitizer->pageName($input->urlSegment1); $landingPage = $pages->get(2281)->child("name=$name, include=hidden"); if($landingPage->id) echo $landingPage->render(); else throw new Wire404Exception(); } else { // do the normal homepage... so that's why the segment check on the landing page template, because when it is being rendered from the homepage, if(!$input->urlSegment1) will be true1 point
-
I use AIOM+ and then regular php to manage the array before the AIOM+ is called.. im usually setting the scripts array in the init, like $minifyCSS = true; $minifyJS = true; $stylesheets = array( 'assets/bootstrap/css/bootstrap.min.css', 'assets/css/font-awesome.min.css', 'assets/css/style.css', 'assets/css/custom.css', ); $jsfiles = array( 'assets/js/jquery-2.1.3.min.js', 'assets/js/imagesloaded.pkgd.js', 'assets/js/custom.js', ); in templates i sometimes do this (if styles/scripts need to be before last one, e.g. if last style is custom/override) $jsOffset = -1; $cssOffset = -1; //1.) Event Calendar array_splice($jsfiles, $jsOffset, 0, 'plugins/eventCalendar/js/jquery.event.calendar.js'); array_splice($jsfiles, $jsOffset, 0, 'plugins/eventCalendar/js/languages/jquery.event.calendar.en.js'); array_splice($stylesheets, $cssOffset, 0, 'plugins/eventCalendar/css/jquery.event.calendar.css'); or simple: $jsfiles[] = 'plugins/soundManager/js/soundmanager2-nodebug-jsmin.js'; $jsfiles[] = 'plugins/soundManager/page-player/script/page-player.js'; $stylesheets[] = 'plugins/soundManager/page-player/css/page-player.css'; then outputting: if($minifyCSS == true) { echo "\t" . '<link rel="stylesheet" type="text/css" href="' . AllInOneMinify::CSS($stylesheets) . '" />' . "\n"; } else { foreach($stylesheets as $stylesheet) { echo "\t<link href='{$templates}{$stylesheet}' rel='stylesheet'>\n"; } } // END IF MINIFY this lets you toggle AIOM and good for development and troubleshooting stuff.. i should also clarify that for brevity, i setup a lot of aliases in the init, like: $templates = $config->urls->templates;1 point
-
This method has a major drawback, as you might load unnecessary scripts from the backend (other modules running in the backend will use this array also for storing scripts/styles). A better apporach IMO would be if the module uses its own array to ensure that only the needed files are loaded.1 point
-
I think you're misunderstanding registering/executing hooks. When you register a hook, you do not call anything. Basically you tell ProcessWire that you want to execute custom logic whenever the hooked method is executed. In your case, your method "addInlineScript" is called after Pw rendered your page (after executing $page->render()). Autoloading just makes sure that your hooks are properly setup, before hooked methods are executed. You don't need autoloading, but then you must be sure that "registering" the hook happens before Pw executes the hooked method. Sorry if the above does not make any sense, it's not easy to explain this stuff as non-native english speaker/writer1 point
-
I'm not sure about this. In Menu Builder I have two hooks and they work fine but Menu Builder is not an Autoload module...1 point
-
hey grumpy, it seems you are using the default intermediate profile? you are mixing code in your map template php file and your _main.php file! thats some very basic PW stuff and not related to mapmarker, so i think it would be a good idea to start a new "general support" thread and stop messing this specific thread up (sorry) as long as there is no extra thread, i'll try to help you here once more. have a look at this posting, thats the intermediate profile workflow: https://processwire.com/talk/topic/9690-sub-templates/?p=93247 so everything you echo in your map template will be placed BEFORE all the code in _main.php to get something into the body of your _main.php you have 2 options: 1) create a whole new map template (i think you named it postcard.php) like this: <!DOCTYPE html> <html> <head> <title></title> ## your javascript here ## </head> <body> <?php ### render map here ### ?> </body> </html> but that would remove all the other site elements that you already have on your website (menu, sidebar, search etc) 2) populate the $content variable with your map markup postcard.php $map = $modules->get('MarkupGoogleMap'); $content = $map->render($page, ## your div id here ##); note its not echo ... but $content = ... _main.php should look somehow like this <!DOCTYPE html> <html> <head> <title></title> ## your javascript here ## </head> <body> <h1><?php echo $title ?></h1> <div> <?php echo $content; ?> </div> </body> </html> so in the second case your map will be placed wherever you put your $content variable in your _main.php file. please take your time and read this thread carefully: https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ thats a lot of useful information and explanation of what's going on behind the scenes when you are using one file to handle all the markup. especially this thread of ryan should help you: https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/?p=6174 good luck1 point
-
@LostKobrakai: Fixed the \" bug. And 2.5.28 will be available tomorrow I guess so I'll leave it1 point
-
OK, I'm finally going to be breathing some life into this project. I got the title sequence done (well a near final draft) along with intro music (bought the track music from audiojungle). Here's a little teaser: http://jonathanlahijani.com/wirecasts-teaser.mp4 The title sequence is a little choppy. Need to fix that. It's actually just a screen capture of an animation I made using plain old html/css with animate.css. I have about 15 videos done so far, but another 18 to go. This WordPress vs. ProcessWire series will cover many different features and quickly compare the two systems. It will not be biased and will compare the best of WordPress to the best of ProcessWire.1 point
-
You do this on template: $session->error("error error"); or this on class: $this->session->error("error error"); End then on next page load you can have this: foreach($notices as $notice) { if($notice instanceof NoticeError) { echo "<p>$notice->text</p>"; } } And that error notice is gone, no need to clear it yourself.1 point