-
Posts
2,765 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
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...
-
after upgrade all of a sudden my sites all started to show the alternate skin on CK editor, even though we I don't have that sub module enabled; enabling disabling the CKEaddons doesn't change anything, e.g. it still shows the wrong skin, and also the editor has redundant text align buttons; only way to fix was to disable module.
-
Here is a pre-release version on Github: https://github.com/outflux3/ImportExternalImages Still needs some cleaning up, but works fine so far in limited testing on 3 sites...
-
I guess we need to do some testing, with regards to the version number issue? not sure how to conveniently test it though, but could have a look at the upgrades module and try and see why it doesn't even list the CroppableImage3 module...
-
ok well yes, i was apparently running an older version (weird, just downloaded this from modules directory), but no idea how i had an out-of-date version, and the upgrades module shows nothing about this module... so this is fixed, by upgrading manually to the version on github
-
in the meantime i can see from some quick testing that the getCrop method is getting stuck here: // return InputfieldCroppableImage3 or null if not found $inputFieldInstance = $this->_getInputFieldInstance($event);
-
one of these was upgraded from the old cropping module to the new one, and one was started on 3x branch, and just added the cropping module; the module was probably installed after the upgrade to 3.0.52; not sure if any of those things make any difference; I can get you access to the admin and the FTP - i'm assuming you need both; will PM you in a bit.
-
yeah, when i first started the conversion, i was basically scratching my head about how hard/complex it would be to change from direct to delayed; At some point along the way i remembered the tracy template path, and after that it just went really fast.. now that site's code has been completely refactored and it's so much cleaner!