Leaderboard
Popular Content
Showing content with the highest reputation on 04/24/2015 in all areas
-
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 true8 points
-
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).6 points
-
justb3a's great ModuleDownloadCommand has just hit the develop branch! Next, I'll try to incorporate Nico's module generator, and then both new Commands will be released as 0.4.0 @horst: Thanks for sharing your approach! Since the Readme and this topic's start post is getting bigger and bigger I'll set up a dedicated microsite for wireshell doc and best practices like these.4 points
-
You are saying that building custom applications in PW with the "everything is page"-mantra has its limitations - and that's right! No one has said, that every possible application can and should be built with PW-pages. PW is a Content Managment Framework, and for most of the contents you need for the web, its possibilities are more than enough. I think it is not fair by judging over PW while developing an ecommerce-application as your first application. Look at most of online-shopping suites like Magento or Prestashop, how difficult they were to develop just with php(-frameworks). Some applications are not best suited for PW (or any other CMS), at least with not building some helping modules or components, which could make it easier for plug the application together. Just another thought: would you have considered any other CMS with its built-in editing & API to develop an ecommerce solution on top of that?3 points
-
There are basically two ways of making a page accessible under a different url. Either you use urlSegements and a dedicated template, which then renders the page instead of own content. // render another page in a tamplate $pages->get("/services/some-service")->render(); The other option is hooking Page::path to modify the path on the fly. You can see an example here: https://gist.github.com/LostKobrakai/9c02484a9710e16bc512 Also this isn't a new issue, see here: https://processwire.com/talk/topic/9692-hidemask-a-parent-page-from-front-end/3 points
-
Thanks again for the port to leaflet! I prefer OSM over google maps and have been using it for quite some time. Leaflet is very powerful and opens up many possibilities. I forked Mats' module and added support for leaflet-providers so we can choose different map tile providers (see my post here). It is still a work in progress but seems stable. Once it is ready for production I'll make a pull request. Mats, do you think we should use leaflet-providers as standard or offer the user a choice whether they want to use it or not? Next up I will add an icon field and support for Leaflet.awesome-markers.3 points
-
2 points
-
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.2 points
-
Th bots are also known not to visit your website since they will guess the Analytics ID. I've read a lot of these stuff and sometimes adding a second ID (xxxxxx-2 instead of xxxxxx-1) will stop them for about a month or so before they try the -2 of -3 or -4 version of your ID. It's all automated and they only way they can be stopped is if Google blocks them. Or if you use a filter or an Advanced Segment to either filter them or segmentize. On language specific websites I tend to segmentize only the country and/or language to view relevant data. Of course I will block out potential data, but the harm coming from these bots is greater. Google should fix this mess.2 points
-
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;2 points
-
I agree. Added all available providers to the select dropdown and have set OpenStreetMap.Mapnik as default. Will post the next days with update on awesome icons...2 points
-
I have the feeling that this should be handled by google itself, who's interested in spam visitors?2 points
-
you can filter out unwanted entries BEFORE they are stored in your view or AFTER that (before presentation of data). if you filter them out before storing it, all your reports are free of those unwanted entries and they don't deform indicators like bounce rate and session duration and so on. if you filter them before presentation you would have to apply all those filters on every single report. of course you could do that and you could even save your reports as shortcuts so that you do not have to do this work over and over again, but imagine what happens if you have several shortcut reports and you notice there has a new spider come up... kind of a best practise is to filter data before it gets stored and have one unfiltered view as a backup. @wanze did some research on this but for the moment it's beyond my scope. seems to be not that easy with all the authentication and so on so i thought it would may be a simple and very useful addition to your module. sorry for honoring nico instead of you but you are right - it's not directly what your module was made for so a seperate module would be good... maybe i find the time some day or anybody else what makes me puzzle somehow is that i can't find any howtos or codesamples for this... seems i'm the only one on the web concerning about it ^^2 points
-
Yes, but in pw all fields are custom.2 points
-
For those interested, I just committed another small update that includes a couple of fixes from @LostKobrakai as well as support for not needing to define the "title" field in the field pairings if you only have edit and overwrite mode enabled. This should make it much more flexible when running CSV data imports to update existing pages. EDIT: Also just changed "Overwrite" edit mode to be called "Update" to better describe what it does and also to avoid confusion with the "Overwrite Names" option.2 points
-
Here is a new module for ProcessWire 2.1 that imports pages from a CSV file. By default it will create new pages from data in the CSV file, but you can also configure it to modify existing pages too (existing pages that have the same title). Please give it a try and let me know how it works for you and if you run into any issues with it. This module is something I've had in the works for awhile, and regularly use on various projects, so figured I should clean it up a bit and release it. Also attached are a couple screenshots from it. How to Install: 1. Download from: https://github.com/r.../ImportPagesCSV 2. Place the file ImportPagesCSV.module in your /site/modules/ directory. 3. In ProcessWire admin, click to 'Modules' and 'Check for new modules'. 4. Click 'install' next to the 'Import Pages CSV' module (under heading 'Import'). Following that, you'll see a new menu option for this module on your Admin > Setup menu. Supported field types for importing:* PageTitle Text Textarea (including normal or TinyMCE) Integer Float Email URL Checkbox (single) *I'll be adding support for multi-value, page-reference and file-based Fieldtypes in a future version.1 point
-
Hi! Just finished my first module This module adds a new "Google-Analytics" Page in your Admin-Panel and displays various Statistics from a Google Analytics Account. It uses the JQuery plugin "jqplot" to display the charts. Github: https://github.com/w...GoogleAnalytics Modules directory: http://modules.proce...ogle-analytics/ Features Visits by Date (Chart) General Statistics about Visits (Total visits, Visit duration, New visitors, Returning visitors etc.) Demographics: Countries, Cities, Languages System: Browsers, Operating Systems, Screen Resolutions Mobile: Operating Systems, Screen Resolutions Pageviews by Date (Chart) Top Content Traffic Sources: Keywords, Referral Traffic by Domain and URI Choose a default date range displaying statistics: last 24 hours, 2 days, 1 week, 1 month etc. Custom date range by setting a "start date" and "end date" Requirements Google Account and Analytics Account A Project in the Google APIs Console cURL Installation 1) Create a Project in the Google APIs Console: Create a new Project in the APIs Console: code.google.com/apis/console/ Under Services, enable the Analytics API Under API Access: create an Oauth 2.0 Client-ID Give a Product Name, choose "Web-Application", Domain doesn't matter Enter a Redirect URI to the GA-Page in your Processwire Installation: http://yourdomain.com/processwire/google-analytics/ Notes: The redirect URI must exactly match with the URL from the new "Google Analytics" page in Processwire. Open the Page and copy the URL from the address-bar (localhost does work too!) The project created in the APIs Console can be reused for every Processwire installation using this module. You just have to enter more redirect URIs 2) Install the module: Place the module's files in /site/modules/ProcessGoogleAnalytics Install the Module via the Admin-Panel Enter Client-ID and Client-Secret keys from the created project in the module config Load the newly created page "Google-Analytics" and click on the button "authenticate" Grant the module access to the Analytics Data Choose a Google Analytics account (Domain) from the dropdown Done: You should see the statistics. Check out the module config options for further customization In order to let other users see the Google Analytics page, you must give their role access to the "ga-view" permission. Ps. Processwire is awesome and so is this community!1 point
-
wireshell 1.0.0 is out See Bea's post -------- Original post ----------- Now this one could be a rather long post about only an experimental niche tool, but maybe a helpful one for some, so stay with me Intention Do you guys know "Artisan" (Laravel) or "Drush" (Drupal)? If not: These are command line companions for said systems, and very useful for running certain (e.g. maintenance, installation) task quickly - without having to use the Admin Interface, first and foremost when dealing with local ProcessWire installations. And since it has a powerful API and an easy way of being bootstrapped into CLIs like this, I think such a tool has a certain potential in the PW universe. It's totally not the first approach of this kind. But: this one should be easily extendable - and is based on PHP (specifically: the Console component of the Symfony Framework). Every command is tidily wrapped in its own class, dependencies are clearly visible, and so on. ( Here was the outdated documentation. Please visit wireshell.pw for the current one )1 point
-
Hi all, Here's a preview of a Gallery photo album module I am working on (very slowly! ). Development is currently in closed beta testing. The module will consist of a backend (as seen on video below) and a frontend that is framework and lightbox agnostic, aka plugin whatever and it will still work. Features Unlimited number of albums and sub-albums (easy to query using PW API) Multiple methods to add albums and photos (including uploading images and zip files, scanning a folder for FTP'ed photos, etc) Automatic album and photo creation based on names of folders and files respectively Bulk editing (moving, deleting, tagging, etc) Manager themes in several colours A bit of eye candy Etc... This is in beta so it is still rough around the edges. Feature suggestions? Yes please Apologies the video is way too long and you might get bored toward the end...1 point
-
Hello everybody, a few weeks have been passed since the last update. As you maybe remember, we introduced LdapSignIn, a module which allows you to sign in via an LDAP server account. Since you guys reported that there are many features missing to call it a "solution for Active Directory". Well, during the last weeks, we've thrown the module away, restructured and rebuilt it from the ground up. So we can now truely say: yes, this is a real solution for this porpuse. First of all, we've split the LdapSignIn module into 3 different modules WireAD handles the connection between ProcessWire and the Active Directory. It delivers a straight-forward API for authentication and accessing objects in the Active Directory. So your modules can access it as well. LoginAD extends the ProcessWire login process, so users from the Active Directory can log in. LoginSingleSignOnAD enables Single Sing On for ProcessWire using an Active Directory. Second, the modules also include a set of realy nice features: User and Group Migration You can define rules to map Active Directory user and group attributes into ProcessWire user and roles fields. Groups in Groups WireAD is able to detect groups in groups. So if user A is member of group B and group B is member of group C, user A is migrated as member of both group B and C. TLS and SSL WireAD handles connections via SSL or TLS to your domain controllers Load Balancing You can specify more than one domain controller to load balance between them Auto-detect Base DN or manually specify it Unique User and Role Objects Users and groups are migrated using their Active Directory GUID, so they are mapped as unique objects in ProcessWire Third, I created a demo video to show you some of these features: So what do you think? Please leave a comment below. Greetings from Germany Marvin1 point
-
Very well done mate! And nice to see a font loader There are some console.logs, maybe you want to remove them.1 point
-
1 point
-
1 point
-
I'm not up to date with this topic, but I quickly checked some sites.. I'm also seeing those spam entries like "buttons-for-your-website" and "best-seo-offer". Not sure what to do against this though... I'm wating until someone posts an easy solution Btw I don't like the new analytics interface, really had trouble finding the relevant stuff..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
-
BernhardB, I am not sure what wireshell does yet, however looking at it quickly it seem to be an interface to processwire admin through the terminal. I would not sucgest that a node module will ever be replaced by a php shell plugin (even though its my first run in with this), however I would say that the two can rather be used alongside one another. Generator => Create a basic project, generator can use wire shell to run certain commands. Maybe even do the processwire db install and remove those annoying files (install.php and site/assets/install) An example of a command for gulp would be make template, Pseudo - make the file required for the template using gulp-shell - make the processwire template This works nicely for the fixate-pw-generator since one can set the file the template use to their mvc as a default of the gulp task. WireShell => used alongside gulp/ or vanilla WireShell to manage created project (fully aware of its install pw capability, but is it automated?) Again this is only in theory for me thus far, but I doubt the one makes the other obsolete, both are big wins for the PW community.1 point
-
1 point
-
As far as I know, there is no built-in way to do this. You would have to use a module or write one yourself. I found this post from ryan to be very helpful on that topic: https://processwire.com/talk/topic/1799-routes-and-rewriting-urls/#entry16754 In this thread you'll also find further information about rewriting urls. If you're rewriting urls there will certainly be side effects like the link module in ckeditor will not work properly anymore.1 point
-
offtopic: if anyone else also wonders what OP stands for: http://netforbeginners.about.com/od/internetlanguage/f/What-Is-OP.htm OP = original poster1 point
-
I just want to say THANK YOU to everyone who posted, it's made my day. What a great community this project has. The location tag mentioned, is that referring to a field (Custom field they are called in WP)1 point
-
Hi Bernhard, In its current state, the Google Analytics module does display a uesful subset of the available analytics data. In my opinion, it's not the job of the module to filter out data. I would suggest to create another module which does this job. Or maybe I'm misunderstanding something? Can we filter out those spam entries when querying data with the API?1 point
-
I still don't get it howcome google doesn't filter them. Would be so easy to put a report spam button and do exactly the same as they do with email. Isn't filtering emails more risky than filtering visits for analytics purposes?1 point
-
Hi mattcohen, since you specifically asked about “more control over the results other than using foreach”, I’d like to add to the responses above that you can absolutely sort, modify, filter the results you get from find()! What ProcessWire’s $pages->find() gives you is a special kind of array object called PageArray. PageArrays have a number of methods detailed in the ProcessWire Cheatsheet. If you need to sort the gyms from your example by location after finding them, you can do this: $gyms->sort('location'); //Sorts ascending. For descending prepend a "-" like so: sort('-location') This may be useful if, for example, you want to output the same list of gyms twice. Once sorted by rating and once by location, perhaps. You can also use find() on an existing PageArray. Maybe you want to show all gyms, but feature the three top rated ones above. You may do something like this: //Find all gyms sorted by location $gyms = $pages->find("parent=/gyms/, sort=location"); //Copy the 3 with the highest rating into $top_three (another PageArray) //No need to go to the database again, because we have $gyms already $top_three = $gyms->find("limit=3, sort=-rating"); foreach ($top_three as $top) { echo "$top->title: $top->rating Stars"; } foreach ($gyms as $gym) { echo "$gym->title in $gym->location"; }1 point
-
Welcome, mattcohen. Does WP let you sort search results by anything other than date yet? What diogo and LostKobrakai said, but I'll add a little bit. From your question, it looks like you know some php or at least prepared to learn (or you know loads). Take a look at http://processwire.com/api/selectors/. There's a lot to take in, but it will give you an idea of the power of PW selectors (especially http://processwire.com/api/selectors/#examples). We, of course, think/know PW will be a wonderful fit for your expressed needs but that's because we have been here a while. Maybe have a play with the Skyscrapers profile, on which some of those examples are based. The search page there is somewhat more detailed than in the PW install, and gives more of a feel for what you can do.1 point
-
"How to create a page while installation with a non-process module?" Would now be in module config public static function getModuleInfo() { return array( 'title' => 'MyModule', 'version' => 1, 'author' => 'John', 'summary' => 'My summary', 'href' => '', 'singular' => false, 'autoload' => false, 'icon' => false, 'permission' => 'my-permission', 'page' => array( // optionally install/uninstall a page for this process automatically 'name' => 'my-super-processmodule', // name of page to create 'parent' => '', // parent name (under admin) or omit or blank to assume admin root 'title' => 'Super Duper ProcessModule', // title of page, or omit to use the title already specified above ) ); } Icon is also missing.1 point
-
Thanks. Yeah it's not that important as it seems to work fine. Something different: While at it, I would have a feature request to exclude or include roles that will get logged. I have sites with thousands of users.1 point
-
A jquery countdown lib is used. Add a date field of your desired template which want to display a countdown widget. I added following code on a event template <?php // convert a php unix timestamp to a javascript datetime format $js_datetime = $page->end_date * 1000; $today = date("U"); $end_date = date('d M Y', $page->end_date); $out = ''; $out = "{$page->body}<br/>"; $out .= "Event ending date: {$end_date}<br/>"; if ($today > $page->end_date) $out .= "<h3>Event is ended.</h3>"; else { $js = ''; $js .= "<script src='{$config->urls->templates}assets/js/jquery.plugin.js'></script>\r\n"; $js .= "<script src='{$config->urls->templates}assets/js/jquery.countdown.js'></script>\r\n"; $js .= "<script>$(function(){endDay = new Date({$js_datetime});$('#Countdown-widget').countdown({until: endDay});});</script>"; $out .= "<div id='Countdown-widget' class='clearfix'></div>"; } $page->body = $out; include('./main.php'); In the main.php output file, echo the $js variable, something like <?php if ($js) echo $js; ?> Some screenshots Usage: With this minimal bare bone code, you could extend and add your functionality. For example, build a groupon like time limited group order page, an online event registration form1 point
-
Thanks. Sounds like second update was triggered before first one was fully finished; database schema was already up to date, but revision number wasn't incremented yet. Looks like I'll have to add another check there to make sure that update doesn't get triggered unnecessarily like this.. If the site and module are working properly now, I wouldn't worry about this too much. If you want to be 100% sure that everything is fine, check that "schema_version" in the ProcessChangelogHooks config is "2" (easiest to check via the modules table) and that table "process_changelog" has column "templates_id".1 point
-
@jordanlev, I have read the last couple of posts you've written about your experience with ProcessWire in respect of your 'custom/complex' application and I do understand some of your frustration. However, I think some of your assertions may convey the idea that somehow PW corners you to do things in a certain way. Or that ProcessWire is a one-size-fits-all for all kinds of needs. For instance, PW is not and has never claimed to be an e-commerce application. Whilst you can certainly build and e-commerce site with PW (or even a product - there's one in the mix actually) your end product depends on how you code your application. I am not in any way questioning your coding skills; just trying to point out that PW is mainly a tool....what you do with that tool is really up to you. However, for some jobs, you are better of using tools better suited to those jobs, e.g. foxy cart, etc for e-commerce sites. Secondly, the adage that everything is a page does not mean that you should always take that approach. Again, there are examples here in the forum. You can use custom tables, designed just the way you want. Although using pages gives you access to the PW API, you are not tied to using them. And here is another strength of PW...you can use custom tables with ease, and either use custom CRUD code or PW $database and $db to access them (though with some limitations) and you are good to go. Not many CMS will allow you to do this...at least not with ease Thirdly, I disagree with the notion that PW is not up to the job when it comes to custom applications. There's a couple of examples of custom apps built using PW right here in the forums. I don't agree that its only good in terms of the 'templating and the front-end portion of the site'. So this statement "ProcessWire had nothing to offer me on the "custom dashboard application" side of things." is not exactly true. PW allows you to build your own custom dashboards by not getting in your way. Yes, it may not offer a turn-key experience (although there are one or two dashboard modules) but it allows you to build your own without bothering you. Fourthly, PW does not demand that you use its inbuilt 'input' modules or as you put it 'a rather clunky editing interface' when building custom apps/modules with it. In fact, that's one of the strengths of PW. You can build your custom apps using custom code or extend other libraries and PW will happily let you. The 'input modules' are used internally by PW but are also there for convenience if you need to use them, but you are certainly not tied to using them. Build your complex forms by hand or another library? PW doesn't care nor will it get in your way. Anyway, if I misread your posts, I apologise. However, you've made the same assertions twice or thrice and I thought they needed clarification/qualification especially for newbies. Hope I haven't derailed the original discussion1 point
-
@Macrura Thanks - I'm glad you're liking it. Yeah, documentation is pretty important to me, and so I make sure I do it to the best of my ability. Originally, I wanted to host the documentation myself, but thought the GH wiki system would be perfect enough for the task. Regarding the selectors, I'm going to leave the implementation as-is for now (as mentioned in the docs).1 point
-
Replace: $pageid = $this->sanitizer->selectorValue($this->input->get->id); $page = $this->pages->get($pageid); with: $page = $event->arguments[0]; Remember the id get variable won't be available on the front-end via the API. EDIT: Actually, better yet, don't use $page at all, use $p instead - you don't want to overwrite the current $page with the one being saved.1 point
-
Thanks for the positive feedback! Some updates in 0.2.0: Attach roles on the fly while user creation: $ wireshell create-user foo --roles=superuser,editor Create templates and attach existing fields on the fly with $ wireshell create-template contact --fields=body,sidebar , prevent template file creation with --nofile Command aliases now available: c-u, c-t, c-r, s Now planning field creation.1 point
-
You may need to look at and possibly increase the max_allowed_packet variable in MySQL.1 point
-
@Sevarf2 The notice about the undefined index is fixed now in FieldtypePageWithDate v1.0.3 https://github.com/Rayden/FieldtypePageWithDate1 point
-
As part of a move to a new hosting provider, I've upgraded from 2.4.0 to 2.5.3, following the instructions and everything worked perfectly. I couldn't find anywhere the details of how PW knows to make schema changes during upgrades. I'm guessing that there's code somewhere that checks on every page load and calls a routine to make the changes needed for the new version? And that there's an indication in the DB somewhere indicating which version of PW it's been upgraded to? Thought it might be useful to post this question to get it documented for others. Since I'm going to be periodically re-importing the old 2.4.0 database underneath the new 2.5.3 code until "new version go-live", I assume it will make these schema changes each time I do that and subsequently load a page?1 point
-
Hi there Updates are handled through a module called SystemUpdater in /wire/core/modules/SystemUpdater/ . This folder also holds all the update files that exist so far. The module has an entry in the modules table in the database that stores the system version so yes, those updates will be reapplied to the database every time you re-import the old database and upgrade.1 point
-
I have added the ability to set the assigned datetime manually. This can be done by setting the assigned value to the page you going to add. For example: $friend = $users->get('johndoe'); $friend->assigned = "2012-01-01 12:12:12"; $page->myfriends->add($friend); $page->of(false); $page->save(); When you want to modify the value of an already assigned page you will have to remove it first and then add it again with a new assigned datetime value. $friend = $users->get('johndoe'); $page->myfriends->remove($friend); $page->of(false); $page->save(); $friend->assigned = "2012-01-01 12:12:12"; $page->myfriends->add($friend); $page->of(false); $page->save();1 point
-
Hey horst - sounds like we are both having similar issues at the moment I had the same thing yesterday and it was just about properly removing the admin page on uninstall. Not sure how you have set up the page, but this worked for me: $moduleID = $this->modules->getModuleID($this); $page = $this->pages->get("template=admin, process=$moduleID, name=" . self::adminPageName); That works based on defining this constant early on: /** * Name used for the page created in the admin * */ const adminPageName = 'table-csv-export';1 point
-
+1 for drafts. In my opionion the "save unpublished" feature is great and for my (and my client's) needs it would be totally sufficient to have a possibility to save existing (and published) pages as a draft. Like "save and preview" or "save as draft". So the latest published version keeps being online and the new one is saved until someone hits "save and publish". Perhaps the same functionality could be achieved with using the cache. So if cache is enabled and the new version (the draft) is saved, it would be totally enough (for me) to not empty the cache until "publish" is hit. So perhaps a module which hooks into the cache management and displays an additional button "save draft" which saves the page but doesn't empty the cache. The editor can easily preview his changes because he is logged in. Guest still see the old version. Since we are here talking about wishes: My number one wish is a (real) multisite capability. Something like contexts in MODX with customizable settings for each context (domain, templates whatsoever). The multisite module works pretty well, but it would be nice to have something like this a bit more robust with something like $context->config->host.1 point
-
Cannot create child pages with cyrillic titles. Probably names are not generated through transliteration.1 point