Leaderboard
Popular Content
Showing content with the highest reputation on 08/23/2016 in all areas
-
7 points
-
Newest tutorial about modules now available on tuts+ - Extending the ProcessWire Admin Using Custom Modules http://webdesign.tutsplus.com/tutorials/extending-the-processwire-admin-using-custom-modules--cms-26863 Thanks for everyones help.4 points
-
The more I use it, the more I love it. It simply is CSS: /*****************************************************************************************/ /** Transparent-Images Background **/ li.InputfieldImage div.gridImage__overflow, li.InputfieldImage .InputfieldImageEdit__imagewrapper > div > img { background: transparent; background-color: rgba(196,196,196,.7); background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADFlJREFUeNo8lwl4jWcahu+TlUQkdrIJ0dgSDUKKMBI0toPWpKWlbRBMizJVpcxIOzpqacdQtUVoqdqiQpQQIvZYgyQqiIgkosgiEiRpzjz/Ob3mXNd/rnO+//+/9/ve93mf5/lMlotjzXTfxtf8wdwyC3h8zu+E0ZyueOFDIX9+qnU56cr5AAI228YSILYsgfmjcznnEYM/aXheGgkl12BKJmS9A49fQEsTVDhTqekLm9imqeMqjliwe67gcJS5XOGSR5F+D1XwEZCo4Pnw/k54+A9b8KVchAwjeCrbkmHV8V3EThyNY7E/T35z4bunT8D7VRjUBXIVvP48Knzs+eWJgj+G7xXcq3Qj95ZCE17F56dXsG83M6z9ueQ6NndYx3vXorE/mgZBZ8CvB3kNbhP9amNuROQrGwuUjUl0rs3nUnEwkc8gdIaHFtOQoqYN6BGfyIAbEyDcjvuE4G5NUQHOCtTieRHdfBuyY2AuK8s9qHr7GSeeNcEpzAmTpXKhGZdYPVxKpZKfuTad0KnvoVmsaX/sv5JNB6YzIcKEQ/2tuDCOi9pBsNM6UoOnMLSJHgr6QQmNwaKsBwfaAifleePkAq12gFvoFvx6RrHgu3rETIPWx6A8IkmLPIN9rOOW9vTXelPr49TmIo1DRvMVyzXUmzq97OoVSp/utZx1sKejKQB7Y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mOV2UdmqdSNWJ6/fyJWQfKlNOPzF4oNaMzJQIV9gL43FWVwZ39lHnwiisymp1w1vvf0C0z5+nYplXPhE6I+R2j8Vw/nga1R4j8Xa5hl9AJvMq3sHd7QVzC7T4fGe8dM5BkiHC4ZseVzlUY2FGcDFXvAcLA3zI7TXqxaKlOr1s4kAnH2sMqyma/qOY+Qm/36kkumIz96usxZFgwDrDXM8SsdR6kH32Kq/5bsUhQODQ+SlGXTRI54ecGwrecKlN7EekyHApK5GpzBgu9ng52MAo/xNgAN8tgFKi3lETAAAAAElFTkSuQmCC"); background-size: 32px 32px; background-position: 0 0, 16px 16px; } li.InputfieldImage div.gridImage__overflow:hover, li.InputfieldImage .InputfieldImageEdit__imagewrapper > div > img:hover { background-color: rgba(55,55,55,.9); } /*****************************************************************************************/4 points
-
I have working solution on PW 3.09 with this inside Extra Allowed Content: div(*)[*]{*} iframe(*)[*]{*} But my opinion is that HTML Purifier strip some tags (like "data-oembed-url" and others) and to get working solution HTML Purifer need to be off. Also edit works (2 clicks, open popup with url input).3 points
-
I think PageTable (and Repeater / Repeater Matrix) will not scale up to the number of chapters expected. But if chapters are child pages of a book then the Lister mode of Batch Child Editor would be a good way to sort/find/manage large numbers of children:3 points
-
Ok it is may confusing while you have the UI in mind...i would present you a different view. Basically you are right. You can setup your app like you wrote: ->book -->chapter1 -->chapter2 ... as childpages of the book. As oneToOne every chapter belongs to only one book. In the blog example of @szabesz a blogentry chould change tags, cathegory and so on but your chapters always belongs to one book... So you could use something like to easy edit the childpages (chapters) of a book: On the API side you can check if a book have a childpage (so a chapter is there) and only if this check is true show the book...on the admin you can show the editor a message with a hook on page save that there is no chapter and they have to create at least one... Example for hooking after page save: UI Alternative1 (The real problem with PW is that there are tons of alternative ways to go....at the start; - ) You could take a look at the great Table field from the Profields - it is commercial but have a lot of pros on User UI and datamanaging of such setups. It uses pages in the background but as fieldtype you could add items within the book template. Have a read: https://processwire.com/api/modules/profields/table/ https://processwire.com/blog/posts/fieldtype-pagination/#example-profields-table https://processwire.com/blog/posts/3.0.27/#whats-new-in-profields-table-v14 UI Alternative2 Use PageTable field for your chapters. It uses pages, too and your editors add entries on the book template, too. It could be easy set to put the chapters as childpages or under chapters/chapter for managing all under one root. The pages stay connected via the PageTableField. PageTable Field is a little bit different to Table since you can setup more complex editing things and change the single pages on the default edit path, too. Table and the default Repeater field are both repeater fields for less or more complex entries that belong to one page, while only the table field provide the options that you need (hundreds or thousands of chapters of a book) pagination, filtering, scalability and so on. PageTable and the former mentioned Repeater Matrix are something like a provided UI for editing real pages with templates and fields without restrictions. Take a deeper look: On the first projects with PW take the time that you will save while developping to research how to start since this time is priceless. While you get deeper in the rabbithole the more fun you will have best regards mr-fan3 points
-
Thanks for the report @szabesz - can you please check if the latest version fixes both of those for you?2 points
-
2 points
-
@Robin S is right - you wrote tausands of chapters on one book....than i forgot one really big additional option in managing chapters right for editors....;) https://processwire.com/api/modules/lister-pro/ With lister you can setup a view where someone can select the book - or search for it and CRUD chapters... The Profield Table can paginate, filter and sort, too so this would scale for many chapters. But one the first run i would give book/chapters a go and use BatchChildEditor. With BCE you could create dummy data, pages via CSV import, too!! Thats the propose i use it in some projects. Most important thing choose wise and have fun!2 points
-
Thank you for your feedback, I'm really glad seeing someone else interested. My idea was to make most used features easily accessible that's why Pages and Settings are always open, modules configurations always closed and Access is opened on hover (Mike Rockett 2, 3, 4.). With such a configuration you can with one click only check a name of a field or go to template settings still having less frequently used sections collapsed. So it's not a bug, it's a feature I have never used system notification, so will check it. I'll try to make some features optional in next release as tpr suggested. UPDATE: Just uploaded small fixes (notification bell, shadow, sidebar scrollbar, header height aligned to sidebar items)2 points
-
hey adrian, what do you think of a panel to switch off certain modules. like the panel selector but not for panels but modules. so you could switch off modules during development to make sure it is not related to that module... no idea how hard that would be - just wanted to share the idea and hear your thoughts2 points
-
If there will only ever be exactly one image per page, then page = image and image = page, certainly on image pages (there may be 'About Me' type pages as well). If that is the case, you could simplify your naming conventions a little. Much of the functionality you need can be found in the PW core and a couple of modules. Check out http://modules.processwire.com/modules/image-exif/ and http://modules.processwire.com/modules/image-extra/, as a starting point. Do some experimenting, and come back with any questions.2 points
-
Hello, yes that needs to be done to get visible plugin button inside CKEditor toolbar (sometimes it's problem to find right "call"/"trigger", eg. plugin name "btgrid", but to get toolbar button need to insert/write "Btgrid"). To solve problem with cleaning divs write this below inside Extra Allowed Content: div(*)[*]{*} Or next example will allow to use <p class="...">, <a class="...">, <div class="...">. p(*)[*]{*} a(*)[*]{*} div(*)[*]{*} All this examples also works if ACF or Purifer switched on. Regards.2 points
-
Hello for all, but first thanks to Bernhard for this module! I also created something for similar usage (layout switcher, first image), but also do some additions to this nice module (second image). Here in attachment is TemplatePreviewImages module version where I added some options: thumbnails creation (before usage need to create "thumbs" folder eg: "template/images/TemplatePreviewImages/thumbs) can use any kind of image extension (jpg, jpeg, gif, png) zoom option to preview (using PW integrated jQuery UI ) can restrict module to works only inside desired page tree Regards. TemplatePreviewImages.zip2 points
-
Some good news! I have experimented with the background for transparent images. I have tried lots of checkerboard images, with two or three colors, with alpha transparency or not. Finally I came to the conclusion that it is much better to use some photoshop noise. Here is my testimage. A png with black, white and midgrey text / symbols plus a grayscale full opaque and half transparent: And here is a screenshot how it looks as thumbnail in the images field with some noise background: This way we would not need any steroids, no config settings, nothing else.2 points
-
I found this website to be very interesting take on pricing websites and other development tasks. http://howmuchtomake.com/ I will be referencing this link to my clients so that they can get a realistic view of how things are priced. Depending on where you live, this may or may not be much help to web developers/designers. Good Day.1 point
-
It would be awesome users could size their images for the RTE (rich text editor) using preset cropping sizes. This could really help ensure consistency across a site for editors that need to add images and reduce the amount of training needed when dealing with images. third part image crop fields do this really well, but do not offer a way to use the crops in the RTE. Image: Look next to the cancel button, there is a pulldown for image size presets. Drop down menus allows users the ability to select some preset image cropping dimensions. Crop guides would keep the aspect ratio, and return the desired image size. Pick custom size and the cropping guides would work as they normally do (free form) Other approaches: ProcessPageImageSelect could be made hookable in a way that images from third party image modules can add images to the RTE image selection page. i've been trying to get a preset image crop sizes into the RTE editor for a while now. I tried to use the hooks in ProcessPageImageSelect in-combination with the CroppableImage module but there is no hooks for this as (as far as I know). $this->addHookAfter('ProcessPageEditImageSelect::execute', $this, 'HookPageImageSelect'); The hook above will allow me to add images to the image selection modal, but I still can't get images that image to be addable to the Rich Text Editor on click. I was able to get the desired functionality by modifying core module ProcessPageImageSelect. Maybe if ProcessPageEditImageSelect->getImages() was hookable images from other modules could be added without modifying core modules.1 point
-
It's a module that adds extra color variation to Reno admin theme. Maybe someone will find it useful. Features (can be disabled or enabled): Sticky header with action button always visible notices at the bottom fixed sidebar Disabled accordion on Pages and Setup domain name with "open home page in new tab" Not tested with Admin on Steroids. Usable with disabled all option in this module and enabled sticky compact header in AdminOnSteroids. Not everything in every combination play well, but should be ease to set up these modules together. Before install change admin theme to Reno (works best with blue colors but is usable with Reno and classic) and this module will do the rest. The good idea is to change admin theme for guest as well to enjoy matching login screen. https://github.com/pmarki/Processwire-Admin-Dark-theme1 point
-
Wow! If only all my wishes came true that quickly! Both issues are fixed, thanks a lot!1 point
-
@adrian I'm not saying I can keep up with the pace of the module's development, but trying to... I skipped a few versions, but now I'm checking out the latest (2.7.2 - in sync with PW master, eh? ) and have two issues with the Template Resources panel: #1 issue: when file compiling is on, I get: #2 issue: I have the following list of Included Files: As you can see, files are listed more than once, a lot of them 8 times, but at least 3 times if I'm not mistaken. I use wireRenderFile() to render partials of the page but simple include_once is used too.1 point
-
its located in processpageedit module i also found that by coincidence some day... http://kongondo.github.io/ProcessWireAPIGen/devns/source-class-ProcessWire.ProcessPageEdit.html#93-1121 point
-
Yes, that's the hard part My vote goes also for the checkbox, though currently I'm fine with the auto-auto-clear.1 point
-
Interesting idea for sure. The thing is that I am not sure that I would always want it to auto-clear. There are times when I want to compare the results of one dump with another (perhaps after a code change), or even on a different page. It could be a configurable option though - on the module settings page, or maybe a checkbox on the panel so you can easily uncheck when needed. What do you think? I think the idea is great, just not sure how easy the implementation is. I can't find Ryan's notes about the module disable feature he added, but he only made it available when in advanced mode because he mentioned there can be some big side-effects in the case of some modules. I guess I could also limit to advanced mode and add the same caveat. Here is the text from the source code where the disable module checkbox is added (https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessModule/ProcessModule.module#L1280): "Be careful, checking this box can break the module or your site. Use for temporary testing only."1 point
-
Thanks for the replies. I've looked at the details and Repeater Matrix seems perfect for what I need. It's a shame it's part of the ProFields package but having discovered just how good PW is I don't mind throwing some money towards it. I'm really excited about how awesome this finished project is going to be now!1 point
-
This is exactly what I’m looking for. Plus, the ability to habe fix aspect ratios like 16:9, 4:3 oder 3:2 (in addition to fixed pixel sizes)1 point
-
The checkerboard pattern creates a sort of interference effect but your slightly colorized noise has no chance of doing that, so no wonder it is a lot better choice. Lesson learnt? Sometimes it is not the best thing to follow the crowd...1 point
-
Just throwing out an idea: maybe some JS via AdminCustomFiles that appends "&modal=1" to links in the pagetree depending on if window.location.href contains "&modal=1"? You'd have to find a way to re-init the script for each AJAX load in the pagetree though. Maybe you could to follow the same principle in PHP with a hook to the pagetree render and $_SERVER['REQUEST_URI'] ?? Not sure if that would work.1 point
-
I had this issue with FEEL though never fixed Perhaps you could hook it, or add a click eventlistener that intercepts the event. Unfortunately Pagelists already have click events and it's hard deal with it - maybe mousedown/mouseup could help somehow (I've used this in a module (AOS).1 point
-
Auto-clearing of the Dumps Recorder could be achieved on client-side on each page load: $(window).on('unload', function () { if ($('a[rel="tracy-debug-panel-DumpsRecorderPanel"]').length && window.Tracy && Tracy.Debug.panels['tracy-debug-panel-DumpsRecorderPanel']) { var BRPanel = Tracy.Debug.panels['tracy-debug-panel-DumpsRecorderPanel']; // init only if it's not initialized if (!$('#tracyDumpEntries').length) { BRPanel.init(); } if (window.clearDumps) { clearDumps(); } } }); Note that I haven't tested this thoroughly but I guess it's safe to use. Maybe there's also a more efficient/nicer way to do this. Edit: if you use 'beforeunload' event instead 'unload' then you can also see the panel clearing. Edit2: fixed the code above: init only if required1 point
-
1 point
-
I think you'll find Repeater Matrix provides the best UI for what you want to do. It gives you the flexibility of multiple page (block) types like PageTable but with the convenience of seeing all the block content together within Edit Page.1 point
-
I had limited occassions to try but regular Dumps were not showing up when the Dumps Recorder was active, so it seems to work fine here. Admin slowdowns due to many items in Dumps Recorder is still an issue but of course it's not Tracy's fault, but it's still better than seeing no dumps at all (when they disappear).1 point
-
v053 fixes the issue with label-less checkboxes not having field edit tooltips (thanks @ceberlin!)1 point
-
I just saw this: http://lifehacker.com/5896830/use-google-docs-to-monitor-your-websites-uptime Use Google Docs to Monitor Your Website's Uptime Have a website and want to know the minute your site is down? This simple Google Docs spreadsheet from Digital Inspiration can email you and monitor your website for free.1 point
-
Hidden is just that: hidden. So it shouldn't be visible in neither the nav as well as searches. If you need other semantics create your own checkboxes / logic.1 point
-
If you want to learn I'd highly suggest subscribing to laracasts. While the main focus is obviously laravel it does also have tons of general php videos from beginner to advanced levels. I've learned so much there – even from some of the laravel specific videos – even while never having run laravel once.1 point
-
Thanks, good spot. The label in this case is hidden so the tooltip won't be shown (though it's already there). I'll find a way to fix. @bernhard Ok, I'll see - I think the checkbox would be too much in this case.1 point
-
@tpr: finally found time to take a closer look at the language tabs issue. So far there appear to be two issues behind the scenes: VersionControl stores all language values in the form of "data[language-id]", but the field name for the default language is actually just "data". I'm pretty sure this used to work at one point, so perhaps it was a core change somewhere between 2.4 and 2.6 (have to setup a test site with earlier version to make sure). When built-in language tabs are enabled, CKEditor instances are not loaded before a specific tab is opened. This is a bit of a problem, since I can't set a value of a CKEditor instance unless it's already there. This requires a bit of testing, but I'll try to get these sorted out soon.1 point
-
Thanks @Juergen, this should be fixed in v052. There's a new feature to FileFieldTweaks (named FileFieldToolbar before v052) that allows downloading assets - images or files. To keep things simple I've used the "download" HTML5 attribute which doesn't work in IE, at least in IE11. I don't plan to fix this because the download link will open in a new window if it's unsupported so it's still usable.1 point
-
1 point
-
Q: What has the TESLA that PROCESSWIRE does not have: A: backdoors1 point
-
Thanks Ivan, I really appreciate it! You give me way too much credit and are too kind, but such a heartfelt message still leaves me speechless, so thank you again. I don't think I want any kind of luxury car! I'll be honest, while I was sad to give the car back, I was also glad to because it's just plain stressful. There's no problem if someone dents my car or something gets scratched, etc., but borrowing such a fancy car makes you always worried about where you park. If a bird poops on it you have to clean it right off, and so on and so forth. All these things I never worry about, but became apparent when I had to be responsible for such an object for 2 days. I imagine a lot of stress comes with owning something like that. I'm sure to many it's worth it, but still, glad I don't have to think about that kind of stuff every day. If I were to ever own a car like this, I'd buy it after it's already many years old, inexpensive, and has the battle scars to show it. \1 point
-
Hi, Does the page/template in question has the view permissions set for the guest user? Seems like the check for the right permission goes wrong. According to the debug code, if you are logged in as a super user, this check won't happen -- this would explain why it works if you're logged in. cheers Tom1 point
-
I managed to get the Embed plugin working by following the steps you outlined (adding all dependency plugins, manually adding toolbar button), and then also: Uncheck "Convert div tags to paragraph tags" Set "Use ACF?" to "No". I suppose you could keep ACF active but then you would have to add all the elements/attributes/classes that could potentially be inserted by the plugin into the "Extra Allowed Content" field. Looking at the Embed plugin source it only adds div[!data-oembed-url] as allowed content, but when you check the markup that is added for a YouTube embed (for example) you see a lot of other markup besides the div. There also something going on regarding allowed content in the Widget plugin but I found it difficult to decipher.1 point
-
You can do that, but not with ProCache, and it won't give you the big speed improvement of it. ProCache is so fast, because it's not even starting php, and neither processwire. What you are looking for is the $cache api: https://processwire.com/blog/posts/processwire-core-updates-2.5.28/#wirecache-upgrades1 point
-
1 point
-
As a simple example, let me show you the basic setup of a blog (simplified diagram of the blog profile I recommended above): It is a "UML like" diagram, where the yellow boxes are the templates, the blue ones are sample pages (they must be created in the Page Tree) based on the templates. Generally speaking whenever you can, you should set up parent/child relationships, because this is something ProcessWire handles well, out of the box. However, it is not possible to force all the required relationships into a tree, so we can also have "simple" one-to-one and one-to-many relationships via Attributes (Fields). A Field in ProcessWire has its associated "Input field type" (found under the Input tab of the field), which sets up the UI element used by the admin for the field. Quote: "Input field type: The type of field that will be used to select a page. Select one that is consistent with the single page vs. multi-page needs you chose in the "details" tab of this field..." Hope this helps. If not, I can mock up a similar diagram about your use case too. Answers to your questions: A1. Generally yes, but I recommend implementing something like you see above: parent/child for Books/Book, Categories/Category, Chapters/Chapter, etc.. and you can connect these via Attribute (Field) / InputField relationships. This is a much more flexible setup. A2. If I understand you correctly, you can do it if you use Attribute (Field) / InputField relationship, and by setting the field to "required". A3. Yes, a field. The simplest way to implement it is using the Options type: https://processwire.com/api/modules/select-options-fieldtype/ https://processwire.com/blog/posts/new-options-fieldtype-processwire-2.5.17/ Of course, you can also setup just another Field/InputField relationship, if you need more than a simple select. A4: Sure, it can: https://processwire.com/api/variables/ BTW, one more reading on the topic: https://medium.com/@clsource/understanding-processwire-templates-fields-and-pages-201aecd0a1a4#.gd0w6u9qw1 point
-
Which cache? Template cache you would go to the PageRender module settings and delete cache.1 point
-
A variant of the IF statement section from the above example that checks whether a Tweet is a retweet, and displays the appropriate author information. if ($i < $limit){ $text = convert_links($tweet['text']); $timestamp = date('F j g:i a', strtotime($tweet['created_at'])); echo '<li>'; if ($tweet['retweeted']){ $author = $tweet['retweeted_status']['user']['name']; // Other Person $handle = $tweet['retweeted_status']['user']['screen_name']; // @otherPerson $text = substr($text, 3); // Removes 'RT ' from the beginning of the Tweet } else { $author = $tweet['user']['name']; // You $handle = $tweet['user']['screen_name']; // @you } echo $author.' @'.$handle.'<br>'.$text.'<br>'.$timestamp.'</li>'; } Note that the above requires the following change to MarkupTwitterFeed.module (line 138) to work : 'trim_user' => false, // include user details, because user details are useful1 point
-
About handling the display of images from a twitter feed, I did this today by adding code inside MarkupTwitterFeed.module. I post it here in case it could help other pw users having the same needs. // To be added in public function renderItem, before: $out = $options['listItemOpen']; if (isset($item['entities']['media'])) { $mediaUrlField = wire('config')->https ? 'media_url_https' : 'media_url'; foreach($item['entities']['media'] as $m) { if($options['listItemPhoto']) { $photoHtml = str_replace(array('{src}', '{title}'), array(wire('sanitizer')->entities($m[$mediaUrlField]), wire('sanitizer')->entities($m['display_url'])), $options['listItemPhoto']); $text = preg_replace('!' . preg_quote($m['url'], '!') . '(\b|$)!i', $photoHtml, $text); } else { // Hide the media reference in the text $text = preg_replace('!' . preg_quote($m['url'], '!') . '(\b|$)!i', '', $text); } } } where $options['listItemPhoto'] contains the html for a Twitter photo. For example, if you simply want to display the image, you can set it to: $options['listItemPhoto'] = "<img src='{src}' title='{title}'>"; This will be rendered like in this screenshot:1 point