Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/27/2015 in all areas

  1. Hi everyone, Here's a quick little module that I hope you'll find useful. NB It requires PW 2.5.16 (or late 2.5.15 - this is the exact commit) It allows you can control display of the various Page Edit tabs by user permissions. So if you want to always hide the Settings tab for users of a particular role across all templates, this should come in handy. http://modules.processwire.com/modules/restrict-tab-view/ https://github.com/adrianbj/RestrictTabView You can approach this from two directions - hide from all users unless they have View permission, or show to all users unless they have Hide permission. It's up to you to create the permissions and assign them to roles. Let me know if you have any problems or suggestions for improvements. BTW - I am not sure how much use the Delete and View options really are in most situations, but they are there if you want them. PS Thanks to @LostKobrakai for the code in this post: https://processwire.com/talk/topic/8836-how-to-manage-delete-tab-for-user-groups/?p=85340.
    12 points
  2. wireshell 1.0.0 is out See Bea's post -------- Original post ----------- Now this one could be a rather long post about only an experimental niche tool, but maybe a helpful one for some, so stay with me Intention Do you guys know "Artisan" (Laravel) or "Drush" (Drupal)? If not: These are command line companions for said systems, and very useful for running certain (e.g. maintenance, installation) task quickly - without having to use the Admin Interface, first and foremost when dealing with local ProcessWire installations. And since it has a powerful API and an easy way of being bootstrapped into CLIs like this, I think such a tool has a certain potential in the PW universe. It's totally not the first approach of this kind. But: this one should be easily extendable - and is based on PHP (specifically: the Console component of the Symfony Framework). Every command is tidily wrapped in its own class, dependencies are clearly visible, and so on. ( Here was the outdated documentation. Please visit wireshell.pw for the current one )
    12 points
  3. Hi guys. This is my first project with PW, my personal site and portfolio. Check it out: http://www.heldercervantes.com This is an almost clean PW installation, with only the file type repeater module for all my repeating needs Had an awesome time with PW and will definitely explore it further on future projects.
    8 points
  4. Not really such a big deal, but.. this made me smile. Perhaps Ryan could implement couple of vulnerabilities somewhere, so that we can get some CVEs of our own?
    8 points
  5. I am currently managing a PW site with 2 million+ pages. It's admirably fast, and much, much faster than any other CMS we tested. Searching is also ridiculously fast when done on single fields like title. (I also just did a test search using the page finder and it took < 4 seconds to find pages which had a particular field empty from a template which has 1.63 million pages.) The site doesn't deal with many image or file uploads (yet), but two optimizations I have applied so far are to 1) always, always use limits on using $pages->find(), and 2)to cache the sitemaps (which contain thousands of links each) using Procache(https://processwire.com/api/modules/procache/) Once you know where specifically your site is using the most resources, you can apply more selective caching / database optimizations. Thanks for starting this topic, I learned about pageFileExtendedPaths... there's always some cool feature I didn't know about and now must have!
    6 points
  6. Thanks for the remarks. I have to say that working with ProcessWire was nothing short of spectacular. I'm mainly a frontend guy, and the API's simplicity is just perfect for me. Got the site running using only php echos and foreach statements, literally coding it amidst conversations with friends and half looking at my screen. So simple and logic. Plus the barebones + modules approach to the CMS ensures a super clean and streamlined product. No posts module that you don't need, no unnecessary fields, just zero clutter.
    6 points
  7. your options for a slider are several.. here are two common options: 1.) Repeater - the repeater is a type of field that can repeat the same content pattern over and over on a page. You can specify which fields to use in the repeater. repeaters are really pages, that are just hidden from the normal page tree. I was just working on a site where their homepage slider is done with a repeater. You don't hear much about them now that there is Page Tables, tables, and profields multiplier; however repeaters are still an indispensible part of the the PW toolkit and when used for the right purpose are great. 2.) Pages, and PageTable You can setup a hidden branch of the page tree (e.g. settings) and below that store various things, one of which could be sliders; so you would have something like: /settings/slider/slide1 /settings/slider/slide2 the template for slider could be called 'slide-folder', or 'slide-index' and then template would be 'slide'. your slide template would have whatever fields you need. the slides themselves will be added by the pagetable field Next you would setup a pageTable field called slides and you would specify that the new slides are added to that /settings/slider/ branch.
    6 points
  8. So, when looking to all that pro sites that were published here the last time, I first thought better not to post this site. But second thought was: "Oh what the heck, they can not all be professionals here." So here it is, a small site for a little but very fine Italian Restaurant driven by a nice family. They wanted to have something like a webcard that holds their address, telephone number and opening times plus some impressions. http://bella-italia-aachen.de/ The site is build using pocketgrid css framework, less, flexslider.js, superbgimage.js and these modules: Spex & AIOM and CroppableImage & Pia.
    5 points
  9. Hi PaulAik, welcome to the forums! You're assumptions are in general correct, but: Actually, I would say this is 'the ProcessWire way'. In PW everything is a page, so, what you call "fake pages" are simply pages that are not shown in the frontend and are used mainly as data holders. Read this fun text by Joss about this subject https://processwire.com/talk/topic/2296-confused-by-pages/ You can also use repeaters, page table (core module) or even the image extra and image extra multilanguage fields. Not yet, but there is a module and drafts are in the roadmap. ProcessWire doesn't impose almost anything to you, you can use whatever strategy you prefer. MVC was already discussed a lot, have a look at these edit: dang Macrura!
    5 points
  10. Two days after announcing these two, we finished a third one. http://pingpong.pt/ Pingpong is the communication company of Ana and Pedro. Ana is my sister This is a simple one page site, responsive of course. The corporate image was also done by us and the images are old photos in the public domain.
    4 points
  11. Thank you! I want to encourage you to keep on going with those super usefull modules you always come up with. I do not vote for your modules every time I download them just to keep my ip from being banned.
    3 points
  12. Everything they ^^^ said, plus I love the little 'go back upstairs' animation.
    3 points
  13. Glad you like it mr-fan! I've merged your pull request into the module.
    3 points
  14. Update: version 0.0.7 Merged changes from last version in dev to master MenuBuilder now fully speaks your language, thanks to this post by @bbeer. Added multilingual capabilities and options to both the process and markup modules. In relation to above, added option 'default_title' to MarkupMenuBuilder. This option allows you to control whether to display MB saved menu item titles/labels in your navigation versus the actual/current titles of the pages listed in the navigation. The default => 0 means display the saved values (e.g. useful when you've altered the labels/titles). However, in some cases, e.g. in multilingual environments, you may want your navigation labels to change depending on the chosen/user language. In such a case, users will be presented with labels that match their language (assuming of course your pages have titles for different languages). To use the option specify 'default_title' => 1. Works for both menus and breadcrumbs Any issues, please let me know, thanks. IMPORTANT I forgot to add that currently, for multilingual sites, you can only pass an array | id | page to render() and renderBreadcrumbs() but NOT a not a menu page name | title (will throw an error for superusers and display nothing for all others). This is because there is no way MarkupMenuBuilder can know whether the string you are passing to it is the name of the menu page in English, Dutch or Arabic, etc. It cannot fall back on the current user language as well since the front-end of your site can be surfed in several languages. Neither can it fall back on the default language since a menu could have been created in a different language from the default. Hence, the only foolproof way to get and render menus in such environments is by array of menu items or menu id or menu page. Unless somebody shows me a workaround, its going to stay this way. I hope this is not too much of an inconvenience to ML devs
    3 points
  15. We needed to make a small site for World Book Day in my office and had officially no budget for it, so it sounded like a good pretext to try Processwire for the first time. So it took last year static site, hammered on some new colors and images and then processwired it. Here it is: http://dgp.conaculta.gob.mx/dml2015/ There are some things to fix in the frontend, and surely is nothing to be noteworthy as a site, but it will serve it's purpose. I was kind of surprised by the fact that the frontend is still taking way more time to do everything right than the backend. I had to learn a lot more php than I ever thought I would in my life, and my spaghetti code might be unreadable, but I managed to program and add all the dynamic content in about a day (and since receive changes almost daily, it's a blessing that we have a clear interface to edit it). The most impressive thing for me was that if I tried to do something, it usually worked. Since it's my first try, that was something I never expected. Also, you need to publicize and document the Page field a lot better. It is incredibly powerful. I know I'm only scraping the surface with this site, but my guess is that this feature is what made making content dynamic in this such an easy feat. However, I learned some things the hard way: * Never use a title field inside a find selector. If it has quotation marks or other special character it will fail completely. * You can't use the datetime filed to only write time --even if it seems you could--. This drove me crazy for a while, but then I discovered that about two weeks ago some kind soul created a module for a time field. Many blessing for that perfect timing. * Some places you can chain selectors, some places you cannot. I have no idea why. I mean, I know its php related, but I guess I need to dive in a lot deeper to get it. * Some things are case sensitive and some are not. Some things you have to always write in lower case. I'm still trying to get the hang of it. * Migrating to production it's a pain. You get a lot of unexpected errors, which thankfully the forums helped me solve. And two questions: * In order to restrict the kind of template the children of a page could use, I ended up creating another template who's only reason to exist was said restriction. Is there an easier way to do this? * I'm having some weird login problems. A user can't login or get's logged out after some minutes. How can I troubleshoot this?
    2 points
  16. Hi Guys, done a small kindergarten project that works with care on kids only in the wood and outdoor. http://waldkindergarten-altfraunhofen.de/ It's my second project with PW and learning so much on every project i'm getting better and better with API, modules, using more special tools.... like on this one first time: AIOM->greatTool MarkupWeather->worksGreat PageProtector + PageRenameOptions for the building time and AllTimeLovers: AdminCustomPages ChangeImageSelect MarkupSimpleNavigation PageListBetterLabels TemplateDecorator VersionControl MarkupSitemapXML ModulesManager CropImage Changelog ListerPro The project is a small budget so i'm relying on a individual changed themeforrest template - no own design this time. With this one i've made my first experience with URL Segments and i love it like everything else in PW! Worked out a little "archive" script with 80 line of Code and some URL Segments for the /archiv/ as SEG1 and cat or year as SEG2 should work great. Using the PagerMarkup with Somas Code for SEO friendly links - Thanks for this one. At least thank you all and especially Ryan for making such little happy things possible!
    2 points
  17. Please publish this new module. Thanks and here's another useful tool you have developed.
    2 points
  18. Great website, and loved the sexy tables plugin. nice to see another tuga here
    2 points
  19. Another possible solution on the slider front is ImageExtra http://www.kf-interactive.com/blog/adding-custom-fields-for-images-in-processwire/ It is very powerful and capable of much more than sliders, but will easily allow you to specify a link to internal page / external URL, an extra caption field, and anything else you might need.
    2 points
  20. The bug is fixed with the latest commits, please upgrade the module. Thanks again for finding and posting this here
    2 points
  21. 2 points
  22. Just forgot - i'll always wanna share the interesting parts to this forum so may others can learn something or i can improve something... i use in my template the delegate approach with a _init.php and a _main.php for the whole HTML Part....but i've read from Horst about a great and simple solution to split up easy HTML parts for special contents and templates...with this simple lines of code: _init.php $myLayout = "default"; //default layout _main.php <?php include_once("./layouts/_{$myLayout}.php");?> So i could use twocol layout if needed mabe if i've subpages: // If the page has children, then render navigation to them under the body. // and get the sidebar $level = count($page->parents); if ($page->template != "start") { if($page->hasChildren || $page->siblings && $level == 2) { $myLayout = "twocol"; $sidebar = "<p>".$page->meta_description."</p>"; } } or get some more logic together with URL Segments on the mentioned archive page: <?php // aktiv-root.php template file // overview - all activities from the kids //I've /aktuelles/archiv/2014/ or /aktuelles/archiv/kochen/ //segment1 = archiv ->show the archiv //segment2 = jahr ->show the posts from choosen year //segment2 = kochen ->show the posts from choosen cat //get all segments for choosing the output/layout! $seg1 = $sanitizer->pageName($input->urlSegment1); $seg2 = $sanitizer->pageName($input->urlSegment2); $seg3 = $sanitizer->pageName($input->urlSegment3); //get the rootpage of the posts $aktivroot = $pages->get(1063); //Load normal akitv_root Layout with isotope view of the last 12 entries! if (!$seg1) { $myLayout = "aktiv_root"; $headinfo .= "<h5><a href='{$aktivroot->url}archiv/#start' alt='Archiv'>Alle Einträge im Archiv</a></h5>"; } //check if we are in /archiv/ first! if ($seg1 && $seg1 != 'archiv') { // unknown URL segment, send a 404 throw new Wire404Exception(); } //check for the third urlsegment not needed if ($seg3) { // unknown URL segment, send a 404 throw new Wire404Exception(); } //get startet to separate the posts in years and categories if($seg1 == 'archiv') { //Load categorie akitv_archiv Layout show all or divided by category or year!! $pageNum = $input->get->page ? $input->get->page - 1 : 0; $limit = 5; $start = $pageNum * $limit; $posts = $pages->find("template=aktiv,start=$start,limit=$limit,sort=aktiv_date"); $myLayout = "aktiv_archiv"; $headinfo .= "<h2>Alle Einträge im Archiv</h2>"; if ($seg2){ if(preg_match('/^(\d{4})$/', $seg2, $matches)) { //Load year View if $seg2 wrong 404 // A URL segment matched in the format of year-month, i.e. /news/2010-12 $year = $matches[1]; $startYear = strtotime("$year-01-01"); $endYear = strtotime("$year-12-01"); $now = time(); //Load dates aktiv_archiv Layput show all posts for a selected year $posts = $aktivroot->children("aktiv_date>=$startYear, aktiv_date<$endYear"); $headinfo = ""; $headinfo .= "<h2>Alles aus dem Jahr ". $seg2 ."</h2>"; if ($posts == ""){ // not valid category, send a 404 throw new Wire404Exception(); } } else { //Load cat View if $seg2 wrong 404 //get all categories $cat = $pages->get(1077)->children("include=all"); //search for the given urlsegment3 as the category $catsearch = $pages->get("/site/aktivitaeten-typen/{$seg2}/"); $found = $cat->filter("id={$catsearch->id}"); if ($found == ""){ // not valid category, send a 404 throw new Wire404Exception(); } // valid category, list items in it // Load categorie akitv_archiv Layout with listing of all entries of one category $posts = $pages->find("template=aktiv,limit=2,aktivcat={$found},sort=aktiv_date"); $headinfo = ""; if (count($posts)) { $headinfo .= "<h2>Alles zum Thema ". $catsearch->title ."</h2>"; } else { $headinfo .= "<h2>Leider keine Artikel zum Thema ". $catsearch->title ." vorhanden!</h2>"; } } //end cat or year view = seg2 } //end /archiv/ = seg1 } //end output (may someone find some mistakes i'm not a PHP proffesional - and always open for refactoring.... ) Best regards mr-fan
    2 points
  23. Just a simple contact form including spam protection. Optional support for Twig (TemplateTwigReplace) as template engine. --- Please have a look at the readme on github! If you upgrade from version 0.0.9 and below, there are some extra steps to be taken. The Guides Installation Module Settings Spam Protection Usage Logging Upgrade Notes
    1 point
  24. I found (after 2-3 Projects using PW) that it's a good technique to use templates in a way I think hasn't been thought of yet really by some. (Although the CMS we use at work for year, works this way.) I'm sure I'm maybe wrong and someone else is already doing something similar. But I wanted to share this for everybody, just to show alternative way of using the brillant system that PW is. Delegate Template approach I tend to do a setup like this: - I create a main.php with the main html markup, no includes. So the whole html structure is there. - I then create page templates in PW without a file associated. I just name them let's say: basic-page, blog-entry, news-entry... but there's no basic-page.php actually. - Then after creating the template I make it use the "main" as alternative under "Advanced" settings tab. So it's using the main.php as the template file. - This allows to use all templates having the same php master template "main.php" - Then I create a folder and call it something like "/site/templates/view/", in which I create the inc files for the different template types. So there would be a basic-page.inc, blog-entry.inc ... - Then in the main.php template file I use following code to delegate what .inc should be included depending on the name of the template the page requested has. Using the TemplateFile functions you can use the render method, and assign variables to give to the inc explicitly, or you could also use just regular php include() technic. <?php /* * template views depending on template name * using TemplateFile method of PW */ // delegate render view template file // all page templates use "main.php" as alternative template file if( $page->template ) { $t = new TemplateFile($config->paths->templates . "view/{$page->template}.inc"); //$t->set("arr1", $somevar); echo $t->render(); } <?php /* * template views depending on template name * using regular php include */ if( $page->template ) { include($config->paths->templates . "view/{$page->template}.inc"); } I chosen this approach mainly because I hate splitting up the "main" template with head.inc and foot.inc etc. although I was also using this quite a lot, I like the delegate approach better. Having only one main.php which contains the complete html structure makes it easier for me to see/control whats going on. Hope this will be useful to someone. Cheers
    1 point
  25. Nice find @Teppo. Big smile on my face here....
    1 point
  26. You've read my mind Adrian, wanted to do the same for a long time...
    1 point
  27. I just created a module that might be useful to those interested in this topic: https://processwire.com/talk/topic/9496-restrict-tab-view/
    1 point
  28. Love the idea of the intro phrase doubling as a menu. Nice work
    1 point
  29. Pagefields are one way connections, so there's no way for "get me all areas which are at least in one pagefield", but there is "get me all pages of those pagetables". $artists = $pages->find("template=artist"); $used_areas = new PageArray(); foreach($artists as $artist){ $used_areas->import($artist->areas); //areas is the pageTable; } $used_areas = $used_areas->unique(); // Remove duplicates Edit: or this: foreach($pages->find("template=area_page") as $a) { if($pages->get("template=artist, areas=$a")->id){ // Found a page with this area so it's used } }
    1 point
  30. Just as I'm in the means to build a separate directory for bugfixes, where I just paste in disposable processwire installations. Really great. Will certainly take a look at it later. I can also see this very useful for setting up base installations in a more flexible way than siteprofiles.
    1 point
  31. @lostkobrakai There's in config.php for that problem. $config->pagefileExtendedPaths = true; Apart from that there's no limit in PW, going for millions may require special and different strategy depending on what it is built for. After millions of pages a fulltext search on large text's can grow linear quickly to several seconds. One also just have to take care about what code you build and it's easy to run into timeout or memory limit if you don't be careful. Also it depends if there's a lot going on like lots of user that post something. PW handles that all well but depends also on what server.
    1 point
  32. There are people using that much pages (https://processwire.com/talk/topic/9336-need-help-deleting-an-empty-field-from-a-template-with-2-million-pages/?hl=%2Bmillion+%2Bfield) and the only thing that does not automatically scale for that much pages are files/images. I can't recall where I've read about it, but basicly it's a filesystem limitation, which lets folders only have a certain amount of subfolders/items. ProcessWire needs to be set to use multiple site/assets/files/ folders to prevent a "overflow" of the standart single folder.
    1 point
  33. Is it always the same JS snippet or just 2-3 variants?? In this case you could easy use Hanna Code for this like [[myjs]] in the wysiwyg.
    1 point
  34. You can see from the design that it is build by you. I love the consistency of your 'personal' style.
    1 point
  35. Hi guys! So, we launched two more websites and more will follow soon. http://mlausen.com/ Multi language and responsive site for a German architect/photographer based in Switzerland. This site is for showcasing her (exclusively b/w) photography and writings. Maike is very happy with PW, and said that she had fun while updating the content. -- http://demenzinitiative-karlsruhe.de/ Very simple and simple to use (by concept) website for a dementia support initiative in Germany. This website has three different layouts depending on the screen size, so make sure you resize the window, and zoom out if you don't have a large screen. The illustrations are by us -- Both corporate identities were also created by us.
    1 point
  36. So awesome to see great talent joining ProcessWire! Well done, and welcome aboard
    1 point
  37. shouldn't be that hard; i've done some similar things with complex displays really similar to that. this is untested and assumes a lot, not knowing the names of fields etc.. <? function listMovies() { // get all of the movies $movies = wire("pages")->find("template=repeater_movie_times") $dates = array(); $out =""; // find the array of dates for all movies foreach ($movies as $movie) { $dates[]= date("U", $movie->getUnformatted("date")); } $dates = array_unique($dates); asort($dates); // for testing // print_r($dates); // print_r($movies); foreach($dates as $key => $date) { $dateDisplay = date("l, F jS", $date); // l = A full textual representation of the day of the week // F = A full textual representation of a month, such as January or March // j = Day of the month without leading zeros // S = st, nd, rd, th // Output the date $out .="<h2>{$dateDisplay}</h2>"; // find the array of movies this day and put into new array $date_movies $date_movies = $movies->find("date=$date"); // print_r($date_movies); // loop through the movies for this day and add the times to the array $times = array(); foreach ($date_movies as $date_movie) { $times[]= $date_movie->start_time; } $times = array_unique($times); asort($times); // print_r($times); // loop through the times and find movies for the time foreach($times as $key => $time) { // Output the time $out .="<h3>{$time}</h3>"; // filter only the movies for this time, from the $date_movies array. $time_movies = $date_movies->find("start_time=$time"); // print_r($time_movies); echo '<ul>'; foreach($time_movies as $m) { $movie = $m->getForPage(); $out .="<li>{$movie->title}</li>"; } // end foreach movies echo '</ul>'; } // end foreach times } // end foreach dates return $out; } ?>
    1 point
  38. Fantastic, as usual! Overall feel of the site is great, with the old images and choice of font particularly.
    1 point
  39. WOW! Would you like to also submit it to the sites directory?
    1 point
  40. Yep. WireArray::import() des check if the value is already in the array, if so, it does not import it again. In your case, I guess the PageImage::toString() method returns the same filename, so ProcessWire assumes that it's the same image, although it's from a different page. What you could do is to add them to a normal PHP array and then use WireArray::setArray() to pass them (not tested): $productImages = new WireArray(); $temp = array(); foreach ($page->childern as $p) { $temp = array_merge($temp, $p->product_images->getArray()); } $productImages->setArray($temp); Cheers
    1 point
  41. You may need to look at and possibly increase the max_allowed_packet variable in MySQL.
    1 point
  42. That's the way I handle this stuff. It's quite easy with the API to loop through all the fields ($fields->find(type=Image|File)) and set the noLang to true. Don't forget to save(). I'm on mobile so no code example, but let me know if you want an actual example.
    1 point
  43. for CKE you will need some CKEEditor addon like this one: http://ckeditor.com/addon/flash be shure about the right settings have a read in this thread: https://processwire.com/talk/topic/7854-iframes-are-being-stripped-from-ckeditor-field-even-when-explicitly-allowed/#entry76826 OR have a look at this textformatter: http://modules.processwire.com/modules/textformatter-video-embed/ OR other way could be to work with HTML hannacode. https://processwire.com/talk/topic/3745-hanna-code/ best regards mr-fan
    1 point
  44. Just to sort up the things you've mixed... Frontend Look == Your Choice and your CSS under /site/templates Backend Look / CSS Classes in CKE / Float right, left and so on.... == just Backend styling not related to the Frontend until you setup up all that stuff... Let's go How to: 1. Frontend first - How your CSS get the HTML from the Wysiwyg? 2. Frontend CSS - What classes you use for your template image left, right and so on 3. What is CKE changing in the Source if you click on "Image left" -> take a look for that Output with the source button in CKE after changing something with the Style things 3. CKE modification to get the look like in the frontend -> 2 files are to setup/create/put the path in the field settings! --> mystyles.js (may you create one in /site/templates/scripts) --> contents.css (may you create one in /site/templstes/styles) What? What do this files...ok this two files do two things... 4. mystyles.js This could be set in your CKE Field to the path of your choice and "override" the items in the "styles" menu!! Really cool stuff to setup here. Example from real Life (the labels in german but i think you get the idea how to use it...): CKEDITOR.stylesSet.add( 'mystyles', [ //images { name : 'Bild links mit Vorschau' , element : 'img', attributes : { 'class' : 'thumbnail align_left vorschau' } }, { name : 'Bild rechts mit Vorschau' , element : 'img', attributes : { 'class' : 'thumbnail align_right vorschau' } }, //lists //{ name : 'Liste mit Pfeil' , element : 'ul', attributes : { 'class' : 'pfeil' } }, //{ name : 'Liste mit Check' , element : 'ul', attributes : { 'class' : 'check' } }, //headings { name : '3 Alt. Schrift' , element : 'h3', attributes : { 'class' : 'extrafont' } }, { name : '4 Alt. Schrift' , element : 'h4', attributes : { 'class' : 'extrafont' } }, //tables { name : 'Tabelle normal' , element : 'table', attributes : { 'class' : 'pure-table' } }, { name : 'Tabelle mit Rahmen' , element : 'table', attributes : { 'class' : 'pure-table pure-table-bordered' } }, { name : 'Tabelle nur Zeilentrennung' , element : 'table', attributes : { 'class' : 'pure-table pure-table-horizontal' } }, /* Object Styles */ // This styles are only available when you select the defined objects. E.g. when selecting an image // you can control here with the styles dropdown the styling. // Here you can define Divbox classes as well these are shown on "Create div Container" { name : 'Gruene Box', element : 'div', attributes : { 'class' : 'alert alert-success', } }, { name : 'Gelbe Box', element : 'div', attributes : { 'class' : 'alert alert-warning', } }, { name : 'Rote Box', element : 'div', attributes : { 'class' : 'alert alert-danger', } } ]); 5. contents.css The contents.css override the CSS of the content of the CKE field in the backend so this is the thing where you tell the CKE how to look like your frontendcontent...for example also the background image fo the frontend could shown up in the backend... Example: /** * General editor styles (regular mode only) * * See contents-inline.css for inline styles. * */ /* Template CSS ONLY */ @import url("bootstrap.css"); @import url("font.css"); @import url("style.css"); /* WORKSPACE EDITOR SETUP */ body { padding: 10px; } /* CORRECT THE ORIGINAL STYLESHEET */ Oh this was the easy part just import your stylesheets in there and correct some wired things like add some padding in the CKE only to get some whitespace for the editor... Some more Links on this topic: https://processwire.com/talk/topic/8342-adding-css-classes-to-ckeditor/ http://docs.ckeditor.com/#!/guide/dev_styles http://www.flamingruby.com/blog/processwire-weekly-13/#1-1 regards mr-fan
    1 point
  45. Very nice.. just tryed it out and works perfectly. I had a little trouble with ajax but sorted out in the end. My fault for copy and pasting from the instructions but this code below needs to be changed: if ($('.js-simplecontactform').length) { $.simplecontactform($('.js-simplecontactform')); } to if ($('.js-simple_contact_form').length) { $.simplecontactform($('.js-simple_contact_form')); } just a matter of class name if using the default class of the form in simple_contact_form.php
    1 point
  46. Hi Apeisa, Can't remember if I mentioned this before... Adminbar has a bug now in PW 2.5. If you're editing a page in the admin in a modal window (i.e. a PageTable field or ListerPro set to use modal), when the page is saved the user is redirected to the front end of the page they just edited rather than back to the admin screen.
    1 point
×
×
  • Create New...