-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
Hey Joss - I like it Three quick comments: I don't really understand why the Click Me button goes to the Adobe website. On smaller screens the music play/stop buttons are covered by the footer making them impossible to click It would be nice to lose the horizontal scrollbar
-
Unable to delete an image inside a repeater(after upgrade)
adrian replied to quickjeff's topic in Modules/Plugins
Perhaps you could contribute to the discussion on Github and see if you can help Ryan reproduce it? https://github.com/ryancramerdesign/ProcessWire/issues/655 -
I can a few different options here. Use the attached module which uses some jQuery to force the description field open - seems to work fine and I don't think there will be any side effects with it affecting other fields, but you can tweak the jQuery if needed. You could make use of Martijn's new module http://modules.processwire.com/modules/admin-custom-files/ and use the code from the attached .js file. Figure out how to change the status of the collapsed state with a before hook ProcessField::buildEditFormBasics - you'll see I tried a hack - in the attached module, my first approach was not with the associated js file, but instead of the after hook, I used a before hook and used the commented code to make sure the description field wasn't blank. This was ugly, but I couldn't figure out how to change the collapsed status properly in this case - sure I am missing something obvious, but only had a few minutes this morning to look at this. FieldExpandDescription.zip
-
"Name format form children" option generates empty untitled pages
adrian replied to mikelexp's topic in General Support
Just to follow up for those that come across this. Looks like it was a firefox issue, but Ryan fixed it before releasing 2.5.2 stable. -
Just to follow up - now that 2.5 is official, here is the complete changelog: https://processwire.com/blog/posts/processwire-2.5-changelog/ Grab a coffee first
-
Reno Theme Not working Properly after upgrading to 2.5.2
adrian replied to quickjeff's topic in General Support
And if you want to make it the default for all users, add this to your config.php file: $config->defaultAdminTheme = 'AdminThemeReno'; -
I am guessing you are using a page field on each page to determine which of the tags children are used? If so then you need to: foreach($page->tagsfield as $tag){ echo "<a href='{$tag->url}'>{$tag->title}</a></li>"; }
-
Using a different field to generate page URLs
adrian replied to statestreet's topic in API & Templates
If you're will to use page ids for the story id, I think this will help out: http://modules.processwire.com/modules/process-redirect-ids/ -
BugFix for /backend/page/?id=n&open=childofn
adrian replied to blackeye1987's topic in Wishlist & Roadmap
Tricky, but I am curious how you could get to a url like that without manually typing it? -
I second everyone's comments - this looks awesome for showing clients around. Nico's module is definitely more for developers. As diogo said - it would be awesome to have this configurable so that we could highlight features that are unique to each site and perhaps each template so if they go to edit a complicated page with lots of alternate options. I haven't thought through how you'd do this though - maybe an MarkupAdminDataTable where we could choose the template and create each slide of the tutorial for that template. Anyway - awesome work - looking forward to seeing this progress!
-
Hi KimP - welcome to the forums. I can confirm I get the same behavior here and is a bug that should be filed on Github. Are you happy to take care of that, or would you like me to?
-
This module allows the page name to change when the title is edited. Modules directory: http://modules.processwire.com/modules/page-rename-options/ Github: https://github.com/adrianbj/PageRenameOptions I'd love to think that this module was not necessary for me but, especially during development, I find that page titles often change and I'd really rather have the names/urls match the title. I don't think you can expect clients to remember to change the name when they change the title, or even if they do, they still have to get it right which can be a challenge with a long article names with characters not allowed in page names. With none of the config settings checked, the default behavior is to have the page name always match changes to the page title, but allow the user to manually edit if they want. The options allow you to protect initial differences (changes you may have made as a user with an exempt role), completely disable manual changes, or protect manual name changes from subsequent changes to the title while editing. My preferred settings are to set the exempt role as superuser, and check "Initial Differences Protected" and "Prevent Manual Changes". CONFIG SETTINGS Exempt Roles The selected roles will not be subject to any of the rules below. The name will change automatically with the title, but they will be able to manually edit the page name as desired. Excluded Pages Pages that are excluded from the actions of this module. Changing the titles of selected pages will behave as though this module is not installed. For multi-language sites it is recommended to select the site's homepage. Initial Differences Protected If checked, further changes to the name (to match a changing title) will not happen if the name is already different from the title (evaluated on page edit initial load) Prevent Manual Changes If checked, it won't be possible to manually edit the name. If checked, this will disable the "Live Changes Protected" setting since it won't be possible to make any manual changes. Live Changes Protected If checked, further changes to the name (to match a changing title) will not happen if the name field was manually changed at any time during the current page edit. Please test the behavior of each setting thoroughly so you understand what each one does! Please let me know if you have any further requirements around permissions / role access to the module's functionality.
- 109 replies
-
- 12
-
This is a simple module to prevent guest users and search engines from accessing to your site. Primarily it is designed for use during site development. Modules directory: http://modules.processwire.com/modules/protected-mode/ Github: https://github.com/adrianbj/ProtectedMode Install and check the "Protected Mode" checkbox Create a user with only the guest role and give the login details to your clients/testers. Of course existing admin users can use their personal logins still. There are some similarities with Pete's excellent Maintenance Mode module, but the reason I built this, rather than using Maintenance Mode is: I didn't want the "Maintenance Mode" badge showing up on the site since this is for development before a site has ever been live and I didn't want the client seeing that badge. I didn't want users redirected to the PW login page because I didn't want visitors to see the PW login page. I know the module has the option to redirect to a custom page, which you could use to make a front-end login form, but that seemed more complex than I needed (and I think other PW devs might also need). Because of the way this module replaces Page::render with the login form, visitors can be sent to any page on the site, and once they login that page will reload with its full content - no messing around finding the page again, and no need for sending page ids through the login process to redirect back. This module also lets you configure the message that is displayed along with the login form, and also apply some css to style the login form. Hope you guys find it useful.
- 49 replies
-
- 21
-
Looks like all those page somehow lost their hidden status on your live site. Make sure your page tree looks like this. Note the hidden status of everything but Find and Pages:
-
OK, I have a quick fix for you. Replace the attached file. It was a problem with the parsing of currencies with two codes. The Mexican Peso was: MXN MXV Mexican Peso Mexican Unidad de Inversion (UDI) $ But if you change it to: MXN Mexican Peso Mexican Unidad de Inversion (UDI) $ everything works fine. The reason I attached a replacement is that you need to make sure there are tabs in the correct places within that line. Seems like there needs to be a change to the parsing logic here to account for currencies with more than one code, because right now, the code that is being sent to the Open Exchange Rates service is "MXN MXV". There are actually several currencies with the same problem. if(substr_count($line, "\t") < 2) { list($code, $name) = explode("\t", $line); $symbol = ''; } else { list($code, $name, $symbol) = explode("\t", $line); } I am not sure what the extra code is about anyway, so maybe Ryan will Chime in. He will either need to remove the extra code from the txt file, or parse it out before sending to the service. Github issue submitted: https://github.com/ryancramerdesign/ServiceCurrencyConversion/issues/1 currencies.txt
-
Sorry I put that error log call before $rates was defined. Try moving those new lines after: $rates = $this->getConvertedRatesTable($fromCurrency, $amount, $markup, $decimals); I'll also try installing the module here and see if I can replicate the error.
-
Ok, sorry, try replacing error_log on both lines with: $log->error which will put the results into /site/assets/logs/error.txt
-
Sorry, I wasn't expecting it to fix anything I just wanted to see what was in the error log to see if the $rates array contains MXN and to check what the value of $toCurrently is. Do you know where to find your php error log?
-
Another alternative: https://github.com/adrianbj/ProtectedMode I haven't added it to the modules directory just yet. Official forum post: https://processwire.com/talk/topic/7723-protecteddevelopment-mode/ Modules directory: http://modules.processwire.com/modules/protected-mode/ The reason I built this, rather than using the Maintenance Mode module was: I didn't want the "Maintenance Mode" badge showing up on the site since it really is for development before a site has ever been live. I didn't want users redirected to the PW login page because I did want visitors to see the login page. I know the module has the option to redirect to a custom page, which you could use to make a front-end login form, but that seemed more complex than I needed (and I think other PW devs might also need). Because of the way this module replaces Page::render with the login form, visitors can be sent to any page on the site, and once they login that page will reload with its full content - no messing around finding the page again, and no need for sending page ids through the login process to redirect back. This module also lets you configure the message that is displayed along with the login form. I don't see this as a replacement for Maintenance mode at all. It has less options and is not really appropriate for scheduled maintenance time - it doesn't send a 503 - although Maintenance Mode doesn't do that either. If you try it, let me know how it works out for you.
-
And in this: http://openexchangerates.org/api/latest.json?app_id=xxxxx (with your API key). What happens if you edit the module file: https://github.com/ryancramerdesign/ServiceCurrencyConversion/blob/master/ServiceCurrencyConversion.module#L293 to include a log of $rates and $toCurrency public function convertAdvanced($fromCurrency, $toCurrency, $amount, $markup = 0.0, $decimals = -1) { error_log(print_r($rates,true)); error_log("ToCURR:".$toCurrency); $rates = $this->getConvertedRatesTable($fromCurrency, $amount, $markup, $decimals); if(!isset($rates[$toCurrency])) throw new WireException("Can't find target currency."); return $rates[$toCurrency]; }
-
It looks like the service doesn't support MXN. Check out the dropdown here: https://processwire.com/api/modules/cc-example/ Although weirdly it is in this list: http://openexchangerates.org/api/currencies.json So I don't know why it is not available
-
Help understand the _ files in the template
adrian replied to mikeroosa's topic in Themes and Profiles
Hi mikeroosa and welcome to PW. Both of those are optional. The leading underscore is simply a convention so you know those files are not actual template files, but rather php includes (files that get included into other files). This is also common outside of PW. The omission of the closing tag has several benefits. A quick google will help to explain why: https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=php+omit+closing+tag -
I haven't managed to test out this new module yet, so I am not sure, but I think it should do what you are looking for: https://processwire.com/talk/topic/6822-module-dynamic-roles-for-pw-246/
-
Damn it is embarrassing that I felt the need to Like that suggestion of Joss'. I used to be fine on a 15" laptop running 1920x1200. Seems like 40 really is the beginning of the end when it comes to small things and low light
-
http://modules.processwire.com/modules/process-hanna-code/ will let you create the gallery using your own php code and the client can simply type: [[imagegallery]] Alternatively, check out PageTableExtended: https://processwire.com/talk/topic/7459-module-pagetableextended/