Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/22/2014 in all areas

  1. 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
    16 points
  2. http://www.designsatu.com Satu Jaakkola-Chiari is a Finnish fashion designer. She has two decades of experience with high-end fashion design in Italy. This is a small promotional website for her latest collection.
    12 points
  3. This website is a recent conversion from a Joomla version built over 2 years ago: https://www.olddominionmc.com My client, Old Dominion Medical Center (ODMC), simply loved the ProcessWire-based colors when I showed them the original "FoundWire" demonstration prototype. This website is a modified version of the original FoundWire Demo Profile that is now using the straight CSS version of Foundation 5. It's my personal preference until I can find the time to install Ruby and LESS/Sass tools on my new development desktop. For this project, our primary objective has always been to have a simple customer-facing website that presents their patients with vital information about the practice. Our secondary objective is to continue to use the website as an information portal for their back office day-to-day operations. Some of the first ProcessWire applications I built (over a year ago) were in direct support of ODMC. I continue to expand their Intranet to incorporate many administrative and support functions not covered by their EMR/EHR system. The following are the critical ProcessWire modules that make this website, especially the Intranet shine: Form Builder Pro Cache Modules Manager Images Manager (which, to me, is the greatest of Soma's many useful modules) Hanna Code Page Edit Field Permission Changelog Custom Upload Names Login History Redirects Template Editor Import Pages From CSV JQuery DataTables Plugin AIOM+ (All In One Minify) I have special thanks for Joss Sanglier (for his fantastic FoundWire Demo Profile) and Ryan Cramer (for his Foundation 4 Profile which got me very interested in Zurb Foundation). There are many others out there to thank (mainly the developers of the above listed modules) that have made my transition to ProcessWire most enjoyable. I'm still learning.
    9 points
  4. My first process-wire site for a client! Been working on it this week, will add a blog. It was my first 2.4 project. I'm loving 2.4. I put a font awesome icon on everything in the backend! makes me feel good to have icons for some reason. I am hoping I can just save this site as a "template" and use it for future projects as a base. + this was my first zerb site. http://www.principlededu.com/ I started this project as a wordpress project using Avada theme. a theme that got like 20,000 downloads or something crazy. It looked ultra flexible. But when it came time for client to edit, and they saw all the short-codes, they said forget it! (this is an example of an "easy page": the home page had more shortcodes then content) So I decided to give PW a try. It made for a much cleaner solution. (screen shot of home page) the page got more complex, and the client is editing happily. Anyway that is my success story, still working on the the project now, and open to any feedback and tips.
    5 points
  5. New Processwire Website. Built with HTML KickStart. http://www.carscallen.com Feedback welcome.
    4 points
  6. Technology evolves and you just have to evolve when things change. The basics I learned in the 80's are still applicable today. Each new technology builds on, circumvents or basically changes what was hot yesterday. If you are serious about learning you will keep up and prosper. Don't look at new ways of doing things as a challenge, look at it as an opportunity. Don't be scared or hostile to reinventing yourself. Good Luck in your endeavours.
    3 points
  7. Greetings, There are many methods you can use for forms -- as others have suggested. Remember: ProcessWire allows terrific flexibility to accomplish almost anything. But that flexibility also means you have to be clear about what you want to accomplish. I regularly build front-end interfaces for my ProcessWire projects, largely based on forms (of course). Once you head down this path, the possibilities are endless! I tend to build my forms with classic HTML, as Soma suggested. That method gives you the greatest flexibility. Please provide more information about what you want to accomplish, then we can give better answers. For example, are you trying to create and control ProcessWire content through the foms? I've worked through all this and posted about it before, as have others. Here are some links to get you started: Form to Create ProcessWire Content Using HTML (with file uploads): http://processwire.com/talk/topic/3105-create-pages-with-file-upload-field-via-api/ Form to Create ProcessWire Content Using ProcessWire Field Modules: http://processwire.com/talk/topic/2089-create-simple-forms-using-api/ Form to Edit ProcessWire Content http://processwire.com/talk/topic/4350-how-edit-a-page-using-api/?p=42620 Follow up if you have other questions. Thanks, Matthew
    3 points
  8. Hey, Mr Stevens, glad to see Foundwire helped someone. Rather than go to the trouble of installing Ruby and the rest, either go grab Scout or PrePros Scout is free and PrePros has a free and paid version. PrePros has the advantage that it will handle less and sass as well as minify JS, HTML and the rest. Nice clean site, btw
    2 points
  9. I am not a dev, but as I said before, all they are doing is using a line of JQuery to put the url of the linked-to page into the address bar. If you look at the source, the modal is in a div with the class "module Closeup canClose" This div is written (using ajax, I would guess) into a div called appendedContainer, which remains on the page unpopulated if you don't click on anything - it is simply a target for the retrieved page The css for the the closeup div is: .App .appendedContainer>.Module { -webkit-overflow-scrolling: touch; overflow-y: scroll; bottom: 0; left: 0; position: fixed; right: 0; top: 0; z-index: 680;} As you can see, it positions itself over the home page content with a z-index to put it on top. The actual homepage which is being overlaid is in a div called "ajax HomePage Module," just for interest and to help you find your way through the source. sooooo... What needs to be done here (by some nice person who can write a couple of lines of code) is for your link to call, by ajax, an actual PW page using its own template (possibly render() - though you would need to get rid of header and footer bits), write it into a div as above and at the same time, pop the URL of that page into the address bar. I am pretty sure that is how Pinterest are doing it, though foolishly, without PW It is probably about 4 lines of code and a couple of lines of JQuery to sort out the address bar bit. I am really not certain how to do it as I am an ajax virgin, but someone should be able to do it on the back of what I have just written. By the way, I do not see any SEO advantage to this method - the page is only called in by ajax when the user actually clicks on the image/link and the address bar is only populated at that same point. From a Search Engines point of view, it will just look at the link on the image, whether or not it has a nice flash popup Does that help steer you in the right direction? I am sorry I don't quite know enough to post the actual few lines of the solution. I could probably work it out eventually, but that would just be by asking everyone here how to do it! haha. PS: It is very definitely NOT an underpop - though I love that term! It is an overlay.
    2 points
  10. Networking via LinkedIn, through a contact I hadn't heard from in years. They contacted me and I originally helped them with some Windows PC support. I then redesigned all of their forms. Then I helped them get out of a couple of bad costly support contracts. I next created a custom IVR solution for them which replaced a support contract that was costing them $800 a month. New projects continue to this day.
    2 points
  11. Hi Helmut, you may create a new template with its own template file. Create a blank textfile and call it myform.php, copy it into the site/templates/ folder of pw. Go into the pw admin and under setup templates and create a new template. There should be a list with template filenames from your site/templates/ folder (without the .php extension). Check the one you have newly created and save it. Now create a new page under homepage and assign your form-template to it. Lets say the url of it is "/contactform/". Go to your Editor and write into your template file some code like that: <?php if($input->post->aFormFieldName) { // a user has send the form, proceed the data and display a thank you message ... echo "<h4>Thank you for contacting us. We will get back to you soon."; return; // stop with template code here } // if we have no post data, lets display a html form $myForm1 = " <form action='{$page->url}' method='post'> // your inputfields and buttons here </form> "; echo $myForm1; Now go to the browser and call: example.com/contactform/ and try it out. If you use a profile with header.inc and footer.inc, add it to the template file like it is within the other template files: <?php include("./head.inc"); if($input->post->aFormFieldName) { // a user has send the form, proceed the data and display a thank you message ... echo "<h4>Thank you for contacting us. We will get back to you soon."; include("./foot.inc"); // load the footer here, because we stop template execution in the next line! return; // stop with template code here } // if we have no post data, lets display a html form $myForm1 = " <form action='{$page->url}' method='post'> // your inputfields and buttons here </form> "; echo $myForm1; include("./foot.inc"); Have fun!
    2 points
  12. Hello horst and thank you for your feedback! Animation is done with CSS transitions by animating opacity and scale. I wrote a simple jQuery plugin to handle animate-in and animate-out classes. Plugin is similar to Sequence.js.
    2 points
  13. Greetings Fokke, Thanks for posting this! Great work. Viewing (at the moment) on iPad Safari, and the whole experience of the site is terriric. The large images work well to give an immersive feel to the whole site. Nice design for the slideshows of the "Collection" items. Just a couple of very small comments: the text on individual "Collection" items has odd line breaks (see screen shot below). The slideshow is just a bit slow. Excellent work. The client should be appreciative of how well you present their works! Thanks, Matthew
    2 points
  14. also worth a look: http://processwire.com/talk/topic/3812-htaccess/?p=37295
    2 points
  15. Hi all, we lauched this big website for a festival last week, and pout a lot of work and love into this. Check out: boomfestival.org Hope you like it! and it has been received very well so far.. ( 60 000 visits in less then 1 week) It uses processwire as CMS , and I must say awesome decision to replace Wordpress we used the last editions, processwire is highly superior to wordpress as CMS . I even managed to import a lot of content from Wordpress with the Processwire bootstrap API and JSON and the help of this forum Content is loaded all with Ajax , and still backbutton does work and everything can be deeplinked . Ryan ProCache module has helped very much with Site speed and our high traffic server load If I find the time I might do a case study here...as this ajax approach moight be interesting for other developers
    1 point
  16. What's the best way to adjust the title tag display? For just about every client I have using PW, the page title they're editing is much more relevant to see in the tab title than their site's domain since it's the only site they'd ever be editing.
    1 point
  17. thanks, I noticed that right away and was trying to figure out how to do that.... thanks, just changed it! Another feature that I thought would be cool would be to minimize repeaters be default. This might already be a feature but I could not find it. Example:
    1 point
  18. An HTTP hosts whitelist is important from a security aspect because http_host comes from the request rather than from the server... Meaning it can be forged. Maybe not a big deal since we always sanitize it, until you are dealing with cache, which the opens up the possibility of cache poisoning for any page that makes use of the http host. Imagine a hacker priming your cache with their own URL. Unfortunately, PHP's safe server_name variable is not reliable enough to reflect the potential diversity of http host names. So the only safe thing to do is to have a whitelist. If you aren't using the whitelist, I recommend adding it to your config.php. It's actually a little unusual for the http host to be used in PW because usually you'd just use the url() methods, which just output paths and not hosts. There's really no reason to use httpUrl() in most cases. So if you are using it, double check that you need to - it's extra unnecessary bytes unless you need to switch hostnames or schema. But with the next version of ProCache supporting multi-hosts, having an http host whitelist is now absolutely necessary.
    1 point
  19. Definitely, but also check out the h5bp .htaccess There are some of the same rules but also some other nice stuff.
    1 point
  20. Hi Charles, the site is looking great. At first I like the colors, don't really know why! (just kidding) The screen of the information portal is suuuuper. While one can only guess what is behind it, it is not much imagination required to come to the conclusion that certainly it makes fun to work with it. Impressive work.
    1 point
  21. Nice site. One comment; the logo doesn't really scale nicely upon resizing the screen and on bigger resolutions some artifacts appear. For example when viewing on 1920x1080 Win7 Firefox 27.0.1, it's not really crisp, and some artifacts beneath some of the letters: Google Chrome and IE do a better job, but still not great.
    1 point
  22. Reading your post, I'm a little impressed what you are all doing out there with processwire. How did you catch that project ?
    1 point
  23. Thank you for the explanation and link to sequence-js. But I think sequence.js would be to much overhead for a little Ken-Burns effect. To write a own small script is a much better way
    1 point
  24. Yes Apeisa's shop module works very well but you need some coding experience to make it output your needs.
    1 point
  25. Hi Fokke, really great site. Very good presentation and modern design. Most I like the moving of the slideshow images on the homepage. Is this realized with a jQuery-Plugin only, or is this mainly a CSS3-animation/transition thing? (I'm not very familiar with this stuff)
    1 point
  26. You added 'FieldtypePage' to the $fieldtypes array correct? What field type does the 'user' template have? Have you tried to connect a single page id?
    1 point
  27. I would vote against making this standard. It isn't neccesary for w3c validation and actually, using title attributes on links is fairly problematic and i don't think good practice at all. http://blog.paciellogroup.com/2013/01/using-the-html-title-attribute-updated/ http://www.rnib.org.uk/professionals/webaccessibility/wacblog/Lists/Posts/Post.aspx?id=38
    1 point
  28. Hmm - I think it would be much better, if no repeater template settings would be involved? If someone has time to check what it would require to support repeaters without access stuff, please send pr.
    1 point
  29. Yes...repeaters, behind the scenes have their own templates You have to enable "show system templates" under : admin/setup/templates filters. Select radio button "Yes" to show system templates (you can disable this later). Then, under admin/setup/templates system, you will see your specific repeater template named "repeater_nameofyourrepeater" - you know what to do from here...
    1 point
  30. I don't think that's what Nico is talking about pwired. I think it's about getting your webserver to send compressed html/css/js over the line via mod deflate or alternatives.
    1 point
  31. Out of the box. No changes.
    1 point
  32. @adrian: if the actual page isn't in $pids, there is no need to load page 1114 into memory $pids = array(1010, 1011, 1022); if(in_array($page->id, $pids)) { $downloads = $pages->get("1114"); echo "$downloads->body"; }
    1 point
  33. Find concerthouses first: $concerthouses = $pages->find("template=concerthouse, title~=$q"); Then find events that are held in any of those: $concerts = $pages->find("template=concert, event.concerthouse=$concerthouses"); Ah, sorry, missed the repeater part... updated above.
    1 point
  34. I see you found your solution, but I will post mine anyway, maybe it will be of some help too <?php $today = strtotime('today midnight'); //or if you want to show only events in future //$today = date(); $schedule = $page->schedule->find("schedule_date>$today"); //then put $schedule in your loop Also you can request one item like this: <?php $schedule_item = $pages->get(1007)->schedule->get("schedule_date>=$today"); //maybe you'll want to sort them if they are not in the right order, then add sort=schedule_date to your selector
    1 point
  35. Have you read the pages on repeaters, especially the section on: "Finding pages by repeater value (using selectors)" You should be able to figure it out from there using a selector that finds items with schedule_date > time() Let us know if that gets you on your way, or if you need more specific help.
    1 point
  36. Second (looks like last) release candidate of stable Czech Language Pack for ProcessWire 2.4 is finished. Czech Language Pack Current version: 1.0rc2 (99 files) + README.txt Changelog: Some minor fixes. Added few missing strings Czech Language Pack for external modules. Current version: 0.6 (28 files) + README.txt Added: ProcessBatcher /site/modules/ProcessBatcher/ProcessBatcher.moduleTextformatterHannaCode /site/modules/TextformatterHannaCode/ProcessHannaCode.module /site/modules/TextformatterHannaCode/TextformatterHannaCode.module Updated: ProcessPageDelete ModulesManager InputfieldCKEditor ShoppingCart FormBuilder Contains: FieldtypeCropImage InputfieldCKEditor ProcessBatcher ShoppingCart TextformatterVideoEmbed FormBuilder ModulesManager ProcessPageDelete TextformatterHannaCode pw_czech_1rc2.zip pw_czech_modules_06.zip
    1 point
  37. I terms of development and usage standpoint ProcessWire is much better suited for the task then Joomla, Wordpress and even Drupal. But you have to be ready to invest your time in learning some concepts of PW. There are a few of them: page, pageArray, selector, template, template file, field, and module. If you feell comfortable with OOP PHP, CSS and HTML, you will definetely succeed. Of course it will requre some custom coding as with any more or less complex project. I'll try to make some assessment here in terms of efforts required if you have the skills mentioned above: listing and search of properties for rent and sale - easy blog layout display and detail display - very easy gallery for each property - very easy google maps display of location - easy with existing module (some work is required if you need more complex integration) google maps search - (not quite sure what you mean here) I guess it depends on what parameters you want to search, should require some coding user registration - user access control is coming out of-the-box, you just need to customise it for your needs and make registration and login forms for your front end. add to favorites function- easy send to friend - easy social share - some coding requred - I think there are open source social sharing projects you could integrate for this (like this one) and so on - it depends, but I think the rest is super-easy front and back end editing - back-end editing is already here. But front-end editing is what you will have to code yourself. So I suppose could require fair amount of work. restricted access to some sensitive informations (like landlords contact details, clients info and so on) - it depends on the logic of your site, I guess you will have to code some parts. adding property informations with some already defined values in dynamic fields (street names for instance) - from easy to medium, but more info would help. Jquery image upload (automatic resize, thumbnail creation, watermark add) - all is here (thanks @Apeisa and @smd) including watermarks (thanks to @Horst) I am sure you get the picture. Unless you have a strict deadline go with Processwire - it will worth the effort in any possible sense. If it's your first project with PW, it may be not the easiest journey, but an exciting one. In the end you will aquire some great skills and have many insights. And I'm sure, after you've arrived you will never look back . Whereas you arguably could start faster with Drupal (that I think the only competitive CMS option here) dropping some plugins together, you then would almost inevitable struggle with your front-end markup and in general making all work the way you (and not Drupal) want. And again you have to be familiar with Drupal's internals to make those hacks. In PW you develope naturally extending existing functionality and it doesn't make any assumptions about your workflow and markup. So it gives you more rewarding experience during the development process. Almost all the skills you get using PW is transferable to other webdev areas. From the UX point of view PW's interface is a dream coming true (and Drupal is a nightmare IMHO). If you haven't seen PW 2.4 yet, just go and have a look - it's beautiful!
    1 point
  38. As the others have said, the point with ProcessWire is that you end up with exactly the interface and exactly the tools that your client needs, because you build them for them. The result fits their brand and their need, you are not trying to force them into a compromise. There are a few of us who have come the Joomla route (and would never go back) and we have all been amazed at how quickly we were able to pick PW up and make something solid with it - even people like me with little programming knowledge. And of course, any tools you develop as you go, you can keep and reuse on another project!
    1 point
  39. Everything you've mentioned is possible with ProcessWire. If there aren't any complete solutions avaible for Wordpress or Joomla then ProcessWire might be your best choice to build it by yourself. But remember that the great flexiblity comes from building your own "logic" and template rather than using 10 different modules from 10 developers. It takes more time but the result is customized for your problem then. Search and list the properties pages. No problem. Example pseudo-code $pages->find('template=house,sale=1"); Another view option for a list of properties. The detail page could be the template of the property. The gallery can be a field with multiple Images or a extra page linked to the property. There is a GoogleMapsMarker Fieldtype. Works fine with some JS libraries for front-end integration. Not sure about this one. Now we come to the weaker spot of ProcessWire. It's no problem to build a simple signup form and make basic user management. But depending on your requirements you will have to put a lot of effort into this topic. Fine if you only need it for a single user/session Just HTML/JS magic. No problem and nothing special to ProcessWire ... The backend might be your problem. Backend Editing is no problem. But building a Front-End live editor thing is a huge project. Whole teams are spending weeks developing such functionality for other plattforms. Here you can look into the Module directory. This is possible with PW Not sure. You would define a source for this pre-populated data. Maybe a combination of a simple module and Page-reference field? Image resizing is no problem, neither is the thumbnail creation one. You can add a watermark with Horsts PIM module. Overall this is a complex project. Especially the front-end editing and the user thing can take some time. A basic system where you can have properties listed with details is easy and should be your first step. If you can invest the time you will get an awesome and flexible site. Split the project into smaller milestones would be my last suggestion.
    1 point
  40. Let's put it this way....if you enjoy microwave dinners, then Joomla or WP is for you. Sometimes the dinner will be easy to cook and may turn out right. On other occassions, the dessert will flop and you will be left frustrated but you will have to do with what you have. If on the other hand, you enjoy having all the ingredients you need and can follow any of several recipes to create some beautiful food with your ingredients, then PW is for you .... What am I saying? If you want to point and click and solve problems by adding more plugins to the system, Joomla and WP are "good". If you want finely grained control over everything, then PW is for you. However, with PW, some work will be required of you. You will have to be willing to learn....The community will be here to guide you along the way if you ask for help where you are stuck... Just my 2p (spoken from the point of view of an unashamedly biased PW addict - but who has been to J and W before...)...Seriously, though, creating a backend admin in PW is not difficult... Welcome to PW and the forums vladar
    1 point
  41. Thanks Horst for the honest feedback. You're right, I didn't handle this situation and our conversation the right way. Yes, we keep the IPTC information. But please keep in mind, that we do some sort of compression that's not completely lossless. That's right and its already on the list for the next update. Like normal image variations in ProcessWire, the first time you load the page takes longer. The person uploading the images needs to open the page once. That's not perfect but was the fastest working method. See below. We only have one live site and some sites in developement. That's a problem, I know. Same thing as 4. Or should I be quoting myself? _ We sat down today and based on your feedback wrote down some features for the next module version. They should increase performance, make it more configurable and the integration will be easier. We also thought about developers like Horst that have thousands of images. Alternative hook after the image upload (based on selected fields). No need to call the mz() method or changing templates. Option to overwrite original files or to keep a variation. A pseudo "async" upload method. Images will be sent to our servers and then the site will render without the minimized images. If you open the site again, your PW will check if the minimized images are ready for download and replace/create the minimized files. No need to wait for our servers but results may take another page load before they appear. We don't want to open a "pipe" (e.g POST /receiveimages/) to write them back to the file system once compressed. Fallback to PW compressed images. On the server side we will then build a complete queue system for better scaling across multplie server instances. It also allows use to use the slower but better options of PNGQuant or JPEGOptim. The goal is to release this in the last february/first march week.
    1 point
  42. To build on top of Ryan's response, redirecting is not just sensible to do on login, but whenever you have forms. The wikipedia page on the Post/Redirect/Get pattern explains it much better than what I can - it's definitely worth the read
    1 point
  43. I would avoid putting it in /cache/HannaCode/. What does your include line look like? If your class file were placed in /site/templates/includes/ (for example) then your include line should look like this: require_once(wire('config')->paths->templates . "includes/YourClass.php");
    1 point
  44. Here's a very basic test page / proof of concept: http://fantastique.ch/pinterest/ Using underscore + backbone + colorbox. i.e. accessing http://fantastique.ch/pinterest/#backbone-js will load the desired url in the colorbox iframe (not just onClick).
    1 point
  45. @slkwrm Thanks for the hint. Actually it turns out that the repeater page's parent is not the page where the repeater field is, but this page can be got by calling the method getForPage. So the correct code is: $containerPage = $page; if ($page instanceof RepeaterPage) { $containerPage = $page->getForPage(); } // can be checked with echo $containerPage->id; I added this container page calculation at the right place (I hope!) in TextformatterHannaCode.module and the repeater field case now seems to work for hanna codes.
    1 point
  46. Do you want to find something in a set of 10.000 pages or do you mean a find result of 10.000 items? Searching in 10.000 pages isn't a problem, PW is really fast. But if there are a lot of possible results it's generally advised to limit the pages->find call to 25, 50 or another sane value. http://processwire.com/api/selectors/#limit . If you want you can combine this with pagination. The reason for this (others can prolly explain better) is that the pages->find call will return a PageArray that gets put in memory and if there are a lot of pages in the array things will inevitably slow down. Of course, depending on the situation, 'slow' in PW terms may still be acceptable. I have grabbed hundreds or even thousands of pages in one go and it still performed pretty well.
    1 point
  47. That is a simple light box functionality or modal window that takes content rather than just an image. There are loads of jquery plugins out there that do it - search for "jquery modal" Here is a very basic one I have just found - haven't tested it! http://leanmodal.finelysliced.com.au/ One note: you need to double check what JQuery you are using - For instance Foundation 5 uses JQuery 2, but not all plugins are working with that.
    1 point
  48. If you don't need the page to be saved when the button is clicked, then I think the route you are taking is fine. If you did need the page to be saved, then you'd want your button to be a submit button, and a second (save) hook to be called after the ProcessPageEdit::processInput and to silently do its thing (no redirect). Another route you could take is to setup a separate page with a template that does what you want, and then have your button link to that instead. But the way you've done it is already more compartmentalized (less parts to consider) so I wouldn't change it unless it creates issues with other modules hooking into ProcessPageEdit at some point down the road (which is possible). One issue you probably want to fix here though is the potential for XSS: $href = $this->config->urls->admin.'page/edit/?id='.$this->input->get->id.'&e=1'; Taking a variable directly from $_GET or $input->get and putting it in output (unsanitized) is always dangerous. You'd want to do this: $id = (int) $this->input->get->id; $href = $this->config->urls->admin."page/edit/?id=$id&e=1"; or better, yet this: $id = (int) $event->object->getPage()->id; $href = $this->config->urls->admin."page/edit/?id=$id&e=1";
    1 point
×
×
  • Create New...