Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. I just tested commited an update to the teflon theme, so the submenus get title from module info. If module is translateable it will work show the language title if it's translated already, otherwise you have to create a translation. If the module is not translateable you can't.
  2. That makes sense for the submenus. So the only thing would be if I want to rename it to something different using the page title I can't. I just took your approach from the default admin theme for the main topmenu item that got defined in the default.php comment.
  3. Would that also translate the navigation title? That would make 3 ways to make the same translateable. - through module - through admin theme default.php - through direct admin page title (if page title is changed to multi-language text field) It is also to consider that we discussed and decided that not every word and module will be translated which doesn't belong to normal editors. Lot's of modules core/third-party aren't translateable (yet) and adding modules (that will maybe also create admin pages) will have to be translated if you want to by the developer himself, unless the module developer serves his modules with translation files for every language, which will not happen anyway except the community cares to help to do so.
  4. I think for those menu subentries it would be easier to include them in the theme default.php, same like the top menu entries. So they can be translated from the same translation file for default.php. /* * Dynamic phrases that we want to be automatically translated * * These are in a comment so that they register with the parser, in place of the dynamic __() function calls with page titles. * * __("Pages"); * __("Setup"); * __("Modules"); * __("Access"); * __("Admin"); * Standard Submenus * __("Fields"); * __("Templates"); * __("Languages"); * __("Users"); * __("Roles"); * __("Permissions"); * */
  5. I love selfsupport.
  6. If you ask me... Textmate: Right click ->Convert ->Tabs to Spaces
  7. Just saw this note of yours. When I have code I copy from editor I first switch tabs to spaces. In Sublime2 I can do this with one click in status bar.
  8. The key is: "title client.title" HF
  9. Hey Buddy I would be insterested what the "usual" way is? Decodesiffering your post... I think you can simply first query the color pages. It will give you a PageArray with the color pages, with that you can then use directly to find the pages with these colors selected through a page field. // get all pages with at least 1 of these colors, this will return a page array, if you echo it you'll get a list of IDs // here "color" is the text field with the color string $pagesForColor = $pages->find('color=0x00f|0x0f0|0xf00'); // we find all pages that have at least one of the colors selected // here "color_select" would be the page field $result = $pages->find("parent=/boxes/, color_select=$pagesForColor"); It's that what you're looking for? PS: Don't use $page or $pages variables for the results of queries. YOu may overwrite the template system variable with that name.
  10. I would also go for a structured page tree and see the page tree as the main repeater. Edit: need some sleep.. so also what I wanted to add you could keep the structure ...->book(page)->runtime(repaeter-range). So if the level of information becomes 1 dimensional use a repeater there i.e. runtime has a repater for range. Book1 ->Runtime1 ->Runtime2 - range1 - range2 Book2 ... Also depends a lot on how you want to be able deal with these data. Maybe some thought about what you want to be able to do with it later i.e. if storing data in json format or comma separated strings, you'll have hard time to filter content based on that. Using a page structure will, at the best, let you use simple PW selector queries to filter or search the data.
  11. 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');
  12. 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 .. }); });
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. Glad it's working out Gazley! See even without writing anything. Must have been very complicated if you already got it wotking?
  18. 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.
  19. I'm not angry just lazy
  20. 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?
  21. https://www.google.ch/search?q=site%3Aprocesswire.com+paginate+images
  22. 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.
  23. 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
  24. 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");
×
×
  • Create New...