Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/09/2015 in all areas

  1. I'm using it with insertBefore the image field and it works fine, regardless of PageStatus. I also have added two lines to the AdminCustomFiles/AdminThemeXXXXX.css files to move it to the right: #wrap_hook_sort_images { float: right; } #wrap_hook_sort_images:after { clear: both; } Such a nice and helpful snippet from @LostKobrakai, I really love it.
    3 points
  2. Came across this little survey on https://www.designernews.co/stories/58701-survey-dn-cms-for-clients recently. I have no idea how many readers DN has, but I thought it can't hurt to post something about PW there. Feel free to add to the discussion...
    3 points
  3. Something else to note as per this Github discussion: https://github.com/ryancramerdesign/ProcessWire/issues/1466#issuecomment-150174471 Whilst setting the value of the "title" field to something custom for this purpose shouldn't mean the actual page title gets overwritten, you never know what custom modules are running in the background that might cause your custom title to get saved, however unlikely. If you want to play it really safe, assign the custom value to _title instead of title (so just a fake field name) and then set the option in the field setting to {_title} instead of {title} It's not paranoia if it saves you from a lot of headache further down the line
    2 points
  4. But Opauth is abandoned and now PHP-people are using HybridAuth. There is already a module, Social Login, which makes use of it.
    2 points
  5. Hi I've been working on a site that needed a calendar. Specifically it needed a calendar with support for some rather iffy recurrence patterns. This is all still pretty rough but I have written two modules. Calendar : Implementes basic event recurrence expansion using four fields: calendar_start calendar_end calendar_rrule calendar_exdate these fields are created on install (but not removed!) and are added to the template: calendar-event which is created on install (but again not removed on uninstall!). the calendar-event template is intended to be expanded to represent the needed calendar event structure. The ProcessCalendarAdmin provides a calendar admin gui. the modules and a slightly more detailed readme can be found on github https://github.com/lindquist/processwire-calendar I'm not sure how much more time I can/will spend on this, so here it is in case anyone finds it useful
    1 point
  6. I was using this since a long time. I also noticed that ListerPro doesn't use that concated title for the first result. Strange.
    1 point
  7. Shouldn't both work (i.e. with and without www) if you set up you A Records accordingly? That's what I do with mine at namecheap, according to their KB, i.e. Type Host Value A record @ 11.22.33.44 (your IP) A record www 11.22.33.44 (same IP) No messing about with .htaccess and whatever the user types will get them there. Unless of course the client always wants his/her visitors to see 'www'
    1 point
  8. Welcome to the forum! There is a WP to PW migration tool. Have a look here https://github.com/NicoKnoll/MigratorWordpress and here https://github.com/adrianbj/ProcessMigrator
    1 point
  9. I can access it without www. With 'www', Google reports: I suppose you need to talk to GoDaddy? MInd you, my knowledge about servers is very minimal Edit I am assuming you used to be able to reach it via www.? If you've never, then you'll need to set it up in your DNS A Record. But you probably know this already...
    1 point
  10. Adding the new page to the inputfield is not trivial as the actual code does completely depend on the used inputfield. With a few 3rd party inputfields this will be quite some work if all of them should be covered.
    1 point
  11. If you can't hide the titles in a hidden input that could be sent via post, then you would need to find the pages on the fly, e.g. $error = "Your error message"; $sectors = $sanitizer->pageName($input->get->project_sectors); if(strlen($sectors)) { $sector = $pages->get("name=$sectors");//could make your selector more specific, e.g. specify template if($sector && $sector->id > 0) { $sector = $sector->title; //do something with $sector } else {//display error or similar } } else { //display error or similar since given input was empty }
    1 point
  12. @MuchDev, yeah, thanks. I've tried it for the last couple of hours and it would intermittently hang. I am now using SFTP where I am the owner of the files in public_html. I can edit remote files using my local ST3. So, it's all sorted, thanks.
    1 point
  13. I (client) might want to display news posts from remote site on his site. I could connect to remote mysql and use db queries (hmm...no). I could parse rss feed (then you have it all and not just what client needs). I know PW 3 runs in its own namespace, but believed something similar might be possible with current PW. Pages Web Service will do the job, will use it if client expresses a wish. Thanks to really smart friendly people here ;-)
    1 point
  14. Adminer is a nifty small tool, still use it every now and then. It is so small in size that you can simply drag and drop it on your server when you need it and delete it after your database session.
    1 point
  15. I experienced some wierd issues with saveReady before and after and am still waiting for the mystery to be solved Mentioned it somewhere but can't remember where. Also happened to have corrupt status in db. I think I reported those but couldnt tell why it happened, neither Ryan. On mobile so too lazy to look it up.
    1 point
  16. The extend is basically just an replacement for an interface, which conveniently can hold some helper methods I'm using. It's also extending Wire so all the ProcessWire api variables are injected and accessable by e.g. $this->pages or $this->templates. There's nothing framework behind this. The execution does in my case happen in an Process module, that does just list all the available migration classes and shows and update/downgrade link to run them. But you can call those classes anywhere, just make sure to bootstrap processwire, so the api is available, before executing any of the migration methods. abstract class Migration extends Wire{ public static $commit; public static $description; abstract public function update(); abstract public function downgrade(); […] // Few non abstract helper methods }
    1 point
  17. While ryan's code does certainly work you should be aware that this code wouldn't find events, that are longer than the mentioned "5 days from now" but still currently active. Such events could start before today and end after more than 5 days. To catch those as well you'd need another OR option like you can see in this topic: https://processwire.com/talk/topic/10682-help-with-date-range-selector/
    1 point
  18. Thanks Ryan. I used your snippet to redirect all incoming traffic from potentially misleading domains, which works. Might be possible that this is an error, however, I contacted the domain-owner who is not responding, which is strange. I was thinking that the whole domain might have been kidnapped and the owner does not know about it. In any case, it is the responsibility of the domain registrar to investigate this further. Thanks to everyone for the comments. Again, ProcessWire stands out when it comes to community support.
    1 point
  19. You can use "|" to OR fields, or OR values, but not expressions. Your selector is translating to something you didn't intend. I think the selector you might be attempting is instead this: template=event, enddate>=2015-11-06, enddate|startdate<=2015-11-13 Or you could use OR-groups: template=event, enddate>=2015-11-06, (enddate<=2015-11-13), (startdate<=2015-11-13) Either of the above selectors says: The template must be event. AND The enddate must be greater than or equal to 2015-11-05. ​AND (The enddate must be less than or equal to 2015-11-13 OR the start date must less than or equal to 2015-11-13).
    1 point
  20. Just change the last line to use another field: $form->insertBefore($button, $form->get("id"));
    1 point
  21. DrLunesTypeManager is a Template Helper. DrLunesTypeManager asks you for a typekit ID, Google Fonts Family, CDN, Custom CSS and more, and outputs the code needed to use this fonts in your templates. It also forces some tags to use this fonts and your custom CSS styles to be applied to the page. DrLunesTypeManager in github: https://github.com/biojazzard/DrLunesTypeManager Inspiration Inspired by [Dr. Rober´s](rober@1un.es) needs. ProcessWire is about efficient code, but sometimes humans need helpers. Install Via PW: + Download zip + Use modules administrator in PW to upload it to the server. + Open it and configure it with your settings. Install Via GIT: I´m not a git pro, but it´s nice to have modules as a subtree so it´s not a pain to mantain, and you can easily reuse it in other projects keeping it´s development in github as well. + Fork [DrLunesTypeManager](git@github.com:biojazzard/DrLunesTypeManager.git) + Ad it as a subtree in git with relative path site/modules/ + Edit it as you like. + Install DrLunesTypeManager with modules administrator in PW. + Open it and configure it with your settings. Module [sample] Settings Using DrLunesTypeManager in templates. Last thing is to output code, this can be done in your: $config->appendTemplateFile + DrLunesTypeManager uses jQuery. So output code AFTER **jQuery** is loaded, usually in your ``head``, but preferably before ``body`` tag. <?php // Get Module $typekit = $modules->get('DrLunesTypeManager'); // Render Script & Settings. echo $typekit->render(); // It´s done. ?> html outout MODULE-VALUE-* represents your value settings in Module´s Settings <script> WebFontConfig = { typekit: { id: "MODULE-VALUE-TYPEKIT-ID" }, google: { families: ["MODULE-VALUE-GOOGLE-FONT"] } }; (function() { var wf = document.createElement("script"); wf.src = ("https:" == document.location.protocol ? "https" : "http") + ":MODULE-VALUE-TYPEKIT-CDN"; wf.async = "true"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(wf, s); })(); // TypeKit Classes added to main text tags (function($) { $("p").addClass("MODULE-VALUE-BODY-CLASS") $("ul").addClass("MODULE-VALUE-BODY-CLASS") $("h1, h2, h3").addClass("MODULE-VALUE-H13-CLASS") $("h4, h5, h6").addClass("MODULE-VALUE-H46-CLASS") })(jQuery); </script> If you are using the **Custom CSS** field, you may add ``!important`` in order to get this styles loaded as expected: h1.tk-cubano { letter-spacing: -1px; color: hsla(360, 94%, 32%, 0.76) !important; // FORCE RED text-shadow: 1px 1px 3px hsla(360, 94%, 32%, 0.3); //SHADOW } With love. 1un.es
    1 point
  22. You could still create a simple module to implement the functionality without using ready.php. Just replace the hook and the function in the save snippet you linked. Further information about hooks are also to be found here: http://processwire.com/api/hooks/
    1 point
  23. This is what would need to be in the afterSaveReady function. But keep in mind that this will deny any attempt to sort images in the backend manually. // Get the soon to be saved page object from the given event $page = $event->arguments[0]; // Sample condition and changes if($page->fields->has("images")){ $page->images = $page->images->sort("basename"); // Page will be saved right after this hook, so no need to call save(). // Every other page you load and edit here needs to be saved manually. $this->message("Images have been sorted"); }
    1 point
  24. It's possible to localize with language support. Just translate the file InputfieldDatetime.module (if I remember right) and there is option for translation (also affects the first day of the week).
    1 point
×
×
  • Create New...