-
Posts
691 -
Joined
-
Last visited
-
Days Won
6
Everything posted by thetuningspoon
-
Thanks Adrian & Soma. I will definitely look into that. Wish I had known about it sooner! Edit: Hmmm, I feel kind of stupid for having to ask this, but... How do I enable the Codemagic plugin? Do I have to add a separate button to the toolbar, and does it go under "third party" or just the standard plugins? Edit 2: Alright, I figured it out through trial & error Add "codemagic" to the list of plugins (not third party) and then add "codemagic" to the toolbar.
-
Pagebreak or Multi-page on single entry
thetuningspoon replied to biotech's topic in Getting Started
I tried that too... -
Pagebreak or Multi-page on single entry
thetuningspoon replied to biotech's topic in Getting Started
Hi Ryan - You were right. Except the throw Wire404Exception() is giving me "Internal Server Error" instead of a 404 page. Is that correct? Here is my new code: <? $pageBreaks = explode('<p>#pagebreak#</p>', $page->body); $numPages = count($pageBreaks); $currentPage = $input->pageNum; if(array_key_exists($currentPage-1, $pageBreaks)) { $body = $pageBreaks[$currentPage-1]; } else { throw Wire404Exception(); } ?> -
Pagebreak or Multi-page on single entry
thetuningspoon replied to biotech's topic in Getting Started
Oh okay, I will have to take another look at that then. Thanks, Ryan. -
Better image management / better integration with WYSIWYG
thetuningspoon replied to mindplay.dk's topic in Wishlist & Roadmap
For the most part, I like the way that it works now. It's not really a "technical limitation," but a matter of flexibility. No matter how you do it, it's going to be a 2-step process of uploading and selecting the image, but the PW way bypasses having to build a separate folder structure while uploading your images and then having to hunt them down afterwards, while still retaining the flexibility of using images that appear on other pages if you want to. When you "add an image to the page" you literally are doing just that--adding an image to the page. Keeping the images separate from the individual WYSIWYG fields also allows you to reuse images more easily (in other WYSIWYGs or in your templates) and to see at a glance what images you have stored & available for use on that page. I think that it is actually more intuitive for people who are not familiar with CMSs at all. Plus the drag-and-drop functionality and auto-resize settings in the image containers bring a whole new level of usability to the CMS. I do agree that being able to drag and drop from the images field to the WYSIWYG would be an excellent feature, though. All of that being said, I recommend using individual custom image fields and outputting/resizing those images directly in the template with the API as much as possible. I have found that it is the most foolproof system for clients, and is where ProcessWire truly excels. Only use images inside the WYSIWYG for inline article images and never for images that are part of the site's layout. -
Just got around to trying this out. I'm probably going to switch over permanently just on account of the fact that it actually gives you formatted code in the source editor instead of compressing everything into one unreadable glob like TinyMCE does. (What's worse is the TinyMCE devs don't seem to be willing to acknowledge this as a problem). I did discover that I had to edit the config.js file and add the line below if I wanted CSS classes and other such things to show up in the source: CKEDITOR.editorConfig = function( config ) { CKEDITOR.config.allowedContent = true; }; Now it works great (except for the Anchor button!) Edit: I am also having problems getting the row number value to do anything.
-
NOTE: Here is an updated/more advanced version of the script I posted below. And here's one for updating the CKEditor, if you're using that instead of tinyMCE: <?php include('./index.php'); $fields = wire("fields")->find("name=body|intro|sidebar"); foreach($fields as $field) { $field->toolbar = " Format, Bold, Italic, -, RemoveFormat NumberedList, BulletedList, -, Blockquote PWLink, Unlink PWImage, Table, HorizontalRule, SpecialChar PasteText, PasteFromWord Scayt, -, Sourcedialog "; $field->inlineMode = "0"; $field->contentsCss = "/site/templates/styles/contents.css"; $field->stylesSet = ""; $field->extraPlugins = "pwimage,pwlink,sourcedialog"; $field->removePlugins = "image,link"; $field->save(); } ?> CKEditor is now updated.
-
Pagebreak or Multi-page on single entry
thetuningspoon replied to biotech's topic in Getting Started
Yes, the -1 I added solved that issue. Sorry, my wording was a bit unclear. I'm not sure I understand what you mean on the second point. If I understand the code correctly, the else condition sets the $body variable to the entire contents of the $page->body field in the event that no #pagebreak# exists, which is what I wanted. Maybe just doing $body = $page->body; would be better? It seems to be working fine. -
Thanks guys. I haven't received any more notifications for a while, so I guess I'll just keep my eye on it and see if the client reports anything.
-
Pagebreak or Multi-page on single entry
thetuningspoon replied to biotech's topic in Getting Started
Being able to add a custom tag in tinyMCE to create a pagebreak would be ideal for a project I'm working on. I tried out Ryan's code here, which works for splitting things up (although I discovered that I need to add a #pagebreak# at the beginning of the first page for it to work right or else it will start at page 2). The problem is when it comes time to add navigation, since the resulting array is not a WireArray and thus I can't use get("limit=1") on it and then call renderPager() on the result. I tried creating a new WireArray object from scratch and adding the contents of $pageBreaks to that, but it won't accept them as valid input. I feel like I'm probably barking up the wrong tree with this... EDIT: Ok, so it looks like I just need to build my own navigation from scratch. I can see why a repeater is probably the better way to go here. EDIT 2: I have it working now. The reason I had to add a #pagebreak# to the top of the page with the original code is that the page numbers start at 1 while the array was 0-based so there was a mismatch. If anyone else wants to do something similar, here's the final code from my template with my custom navigation: <? $pageBreaks = explode('<p>#pagebreak#</p>', $page->body); $numPages = count($pageBreaks); $currentPage = $input->pageNum; if(array_key_exists($currentPage-1, $pageBreaks)) { $body = $pageBreaks[$currentPage-1]; } else { throw new Wire404Exception(); } ?> <?= $body ?> <? if($numPages > 1) { ?> <div id="pagination-center-1"> <div id="pagination-center-2"> <ul id="pagination"> <li <? if($currentPage > 1) { echo 'class="previous"'; } else { echo 'class="previous-off"'; } ?>> <? if($currentPage > 1) { echo '<a href="page'. ($currentPage - 1) .'">« Previous</a>'; } else { echo '« Previous'; } ?> </li> <? for($i=1; $i <= $numPages; $i++) { ?> <li> <a href="page<?= $i ?>" <? if ($currentPage == $i) { echo 'class="active"'; } ?>><?= $i ?></a> </li> <? } ?> <li <? if($currentPage < $numPages) { echo 'class="next"'; } else { echo 'class="next-off"'; } ?>> <? if($currentPage < $numPages) { echo '<a href="page'. ($currentPage + 1) .'">Next »</a>'; } else { echo 'Next »'; } ?> </li> </ul> </div> </div> <? } ?> And for complete "plug-and-play", here's my CSS for the pagination: ul#pagination { list-style:none; position:relative; float:left; left:-50%; margin-top:10px; } #pagination li { display:block; float:left; border:0; font-size:11px; margin-right:2px; } #pagination a { border:solid 1px #9aafe5; margin-right:2px; display:block; float:left; } #pagination .previous-off, #pagination .next-off { border:solid 1px #DEDEDE; color:#888888; font-weight:bold; margin-right:2px; padding:3px 4px; } #pagination .next a, #pagination .previous a { font-weight:bold; } #pagination .active { background:#2e6ab1; color:#FFFFFF; font-weight:bold; padding:4px 6px; } #pagination a:link, #pagination a:visited { color:#0e509e; padding:3px 6px; text-decoration:none; } #pagination a:hover{ border:solid 1px #0e509e; } #pagination-center-1 { overflow:hidden; z-index:-1; height:45px; } #pagination-center-2 { position:relative; float:left; left:50%; } #pagination a.active { color:#FFFFFF; EDIT 3: I recently revisited this on one of my new ProcessWire sites where I was using the built in PW pagination as well as this custom TinyMCE pagination system, and I wanted to get the pagination to look exactly like the standard PW pagination instead of what I posted above, which is a bit different. If you want it to use the exact same look & CSS classes as ProcessWire, here is the code: <? if($numPages > 1) { ?> <ul class="MarkupPagerNav"> <? if($currentPage > 1) { ?> <li class="MarkupPagerNavPrevious"> <a href="page<?= $currentPage - 1 ?>">Prev</a> </li> <? } ?> <? for($i=1; $i <= $numPages; $i++) { ?> <li <? if ($currentPage == $i) { echo 'class="MarkupPagerNavOn"'; } ?>><a href="page<?= $i ?>"><?= $i ?></a></li> <? } ?> <? if($currentPage < $numPages) { ?> <li class="MarkupPagerNavNext"> <a href="page<?= $currentPage + 1 ?>">Next</a> </li> <? } ?> </ul> <? } ?> And the default PW pagination CSS by Ryan: .MarkupPagerNav { margin: 1em 0; font-family: Arial, sans-serif; float: right; } .MarkupPagerNav li { float: left; list-style: none; margin: 0; } .MarkupPagerNav li a, .MarkupPagerNav li.MarkupPagerNavSeparator { display: block; float: left; padding: 2px 9px; color: #fff; background: #2f4248; margin-left: 3px; font-size: 10px; font-weight: bold; text-transform: uppercase; } .MarkupPagerNav li.MarkupPagerNavOn a, .MarkupPagerNav li a:hover { color: #fff; background: #db1174; text-decoration: none; } .MarkupPagerNav li.MarkupPagerNavSeparator { display: inline; color: #777; background: #d2e4ea; padding-left: 3px; padding-right: 3px; } -
Great, thanks for the low-down!
-
I have email error notifications turned on for one of my recent ProcessWire sites and have been receiving the following error alert: Error: Call to a member function height() on a non-object (line 292 of /home/teachct/public_html/wire/modules/Process/ProcessPageEditImageSelect/ProcessPageEditImageSelect.module) I'm not sure exactly where this is happening because the client has not reported any visible issue. However, I'm wondering whether this might be a familiar error to anyone (or something that might make sense to Ryan ) Thanks!
-
Looking at the website for Sketch, the feature set looks fantastic--Fireworks taken to the next level. Will definitely take a look at this one. EDIT: Based on 20min of playing around with Sketch, I think I'm already sold. Very simple but very feature-rich interface with all the important stuff out front, good integration with CSS, multiple page capability, and the vector capabilities are much better than Fireworks. It seems to do for design what MacRabbit Espresso does for web coding. Antetype looks nice, but not as intuitive as Sketch and much more aimed at prototyping interfaces rather than styling them. Seems like it would be harder to achieve those "happy accident" kind of moments that you can get working in Fireworks or Photoshop. It's more like working in the browser, which for me is very restrictive and inefficient.
-
This is great! I'm happy to see this functionality being developed in ProcessWire. I'm not sure how much I would use it, but I'm sure some clients would find it a useful and friendly alternative to using the backend. I haven't tried either yet, but how is this similar to/different from the Fredi module?
-
Thanks for the recommendations, I will be trying each of them out. That Tribaloid site is pretty sweet-- I'll definitely keep my eye on that. I don't have a Creative Cloud subscription. I just use Fireworks CS5. So I don't have to worry about losing it, but it's good to see what else is out there. Fireworks is also the only Adobe product I use. For complex vectors, logos, icons, and print I use (and prefer) Inkscape, and for photo editing I use GIMP. But Fireworks has always been what I use to bring it all together for the web. It's an awesome font!
-
This is VERY disappointing, although I saw it coming. I use Fireworks and will continue to use the current version until it becomes unusable or something better comes along. As far as I can see, Fireworks is still the best app out there for my web design workflow.
-
Thanks for the suggestion Ryan. For my purpose, manual sort with new pages added to the top would really be the first best solution. We can get around it for now, but it would definitely be a useful feature to have at some point
-
Love your idea, Soma. I created a php file in the root of my site called tinymce.php which I can edit and then simply load in the browser www.mysite.com/tinymce.php to send all of the changes to all my tinyMCE fields. Here's my code for anyone who might be confused by this: <?php include('./index.php'); $fields = wire("fields")->find("name=body|sidebar|introduction|affiliates"); foreach($fields as $field) { $field->theme_advanced_buttons1 = "formatselect,|,styleselect,styleprops,|,fontsizeselect,forecolor,|,bold,italic,underline,strikethrough,|,hr,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,indent,outdent,nonbreaking"; $field->theme_advanced_buttons2 = "undo,redo,|,tablecontrols,|,pastetext,|,link,unlink,anchor,|,image,|,replace,|,removeformat,|,code,|,fullscreen"; $field->theme_advanced_buttons3 = ""; $field->theme_advanced_blockformats = "p,h2,h3,h4"; $field->plugins = "inlinepopups,safari,media,paste,fullscreen,table,nonbreaking,searchreplace,style"; $field->valid_elements = "*[*]"; $field->content_css = "/site/templates/styles/content.css"; $field->custom = "theme_advanced_styles:Test Style=test paste_text_sticky:true"; $field->thirdparty = ""; $field->save(); } The name=body|sidebar|introduction|affiliates line selects all of my tinymce fields by name (Soma's example assumed that your tinymce fields all had tinymce_ prefixes on them, which mine do not, so I am just listing all of them out instead). It then loops through each matching field and updates each setting. Pretty cool!
-
Whoops, I totally missed the last post date there! Sorry about that. Good to see that it's on the list. I'll just have to tell the client to hang in there and do the gatekeeping offline until then.
-
This is an issue I'm running into as well. How do I move an article from the bottom of the list to the top when the list gets to be really large? I'm working with a list of news articles, and by default my client wants to have the new articles show up at the top of the outputted list, but to be able to manually reorder if necessary. Is this possible? I'm concerned that they're not going to be too happy about having to do another step each time they create a new article.
-
I currently have a client who is going to have multiple editors on the website and wants the ability to preview all edits before they go live, so I'm really seeing where a more advanced draft feature would come in handy. Since they wouldn't want articles to be removed from the site while being edited, the published/unpublished system doesn't do much for them. Is this something on the radar? Aside from that, a simple preview button would also be handy. There is the module that does a good job of this, but last I tried it was causing bugs with the image uploader in 2.3. I think it would be really ideal to have this as a part of the core functionality, too.
-
New ProcessWire site with Shopping Cart
thetuningspoon replied to thetuningspoon's topic in Showcase
Thank you Ryan & Apeisa. You guys are the best Couldn't have done it without you! -
Slick. I like how you did the contact form so that it shows up at the top of the page instead of bringing you to an entirely different page.
-
We just launched a new e-commerce website built off of ProcessWire. We worked off of Apeisa's shopping cart module as a base and were able to get the system integrated with Authorize.net's DPM for payments. We had a to do a lot of custom programming for this client as they needed sales tax, promo codes, and different shipping rates for different zip codes. I was delighted throughout the whole process with how much I was able to tailor the editing experience for the client as well as the visitor's experience on the page. The client had several last minute requirements which we would never have been able to implement in the time we had if we were using a different CMS and didn't have PW's API and custom field system. I would like at some point to release some of the new shopping cart code (shipping rates by zip code, sales tax, promo codes) to the rest of the community, but as it stands it's not modularized/generic enough and the code is in too many different pieces to make it practical. If I have time outside of work I will try to see if I can make it more distributable so that I can give back something to PW Special thanks to Apeisa for his input when we were getting started with this. http://www.harkenslandscapesupply.com/
-
Ahh, that must be it. Aw, that's a shame... I'd like to be able to use it Sorry for the scare, apeisa