Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/11/2014 in all areas

  1. Hear me out, guys! Based on extensive user surveys and after tremendous amounts of solo brainstorming (and other other proven methods, such as wearing all of the six thinking hats simultaneously) I've just come up with a new marketing strategy (and slogan) that will most definitely make us unbeatable: How's that for a slice of fried gold? .. and on a more serious note, I've also got tremendous amounts of respect for Kongondo and his work here. Never visited MODx boards and still don't know what the heck Wayfinder is, but he's done some pretty awesome stuff here too In my case it was Antti who threatened to break my legs brought ProcessWire to the company we both worked at back then. Ryan's video was my first contact with the system itself and the thing that really convinced me that Antti wasn't just delirious -- this thing actually looked great!
    9 points
  2. Greetings Recently uploaded my first site made within the amazing walls of ProcessWire. It's a very simple, yet professional, site for an accounting, tax, and business consultancy in Limbe, Cameroon. The site uses well-built templates (especially on the backend - I really love the way everything works with the editing pages on a per-template basis), and a custom module for the contact form, which runs a clear and concise validation service, powered by the respective Illuminate components (yes, I had to mingle Composer into the scene). Looking forward to many more sites in PW - as it is, I have three more to upload by the end of July. Hope you like it - feedback is always welcome. www.aegpartners-cm.com
    6 points
  3. Nico, tested out here and it works great. Thanks for making this. Just a few minor suggestions: 1. Your 'autoload' selector in getModuleInfo() works well, but might benefit from being more specific, like "template=admin, name=languages". 2. Your hooks to ProcessPageType might also benefit from being more specific, i.e. ProcessLanguages rather than ProcessPageType. 3. Rather than hard-coding the modules directory API key and base URL, you might want to pull it from the ProcessModule module, as it's possible for these things to change over time. Here's how you could grab them: $data = $this->modules->getModuleConfigData('ProcessModule'); $apikey = isset($data['serviceKey']) ? $data['serviceKey'] : 'pw231'; $baseUrl = isset($data['serviceUrl']) ? $data['serviceUrl'] : 'http://modules.processwire.com/export-json/'; Note that above is falling back to hard coded values just in case of an older PW version... not sure that's necessary (I don't remember when these configuration values were added to the core). 4. In your request to the modules directory web service, append "&category=language-pack" in the URL so that your results are limited only to language packs. Don't worry, you didn't miss this before, I just added the category filter option to the service. 5. Your module has downloadFile() and removeDir() methods that duplicate methods already available in the core. Basically, you can save yourself some code here if you want to. See /wire/core/Functions.php. 6. Your module is using ZipArchive. You might find it saves time and code to use the core's built-in wireUnzipFile($file, $destination); method, also in /wire/core/Functions.php 7. In your module's getModuleInfo() method it refers to version 010. Change that to just 10. The leading 0 will make PHP think it's an octal number or something.
    5 points
  4. Hi All, I am gladly posting my first site profile. Blue-VR Site Profile for ProcessWire Summary A site profile for corporate or personal website. Profile can be used with ProcessWire open source CMS/CMF version 2.3+. The front-end uses the Bootstrap 3.1 css framework for to get the responsiveness and mobile friendliness. Front-end Demo - bluevr.webcreate.lk Back-end Demo mode - bluevr-webcreate.lk/processwire (The username 'admin' and password 'bluevr2') Overall features * HTML5 & CSS3 + ({less}) * Build with bootstrap 3.1 * SEO Friendly * Clean & modern design * Responsive markup * Contact form and google map locations with multiple google markers * Testimonials using bxSlider * AIOM supports (Just install the module no need to touch the code) How to install Please take a copy of the latest ProcessWire (Replace the install, modules and templates directories with those in this profile, as shown below: - /site-default/install/ - /site-default/modules/ - /site-default/templates/ Make sure you do following steps as well 1. Add `tinymce` directory into /site-defaut. 2. Add the following two lines to your `/site/config.php` file: $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; Download Github: https://github.com/gayanvirajith/BlueVrSiteProfile/ Credits I would like to thanks Ryan for giving us great CMS/CMF and modules. Hani AbuGhazaleh for a great module of Fieldtype: Select (AKA Drop Down) David Karich for providing such a nice module AIOM+. *** Please note that the site profile is still on testing stage. Thanks ------------------------------------------------------------------------ Edit: install instructions. Edit: Add credits Edit: Update live demo url Edit: Update back-end demo mode details
    4 points
  5. New version available: It now uses an iframe implementation, not as easy as it sounds, because the text area and the iframe somehow need to share the data. At first I went for the session thing (see above), but then realized there would be too many server requests going on. Then I went with cookies, nah 4096 byte limit .. so I now use local storage with a cookie fallback. So now the styles are scoped properly, no clashing of rules. The refresh interval is now configurable. Major code refactoring under the hood and many additions, little optimizations, not so elegant anymore, but whaaateva. It now comes with another optional theme Solarized Dark, it's not as pretty as I thought, will look for better default ones Key strokes of space and enter are ignored, so no unnecessary refreshes are taking place. When updated content is injected (and overflows the browser window), it does not scroll to to the top, but stays at the current position. Summary how it now works (for those interested): The text area is watched for changes, when it changes, the text is sent to the server, converted via text formatters. a local storage item with a unique key of that field and the respective page is set to true meanwhile within the iframe, JS is polling for that value very frequently (no server requests are taking place here), if it's true the text is injected (and only then to prevent constant flickering), the value is set to false so the iframe is only injecting when changes happen in the text area Roadmap: I would love to make the config on a per field basis, but since this module is not an input field but merely hooks into the rendering I am not sure how to, will look into that. Oh, and it's on the module directory now too: http://modules.processwire.com/modules/process-textarea-preview/ Cheers!
    4 points
  6. Added CKEditor support.
    4 points
  7. 4 points
  8. Hey, thanks for this great answer. 1. I added your addition. 2. It's ProcessLanguage (without s) (ProcessLanguages wouldn't work) 3. Included it. 4. Added it. 5. I'm not sure which function can replace downloadFile... 6. Integrated. 7. changed it and updated it to 1.0.0
    4 points
  9. Hey, I'm not sure if it already exists or not, but it would be nice if ProcessWire would notify me if a new version is available and offer a auto upgrade option (like with the modules). -- Nico
    3 points
  10. $pages->find I guess ?
    3 points
  11. oh, I am sure we can solve that problem ...... one way or another.
    3 points
  12. I also forget to edit config.php after install on different server. Thanks to Ryan I am using following code block to overcome this issue. Please add this on top of your template file (templates/home.php). In this way you want be having a blank page, it will remind you to edit the config.php /* * Check that required settings are in place. * Feel free to remove this if your site already works. * */ if($config->prependTemplateFile != '_init.php' || $config->appendTemplateFile != '_main.php') { echo ' <h2>Please edit your /site/config.php and set:</h2> <pre> $config->prependTemplateFile = "_init.php"; $config->appendTemplateFile = "_main.php"; </pre> '; exit; } You can also find these on Ryan's FoundationSiteProfile (Please check templates/home.php) Thanks
    3 points
  13. I think only notifying, but no auto upgrade. It was discussed earlier. You need to manually compare and update .htaccess and site/config.php agianst a new version. Mostly the wire folder has no write access, or at least shouldn't have it.
    3 points
  14. https://processwire.com/talk/topic/529-where-did-you-find-about-processwire/
    3 points
  15. I've made a module for checking a password against a banned list. The list comes from the 10,000 most common password list and when input will produce an error informing the user that their password is in the list and a more secure password should be used. The module was based on a question I asked in the development section (over here). The banned list is found in the module as banned.list so passwords can be added/removed as required. The module should be in the Modules section once it has been approved. PasswordBannedList.zip
    2 points
  16. I made a video too: (it's converting currently)
    2 points
  17. My face when the logo appears -> My face when it disappears -> Repeat...
    2 points
  18. @Joss: Just discovered my cauliflower showing her white curd... ( didn't thought that would happen )
    2 points
  19. Okay, just stared at it too long and now I am feeling sick! Going to water my veggies.
    2 points
  20. Yes I can see issues with auto upgrade, though a new version available module might be useful for some. Of course, one of the things about how I use PW is that I really don't have a huge need to upgrade since the site is built round whatever the version was at the time. There is also not the pressure to upgrade unlike certain other systems.....
    2 points
  21. Yeah, that's probably easier for now. Added you and horst as collaborators to the repo. However, I think github has limits to the number of collaborators on the free accounts so this model will probably only scale so far.
    2 points
  22. Couldn't you just add us as "Co-Creater" to the fork or we use or own forks if we want to add changes? I think we should not rip it apart.
    2 points
  23. Hey, could anyone provide the current PW logo as a vector? I'm working on some animation stuff (completely new in this section). A really not polished sample (first play around with After Effects) using a self-made vector of the logo:
    1 point
  24. This module adds a preview and zoom button to InputfieldTextarea for live previewing the content after being formatted by the text formatters assigned to that specific field. It's pretty alpha still but it already works. For now I was only playing with the Parsedown formatter, but it should work with every other formatter as well, even with Hanna Code, not sure though, haven't tested it. It's restricted to regular textareas, meaning TinyMCE et al are not supported yet, because they need specific change listeners. Will look into it though. The result is fetched via ajax from a process page, the default style sheet contains some Github-like styles but the style sheet is configurable, see module settings. Github: https://github.com/owzim/ProcessTextareaPreview Open for suggestions
    1 point
  25. It's sometimes a bit hard to tell where your comprehension ends and the hat-eating starts but i'm glad to see you've got the gists of it. In your last piece of code the sanitizer step seems unnecessary. Seeing as you only ever want to submit allowed values there is no need to sanitize input->post only for checking values.
    1 point
  26. Then it will (probably) not be recognised as Hanna code and the [hello_world]] will be displayed as-is. So no harm done (it may only look a bit stupid
    1 point
  27. PW 2.4.4 on the dev branch...
    1 point
  28. Let's say you have a frontend form that, among other things, asks visitors to tell which Dutch province they come from. You generate the select options from 12 PW pages (there are 12 provinces). Of course, because these are existing PW pages and you did some solid coding the select options will be clean and because visitors can not type anything themselves you think that the only thing that could be submitted would be one of the 12 provinces. This is where you are wrong. Assumption is the mother of all fuckups. Maybe a clever hacker will be able to manipulate what goes into input->post. So instead of a province a bunch of evil code gets submitted. This is why you have to check that input->post matches one of the trusted values before submitting. In this case, the trusted values being the 12 provinces. So in the case of predefined select options it is not about sanitizing but more about checking/validating post data before processing the request.
    1 point
  29. So this reminds me of the joke about the man who asked is friend if the indicators (signals) on his car were working: "Yes it is, no it isn't, yes it is, no it isn't...."
    1 point
  30. Stolen text: The $input variable is your connection to get, post and cookie variables, url segments, and page numbers. So that has nothing to do with HTML tags if you look at it strict. You don't have to if you use the sanitizers when using those fields, as that is already done with those fields. // no need to sanitize. Sanitizing is already done in the Fieldtype/Inputfield foreach ($page->fields as $field) { echo $page->$field; } But you're free to join Kongondo ! Please correct me here on anything...
    1 point
  31. Thanks for sharing Gayan! It would be good to explicitly state in your install instructions that Site Profiles can only be installed on 'new' sites (newbie alert ). I know it is implicit here 'Please take a copy of the [latest ProcessWire]' but it could be clearer Edited to request clearer instructions...
    1 point
  32. Had to take a quick look to remember how I've done it. Thing is the modules is loaded but the ready() is never triggered in bootstrap and those language aware API is only added via hooks. So I did add those hooks in my script and delegate the event to the module manually. <?php include("index.php"); $lang = wire("languages")->get("default"); // manually add hook to use localUrl wire()->addHook("Page::localUrl", null, function($event){ wire("modules")->LanguageSupportPageNames->hookPageLocalUrl($event); }); // now works echo wire("pages")->get(1001)->localUrl($lang); // ------- // manually add hook to use user language wire()->addHookAfter("Page::path", null, function($event){ wire("modules")->LanguageSupportPageNames->hookPagePath($event); }); // now works wire("user")->language = $lang; echo wire("pages")->get(1001)->url;
    1 point
  33. Maybe a general notification module that can be inserted into a dashboard (or perhaps can be used in a couple of ways) that looks at updates of modules too?
    1 point
  34. Hi Melissa, I tried to reproduce this scenario on my local setup. It works for me. Here what I have done. Here is my templates structure └── news - Has templates/news.php file. Enable Allow Page Numbers (Templates > news > URLs Tab > Checked Allow Page Numbers?) └── month - (Template > month Family Tab > Allowed templates for parents(s) - news, Allowed template(s) for children - news_story) └── news_story (Template > news_story Family Tab > Allowed templates for parents(s) - month Here is my page structure └── News (uses news template) └── 2014 (uses year template) ├── Feb (uses month template) │ ├── Story-4 (uses news_story template) │ └── Story-5 (uses news_story template) └── Jan ├── Story-1 (uses news_story template) ├── Story-2 (uses news_story template) └── Story-3 (uses news_story template) I added fetching+pagination code in templates/news.php <?php if(!$page->template->allowPageNum) { // notify me to enable pagination in the template echo "<p class='alert label'>" . "This template needs page numbers enabled to support pagination!<br />" . "Go to: Admin - Setup - Templates - Edit: '$page->template' - URLs " . "</p>"; exit; } $results = $page->find("template=news_story, limit=3"); $pagination = $results->renderPager(); ?> <?php foreach ($results as $child): ?> <?php echo "<h4><a href='{$child->url}'>{$child->title}</a></h4>";?> <?php endforeach; ?> <div class="pagination"><?php echo $pagination;?></div> Hope this would help a little. Thanks Edit: Fixed some typo
    1 point
  35. Hey Nico. I have this installed now and testing. I'm using pw 2.4.0 and first attempt worked as expected. So far no major problems at all. Nice work. This may become standard in each of my sites as it is often requested. I'll report back if I find a bug.
    1 point
  36. Hi Ivan Nice to see someone else who has been the Seblod route get here! PW is everything I think Seblod would like to be, but probably never can be.
    1 point
  37. 5. It's in WireHttp WireHttp::download()
    1 point
  38. You will have to put up with screen shots for the moment. The poor client is having trouble getting his domain out from under his ex business partner and until he does, I can't link to it. This is, or rather will be, a simple website for a local service garage - a general sort of place that will service any car. Front end is built with elements from Foundation 5 and a couple of silly bits from me. It is fully responsive, some of the content being delivered in a different way for mobiles. For instance, the 4 features blocks on a laptop become an accordion on phones and small tablets. The site has the normal little news facility and a facility for creating blocks of promotional content that can be included into every page in various ways. The client can select background color, image, text, headline (display or not display) for each block. The client also has control over background images for certain panels as well as selecting top panel graphics. It is built with the current dev but it pretty straightforward. The main emphasis of the site will be to try and get it to score locally as the client has no interest in work from outside of his local area. With this in mind I am talking to him about how to link local promotions into the site and the possibility of doing radio and newspaper promos that are reflected with front page flash offers that he can control. The client has a very low budget, so it has been important that he can get his head round running the site as much as possible and make his own promotional decisions. Yes, it would be nice if I could do it for him, but although I do not charge very much for websites (undercharge hugely, probably), if a client wants to use my 35 years experience in advertising, my hourly rate skyrockets! Well, you have to have SOME stupid, useless pride, don't you? Anyway, screenshots below and once we do get the site up, I will add a link
    1 point
  39. They actually bounce up and down, you know - well, gently move.
    1 point
  40. MadHatter, thanks for your submission to the modules directory. This seems like a very good and useful module so thanks for making it. In reviewing the module, I had one suggestion/request: Because this is an autoload module, and because your $this->bad array gets populated from your init(), your bad passwords file gets loaded into memory on every request. That's ~73 kb worth of bad passwords that are loaded every time ProcessWire runs, which is a significant amount of memory. Because your bad password list is only needed at certain times (i.e. after InputfieldPassword::processInput), I wanted to suggest moving the population of $this->bad from your init() method to your checkPass() method. Or maybe you don't even need to bother with having a $this->bad array, and could keep it all localized to your checkPass method, as InputfieldPassword::processInput is not likely to be called more than once in a request anyway (i.e. no need to cache it).
    1 point
  41. 1 point
  42. Matthew found it and then told me he would break both my legs if I did not abandon Joomla at once and start using it.
    1 point
  43. There are two different approaches here: 1. You want to have the same content for both mobile and desktop users, but laid out differently 2. You want to have different content for each - maybe a less verbose description of something for the mobile users that takes up less space. Looking at number 2, you would need to create two distinct fields - obvious really since you will be adding different content! Then, using whatever frame work or a bit of jquery to recognise the browser type or viewport size, you can call up each field in their distinct way. One warning, however, it is unwise to deliver different content to users of different systems - just because they use different devices does not mean they are distinct market segments. Looking at number 1, in this case you can use the same information in more than one way. So, you can call $page->title and $page->body, for instance, but then lay them out in perhaps 4 different ways, using media queries or JS to select which one to use. Foundation, for instance, has a utility called Interchange for doing exactly this http://foundation.zurb.com/docs/components/interchange.html The point with ProcessWire is that it is versatile enough to server whatever content you need, however you need to use it - you just have to work out what you want to do with it. I suppose one thing you could look at for fun is the core language modules, but rather than trigger them depending on the language, trigger them depending on the device. I have no idea how that would work, but it might be an interesting way of looking at it.
    1 point
  44. Maybe we are misunderstanding each other. A responsive framework allows you to have 1 field "featurelist" and the display will accommodate any device (tablet, phone, desktop, etc...). The logic (framework code) determines what device you have and displays the content according to the wishes of the developer. That means if you have other content that should show up on a tablet only, this is the optimum way to do that. That is covered when you use the front-end framework. If you are talking about responsive content, then that's a responsive solution. I'm sorry if I still am not talking about what you are looking for. My apologies.
    1 point
  45. Here are some multisite things to look at, in case you haven't seen them: http://modules.processwire.com/modules/multisite/ https://processwire.com/talk/topic/1025-multisite/?p=46652 https://processwire.com/talk/topic/3534-one-processwire-installation-folder-for-multiple-sites-without-symbolic-links/ https://processwire.com/talk/topic/4566-is-there-a-disadvantage-to-adding-modules-to-wire/ https://processwire.com/talk/topic/816-multi-site-setup/
    1 point
  46. Hi Sendxt, Welcome to ProcessWire and the Forums! I am in a bit of a hurry. See solution here..https://processwire.com/talk/topic/6243-images-in-a-repeater-field/ Key thing to remember is that behind the scenes repeaters are also pages and need to be treated as such...hence you may also need to foreach (loop) through them....Normally, this would require nested foreachs...if the images are also an array.. foreach ($page->my_repeater_field as $f) //$f is the repeater....you need to loop through it if you have multiple images inside it... foreach ($f->images as $image)//do stuff....
    1 point
  47. What diogo said. If you really need a fieldtype to do ajax internally you best create a hidden admin page with a process module to handle all that. Not overkill but a well streamlined approach, and makes it solid and easy, also the admin URL that way is sure to be unique throughout the system. Gives an interface that is well defined. Process pages are meant for that and PW uses it also in some places like Page tree and fieldtypes. If you will you can of course always catch and bypass the requested url in a module init. Something like public function init() { $adminUrl = ltrim($this->config->urls->admin, "/"); if($this->input->get->it == $adminUrl . "testmodule/load"){ echo $this->executeLoad(); exit; } } protected function executeLoad(){ $id = $this->input->get->id; return $this->pages->get((int)$id)->title; } And a js ajax request might look like $(function(){ $.ajax({ type: 'get', url: "/processwire/testmodule/load", data: "id=1001", success: function(data){ alert(data); } }); }); But I don't know if that's really a good idea at all. Just because you can doesn't mean it's good.
    1 point
  48. I've made a simple module called MarkupBox which is not installed in the CMS, but the files are in the module directory (/site/modules/). When I call the module from a template it returns the value. I suppose there is a way to check if a module is installed, but I can't find it in the code or in the forums. I'm looking for someting like: if ($modules->get("MarkupBox")->isInstalled()) { // Do something } Module: public function render() { $out = "Test"; return $out; } Template: $box = $modules->get("MarkupBox"); echo $box->render(); Thanks!
    1 point
  49. You're very close actually . This is how it works: if($modules->isInstalled("MarkupBox")) { // do something }
    1 point
×
×
  • Create New...