Jump to content

Leaderboard

Popular Content

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

  1. Just fixed some issue with new PW 2.5 while still compatible with 2.4. The module is now on v1.0.3 and updated on modules.processwire.com https://github.com/somatonic/TemplateNotes/commit/7a16e25126d1f2b2ef2b4792edc00f70b9c2db1b
    4 points
  2. try rsync http://rsync.samba.org/ EDIT: their website could use a freshen up...
    4 points
  3. This looks similar to (but a little simpler than) pagination to me. Have you tried a straight pagination solution to this? Otherwise, something like this might do if you don't need access to the $page objects themselves... $list = $pages->find('whatever'); $titles = array(); foreach ($list as $p) { $titles[] = $p->title; } $chunked = array_chunk($titles, 3); print_r($chunked); Even simpler, plus you get access to the object with all its data; $list = $pages->find('whatever'); $chunked = array_chunk($list->getArray(), 3); // Output plaintext titles by iterating over chunks and pages in chunks. // Access protected fields as needed using $page->fieldname and format as required. foreach ($chunked as $i => $chunk) { echo "Chunk $i\n"; foreach ($chunk as $page) { echo $page->title, "\n"; } }
    4 points
  4. Hi Bueno, Try this foreach($languages as $language) { if(wire('user')->language->id == $language->id) continue; // skip current language if(!$page->viewable($language)) continue; // check if page not published for this language $url = wire('page')->localUrl($language); $title = $language->getUnformatted('title')->getLanguagevalue($language->id); $name = $language->get('language_name'); $location = $config->urls->templates; echo "<li>$title</a></li>"; }
    4 points
  5. Actually, you can do this from within PW itself without resorting to htaccess rewrites (if you want to.) Edit your templates and look at the URLs tab. There is a section there where you can define which scheme the page should be served as. Switch over each template representing pages that you need served via https and save them. Your pages should now be directly accessible via the https scheme and if you try to access them via http you should be redirected to https.
    3 points
  6. Don't know if you can already do this, but implementing PHPs array_chunk method would be pretty useful.. For example $list = $pages->find("template=something"); // Returns 5 pages $chunked = $list->chunk(3); print_r($chunked); /*prints*/ array( 0=> array( Page, Page, Page ) 1=> array( Page, Page ) ) Especially useful if you're trying to print pages into columns. Can you already do this?
    3 points
  7. Thanks Sinmok and netcarver. It would be really useful when we are using a front-end framework like Bootstrap. <?php $list = $pages->find("template=basic-page"); // Returns 5 pages $chunked = array_chunk($list->getArray(), 3); ?> <?php foreach($chunked as $i => $row): ?> <div class='row'> <?php foreach($row as $item) : ?> <div class="col-md-4"> <?php echo $item->title; ?> </div> <?php endforeach; ?> </div> <?php endforeach; ?>
    3 points
  8. php files in /site/templates/ are protected against direct access. So you have to create a template and a (hidden) page using this template to use a page with ajax in templates folder. For example: rename the file to "ajax.php", create a template called "ajax" and a hidden page called "ajax" using this template. Now you can use ajax requests with an url like "http://yourcomain.com/ajax/". You can combime all your needed ajax stuff in this template. Just pass some "get" parameters with your ajax request like "?action=getuserinfo".
    3 points
  9. Just want to point out that the code diogo posted in #17 uses a relatively new PHP array syntax. If you are running PHP < 5.4 then you will need to do this instead... $images = array("image1.jpg", "image2.jpg", "image3.jpg");
    3 points
  10. Just have committed a little update and added the new category "Premium Modules" to exclude list, so they're not downloadable (cause they're commercial) http://modules.processwire.com/modules/modules-manager/
    2 points
  11. I'm not the first one to reply . If it was by (S)FTP, I would have thought about the fact that some recommend to specify binary transfer for archives like .zip files in order to avoid file corruption (?). Could it have something to do with permissions? Have you tried http://www.xcloner.com? Of course, rsync and other (more or less) similar tools are convenient.
    2 points
  12. Have a look here https://processwire.com/api/fieldtypes/images/ What you are doing is completely different
    2 points
  13. Finnish web hotel with ProcessWire preinstalled: http://www.zerodistance.fi/palvelut/webhotelli-pw.php
    2 points
  14. Just submitted PW here for tag CMS: http://oozled.com/resources/cms
    2 points
  15. I've been working on a module to make it really simple to upgrade ProcessWire from one version to another. Especially as a way to make it easy to upgrade from PW 2.4 to 2.5, or to upgrade from one dev version to another. This tool supports upgrading between any branches of ProcessWire (currently we only have master and dev on GitHub). It will also let you downgrade your ProcessWire version, though no reason to do that. The module keeps up-to-date directly with GitHub, so it works as a long-term tool for every upgrade if you want it to. It works best if your file system is writable. However, if it isn't, the tool can still be used. It will still download the upgrade files to the server and then tell you where to move them. I should also mention that this module is somewhat inspired by a similar module Nico built awhile back called AutoUpgrade. So far I've used this tool to upgrade this site (processwire.com), the skyscrapers site, and the modules site (modules.processwire.com). Before releasing this officially in the modules directory, or suggesting it for production use, I'd like to get some help testing. If anyone has availability to help test this on non-production sites, your help is appreciated. It can be downloaded from GitHub here. As a bonus, it will also be a good opportunity to help test PW 2.5! Thanks in advance. What I'd really like to do as the next step with this is make it support upgrade by FTP. That would provide a nicer and safer solution for those that don't have writable file systems on their servers. This tool should be compatible with ProcessWire versions as far back as 2.3.4. I will also update it to support older versions than that if there's demand for it.
    1 point
  16. This is a simple module to prevent guest users and search engines from accessing to your site. Primarily it is designed for use during site development. Modules directory: http://modules.processwire.com/modules/protected-mode/ Github: https://github.com/adrianbj/ProtectedMode Install and check the "Protected Mode" checkbox Create a user with only the guest role and give the login details to your clients/testers. Of course existing admin users can use their personal logins still. There are some similarities with Pete's excellent Maintenance Mode module, but the reason I built this, rather than using Maintenance Mode is: I didn't want the "Maintenance Mode" badge showing up on the site since this is for development before a site has ever been live and I didn't want the client seeing that badge. I didn't want users redirected to the PW login page because I didn't want visitors to see the PW login page. I know the module has the option to redirect to a custom page, which you could use to make a front-end login form, but that seemed more complex than I needed (and I think other PW devs might also need). Because of the way this module replaces Page::render with the login form, visitors can be sent to any page on the site, and once they login that page will reload with its full content - no messing around finding the page again, and no need for sending page ids through the login process to redirect back. This module also lets you configure the message that is displayed along with the login form, and also apply some css to style the login form. Hope you guys find it useful.
    1 point
  17. The Module Blog for ProcessWire replicates and extends the popular Blog Profile. Blog is now in version 2. Please read the README in the Github link below in its entirety before using this module As of 20 December 2017 ProcessWire versions earlier than 3.x are not supported Blog Documentation is here (Work in Progress!) See this post for new features in version 2 or the readme in GitHub. To upgrade from version 1, see these instructions. ################################################## Most of the text below refers to Blog version 1 (left here for posterity). Blog version 1 consists of two modules: ProcessBlog: Manage Blog in the backend/Admin. MarkupBlog: Display Blog in the frontend. Being a module, Blog can be installed in both fresh and existing sites. Note, however, that presently, ProcessBlog is not compatible with existing installs of the Blog Profile. This is because of various structural and naming differences in respect of Fields, Templates, Template Files and Pages. If there is demand for such compatibility, I will code a separate version for managing Blog Profile installs. In order to use the 'Recent Tweets Widget', you will need to separately install and setup the module 'MarkupTwitterFeed'. Please read the README in the Github link below in its entirety before using this module (especially the bit about the Pages, etc. created by the module). I'll appreciate Beta testers, thanks! Stable release works fine. Download Modules Directory: http://modules.processwire.com/modules/process-blog/ Github: https://github.com/kongondo/Blog You can also install from right within your ProcessWire install. Screenshots (Blog version 1) Video Demos ProcessBlog MarkupBlog Credits Ryan Cramer The Alpha Testers and 'Critics' License GPL2
    1 point
  18. I found (after 2-3 Projects using PW) that it's a good technique to use templates in a way I think hasn't been thought of yet really by some. (Although the CMS we use at work for year, works this way.) I'm sure I'm maybe wrong and someone else is already doing something similar. But I wanted to share this for everybody, just to show alternative way of using the brillant system that PW is. Delegate Template approach I tend to do a setup like this: - I create a main.php with the main html markup, no includes. So the whole html structure is there. - I then create page templates in PW without a file associated. I just name them let's say: basic-page, blog-entry, news-entry... but there's no basic-page.php actually. - Then after creating the template I make it use the "main" as alternative under "Advanced" settings tab. So it's using the main.php as the template file. - This allows to use all templates having the same php master template "main.php" - Then I create a folder and call it something like "/site/templates/view/", in which I create the inc files for the different template types. So there would be a basic-page.inc, blog-entry.inc ... - Then in the main.php template file I use following code to delegate what .inc should be included depending on the name of the template the page requested has. Using the TemplateFile functions you can use the render method, and assign variables to give to the inc explicitly, or you could also use just regular php include() technic. <?php /* * template views depending on template name * using TemplateFile method of PW */ // delegate render view template file // all page templates use "main.php" as alternative template file if( $page->template ) { $t = new TemplateFile($config->paths->templates . "view/{$page->template}.inc"); //$t->set("arr1", $somevar); echo $t->render(); } <?php /* * template views depending on template name * using regular php include */ if( $page->template ) { include($config->paths->templates . "view/{$page->template}.inc"); } I chosen this approach mainly because I hate splitting up the "main" template with head.inc and foot.inc etc. although I was also using this quite a lot, I like the delegate approach better. Having only one main.php which contains the complete html structure makes it easier for me to see/control whats going on. Hope this will be useful to someone. Cheers
    1 point
  19. I used ispconfig as a control panel. This runs nightly backups of the database and content. It the tar balls these. I then use scp to copy them from one server to another and then untar them.
    1 point
  20. Good question. Security is not something I have ever had to obsess over so I will leave it to others to reply to that but it does sound like a very interesting project. A general question would be, is there already a tool out there that serves the purpose well? A database driven one, even offline software like Filemaker which could perhaps be integrated. Or there might be a framework out there with security at the forefront. Sorry not that helpful an answer I'm sure but it's an interesting question and though it deserved at least a response
    1 point
  21. I have just got round to uploading some bits to Behance - never done it before. And I have 6 "Appreciations!" I have decided I like behance https://www.behance.net/joss9911
    1 point
  22. Depending what the budget it, I chatted to Rackspace a few months ago about a project that didn't happen in the end for a minor celeb. Talking to them on the phone, I was very impressed by how helpful they were prepared to be and flexible and not just stick to the ratecard, as it were.
    1 point
  23. Perhaps there's a better place to post this. Feel free to move it. I'm learning Python for Informatics currently. There are also some videos. I've just found this, from the same source, that could be interesting for php beginners: http://www.youtube.com/playlist?list=PLlRFEj9H3Oj5F-GFxG-rKzORVAu3jestu Starting from "PHP-Intro Chapter 3 - Overview", I suppose. http://www.php-intro.com/ I'll surely look at least at the videos .
    1 point
  24. Anybody seeing any weirdness in 2.5+ with tabs added to the page edit forms by either Nik's PageReference module or Soma's Template Notes module? The fieldset in the tabs those modules add to the page form seem to always migrate below the save button. Like this... Doesn't matter if its the legacy theme or Tom's new theme. I don't ever remember these modules having a problem prior to 2.5 -- but I've not tried them in ages.
    1 point
  25. There looks like there was some changes to the way the page edit form is built or css related. I just build a new wrapper and append it to form. The wrapper gets inserted at the end, but since the submit button is also a inputfield added to the form it is before newly added tabs afterwards the form is built already. I tried and found that prepend the wrapper to the form works around this issue (until next time). While at it I found a missing CSS class in Reno in 2.5.3 where hidden labels would show in the forms. Regarding tabs. I'm not sure if that's really a long term "the best way" to add tabs, I also tried to find a way using the $this->tabs used by ProcessPageEdit but that is protected and after all maybe not suitable to add tabs at certain position since you never know what there will be. A float right hack with css would position the tab at the right, but I don't know if that's maybe used by some other theme already and so on. So no real dedicated fool proof way in PW I guess. I'll see if I can test this with 2.4 and or 2.3 and release a fix.
    1 point
  26. Maybe this is usefull link: https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
    1 point
  27. @kongondo, he is saying that the image name is missing in the URL, not that he wants specifically the file name. So, apparently you are calling the template instead of the image field, try this instead: <?php if($page->battImage->url) echo "<img src='{$page->battImage->url}'>" ?> But make sure that you have this image field set to single image or set to image limit = 0 in the field settings, as that's the only way you can call the url directly on it. Otherwise you will have to iterate it (foreach) of call $page->battImage->first()->url instead.
    1 point
  28. Just curious why you need the image file name? I think you can get that using echo $page->BatteryPicture->name. If what you want is an image caption, then give your images description and echo those out with echo $page->BatterPicture->description. Both code here assume you are referring to the image on the page that is currently being viewed.
    1 point
  29. I'm on the road. Will.supply the link tomorrow.
    1 point
  30. If you have moved to a different server, have you ensured that all your path statements reflect the move (different physical location of files) on this install?
    1 point
  31. I think you can get some inspiration from Ryan's example over here: http://processwire.com/api/multi-language-support/multi-language-urls/#language-switcher
    1 point
  32. Quick update: Over the weekend or early next week merging Blog 2 to master and changing status to stable in the modules directory.
    1 point
  33. So you're saying the user will create new pw fields for every new input he want to enter on a page? I don't think that's a valid approach.
    1 point
  34. Found this an incredible asset to test this cms. Thanks to all involved Regards Allan
    1 point
  35. ProcessWire and ryan's famous Post 144 is mentioned towards the end (~58:10) of #135 of Chris Coyier's ShopTalkShow Podcast: http://shoptalkshow.com/episodes/135-bastian-allgeier/. Allgeier, who runs Kirby CMS, totally agrees with Ryan when it comes to a system's ability "teach people how to fish" vs out-of-the-box.
    1 point
  36. Not exactly what you are looking for, but maybe a (modal popup) alternative? http://modules.processwire.com/modules/fredi/
    1 point
  37. The article is a) once again a shameless plug and b) only subtly mentions ProcessWire at all BUT since it is based on an article of (in this forum) known wptavern.com and deals with the perception of CMS with a strong ease of use, I thought I just leave link here: Link
    1 point
  38. This technique works very well for me. I only ask if the duck hasn't got an answer.
    1 point
  39. Quick answer - all of that can be done in PW. You should start thinking out your data structure: what templates do you need, how are they interconnected. There is a good forum post by kongondo here somewhere about it. Hope someone will help me out on that... Here it is.
    1 point
  40. Hello i allso want to ask How's the new version of the shop going??? i am very interest of buy! thank you.
    1 point
  41. The 100 versions are for the admin - if you have "display thumbnails in page editor" checked on the Images field Input tab.
    1 point
  42. Had the same error a couple of days ago Like adrian just posted, open php.ini scroll to [xdebug] add: xdebug.max_nesting_level = 200
    1 point
  43. Some upgrades to the upgrade module. It now scans for module upgrades too, and provides notifications of upgrades that show up when superuser logs in: Main screen: Login notifications: Note that you have to have the latest PW (2.4.19 or hopefully 2.5 later today) in order to use the modules upgrades or login notifications. The core upgrades portion will work with old PW versions. Also the screenshot says it's called "Core Upgrade", but that's because I already had it installed. If you install it anew now, it's simply called "Upgrades".
    1 point
×
×
  • Create New...