-
Posts
2,776 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
I use SmartBackup (a codecanyon script) in a subfolder and have it set to backup the /site/ folder and the database; it runs on a cron job, and creates the zip file in wherever you specify. All you need to re-create the site is your site folder and the database; unless you have placed some other custom stuff above /site/ Once Duplicator is released, i will switch to using that for backups, and drop the SmartBackup; SmartBackup is very good, but Duplicator will be a native module, and supports more options, like Amazon S3; For sites with massive assets files, like audio, i set the backup to exclude images and other media like audio and video. The i have a Forklift 'synclet' that i can run and that syncs the entire site/assets folder with an Amazon s3 account, with 1 click.
-
[solved] HTML comments removed from template - since when?
Macrura replied to Robin S's topic in General Support
right that is strange - is markup regions something that you can enable/disable? I know for sure i need comments in my HTML to stay put for the most part. -
[solved] Init functions not available in includes?
Macrura replied to Robin S's topic in General Support
this may be a namespace snafu - have you tried putting the namespace in front of the call inside the include, e.g. \ProcessWire\myFunction(); ? to be clear, i include tons of functions from the init, in fact my _init includes a _func.php which the includes around 10 separate files all with functions and those all load and are usable everywhere; however i have run into the snafu of having to prepend the namespace for some reason within certain included files down the line -
[solved] HTML comments removed from template - since when?
Macrura replied to Robin S's topic in General Support
It must be pro cache; i have a site with pro cache enabled and i don't have it set to strip comments, and my comments still appear; have you tried turning off the html minification features of PC? i believe it still processes, even when the caching is off. -
@szabesz i think it is fine to use, i first tested it on localhost, and then i started using it on 3 new sites; i did change the module to not use the 'settings' global variable though before installing it, because as far as i can tell, it somehow actually causes the listers in lister pro to all lose their settings; have not tested extensively yet, so i don't know if it happens only if you load the listers... i will most likely fork the module and then change out my new versions... there are still some things to iron out before it could be considered really stable, with the fields and settings import features..
-
plus DataTables are so easy to setup on the front end, you really don't need a module... just make your table, and then load the datatables scripts and init; the instructions are all there on the datatables site, and it is really well documented..
-
Released: http://modules.processwire.com/modules/jquery-ion-range-slider/ The built in rangeslider is good, but it is somewhat limited if you need really specific slider interfaces, like with pips and showing the value on the handles. There are many Jquery rangesliders, but one of the best and easiest to implement is the ion.rangeSlider. http://ionden.com/a/plugins/ion.rangeSlider/en.html This is a preview of the very simple module that basically allows you to enable the ion.Rangeslider on any text input, and then you type in your params into the textarea field (careful, you can break the page's javascrpt if you are not careful!) There are way too many options to really make this configurable, so the easiest way it to have a free text field where you enter any params. The params are just passed to the instance of the slider. Features of ion.Rangeslider: Skin support. (5 skins included and PSD for skin creation) Any number of sliders at one page without conflicts and big performance problems Two slider types single (1 slider) and double (2 sliders) Support of negative and fractional values Ability to set custom step and snap grid to step Support of custom values diapason Customisable grid of values Ability to disable UI elements (min and max, current value, grid) Postfixes and prefixes for your numbers ($20, 20 € etc.) Additional postfix for maximum value (eg. $0 — $100+) Ability to prettify large numbers (eg. 10000000 -> 10 000 000 or 10.000.000) Slider writes its value right into input value field. This makes it easy to use in any html form Any slider value can be set through input data-attribute (eg. data-min="10") Slider supports disable param. You can set it true to make slider inactive Slider supports external methods (update, reset and remove) to control it after creation For advanced users slider has callbacks (onStart, onChange, onFinish, onUpdate). Slider pastes all its params to callback first argument as object Slider supports date and time Screenshots comparing Inputfield Rangeslider (Soma) vs. JqueryIonRangeSlider... 1) basic range using currency ' Same with different skin Range of years Same with narrower column and different skin.. the module is functional and being used on 1 site, but some additional testing is needed...
- 13 replies
-
- 16
-
-
the style would be easy to update; also i'm hoping to be able to enable fieldset close and also fieldset tab open/close so you can make some pretty extensive settings pages with this. the process page basically renders a standard pw form, using the json data you configure through the module interface; the whole setup is super clever, @pmarki nice job... also i'm hoping to have some prebuilt sets of fields that can be imported to get started with a lot of standard type settings; possible 'field setting profiles' like home business, corporation, education etc, and then it would populate with a lot of fields needed to configure and edit stuff like Schema..
-
Here are some preview screenshots from my pimped out version of this module... 1) Added the placeholder and collapsed attributed to the fields editor: 2) allow export of the fields setup, as well as restore, so that you can take huge sets of fields and import them into a site. 3) ability to export/backup the settings values themselves, as well as restore them from backed up json. still need more testing, but so far these things help make this module more usable; also i changed the default global api variable to g_settings, to avoid the conflict with Lister Pro.
-
yes, the module should do that for sure...
-
yes, that url doesn't work for embedding for some reason, did you try upgrading the essence lib? Also, i still think that that the module's way of replacing is not going to be reliable enough, because it assumes that the user will not inadvertently have attributes on the anchor element, like rel, or target; therefore those will always fail - i think the only fullproof way for the module to do the replacement is to possibly use the essence built in replace, or use a domdocument and cycle through the anchor tags...
-
wow - looks amazing!
-
i do agree - i think modules should probably prefix any global variables with something that won't risk being overwritten...
-
ok i fixed my issue, it was another textformatter that was interfering somehow with the module's ability to find the part to replace; all good now, just had to move that one last...
-
basically the module is not working in terms of the string replace; it can't find the anchor to replace, so that probably needs to be reworked. For example, if i put [replace-me] in the content and then change the search string to that, then the soundcloud embed shows up; also string comparing the whole anchor element that the module predicts it will find, with the actual one on output is also always false, but haven't figured out why yet
-
yes, you can change that but most people probably won't realize why their listers all broke, so the default within the module code should be changed. not sure if it needs own namespace, because you just want to be able to get and set your global settings in a quick and easy way; plus i have module that then uses this module's settings basically wraps the settings for things like meta tags.. prior to this i always set my settings as part of $config which may be safer, because then you are 1 down from the top level... so another option would be to have this module use like $config->settings instead of being top level; since i have abstracted my calls to the vars through my intermediary module, the global name can change at any time without affecting my template output b/c my module looks for whatever the global name is and then refers to that in all of the output methods...
-
There is a somewhat major issue with the module that should be changed asap - this module sets a global variable for 'settings' which is also used by ProcessPageListerPro. Consequently if you have this module installed and you are using PageListerPro, all of your listers will suddenly appear to be broken, until you change the global variable in the settings for this. However it is probably too risky to leave this module with using that 'settings' variable. i would recommend to make it something more unique and less likely to have collisions - i am using 'site_info' for now since i doubt that would collide with anything, and also since this module deals with settings that will presumably be used on the frontend, it makes sense to use the word 'site' in there somewhere...
-
Just testing this out now... it's really great! Going to use this on all sites from now on. One thing i'm testing is that i changed the CSS to show the json for the settings. Then i added a field called settings_import: $field = wire('modules')->get("InputfieldTextarea"); $field->attr('name', 'settings_import'); $field->attr('id', 'settings_import'); $field->label = __("Import Settings Config", __FILE__); $field->attr('value', $data['settings_import']); //$field->columnWidth = 34; $field->collapsed = Inputfield::collapsedYes; $fields->append($field); then i added this, right after this line 222 $json = (isset( $data['settings'] )) ? json_decode($data['settings'], true) : ''; if(isset($data['settings_import']) && $data['settings_import'] != '') { $json = json_decode($data['settings_import'], true); $data['settings'] = $data['settings_import']; $data['settings_import'] = ''; } now i can import all of the settings from one site to another without having to re-create them...
-
this is how i did it using functions: function paginateItems($items) { $items_pp = 5; $start = (wire('input')->pageNum - 1) * $items_pp; $total = count($items); $items = $items->slice($start, $items_pp); $a = new PageArray(); foreach($items as $unused) $a->add(new Page()); $a->setTotal($total); $a->setLimit($items_pp); $a->setStart($start); $items->data('paging', $a); return $items; } function renderPager($items) { $options = array( 'nextItemLabel' => 'Next »</i>', 'previousItemLabel' => "« Previous", 'listMarkup' => "<ul class='pagination'>{out}</ul>", 'itemMarkup' => "<li class='{class}'>{out}</li>", 'linkMarkup' => "<a href='{url}'><span>{out}</span></a>", 'currentItemClass' => 'active' ); $out = '<ul class="pagination">'; $out .= $items->renderPager($items, $options); $out .= '</ul>'; return $out; } in the template: $a = $items->data('paging'); echo renderPager($a);
-
i'm trying to get this to work for some soundcloud links - but nothing is happening; haven't started toubleshooting yet, but not sure where to start;
-
Jump links to chilldren rendered as part of parent
Macrura replied to Chris Whissen's topic in General Support
One way to do it is is with a redirect from the child page to the parent page, kinda hackish but works: /* Check for Redirect -------------------------------------*/ if($page->parent->template == 'service') { $r = ($page->parent->url . "#" . $page->name); $session->redirect($r); } then you just use the $page->url for the sections. a better way would be to use a hook and check the type of page template and then change the URL to the hash: wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'service-child') { $event->replace = true; $hashUrl = $page->parent->path . '#'. $page->name; $event->return = $hashUrl; } }); -
that does indeed fix the issue - thanks!!
-
AOS 1.2.4, PW 3.0.52; hard reload doesn't affect anything; re-saving field no effect; body field settings look correct...