Jump to content

Leaderboard


Popular Content

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

  1. 16 points
    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
  2. 12 points
    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.
  3. 9 points
    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.
  4. 5 points
    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. 4 points
    New Processwire Website. Built with HTML KickStart. http://www.carscallen.com Feedback welcome.
  6. 3 points
    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.
  7. 3 points
    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
  8. 2 points
    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
  9. 2 points
    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.
  10. 2 points
    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.
  11. 2 points
    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!
  12. 2 points
    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.
  13. 2 points
    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
  14. 2 points
    also worth a look: http://processwire.com/talk/topic/3812-htaccess/?p=37295
  15. 1 point
    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
  16. 1 point
    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.
  17. 1 point
    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:
  18. 1 point
    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.
  19. 1 point
  20. 1 point
    Definitely, but also check out the h5bp .htaccess There are some of the same rules but also some other nice stuff.
  21. 1 point
    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.
  22. 1 point
    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.
  23. 1 point
    Reading your post, I'm a little impressed what you are all doing out there with processwire. How did you catch that project ?
  24. 1 point
    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
  25. 1 point
    Yes Apeisa's shop module works very well but you need some coding experience to make it output your needs.
  26. 1 point
    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)
  27. 1 point
    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?
  28. 1 point
    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
  29. 1 point
    Actually i found the answer $num = count($Page->comments); "<p>Page has $num Comments</p>"
  30. 1 point
    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.
  31. 1 point
    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...
  32. 1 point
    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.
  33. 1 point
    Out of the box. No changes.
  34. 1 point
    @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"; }
  35. 1 point
    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.
  36. 1 point
    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
  37. 1 point
    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.
  38. 1 point
    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!
  39. 1 point
    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.
  40. 1 point
    Hi Radek, the Czech language pack isn't working just like the German one. Thanks for pointing to the environment, I will have a look at my setup. EDIT: I found the problem. It's the Windows environment and it's backslash pathes. PW uses the DIRECTORY_SEPARATOR constant in its php code that is a backslash character under Windows. Basically this is correct. But php isn't quite consistent in that matter. The translation function gets pathes with normal slashes although the code uses backslashes because of the DIRECTORY_SEPARATOR constant. The only function that seems to cause that problem is in "wire/modules/LanguageSupport/Languagetranslator.php": protected function textdomainString($textdomain) { if(is_string($textdomain) && strpos($textdomain, DIRECTORY_SEPARATOR) !== false) $textdomain = $this->filenameToTextdomain($textdomain); else if(is_object($textdomain)) $textdomain = $this->objectToTextdomain($textdomain); else $textdomain = strtolower($textdomain); // just in case there is an extension on it, remove it if(strpos($textdomain, '.')) $textdomain = basename($textdomain, '.json'); return $textdomain; } If you replace DIRECTORY_SEPARATOR with a simple '/', it works. (EDIT3: That change isn't enough, look at the posts below.) I don't know if there is a clean solution or if one should write it off as a Windows php quirk. A quick and dirty fix would be to check for a backslash and a normal slash as directory separator. EDIT2: In the subroutine "filenameToTextdomain" I found an existing directory separator fix: if(DIRECTORY_SEPARATOR != '/') $filename = str_replace(DIRECTORY_SEPARATOR, '/', $filename); But for the problem explained above it comes one subroutine to late. I think it's now on Ryan to decide where and how to fix that check for the DIRECTORY_SEPARATOR in the "textdomainString" function.
  41. 1 point
    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
  42. 1 point
    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");
  43. 1 point
    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).
  44. 1 point
    @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.
  45. 1 point
    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.
  46. 1 point
    I think you should probably take a look at the concept behind ProcessWire first, then some of the other docs and the cheatsheet as Macrura suggest - start with the Concept page from here: http://processwire.com/api/ The Cheatsheet then gives you a look at most the possible functionality at your disposal in page templates to access your data and files. As for explaining the line of code you quoted: $skyscrapers = $page->skyscrapers->find("limit=3, sort=random"); From memory, "skyscrapers" is actually a "featured skyscrapers" field, so is just a Page field that links to other pages (probably the most useful fieldtype there is. Here is the exact translation: "For the current page (homepage in this instance), find 3 random pages from the skyscrapers field". The $skyscrapers = bit is just storing the results in a PageArray (it's in the docs linked further up my post here) that can then easily be iterated through to print whatever output you desire. If you're wondering why the demo doesn't seem to pick three random pages, I think page caching must have been accidentally left on here so it's always showing the same 3 in the demo, but that's easy to switch off The syntax is based on jQuery and aims to be human-readable. If you imagine that there are a few database tables and queries behind that code, you can easily see how quick that is to write and all without a line of SQL. You can make all sorts of queries like: $architectsCalledPaul = $pages->find("template=architect, title*=Paul"); // finds all architects (pages with the template "architect" with the name Paul somewhere in the title field // and so on... The idea behind ProcessWire is that once you've learned the basics you can build pretty complicated data structures in the admin quicker than you'd be able to writing database tables from scratch and you have a hugely powerful set of functions at your fingertips to do with that data as you please. Most folks here would agree that it has shaved hours/days/weeks/months off their site build times depending on website scale, but any time saved is good!
  47. 1 point
    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";
  48. 1 point
    Thanks Ryan, I ended up hooking into ProcessPageEdit::buildForm: $this->addHook('ProcessPageEdit::buildForm', $this, 'addButton'); public function addButton(HookEvent $event) { $href = $this->config->urls->admin.'page/edit/?id='.$this->input->get->id.'&e=1'; $field = $this->modules->get('InputfieldButton'); $field->attr('id+name', 'email_customer'); $field->attr('class', $field->class); $field->attr('value', 'Email Booking To Customer'); $field->attr('href',$href); $event->return = $event->return->append($field); } I then just check for $_GET['e'], and undertake the workflow needed, and redirect back to the original edit page. A bit of a circus, but gets the job done. Is there a better way to utilize hooks for custom workflows like this?
  49. 1 point
    what.i use this is good it does.work top {not buttock}, of htaccess u will.put it . enjoy <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 seconds" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/octet-stream "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month" </IfModule> <IfModule mod_headers.c> <FilesMatch "\\.(ico|jpe?g|png|gif|swf|woff)$"> Header set Cache-Control "max-age=31536000, public" </FilesMatch> <FilesMatch "\\.(css)$"> Header set Cache-Control "max-age=2692000, public" </FilesMatch> <FilesMatch "\\.(js)$"> Header set Cache-Control "max-age=2692000, private" </FilesMatch> <FilesMatch "\.(js|css|xml|gz)$"> Header append Vary: Accept-Encoding </FilesMatch> Header unset ETag Header append Cache-Control "public" </IfModule> <IfModule mod_deflate.c> AddOutputFilter DEFLATE js css AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule>
  50. 1 point
    @bcartier: The ImportPagesCSV-module can't do this as is. But I tried making a tiny addition to make it support FieldtypePage (those used to make page references) and it worked amazingly well. The only change needed was to add 'FieldtypePage' to $fieldtypes array (just before init() function if you take a look at the module file), like this: protected $fieldtypes = array( 'FieldtypePageTitle', 'FieldtypeText', 'FieldtypeTextarea', 'FieldtypeInteger', 'FieldtypeFloat', 'FieldtypeEmail', 'FieldtypeURL', 'FieldtypeCheckbox', 'FieldtypeFile', 'FieldtypePage', // add this line ); After that addition it's possible to choose a Page field when connecting the fields from the CSV to the ones in the chosen template. I had pre-populated categories at the target site and used their id's in the CSV file to reference those categories. Multiple categories worked like a charm as well, just use a pipe in between id's (123|456|789). Moreover, if you've got only one category per entry to reference, then you don't even need the id's of the categories - you can use paths as well. Here's a little example: cat.csv: title one two three four entries.csv: title,categories a,/cats/four/ b,/cats/three/ c,/cats/one/ d,/cats/two/ Import cat.csv using a template for categories with (at least) title field, under a page at /cats/. Then import entries.csv using a template for entries, having a title field and a page field. This should leave you with entries that are connected to categories. I hope this gets you somewhere. @ryan: Looks like page references could be supported very easily. I just used this successfully to import ~3500 pages with category references from an old site to a new PW one. But maybe there's still something else to be done before they're fully supported?
×
×
  • Create New...