Jump to content

Macrura

PW-Moderators
  • Posts

    2,776
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Macrura

  1. interesting suggestion, and i know what you mean... if you have a lot of files, then it would be easier if the uploader was on top
  2. @benbyf - many thanks for checking this out.. (also want to compliment you on your sites, haven't commented yet, but they look awesome!) @lpa - not sure what the issue could be, i tested on 10.6.8 with Safari 5.1.10 and it does work.. *however* this site is using cloudflare, so i would have to surmise that cloudflare is messing something up.. because the mp3 player is based off soundmanager2 which is like the most reliable html5 play engine out there... i wonder if anyone else is having any issues? this is the first problem report i have received...
  3. I've figured out a way to have this work in both scenarios, though still a bit hackish.. https://gist.github.com/outflux3/0a013ea20b46e706a6f9 say you have pages being managed by PageTable, and they all live somewhere other than children of the page managing the pageTable items, and you want to be able to have a visible page reference field on the PageTable items; when editing the item from somewhere other than the PageTable, the module first checks to see if it is already in the PageTable array and if not, it adds it (using the page reference).. when you add it from the page managing the items, i have the users leave out the page reference and then when saving the page, it sets all of the items that don't have the page reference, to the page where they are now associated with.. hope i'm making sense...
  4. i tried using the shortcode module, and it is promising, and quite different than hanna codes; shortcodes allow you to have an opening and closing tag so you can enclose things within, which allows you to use them for things like tabs and accordions; hanna code is very usable/flexible, but it doesn't know about things between each instance of itself (no opening/closing)... also the shortcodes module doesn't allow for using more than 1 shortcode on a page.. i think it needs more work; but it would be good if we could have a shortcodes module that works as well as the wordpress shortcodes, since there are still some rare use cases where shortcodes can be useful... custom fields replaces and is superior for the most part to the concept of shortcodes, which is probably why the need has not come up much on PW. And end users always mess up with shortcodes, like putting them in the wrong place in the RTE (like inside a heading), or forgetting to use the closing tag, and consequently break the layout on pages too easily...
  5. What i would do is have a custom management page with a table showing all the tracks and then i would output the page ID in it's own column so they could double click it and copy it into foxycart. but short of that, yes you would need to grab the page id from the URL... funny though - most labels i work with already have catalog #s for their albums; a good sku setup would be the page for the album - page for the track (like 2034-9812) then you could at least see which tracks are part of the same album...
  6. 1.) $var = $page->mytextfield->placeholder 2.) don't know 3.) no, you can't do what you are requesting; if you need that behavior, use repeaters. 4.) you can't, the filenames need to be sanitized, and also they need to be maximally compatible, which is why lowercase and no spaces - also no international characters (though there is still a bug with uploading files that contain characters with accents etc.)
  7. i always use the processwire ID for the code in foxycart; <input type='hidden' name='code' value='{$page->id}' />
  8. update, so here's a super simple module that is doing this now and seems to be working... (where session_table is the PageTable) (moved revamped code to github..see next post)
  9. yeah, i always need to nag the clients during development to keep their page names consistent with the titles.. maybe a module where you could enable a "development mode" which would prompt the user when changing title if they also want to rename (update slug)... some might even want to leave it on and then rely on the page path history to redirect..
  10. @Christophe, i'm not clear on what problem you are having... but there were some errors in your code <div class="gallery"> <?php foreach($page->children('include=hidden') as $child) { // $thumb = $child->images->size(320); // your $thumb var is an array... changing it below so it works $thumb = $child->images->first()->size(320); echo "<a href='$child->external_url' width='320' height='200' target='_blank' rel='nofollow'><img src='$thumb->url' /></a>"; } ?>
  11. I'm a little confused about the admin theme here in 2.4+; I see that the system still pulls fontawesome from the wire/templates-admin directory; i tried to upgrade fontawesome in my site/templates-admin, and uninstall the admin default theme, but it still pulled the font from the wire/templates-admin; so for now i have upgraded FA within wire (and this works, giving access to all the new icons), but i guess it would be better if we could somehow upgrade our version of FA without hacking the core; i'm using a modded fontawesome page label now on every site, but i don't want to load FA 2x, and i need the new icons..
  12. @ozwim - not sure if you already know about this, but i follow Soma's suggestion and have a folder called 'hannas' and then keep all the hanna codes there; and then using this in the hanna code itself: include($config->paths->templates . "hannas/some-hanna-code.php"); @mr-fan - that's great - we should try and setup a place to share hanna codes... maybe github? I have a lot of examples also
  13. thanks adrian, cool, i haven't poked around in the database yet.. i think i would need the ability for users to be able to add those PageTable entries from either the 'class' page, or from the page tree; so i think i'll need to write a module that adds the appropriate 'session' pages to the 'class' when a new session is added not from the place where the page table is... and i'll probably need to run some api code to add all of the sessions to those class pages...
  14. thanks @kongondo...fixed in post
  15. regarding PageTable, is it possible to retroactively use pages that already exist in a PageTable, and if so how would you 'manually' associate them with the page they need to display on; to clarify i have a template called "class" which is an art class; then i have another template called 'session' which is an actual instance of that class (with dates, time, instructor etc); It would be cool if i could show the class instances (sessions) on the Class page editor, using the PageTable; i have a page select on the session to select the class.. just not sure how to deal with this since i'm guessing the page connection between an item in a PageTable is hidden?
  16. @nico - good solution, only issue is what if the editor enters some stuff in the wysiwyg, and then later decides to switch to raw; the pipe wouldn't work right, so maybe instead use the checkbox to determine which to show on output? echo $page->use_wysiwyg==0 ? $page->body_raw : $page->body;
  17. if you say need to show a script on multiple templates , then you can use $page->is, like this; <?php if ($page->is('template=work-index|gallery|videos')) { ?> scripts here <?php } ?> and when you start setting up to use AIOM+, you can then us selectors to load particular scripts with a processwire selector: <?php $jsfiles = array('assets/js/plugins.js', array('loadOn' => 'template=work-index', 'files' => array( 'assets/3rd/dataTables/jquery.dataTables.min.js', 'assets/3rd/magnific/jquery.magnific-popup.min.js' ) ), 'assets/js/main.js', 'assets/js/vendor/retina.js', ); ?> <script type="text/javascript" src="<?php echo AIOM::JS($jsfiles); ?>"></script>
  18. @Horst - that would be great, sounds like a perfect module name! I also see from looking at the link that adrian has here that there could be an issue with the @ character in a filename...
  19. @Horst - according to Apple, the naming convention must be @2x, and that has to be the last part of the image name, unless you are adding device-specific images (-ipad, -iphone); I also actually just discovered thanks you you and @MadeMyDay, that the retina.js library also supports an override using data-at2x attributes. <img src="/images/my_image.png" data-at2x="http://example.com/my_image@2x.png" /> so that would be an easy way to do this in PW.... but still, having a module generate these instead of specifying manually would be cool!
  20. @MadeMyDay, this is amazing, and thanks so much for the examples; The site currently uses the retina.js which as far as i know looks for an image of the same name, but with the @2x appended to the basename; so that's what i was referring to (sorry it wasn't that clear)... i think about a module for retina that would allow users to for example tag an image as 'retina' and then the module would rename the image, adding the @2x to the basename, though i can't get my head around how this would interact with image sizer; anyone else using retina.js? in june/july i will be doing a painter's website, so thanks to your info i will be incorporating the picturefill for retina... looking forward..
  21. hanna codes have proven invaluable for letting end user clients be able to insert things that require complex markup, such as accordions, tabs, galleries; i've used it for links to internal pages, audio players, phone and contact info, counts of pages (for example "We now offer [[count template=class]] classes!"), lists of attached documents, lists of external links, child pages etc..
  22. @MadeMyDay - many thanks for taking a look at this! yes, the little animated gif is a pain, it's part of the fresco skin, but alas this is a very low budget project and i've already done 2x the work i was paid! Thanks for the link to picturefill. this does bring up the issue though of how to handle retina images withing processwire; for the hardcoded images in the templates folder i can easily add an @2x version; but within processwire images management, i wonder how to be able to have an @2x version present, say generated from a single uploaded version; most of the images on this site are probably double the size they are being output...
  23. @christophe - cheers, that's how i was going to search, but you make it easy for me... problem fixed! @PhotoWebMax - thank you for looking at this! the contact form is using the awesome formbuilder; as for the hanna codes, they are shortcodes; so for this site, in order to give the management people the ability to have control over the layout, hanna code outputs the markup for things like widgets, and then you can specify parameters to the hanna code; so for example to output a link of all PDF files with the tag 'article', the hanna code tag is [[downloads tag=article]] and then this can be put inline in the body text; i also have a special textarea field for the sidebar where you can place as many widgets as necessary, like slider galleries, pop-up galleries, audio players, etc..
  24. wow, super cool design...looking forward!
  25. Coda 2 most of the time, also using Sublime Text to clean things up (coda is very convenient, but lacks those line up lines, and double cursor)
×
×
  • Create New...