Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/08/2014 in all areas

  1. Hey, over a year ago I build the website for the bar "Kapitl21" which is really close to where I live in exchange for a beer flat (<- was my idea ). I completely forgot to post it here. Hope you guys like it: http://kapitel21.de / Nico
    6 points
  2. tiptronic, The way of installing admin themes changed drastically in PW 2.4 which hasn't been out very long. I would recommend that at the moment you steer clear of alternate admin themes until we have some new ones designed for 2.4 - I know there is one very close to being ready. So, try the modules manager for installing other cool modules - lots of great tools to try: http://modules.processwire.com/modules/?sort=-likes (here are the most popular ones on top), or just sort by likes in the modules manager itself Is there any functionality in particular that we can help you with?
    4 points
  3. My liver can no longer handle Finland.
    3 points
  4. Just stepping in to say that it's a real shame how complicated things have gone for you, @tiptronic. That's absolutely not how things usually go with PW, you just jumped in at somewhat bad time. Quite a few changes going on I've just reported the problem you mentioned (installing existing Admin Themes via Modules) as an issue at GitHub. Like Soma mentioned earlier, I'm sure Ryan will handle that. Slightly off-topic, but the way Modules section handles non-compatible modules was a bit of a surprise to me too. This was actually the first time I used that thing and I entirely missed the note about Teflon not "necessarily" being 2.4 compatible. Bad combination -- small and unnoticeable message at the bottom of the screen and a hasty user. Personally I would've been happy with Modules section not allowing installing non-compatible modules at all (you can always do that manually, making it this easy is IMHO not such a good idea), but putting that aside, the error message is awfully unobtrusive. How 'bout (at least) adding a big notice at the top of the screen, warning that you're doing this on your own risk? Edit: ended up opening another issue for this..
    3 points
  5. Hi guys We are thinking about organizing a little PW-meetup for all the Finnish PW-developers (of course, people from other countries are also welcome). Logical location could be Tampere, since we have people there, and I know many from these forums who are also there. Avoine can provide meeting place and something to eat/drink. I am thinking about having the meetup at workday (maybe Friday), but if that makes it harder for people to join, we can think of weekend or evening also. What I have in mind is half day long (maybe from 12:00 - 16:00), very free form meeting, where people can just discuss about pw, projects they have done, talk about modules etc. Also few more "official" presentations are welcome. I don't have actual date yet - but I think meeting would be in end of March. If you are interested, please let me know by personal message here on these forums or by emailing: antti@avoine.fi
    2 points
  6. I have been using this for a while now and it is incredibly useful. They have also just released a beta version which is so clean I am sure there are other tools out there like it, but this one has made my life so much easier many times. http://json.parser.online.fr/beta/ Be sure to check all the options under the settings cog!
    2 points
  7. Quick update on schedule - it seems difficult to find organizing this so fast (if we want some content and not just drinking beer). But this is definitely something I and our company wants to organize, so just more hands up. Realistic schedule would April or June, Tampere is still the best location.
    2 points
  8. I just downloaded ProcessWire 2.4.0. I wanted to change the admin theme to 'Teflon'. (Oh btw... there should be a mention somewhere that this one relies on jQueryDataTables - for whatever reason). So I tried to follow a couple of installation hints on the forum, but there seem to be different variations, and I can't get even one of them to work: - it seems that putting the modules into 'site/template-admin' doesn't do the job - but I couldn't get it to work by putting it into AdminThemeTeflon (along with an additional AppminThemTeflon.module), as mentioned somewhere else in the forums. - so I tried the built-in Module management. I typed in 'Teflon' and it downloaded 'teflon-admin-them-pw2' from github. And then it says: 'Successfully copied to new directory: /site/modules/Teflon' (indeed, it's there) -> Clicking 'Install now' just does nothing - ok I downloaded the ModulesManager (and while the ModulesManager installs fine - the Teflon theme doesn't show up in PW). What am I doing wrong? Setup: - iMac OSX 10.9.2 - Safari (latest), Chrome Canary (latest) -> identical results - AMMPS -latest (http://www.ampps.com) - everything else is running fine - since it runs locally (localhost) there should be sufficient rights as well BTW: the Teflon github-page says, it's for PW 2.1, while the Modules-page says, it's compatible up to 2.4. Obviously the help needs some love, doesn't it? (OK - maybe I'm just too stupid ) Any help (in any case) appreciated
    2 points
  9. I don't think there's any need in changing the homepage to "core" and putting a "home" page underneath it. The way it's setup by default is that all content is a child of the homepage - the homepage being the start of the website. Why not simply create a "Profile" page under home and put these pages under the Profile page: Calendar | Messages | Projects | etc ? If the user is logged in you then show the Profile page else show a Login page. Or are you trying to have customised home pages for each user?
    2 points
  10. Not sure what you are after but maybe this might help: http://processwire.com/talk/topic/2300-structure-best-practice-grouping-in-admin/ http://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ But looks like you over-complicate your approach. ProcessWire uses a hierarchal structure for pages you setup in the backend. In your templates you can call whatever page you want. http://processwire.com/api/templates/ section: finding and loading other pages from your template file http://en.wikipedia.org/wiki/ProcessWire Quote: ProcessWire is built around a page content tree (as opposed to a bucket system). The URL or path of each page is always reflective of its place in the hierarchy. One uses this same path to reference the page in the API. As a result, this connection of the path to the internal tree hierarchy is important to the architecture of ProcessWire. Beyond the parent-child relationship implied by a content tree, ProcessWire supports relational one-to-one and one-to-many references between pages in the tree.
    2 points
  11. Hi kongondo, thanks for the welcome! To tell you the truth: I don't know which language-modules I'm referring to ... currently to me it's not really obvious, what's in the core and what's needed to have multiple language-content. I'll play with the stuff in the next couple of days and hopefully this will shed some light on everything As far as Teflon is concerned: This was just my first shot! I wanted to understand how PW works. But nothing worked, so I felt a little stumped, because I didn't understand what I was doing wrong... For now, it leaves a (little) bitter taste, since I'm completely unsure how to check-out the framework, if the supported modules are un-supported (pun intended) What I'd really appreciate, if there was an API/modules documentation per version: e.g. something like: http://processwire.com/api/2.2 http://processwire.com/api/2.3 or http://processwire.com/2.2/api/... ...especially if things are drastically change (as it is obviously the case). For a newbie like me, it's not easy to understand, if the problem is inside or in front of the computer. Let's see, how far I come.
    2 points
  12. Sorry, Teflon is currently not compatible for 2.3+/2.4 I think the module page on modules.processwire.com was updated for all in one step and it's module developers task to check our modules. Just haven't come around to make it, I think it would be a good time now Sorry for the inconvenience this may caused. I will update the info. Also ModulesManager need to somehow account for that (installing admin themes in 2.4). Just give me some time to think how and when. Since there now multiple changes going on old and new theme is a big step
    2 points
  13. Just had a thought for a slightly better version. I replaced this: echo $this->pages->get($this->searchPage)->render(array('q' => $term)); with: echo $this->page->render($this->pages->get($this->searchPage)->template->filename, array('q' => $term)); which seems a little cleaner. This change also means that now you only have to add just the one line to your search.php file: if(isset($options['q'])) $input->get->q = $options['q']; No need to change the page title anymore because we are actually now still rendering the 404 page with it's existing fields, just using the template file of the search page. However, I also added the 404 page's body to my search.php file: if(isset($options['q'])){ $input->get->q = $options['q']; $out .= $pages->get(27)->body; } With this approach you can easily then edit the body field of the "404 Page Not Found" page in the PW admin to read something like this: <h3>The page you were looking for is not found.</h3> <p>We have tried to find the content you were looking for, but if we didn't get it right, please use our search engine or navigation above to find the page.</p> Any thoughts on this new version, or the approach in general? Any problems from anyone who has tested it?
    2 points
  14. Hey guys, first, ProcessWire is a great piece of software. Thanks for that and the great community behind that. So, i'm realy new to ProcessWire, but i will present you my first module for SEO- and performance optimizing: AIOM+ (All In One Minify). AIOM+ (All In One Minify) for CSS, LESS, JS and HTML AIOM+ (All In One Minify) is a module to easily improve the performance of your website. By a simple function call Stylesheets, LESS and Javascript files can be parsed, minimized and combined into one single file. This reduces the server requests, loading time and minimizes the traffic. In addition, the generated HTML source code can be minimized and all generated files can be loaded over a cookieless domain (domain sharding). Install AIOM+ Download current release (link below) Extract and copy the files for this module to /site/modules/AllInOneMinify/ Login to PW backend and go to Modules > Check for new modules Install Module > AIOM+ (All In One Minify) for CSS, LESS, JS and HTML Alternative in ProcessWire 2.4 Login to PW backend and go to Modules Click tab "new" and enter Module Class Name: "AllInOneMinify" Click "Download and Install" Features Combining stylesheets / LESS files or JavaScripts Minimize the combined files No change to the .htaccess necessary (except for the domain sharding) Server-side LESS parsing without plugins HTML source code minimization Cookieless domain / domain sharding Automatic cache management (With changes to the source file, the cache is rebuilt) Configurable via the backend Automatic rewriting the paths in the stylesheet and LESS files. No changes are needed Optional developer mode (combining, but no minimize and browser cache prevention) Clear the cache on the backend Conditional loading for CSS, LESS and JS (since Version 3.1.1) How to use Minimize multiple stylesheet or LESS files into one file. You can even mix stylesheet and LESS files in parsing and combining process! <link rel="stylesheet" href="<?php echo AIOM::CSS(array('css/file-1.css', 'css/file-2.less', 'css/file-3.css', 'css/file-4.less')); ?>"> Minimize multiple javascript files into one file. <script src="<?php echo AIOM::JS(array('js/file-1.js', 'js/file-2.js', 'js/file-3.js', 'js/file-4.js')); ?>"></script> Conditional loading (same with Javascripts) <?php $stylesheets = array('css/reset.css', 'css/main.less', array('loadOn' => 'id|template=1002|1004|sitemap', // PW API selector 'files' => array('css/special.css', 'css/special-theme.less'))); ?> <link rel="stylesheet" type="text/css" href="<?php echo AIOM::CSS($stylesheets); ?>" /> More Information, Documentation and Download AIOM+ in ProcessWire repository AIOM+ on GitHub So, I hope you can do something with this module. Dave
    1 point
  15. 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
  16. The ProcessWire requirements page states that ProcessWire requires PHP version 5.2.4 or greater. http://processwire.com/about/requirements/ Yet when I just tried to install ProcessWire 2.4.0, I receive the following error: ProcessWire requires PHP version 5.3.8 or newer. You are running PHP 5.3.3-7+squeeze19" I'm installing on a host I've never used before, and I'm not sure what "squeeze19" is. Why is ProcessWire giving me this error? What are the actual PHP version requirements?
    1 point
  17. Just noticed a small issue with the sidebar menus on the ProcessWire website (in Chrome) - see attached! It occurs when moving the cursor away from a hovered item. It looks like background-repeat just needs setting to "no-repeat" on the anchor tags CSS .subnav li a.
    1 point
  18. Probably you are either hitting the time limit of your php script or then your server runs out of the memory. To avoid time limit issue, put this on top of your script: set_time_limit(0); That might be all you need. But probably you will hit memory issues too, since PW keeps pages in cache. At some point memory issues come - if not with 2000 pages, then probably with 20000 pages or so. That is easy to avoid, just call this at the end of your foreach loop: wire("pages")->uncacheAll(); Also make sure you don't have debug mode on when running this kind of scripts (there will be memory leak, since debug mode logs all queries in memory). I myself like to create this kind of scripts as a command line script. More information here: http://processwire.com/api/include/
    1 point
  19. This sounds awesome! The location couldn't be better - you can count me in anytime.
    1 point
  20. updated to version 0.0.7 Added a new flag that tells the send() method to make usage of the new logging methods for handling large amounts of recipients by using permanent storage across multiple script calls: useSentLog( true | false ) Tells the send()-method to make usage of the SentLog-methods! sentLogReset() It starts a new LogSession - Best usage would be interactively once when setting up a new Newsletter. sentLogGet() is called automaticly by the send() method - returns an array containing all previously used emailaddresses sentLogAdd($emailaddress) is called automaticly by the send() method - stores each successfully sent emailaddress into the provided log This is intended to use within third party modules for newsletter systems. All three sentLog methods are made hookable, so, e.g. if you don't want log into files you may provide your own storage, or add additional functionality here. The usage is really simple, I think. When starting a new Newsletter Session, you once have to call wireMail()->sentLogReset() to clear any previously stored content in the log. This best should be done manually / interactively I think. After that you only have to set the useSentLog flag to true, e.g by passing an options array into the procedural function call $options = array( 'sendBulk' => true, 'useSentLog' => true ); $numSent = wireMail($to, $from, $textBody, $options); or in object-oriented style like this $numSent = wireMail()->sendBulk(true)->useSentLog(true)->to($to)->from($from)->body($textBody)->send(); That's all. Now you can call your newsletter sending script multiple times (for example bind to lazy cron) and no recipient get lost nor will receive multiple messages. No more worries about script timeouts or other interruptions, just call your script in regular intervals, but ensure that only one instance is running at the time and not multiple in parallel. It would not mess up the logfile because it uses filelocking, but you may get trouble with your SMTP provider if you stress the server. PS: @Nico: want to test it in the near future?
    1 point
  21. I had totally missed this topic! So Joss, if your liver is no good for anything else it still did get my attention. I'm in, definitely.
    1 point
  22. Whether it's drinking beer (nothing wrong with that, by the way) or something else, just keep us posted.
    1 point
  23. Thanks to Craig (http://processwire.com/talk/topic/5770-processwire-website-css-issue/?p=56336), the Chevron fix is: .subnav li a { background-repeat: no-repeat; }
    1 point
  24. 644 is standard for files on most server configurations. I am curious why they ended up as 600 in the first place though? In case you don't know, and you have terminal access, this will recursively set all files to 644: find . -type f -print0 | xargs -0 chmod 644 and if you ever need to do any changes to just folders, this will do the trick: find . -type d -print0 | xargs -0 chmod 755
    1 point
  25. I would like for you to release it and thanks for the great work
    1 point
  26. Any thoughts on whether this should be released as a module in the directory? I am thinking that I will start using it on all sites now. I can't see any negatives with the way it is working now. Obviously I'd prefer a one click install, but can't see a way around having to add that one snippet to the search.php file. Anyone have any strong thoughts one way or the other?
    1 point
  27. Good guess from Pete Most Linux distributions provide certain level of support for packages, such as PHP, included in their (still supported) releases. They won't upgrade PHP as a whole, but they'll backport security fixes. PHP 5.3.3-7+squeeze19 is simply PHP version shipped with Debian release "squeeze" and contains, most likely, various security enhancements over "vanilla" PHP 5.3.3. By the way, regarding required PHP version there's another thread you might want to take a look at too.
    1 point
  28. Profiles are a great way to do it. I have a couple that already have a simple news system built in and different frameworks and so on - no use for anyone else as they are very much dedicated towards how I like to work, but it gives me an instant starter and always means I am using the most recent version of PW at that point. Just as easy as copying your own site.
    1 point
  29. @kongondo No problem here - I have a think skin and a lively discussion is better than if the complaints fall on deaf ears.
    1 point
  30. If you talk english (and not finnish all the time there) I'd love to join it (never been to Finnland) if I can catch a cheap flight Edit: End of march is really close. If it would be in July or so it would be more comfortable
    1 point
  31. If this is your ideal structure, there's no need to change only because of the frontend. There are many ways to make the frontend adapt to the structure. One would ve in the htaccess file, others can be done in the templates themselves. Simplest way would have to have simply: $session->redirect($page->child->url);, this would redirect the "core" to it's first child, the "home". The problem with this approach is that you would have "site.com/home" as the url of your home page instead of simply "site.com", the advantages are that you would have a very easy to create navigation and a one-to-one relation between the backend and the frontend. Another approach would be to render "home" from the "core" url, by putting this code on the "core" template: $page->child->render();, and excluding "home" from lists and searches: "settings > hide". Advantage -> you keep "site.com" as your main url, disadvantage -> you alter the structure and home is not searchable anymore without explicitly including it on find() searches. Edit: to make it clear, I agree with what Pete says below. My suggestions are only for the case you really want to keep that structure.
    1 point
  32. @tiptronic, Apologies if I sounded somewhat brash in my earlier posts. It was late here. Again, welcome to PW. You will love it, am sure. And of course, don't shy away from asking questions...keep 'em coming...they help us too cheers, k
    1 point
  33. As Jeff pointed out, your example should work as coded. However I am thinking from your example that you don't actually want the repeater id, but an auto-incrementing number starting at 1. Is that right? If so, simply define: $i=1 before the foreach starts and then $++ just before the loop closes. Then use the $i instead of $item->id Does that help?
    1 point
  34. Thanks for the reply, will look deeper into this. I was actually looking into updating an existing module, but it has turned out to go way beyond my capabilities at the moment. Glad I brought some attention to that point though. I am hoping to get more experience with PW, and as I found with Drupal, every little setback/misunderstanding is very informative.
    1 point
  35. @adrian: Thanks - meanwhile I got it But as I said (somewhere above); this was just a coincidence, since I simply choose *something* to see what I can do and was immediately trapped.... I'll investigate further and use less complicated modifications (something like my own code ) Anyway - thanks for this kind (and complicated) welcome and I'm looking forward doing anything serious with the framework, because it *really* looks very promising: feature-wise, speed-wise and flexibility-wise... I really appreciate you folks putting so much into this and still keep it uncluttered™ (except of the things mentioned in this thread )
    1 point
  36. OK, it seems we are crossing wires here... Above was in response to this: ....what's in the core is now pretty obvious, no?
    1 point
  37. Edit: Never mind. Simple typo on the equal signs. Carry on! Hello! I am trying to use $child->first() inside a loop, but I get the error "Error:Call to a member function first() on a non-object" Any pointer on what I'm doing wrong? Thanks! foreach($page->children->find("sort=-markerdate") as $child) { $current = $child->first(); if($child = $current){ $icon = $child->parent->icon->url; }else{ if ($child->icon != ""){ $icon = $child->icon->url; }else{ $icon = "image.png"; } } }
    1 point
  38. I think there's no problem with shared hosting involved here. But: - A big advantage using SQLite is moving/replicating a site to a different server/domain (you name it). - Also updating to new contents is a matter of replacing one file (the .db file itself, without the need of messing with a server). - And last, not least, it's pretty convenient in a development environment, since you can run your dev-tools without cluttering your local backend with databases. just my 0.02
    1 point
  39. Hhm, sorry! With the 0.0.5 I have added a configuration option that lets you choose when an optional MailSignature should be send, but have left a boolean true somewhere in the code that overrides always these setting. Have corrected this now and committed the v 0.0.6 to GitHub. (ZIP)
    1 point
  40. I have updated the class to version 0.0.5 and also have edited the first post of this thread (added some short examples and a list of available options/methods). Now per default the module sends multiple messages in a loop, (one for each TO-recipient) like the base class do. Additionaly you can call sendBulk to send larger amount of messages at once in an optimized manner, - or you can call sendSingle to set the module to allow only one TO-recipient but additionally CC-recipients. More information are now in the first post here.
    1 point
  41. @MikeB: no worries, this is just about as good as any other place to ask questions Great timing here, too. Just today I wrote in another thread that integers (such as 32 for version 0.3.2 or 132 for version 1.3.2) feel wrong to me because they can only handle a subset of version numbers. Integers are the default you'll see used a lot, but you can (and, when it's useful, should) use strings like '1.3.12' instead. It should work everywhere just as well as integers (and if it doesn't, that's most likely a bug).
    1 point
  42. @ryan: thanks, great suggestions! I did notice the issue with saving settings, but had planned to reduce it to a proper test case and submit as an issue. Should've acted faster and disabled it right away, though, to avoid any unnecessary confusion Autoload and singular state were carried over from the original module, the intention of which was quite different from current implementation. I've taken care of these already, but will have to change the require logic you mentioned, as that admittedly no longer makes sense (and path part would've made sense even in the original form). So far I haven't been able to reproduce this. Will continue testing, though, since if it happened to you it's probably going to happen to others too. Shouldn't be too hard to figure out (*fingers crossed*). I remember having problems remembering and "getting" the version number logic originally -- 006 was probably carried over from the time I first put this module together. Lately I've used integers, as that seems to be the expected thing there. Slightly off-topic, perhaps, but integers still seem like a bad fit for version numbers to me. Version numbers should be able to go beyond 0-9 range.. and how do you represent versions such as 1.11.24 as an integer without actually using three sets of numbers? Of course there's always the option of using strings in those cases, but I find it weird that integers are seen as "the default way" while they are only capable of representing some version numbers properly
    1 point
  43. Raymond Geerts,you are a great help. thank you!
    1 point
  44. Alternatively you could use this line in the module to send the 404 Page Not Found body to the search template echo $this->page->render($this->pages->get($this->searchPage)->template->filename, array('q' => $term, 'out' => $this->page->body)); and have it output in the search template using: if(isset($options['q'])){ $input->get->q = $options['q']; $out .= $options['out']; } Lots of options really
    1 point
  45. Hello, this module looks fantastic. But unfortunately, I encounter an error while setting up the module. I'm using ProcessWire 2.3.0 with Languages Support module. I installed the latest version of this module (1.3.1), but when I try to configure the module, it returns an error: "Method TemplatesArray::makeCopy does not exist or is not callable in this context" The other modules - Page Snapshot and Revision History For Text Fields are installed correctly and the configuration of Revision History is working. Any ideas to solve this issue? Thanks in advance!
    1 point
  46. Hello and thanks for this great module. It seams to be working fine except that when is activated for a template, if that template contains image fields, after dragging and dropping the image, this module breaks the upload response and immediate image that was uploaded is not shown (instead is returned the return form inject function of this module). The version control is activated only for body field... Just wanted to mention this. Please tell me is I am doing something wrong. Thank you.
    1 point
  47. Inspired by @apesia recent post about a meetup in Finland, I thought I would try and reignite this thread and set a date for some sort of PW meetup in Switzerland. No need to call it a conference, just a very casual meetup to talk about experiences with Processwire and ideas for the future. We only need a few people - it could just be me and @soma. In fact the whole reason I wanted to have a meetup is to actually meet the real person behind that alien avatar so I can dispel my suspicions that he is not just an alter ego of Ryan. Open to having micro talks if anyone is interested - possible topics could be about best practices or case studies of projects you have worked on. Have a few possibilities for locations to host the meetup in Basel. Also open to meeting in other cities nearby like Bern or Zurich depedning on the amount of people and interest. Have setup a Doodle to get an idea of possible dates - thinking sometime in March (not during the Basel Fasnacht carnival!). Please vote on the Doodle if any of these dates work : http://doodle.com/sgvy6kxavs5t2agw
    1 point
  48. Update: version 1.3.0, just pushed to GitHub, adds support for repeaters -- or, to be more precise, support for saving revision data for fields that are within repeaters. Repeaters being pages after all, it seemed most logical to treat them as such. If repeater field added to a template for which version control has been enabled contains fields that are also under version control, values of those fields will be stored just like they would be for the main page (page containing the repeater field). I'm not confident that my explanation made any sense, so let's just say that this should be self-evident once you try it. Main point is that instead of saving repeater values on per repeater basis the module is treating individual repeater fields (or repeater field fields..) separately Another thing to note is that snapshot feature added in previous update is now module called PageSnapshots. It's still bundled with VersionControlForTextFields and initiated (and automatically installed) by VersionControlForTextFields init() method, so this shouldn't change anything. I'm simply trying to keep the "core" version control module as lean as possible. Once again, I'd suggest making sure that things work properly before putting this update into real world use. There have been a lot of changes and something could've broken. I've tried to write and run tests vigorously, but those definitely won't catch all issues.. yet
    1 point
  49. I think how you are using the redirects module is still more like a url shortener than why this module exists (keeping urls form old site alive and also permanent shortcuts to most important stuff, like /board/ => /about_us/people/board/). Have you thought about creating a template called "redirect" and adding two fields for it: redirect_url & description. Template code would be: $session->redirect($page->redirect_url); You could use that method for your "non permanent" needs and keep redirects module for urls that need to live "forever".
    1 point
  50. Absolutely! Here is a simple, but functional example for both login and logout templates. You would want to replace the markup with your own markup or includes. Likewise you'd want to change the redirects to redirect to whatever page you want them to go to after completing a login. /site/templates/login.php: <?php if($user->isLoggedin()) { // user is already logged in, so they don't need to be here $session->redirect("/somewhere/"); } // check for login before outputting markup if($input->post->user && $input->post->pass) { $user = $sanitizer->username($input->post->user); $pass = $input->post->pass; if($session->login($user, $pass)) { // login successful $session->redirect("/somewhere/"); } } ?> <html> <head> <title>Login</title> </head> <body> <form action='./' method='post'> <?php if($input->post->user) echo "<h2 class='error'>Login failed</h2>"; ?> <p><label>User <input type='text' name='user' /></label></p> <p><label>Password <input type='password' name='pass' /></label></p> <p><input type='submit' name='submit' value='Login' /></p> </form> </body> </html> /site/templates/logout.php: <?php $session->logout(); ?> <html> <head> <title>Logout</title> </head> <body> <h1>You have logged out</h1> </body> </html>
    1 point
×
×
  • Create New...