-
Posts
2,766 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
Module FrontendUser: login, logout and register users / members
Macrura replied to pwFoo's topic in Modules/Plugins
I'm getting this error when trying to use the register form Error: Exception: Method FrontendUser::attr does not exist or is not callable in this context (in /Volumes/Docs/MAMP/htdocs/processwire_xys/wire/core/Wire.php line 350) not sure what the issue could be; tried various things - has anyone got a registration form working with FU yet, and if so could you post steps? TIA .. also - i noticed you are maybe using using $sanitizer->username() but it seems to be deprecated in favor of pageName (?) http://cheatsheet.processwire.com/sanitizer/properties-and-methods/sanitizer-username-value/ -
maybe something like this? if($page->city) { $setCity = $page->city; $cityURL = $sanitizer->pageName($page->city); echo " <span class='topNav'> <a class='' href='/gyms' title='Gyms'> <i class='fa fa-chevron-left'></i></span> All Gyms</a> <span class='topNav'> <a class='' href='/gyms/{$cityURL}-gyms/' title='{$setCity} Gyms'> <i class='fa fa-chevron-left'></i></span> $setCity Gyms</a> <span class='topNav'> <strong> <i class='fa fa-chevron-right'></i></span> {$page->title} </strong> "; $randomGym = $pages->find("template=listing-gym, city=$setCity")->getRandom(); if($randomGym->id) echo " <a title='{$randomGym->title}' href='{$randomGym->url}'><i class='fa fa-random'></i> Random Gym</a>\n"; }
-
@mattcohen - there probably is, but i think more info is needed, such as what the relation is between the $page->city property and the resultant breadcrumb.
-
wow just in time
-
Possible to register and login simultaneously
Macrura replied to onjegolders's topic in General Support
@Can, have you considered trying this module: https://processwire.com/talk/topic/9811-frontenduser-login-logout-and-register-users-members/?p=95245 it has some interesting features; not sure about auto login feature as is discussed here though. -
Module FrontendUser: login, logout and register users / members
Macrura replied to pwFoo's topic in Modules/Plugins
this seems to be working for me: // Create form field $last_name = $modules->get('InputfieldText'); $last_name->label = 'Last Name'; $last_name->attr('id+name', 'last_name'); $last_name->required = 1; -
Module FrontendUser: login, logout and register users / members
Macrura replied to pwFoo's topic in Modules/Plugins
yep, tried changing everything, isset and nothing works.. WSOD all the way. Maybe you can setup a temp account on lightning.pw so that your module can be tested with some more widely used version of php? -
Module FrontendUser: login, logout and register users / members
Macrura replied to pwFoo's topic in Modules/Plugins
I'm not running 5.3 on any of my new/development sites, its all 5.4; we just released a module (AceExtended) that is for 5.4+; i think it's fine, just put that in the requirements and don't use any> 5.4 features? -
Module FrontendUser: login, logout and register users / members
Macrura replied to pwFoo's topic in Modules/Plugins
it was actually the same line; i can check more, but all i did was replace that line and then got the same exact error on the same line, but line 65, because of the added 2 lines -
Module FrontendUser: login, logout and register users / members
Macrura replied to pwFoo's topic in Modules/Plugins
that didn't solve it... Compile Error: Can't use method return value in write context -
Module FrontendUser: login, logout and register users / members
Macrura replied to pwFoo's topic in Modules/Plugins
I'm testing the latest version, but: Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8r DAV/2 PHP/5.4.10 Compile Error: Can't use method return value in write context (line 63 of /Volumes/Docs/MAMP/htdocs/pwire_test05/site/modules/FrontendUser/FrontendUser/FrontendUserRegisterEmailValidation.module) -
got it now- that is super cool and useful!!
-
pretty interesting - what would be a good use case for this method, as opposed to making the field itself an AceExtended field? I might be being thick, but am not getting that...
-
Which fieldtype should i use for Bootstrap Lists?
Macrura replied to GeraldSchmidt's topic in Getting Started
In terms of how to output a list, this mostly depends on what the list items are; And since you will seem to need optional links with data attributes, PageTable is probably the the best way.. other options might include: Profields Table Repeater and if they are items that you want to reuse across different pages, then regular page field with the module that adrian posted would be best. -
Ok thanks - in order to see the summary, you'll need to view source, or use the chrome dev tools and inspect element, then navigate to the head, to see your summary meta tag. Meta tags are not visible when viewing web pages.
-
when you say viewing, what do you mean?
-
want to say many thanks to @thetuningspoon for putting this together, and doing all the work of submitting to the directory. It's surely a useful module (use it almost every site), and we hope that all y'all will like it..
-
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
Macrura replied to David Karich's topic in Modules/Plugins
yes, it seems undeniable that AIOM+, which is otherwise a godsend plugin, has the possible side effect of tanking an entire website, front and backend, without warning. The cause is probably some change in the permissions, or who knows what; in my case the css minify was timing out in php, but had worked fine for a year before that. The module would seem to leave no recourse in the event that it fails and the developer has not taken steps as described above and in use by @muzzer and myself to provide an alternate way of outputting the assets. I think the module should come with instructions and warnings about these possible consequences, and that function i posted or one that does the same thing, should be part of the module so that if the user sets emergency shut off, it just lists the files in the arrays that have been passed into the class as single assets... it would also make sense for there to be a simple api for the module in the event that a site has tanked, to enable emergency shutoff; the api could also possibly allow for cache clearing, enable/disable dev mode and enable/disable html minify (this could also allow one to minify html or not on a per template basis, per horst's request..) -
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
Macrura replied to David Karich's topic in Modules/Plugins
Had a strange and horrific experience on Thursday when a site i was working on suddenly could no longer create the new cache files...; i made a change to 1 line of a CSS file on the live site, and then that's when things went sideways. The CSS minify script started to fail and causing PHP timeouts, and then this took the whole site down, every page, and the admin. this is the error: 2015-05-09 18:49:28 guest **site-name** Error: Maximum execution time of 60 seconds exceeded (line 87 of /home/public_html/site/modules/AllInOneMinify/lib/cssmin.php) How I fixed it (for the moment): 1.) uninstall AIOM+ 2.) Replace with new copy 3.) Re-install it, and set on dev mode, no HTML minify. this thankfully fixed the issue, but all in all the site was down for quite a while during this, and it made me realize that this part of the chain in my websites is a weak link, especially if it can fail, in that the site cannot run without the css and js files. Typically I would always have $minifyCSS and $minifyJS vars in my _init.php which in this case i could have simply set to false and then no problem, i could have gone and fixed the AIOM+ issue while the site ran. But for this site I hadn't set that up yet and also I am using conditional loading and hadn't worked out the script to load the individual assets if one of those vars is false. After looking a bit at the module, i came up with this solution for disabling AIOM+ based on a boolean var in your init: if($minifyJS == true) { echo '<script type="text/javascript" src="' . AIOM::JS($jsfiles) . '"></script>'; } else { listAssets($jsfiles); } // END IF this is the function (may not be 100% perfect, still testing, but works ok so far): // use this to echo the assets in the AOIM+ array function listAssets($asset_files) { $templates = wire('config')->urls->templates; $current_page = wire('page'); // testing //$current_page = wire('pages')->get(1023); foreach ($asset_files as $asset_file) { if ( is_array($asset_file) AND isset($asset_file['loadOn']) AND isset($asset_file['files']) ) { $selector = $asset_file['loadOn']; if(!$current_page->is($selector)) continue; if(is_array($asset_file['files'])) { foreach ($asset_file['files'] as $_asset_file) { echo "<script src='{$templates}{$_asset_file}'></script>\n"; } } else { echo "<script src='{$templates}{$asset_file}'></script>\n"; } } else { echo "<script src='{$templates}{$asset_file}'></script>\n"; } } } In summary, i think that maybe there should be an emergency shut off in AIOM+, because without the method described above, how would you keep a site online say if AIOM+ was just totally failing? -
it should be possible to edit any file within the templates folder. If you are experiencing issues/errors with it, I would recommend submitting it here: https://github.com/NicoKnoll/ProcessTemplateEditor/issues Also, for a better editing experience, try using the new AceExtended editor; it is supposed to work now with this. Edit: just checked and was able to open, edit and save CSS and JS files.
-
@gazley, One possibility would be a process module that would handle the sending; for example, you would have a button on the page which would for example link to that process, even by ajax, and send the email. another way, in preserving your current method, would be to run some JS when the checkbox is checked, and display an alert "you have selected to send email on save - would you like to save the page now to initiate this action?" and then run a click action on the save button depending on their response, or even just run the click action on the save button after they select that checkbox - since it would save the page, i can't see any drawback to that...
-
do you have open graph tags? you need to set og:image https://developers.facebook.com/docs/sharing/best-practices#tags <!-- Open Graph ================================================== --> <meta property="og:locale" content="en_US" /> <meta property="og:type" content="website" /> <meta property="og:title" content="page title" /> <meta property="og:description" content="some description" /> <meta property="og:url" content="page URL" /> <meta property="og:site_name" content="Site Name" /> <meta property='og:image' content='url - to - image' />