Jump to content

Macrura

PW-Moderators
  • Posts

    2,780
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Macrura

  1. right - should have thought of that, getUnformatted.. for now i just went with the template approach; I was trying out ways to do more in the admin and less in the template code, as a means to eventually give the clients more flexibility;
  2. i spend most of my time in coda, i guess it's not really an IDE.. it has been good, the ftp functions are good, and the dashboard with all the site thumbnails is nice
  3. @wjkaluza - you might try using a 'live editor' like Coda or Sublime Text, or even a different editor in conjunction with an ftp client that supports live editing (such as Forklift); then make sure your settings show 'invisible' files, since on some OS, files with a . are invisible by default. You'll very likely need quick access to edit your files quite often this way, including the htaccess, where you might need to add gzip compression code, (and occasionally AddType), though i use mediaelement and did not have to add those things to htaccess. good thing about those sorts of editors is you can also quicky change permissions on files, like the config
  4. right, i just reverted to doing it in the template... wonder if this could be fixed in hanna though..
  5. I'm having trouble with this hanna code: <?php foreach($page->children as $child) { echo '<h2>' . $child->title . '</h2>'; echo $child->body; } ?> it's not working (it does work in the template) but in the hanna code, it only outputs the body of the last child.
  6. i get it.. that's a cool idea; but maybe a simple hanna code in combo with this: http://welcome.totheinter.net/columnizer-jquery-plugin/ could be really the way to go for columns... you could setup the js for some different columns and then use hanna for placing the div with the correct class before and after the text... then you could do this: [[2col]] a lot of text which will be rendered in multiple columns [[_2col]] it's responsive
  7. sometimes though you need to be able to just put in a section of a body with 2 columns, so repeaters are less flexible; and also a lot of sites i do have flexible column layouts like 1/3 - 2/3 or 1/5 - 4/5 shortcodes work ok for columns, but can be tricky with hanna codes if you need a column wrapper [[columns]] [[column50]] text [[_column]] [[column50]] text [[_column]] [[_columns]]
  8. in file or image properties, isn't there now a $file->httpUrl or $image->httpUrl
  9. @ryanscherler i've been doing that sort of thing by just using 2 hanna codes, one for the opening markup and one for the closing markup; like this: [[col2]] This is a block of content... [[_col2]] eventually if the shortcodes module supports more than 1 shortcode per page, then this would be pretty easy to do with shortcode; the biggest thing i'm lacking now in terms of hanna/shortcode is with respect to tabs and accordions, and being able to sometimes put a set of tabs inside a body content; like this: [[tab title=Tab 1]] Tab content 1 [[tab title=Tab 2]] tab content 2 [[/tabs]]
  10. no need to have donors get anything special... just a way to crowd-fund some module development... Donor listing would be good, and the donors and their websites could be listed on the module page, and in the module credits, based on donation amount..
  11. right, why not do a kickstarter or indiegogo campaign for some modules.....
  12. i think i might have tried snippets, but ended up with CodeBox which i'm finding really great... have tons of PW code samples and reference in it.
  13. and if you need something in between a big platform like Shopify and the smaller scripts, you could consider foxycart, which works really well with PW. It's javascript based, and the forum and docs have a lot of resources for getting things setup a certain way; Only thing you'll have to look into is about the payment processor integration; it might require one of the more pricey PayPal accounts;
  14. Hi Bram, welcome to the processwire forum.. you might need to check that the server is running Apache
  15. Hi Diogo - thanks for the recommendation - i have looked at google calendar in the past and just now went and setup some test calendars and events, so i'll see how it goes; Already I can see that it's lacking many of the amazing features of Thyme, for example extensive location management, separate email templates for reminders based on location, RTE for events, etc.. Edit: Doesn't look like google calendar will work... you can't set a reminder for someone who doesn't have google calendar, the reminders just don't cut it for what we need...
  16. Hi all - I'm running into a snag with a new project - we need a good calendar script that can handle repeating events, and can send an automated (cron) email reminder to the user at some specified interval. I want to do the main site in Processwire, and then incorporate the calendar. Just wondering if anyone has any advice or leads on really good calendars. A few years back, i discovered an amazing calendar, called Thyme. This script was so advanced, it could handle virtually anything (multiple users, groups, subscriptions, reminders, attachments, etc..). I still use Thyme on 2 sites, and it's really a solid script, and has been a workhorse for me for a really long time. At some point several years ago, the developer of Thyme vanished, leaving a lot of users 'up the creek', because the script was basically frozen at that point and parts of it were encoded. I have since heard that the company allowed for the script to be de-crypted, and for a while there was a site that hosted it; now you can find it on github: https://github.com/acorscadden/Thyme-Revival I'm running a version of Thyme on a site where i rewrote parts of the code to make it php 5.3 compatible. In any case, I thought for sure by now someone would have come up with a calendar that could beat Thyme, maybe use ajax, and more modern technologies (Thyme is getting sort of old school in terms of JS and markup); I finally came across this one that seems to be a light at the end of the tunnel: http://smartphpcalendar.com/ However, I did a pre-sales inquiry and it turns out that the download version (non-hosted) has a max-user limit (default 20, but they were willing to increase it for me), which i find to be a concern; the script itself is sort of expensive, about $200, which is fine, if there were no user restriction... One thing that is notable about Smart PHP Calendar is that it has it's own api and can integrate with other web apps; so it seems like a really good choice for something to integrate into PW;
  17. here's how i setup the custom datatable page: 1.) make a folder in site/templates called admin-custom; inside that i have a css and js folder; in those folders i put all the scripts and stylesheets for datatable (dataTable.css, jquerydataTables.min.js, jquery.uniform.min.js); 2.) make a template in the templates folder, i called it admin-product-table.php; with this code: <table class="table table-bordered" id="dyntable"> <colgroup> <col class="con0" style="align: center; width: 4%" /> <col class="con1" /> <col class="con0" /> <col class="con1" /> <col class="con0" /> <col class="con1" /> <col class="con0" /> <col class="con1" /> </colgroup> <thead> <tr> <th class="head0 nosort"><input type="checkbox" class="checkall" /></th> <th class="head1">Parent Product</th> <th class="head0">Series</th> <th class="head1">Part #</th> <th class="head0">Room Cu. Ft.</th> <th class="head1">Price Ea.</th> <th class="head0">Missing</th> </tr> </thead> <?php $products = $pages->find('template=product-child,sort=title|series'); foreach ($products as $product) { ?> <tr class="gradeX"> <td class="aligncenter"><span class="center"><input type="checkbox" /></span></td> <td> <a href="<?php echo $config->urls->admin; ?>page/edit/?id=<?php echo $product->parent->id ?>" target="_blank"> <?php echo $product->parent->title ?> </a> </td> <td><?php if($product->product_series) {echo $product->product_series;} else {echo 'n/a';} ?></td> <td> <a href="<?php echo $config->urls->admin; ?>page/edit/?id=<?php echo $product->id ?>" target="_blank"> <?php echo $product->title ?> </a> </td> <td> <?php if($product->roomsize_min && $product->roomsize_max) {echo $product->roomsize_min . '-' . $product->roomsize_max;} else echo 'n/a'; ?> </td> <td class="price">$<?php echo $product->product_price; ?></td> <td> <?php if(!$product->speaker_sensitivity) { echo '<span style="color:lime">Sensitivity</span>'; } ?> </td> </tr> <?php } ?> </tbody> </table> <script> $(document).ready(function(){ // dynamic table if(jQuery('#dyntable').length > 0) { jQuery('#dyntable').dataTable({ "sPaginationType": "full_numbers", "aaSortingFixed": [[0,'asc']], "fnDrawCallback": function(oSettings) { jQuery.uniform.update(); } }); } }); </script> 3.) under the Admin page, create a child page called Products, uses template "admin-products" (which will need the ACP_scripts_and_styles field), and uses alternate template filename of admin. Paste the links to the scripts and stylesheets into the ACP_scripts_and_styles field: site/templates/admin-custom/css/dataTables.css site/templates/admin-custom/js/jquery.dataTables.min.js site/templates/admin-custom/js/jquery.uniform.min.js some of how you set this up will depend on which version of PW you are on – see the ACP documentation about that; in my case i have a child page of Products called Products Table which uses the admin-product-table template; hope that's not too confusing; it's pretty simple, but tricky to explain; most of it you can figure out from the ACP documentation..
  18. you could create all the different templates you need for each sub-set page, and then tell them to use the basic-page template; that's how i do it; you should also use the rules for parents/children, that helps a lot with keeping things organized in the admin
  19. I've been using this script off CodeCanyon (http://codecanyon.net/item/smartbackup-an-intuitive-backup-manager/3102970) then i create a custom admin page with an iframe to the interface (which is installed in a subfolder).... the script itself can backup to ftp, sftp and dropbox; i have it backing up the site folder and the database; it zips those and sends to remote ftp. it runs on a cron so can backup at any interval, and can keep x # of backups, also notifies you by email...
  20. Hi Hani - thanks for this module, comes in handy once in a while.. One problem: seems that if you don't use a pair, the $label is null and then you have no labels in the dropdown. i changed line 55 to this: $label = $value; and it works, not sure why or how setting the label to null works, i guess the select field is supposed to handle that, but it isn't doing it also i noticed that the database was showing \r\n and not just \n so i changed line 50 to this; $options = explode("\r\n",$field->select_options);
  21. maybe this? <?php echo $page->adresse_detail . "<br />\r\n"; ?> or this? <?php echo $page->adresse_detail . '<br />' . PHP_EOL; ?>
  22. @roderigo, maybe this might help you?: http://www.edcinteractive.com/
  23. it is an interesting topic, and it seems that the way C5 is doing it is to use that 'download_file' function to go and get the file that is being referenced; a 'node' is like a page in PW - so you can mimic this functionality using pages, url segments, get vars or whatever; i have one site where we have zip files located outside of the web root (not web accessible) and then a url segment that triggers the fetching of the file from the server and forces the download. as far as the other element of this discussion, the concept of replacing the file, that's really just an operation, which takes 2 steps in PW and apparently 1 step in C5; it probably wouldn't be that hard to make a module that could load for that file template, which would combine the 2 actions, so if you click a replace link, it would first trash the existing file and then present the new upload dialog...
  24. http://processwire.com/talk/topic/1912-best-process-for-backing-up-site/
×
×
  • Create New...