Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Pete have you tried adding a nl2br($value) where it's sending email @ https://github.com/r...sor.module#L166 Or with jQuery you could try set the textarea's wrap to hard. So it will convert the nl when posted and preserve them. $('textarea').attr('wrap','hard');
  2. One other comes to mind. If you have multiple albums on same page, you could create a js config object with the different albums images. var albums = { album1 : [ {href: 'image1', title: 'Title1'}, {href: 'image2', title: 'Title2'}, ], album2 : [ {href: 'image1', title: 'Title1'}, {href: 'image2', title: 'Title2'}, ] }; Then create the album fancybox links: <a href="#" rel="album1" class='album-link'>Album1</a> <a href="#" rel="album2" class='album-link'>Album2</a> And the fancybox init script like this: $('.album-link').bind('click', function(e){ e.preventDefault(); var name = $(this).attr('rel'); $.fancybox( albums.name, { .. options .. }); });
  3. I think it's only the user pages. To reproduce you can also open "user" template and go to info, seeing how many pages use that template and press the link on the number to perform a search... it will show no search results.
  4. ANSI isn't an encoding but rather extending the ASCII plain text to 8bit. Not sure though as ANSI was used for different things. So far I recognized no problems with the PW files as all, when opening they are in utf-8 in every editor I have. All website I've done use cyrillic chars and never got any issues with PW and never had to convert anything.
  5. I love this kind of questions. I think one simple solution would be to have the list of images loaded via ajax (bootstrap PW and return the image array) or render a js object on the album page you will simple use when opening fancybox. Simplest solution for now (other solutions up to others slower posters): Add a link somehwere to the album <a href="#" class="showgallery">Show Gallery</a> The jquery will be like this. $('a.showgallery').fancybox([ {href : 'img1.jpg', title : 'Title'}, {href : 'img2.jpg', title : 'Title'} ], { ..fboptions.. } ); Print that script using php and add the images string on runtime. <?php $imgstr = ''; foreach($images as img) $imgstr .= "{href : '".$img->url."', title : '".$img->description."'},"; ?> $('a.showgallery').fancybox([<?php echo substr($imgstr, 0, -1); ?>], { ..fbconfig.. }); Done. Not tested but you get the idea.
  6. Thanks for sharing your thoughts. I also agree with most being said. It's nice the way it works and all, but maintaining language packs and template or custom module translation is very hard as it is now. Some more features that would help for system translations would be greatly welcome. Looking at it now it is very hard and time consuming finding out what's added or what changed. There's some note now how many are left out or abandoned. But that's not enough I guess. Having 73+ translation files adds to it. Also what annoys me is that to that whole lot of translations comes the custom modules and template translation which are separate and adds even more. So separate them in some way would maybe help already. Some system comes to mind that maybe there could be some system translation index that will get updated by Ryan on every new realease that could serve as a base finding differences and additions, so it would be easier to keep language packs up to date easily. Looking at the current german pack there's already some new, abandoned (changed paths) and so and it's very hard to find out what has changes by hand.
  7. Glad it's working out Gazley! See even without writing anything. Must have been very complicated if you already got it wotking?
  8. It's not possible in a convenient way, because the page field is special and not working the same as a text field. It has it's own method of adding the inputfield. So a check would be needed to look for if the inputfield is of type InputfieldPage and then do different code to set attribute for it's inputfield. But since the methods in the InputfieldPage are protected it isn't possible to do the following example: foreach ($inputfields as $inputfield) { if($inputfield instanceof InputfieldPage){ $inputfield->getInputfield()->setAttribute('class','span3'); // will fail cause method is protected } else { $inputfield->setAttribute('class', 'span4'); } $form->add($inputfield); } InputfieldPage.module #101 protected function getInputfield() { If Ryan could make it change to something it could be accessed the above code would work. I don't see any other way right now. So, for now you could do a regex replace script to parse the returned html string from ->render() before outputting. Not simple if you don't know. But, here's the most simple way using jQuery. $('select[id^=Inputfield]').addClass('span4'); Voila.
  9. Still really hard to understand what your need is. Studying your posts and code I think you are having a page with fields you output as as form on frontend, and one is a page field that will generate a select menu? Now you want to add class="span4" to all inputfields and also to the select menu or only to the option tags? Are you using the Formtemplate processor module or your own code? How do your full code look or how are you rendering the inputfields and what is the result you desire?
  10. https://www.google.ch/search?q=site%3Aprocesswire.com+paginate+images
  11. I wonder seeing so many image modules popping out, the image fileld gets clutered. Would make some way to make this streamlined? Like a place or method to be able to add actions. I don't know if there is any way or would make sense even.
  12. I did a quick test and local it doesn't work as Ryan already pointed out, but online on my hosting it works. Very nice work indeed! Nice touch, with the hover showing the buttons, but I for me it's bad UI design as it doesn't indicate there's something unless you hover over the image field. If like this, a small icon when not hovering would be nice (unless I missed something). And maybe a option to turn it off. The basic editor works well, but so many options it would be nice to be able to only give certain commands. The full editor loads but the image doesn't. Is it supposed to register there first? Also some option to turn on/off basic and/or advanced editor button. Trying out the basic editor, it worked like a charm replacing the original image. Does it create a new one or overwrite the existing in the assets folder? So if using the thumbnail module, does it still work? I wonder if it creates a new thumbnail when original changed. Seeing this module I think it would be nice to try to do same with Aviary image tools. http://www.aviary.com/web
  13. You could also do $posting = wire('pages')->find("template=templ1|templ2, album=$album"); To further limit the pages that will be searched. Or if suiteable add has_parent selector $posting = wire('pages')->find("has_parent=id1|id2, template=templ1|templ2, album=$album");
  14. Doing exactly these things is where PW shines, it's designed for this and very very fast. Page relations like this are indexed and the queries are ultra fast. Also it doesn't load all pages with their data in memory, it only does load data on demand.
  15. AND won't work because you don't have pages with multiple templates that would fit the selector. "|" works just fine here and is the way supposed to do it. Don't worry about speed here, even with 100'000 pages you won't notice any speed difference really. That's dependent on how you write the code, either way you would counter that problem not having associated with a post. I'm using this in many places and it works well. Even tested it on my local in latest PW.
  16. "template=tmpl1|tmpl2|tpml3" as the custom selector works just fine. Not sure what is the issue on your side. May the pages are hidden or something. Try adding ",include=hidden".
  17. If you select an album from pages and article you don't have to specify multiple templates, also if you at the end it's the article you edit, so to change the album you could do it right there and not have to go to the album page to change it.
  18. You can set the input of Page fieldtype to PageListSelectMultiple to have a page tree to select from. I think doing it the opposite way is much better, have the page select on articles to add albums.
  19. Yes, this is for the page current in memory I think. It's not yet saved to db hence the saveReady(). Checking for ID makes sure it's a page that has an id. See previous. I think you need to query DB to really check if the page was unpublished before as the current in memory Page is already status "published". I think this goes into init() and would be public function init() { $this->addHookAfter('Page::saveReady', $this, 'sendMailOnPublish'); } The last param is the function name in your module that will get called. public function sendMailOnPublish(HookEvent $event) { // Ryans ... code } Maybe also wanna read http://wiki.processw...essWire_Modules
  20. Great! Thanks for your work on this, will try soon. Edit: You should call the folder or module on github also ProcessPixlrEditor ... same as the module class name.
  21. Too long? There is also a rootParent()! And if closestP() then leave out the P anyway. Or closestParent() and like outputFormatting() has a of(), why not make a cp() too? I use closest a lot in jquery once I understood what it does and it wasn't suggesting to me it would be for parents bubbling up the dom tree. So a little like Ryan said. I don't think it will hurt
×
×
  • Create New...