-
Posts
691 -
Joined
-
Last visited
-
Days Won
6
Everything posted by thetuningspoon
-
New ProcessWire admin theme on dev branch
thetuningspoon replied to ryan's topic in Themes and Profiles
Zahari Majini, I like your design, although I'm not sure that it solves the "boxes in boxes" issue that was one of the main goals of Ryan's redesign. I also don't agree with you on the contrasting colors looking fuzzy. I'm not seeing the borders with in-between colors you're referring to. I think the bigger problem with uncalibrated monitors is when using more subtle shades of gray and lower contrast areas, since many monitors will not be able to handle these nuances or will display the subtle grays as white. I'm also confused about the "tables" you're referring to. Usually extra line height in tables makes them easier to read since it is harder to mix up the lines. And outlining every cell is often unnecessary and ugly as long as data is consistently aligned (and can sometimes actually confuse things by adding too much division or not emphasizing proper groupings). That said, your tables don't look bad since the outlines aren't overbearing. Just some thoughts. From a visual standpoint I'm not "in love" with the admin redesign either, although from a functional standpoint I love it, and I do like the new field "grid" since it seems like a more flexible and clear way of laying things out. And I'm with Ryan in his philosophy of keeping the admin very simple and "unbranded". In that regard the flat design makes a lot of sense. -
New ProcessWire admin theme on dev branch
thetuningspoon replied to ryan's topic in Themes and Profiles
I apologize if this has already been addressed (haven't had time to read through the whole 10 page thread)... But I noticed that the page name auto-fill when creating a new page is no longer working. I am using Chrome on Mac. I checked the Chrome dev tools Console to see if there were any JS errors but didn't find anything. Is this something on my end or is this functionality temporarily disabled in the dev branch? -
Repeater: Add new item add the top
thetuningspoon replied to Nico Knoll's topic in Wishlist & Roadmap
Sounds like this would be basically the same issue as adding pages to the top of the page list, which is also not currently possible, but would come in very handy when you have large page lists that you want to be able to sort manually but need new entries to appear first. +1 -
New ProcessWire admin theme on dev branch
thetuningspoon replied to ryan's topic in Themes and Profiles
Late to the party, but may I suggest superfish.js? Does wonders for my dropdowns! I'm so excited about the changes you've made, Ryan! Can't wait to try it out. -
Ooo, good call. Although, if I understand you correctly, something like this (although a little less elegant) can be accomplished already just using collapsed-only-when-blank fields inside of repeaters: In your template code, you would just loop through the repeater children, checking to see which field was filled out and outputting that field. foreach ($page->repeater as $repeaterItem) { if ($repeaterItem->custom_RTE) { // Code for outputting an RTE block } elseif ($repeaterItem->custom_img) { // Code for outputting an image block } else if ($repeaterItem->custom_gallery) { // Code for outputting an image gallery } } The place both of these fall short is when repeaters within repeaters are required (which is more often than you might think... think about bullet lists or more advanced image galleries). Although the better way around that may be to develop more field types to support some of these more specific content needs. Edit: Can you use fieldsets in repeaters? If so, this gives you a bit more power to group multiple fields into single 'block types', which can be hidden when not in use. All of this would probably make poor Ryan scream
-
This looks great. Is this something that could potentially be integrated with ProcessWire or with the module you've built?
-
how do I implement support for iframe in HTML mode?
thetuningspoon replied to ozznixon's topic in General Support
Glad I could help! Depending on the application, hard coding the iframe into the template or using Martijn's suggestion of adding a new field just for the iframe html could also be a good/better solution. That's the fun part about PW -
how do I implement support for iframe in HTML mode?
thetuningspoon replied to ozznixon's topic in General Support
Hi ozznixon, The settings for TinyMCE are located in the field settings for whichever field you want to add this capability to. So, for the body field, go into Setup > Fields > body. Then go to the "INPUT" tab and click on "TinyMCE Advanced Configuration Options". You'll want to edit the valid_elements to allow for iframes. I don't know off the top of my head how to do this... but if you're okay with allowing ALL elements, you can replace everything in the field with *[*] and that will allow iframes along with everything else. I usually do this although some people would caution against it... It really depends on how much power you want to give your editors. -
Ah, you're right! All of my links are root-relative, and most of time I stay in https, EXCEPT when I go back to the home page (which is also root-relative, i.e. href="/"). For some reason that takes me out of https. Any idea why this would be?? Edit: This may be an issue with an Apache directive on our end... Looking into it. Edit 2: Yep, that was it. The only issue now would be if the client opens another window to view the site front end and doesn't go to https. But I'm not too concerned about that. Thanks for helping me get to the bottom of this, apeisa.
-
Hi apeisa, We are just using the URLs tab on the relevant templates to redirect to https. How would you set it up so that logged in users are always https? That seems like it would be a good solution.
-
No problem here with the scrolling on Mac with Chrome. I recently discovered a different issue, however. On a couple of my sites I am using SSL (https) for some pages, or for all of the admin pages. I find that if there is a mismatch where the live page is regular http and the admin page is https (or the reverse of this also, I think), then clicking "edit" on the adminbar will result in an "Unknown Page" error. It was just recently that I was able to narrow this issue down to only sites that use SSL. Hopefully this can be fixed!
-
I hadn't really thought about the advantages that could be derived from doing it this way. This could definitely work well for some sites. Maybe "ImagesManager" could be expanded to "FileManager"? Thanks for the tutorial!
-
Can't Login to ProcessWire Site Anymore
thetuningspoon replied to thetuningspoon's topic in General Support
Thanks, resetting the passwords through the API worked: http://processwire.com/talk/topic/490-how-to-reset-your-password-how-to-enable-the-forgot-password-function/ -
I went to login to a site that I built about six months ago and for some reason neither of the two accounts I set up are working. I get the usual - Login failed error when trying to login to the admin. The site was running 2.2.15 so I tried upgrading it to 2.3, but that did not fix the issue. I also tried changing permissions to 777 on the sessions folder. What could have caused this and how can I get back into the site?
-
Validating field before page save
thetuningspoon replied to thetuningspoon's topic in API & Templates
Thanks for that, Ryan. That sounds like what I might be looking for. -
Validating field before page save
thetuningspoon replied to thetuningspoon's topic in API & Templates
I understand. Ideally, the page would continue to display with the old database values on the front end while in the editor the new values would just be repopulated (i.e. they would be stored in the session until they were all validated). Nothing would be overwritten until everything was validated for saving to the database. But I see that that isn't how PW is designed to handle validation. Basically, the thing that I would want to avoid is having the page disappear from the website (unpublish) due to the client making an error. I would rather it continue to show the old values on the front end and let the user see and fix his error on the backend. It sounds like the upcoming draft system would probably solve this problem. -
Validating field before page save
thetuningspoon replied to thetuningspoon's topic in API & Templates
Soma, when you say that the error message will get shown after saving, does that mean that in your example the new value would be lost and overridden with the old? I don't want to lose the new value, but just to prompt the user to fix it before saving. Would that possibly be a case for hooking into Pages::saveReady() instead? -
Validating field before page save
thetuningspoon replied to thetuningspoon's topic in API & Templates
Oh okay, I got it I was only thinking about the new value before it was saved and not the value currently stored in the database. -
Validating field before page save
thetuningspoon replied to thetuningspoon's topic in API & Templates
Thanks Soma, I think this will get me on the right track. I'm not totally sure what you mean by "old value" and "new value" though. Can you elaborate on that? -
I rolled my own "maintenance mode" by adding a preferences page with a maintenance_mode checkbox and a RTE field called maintenance_mode_message to display to the user if they're not logged in. I then added the following code snippet to the top of my header include which is included in all my template files: <? if($pages->get('name=preferences')->maintenance_mode && !$user->isLoggedin()) { echo $pages->get('name=preferences')->maintenance_mode_message; exit; } ?> If the conditions are met (user is not logged in and maintenance_mode checkbox is checked), the user will only see the contents of maintenance_mode_message and will not be able to view the site.
-
I'm not sure where to look for this one. I would like to be able to do some custom validation on a WYSIWYG field (checking to make sure some custom tags have matching closing tags) before a page is saved in the admin, and prevent the save and provide an error message if it fails to validate. I gather that this means hooking into the page's save method, but where do I get the pre-save field data from and where should my custom code go? Thanks!
-
Up until now I have used Google Web Fonts for all my advanced type needs. With Google Web Fonts, creating a consistent user experience for the site editor between the WYSIWYG editor and the front end was easy. Here's what I would do: Use @import directly at the top of the site's main CSS file (instead of importing the fonts in the HTML <head>, which is Google's default suggestion). Specify a custom content.css in the TinyMCE field settings and then use an @import statement at the top of this file to import your site's main CSS file from step 1. Doing this makes all your styles and fonts available from within TinyMCE. After the @import statement in your content.css, overwrite any styles from the main CSS file that you don't want to apply in the TinyMCE field. For example, if you specified a background for your body tag you will probably want to overwrite this with background:#FFFFFF. This worked great for general styling and for Google Web Fonts. I had hoped that I could achieve the same seamless experience using Typekit. However, Typekit does not use @import. Instead, it seems to require javascript to load the fonts. I tried adding this code in the admin <head>, but this does not load it into TinyMCE. Is there a way to import this javascript directly into TinyMCE?
-
Awesome! I'll give it a try.
-
Images display on the front end before page is saved
thetuningspoon replied to thetuningspoon's topic in General Support
That would be ideal! Thanks for the reply Ryan. -
Ryan, is there a reason why I have to use echo instead of my preferred approach to using php when templating? i.e.: <? if ($page->rootParent->numChildren > 0) { ?> <nav> <ul class="subnav"> <? foreach($page->rootParent->children as $child) { ?> <li <? if($page === $child) echo 'class="active"' ?> ><a href='<?= $child->url ?>'><?= $child->title ?></a></li> <? } ?> </ul><!-- /subnav --> </nav> <? } ?> I really prefer the markup-first approach to keep the markup as structured and readable as possible (well, at least to my eyes). I'd hate to have to convert all of my code snippets in order to use them with hanna code.