Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/17/2016 in all areas

  1. I do, as processwire doesn't have this functionality out of the box. I need a way to review reported links or pages in the admin panel, when someone clicks to report a link, a new report is created for me to review. I have to review these links or pages in the admin panel. The only way for me to have a page in the admin panel where I review all the reported pages (or links), is to create a module. Believe me, you don't. If you'd followed my link, you would have realized that too. Ranting without reading the help given won't get you closer to a solution. As for the time issues you mention: there's always the choice between doing things quick&dirty and doing things right, especially in programming. Why do people build regular pages on Wordpress? Because they know it and get a quick solution to an immediate problem, but in the long run, they fight against the software they are using because it wasn't meant for this kind of thing. When I estimated that the time would, initially, be roughly the same for using PW and another framework, I was taking into account starting at zero with both, since there's yet no clickading thingy that plucks ideas from a brain and automagically adds it to a web page. ProcessWire is a framework too, and it also has its concepts and best practices. They aren't that many, but they need to be understood. The docs do give a good introduction to them, and there's plenty of information in the forum if you search for the keywords if you need more explanation. Here's a short step-by-step approach to solving your task without a custom module and just one non-core module: Preparations Download and Install the AdminCustomPages module from the module repository The template with the fields used to store reports Create a new field "reported_page" and set the field type as Page, in the settings select "single page or null page" Create a new field "report_message" and set the field type to Text Create a new field "report_read" and set the field type to Checkbox Create a new template "pagereport" in the backend and add the three fields you just created, ignore the message that there isn't a template file present The backend interface Create a file named "_pagereport_backend.php" in site/templates Go to "Page" and expand the tree to "Admin" -> "Pages", then click "New" next to that Set the title of the new page "Manage Reported Pages" and save. The template will automatically be set to "admin". Now, as the process for this template, select "ProcessAdminCustomPages". You can now select the "_pagereport_backend.php" file you created earlier. Click "Publish" The frontend page with the reporting form Create a file named "enterreport.php" in site/templates Create a new template and check "enterreport" Save Create a new page under "home", title it "Report Page" and select the template "enterreport" On the "Settings" tab, check "hidden" so it won't appear in searches and lists Publish You're all set up now, all you need is the PHP code and markup now. Edit "_pagereport_backend.php" and enter the following code, which will render a table with all reports, has links to the reported page and lets you directly mark them as read. It uses the core module MarkupAdminDataTable so you don't have to build the table manually. <?php if($input->get->mark_id_read) { $report = $pages->get($input->get->mark_id_read); $report->of(false); $report->report_read = 1; $report->save(); } $children = $page->children("sort=report_read, sort=-created"); $table = $modules->get("MarkupAdminDataTable"); $table->setEncodeEntities(false); $table->headerRow(array( "Reported", "Page", "Message", "Read" )); foreach($children as $report) { $table->row(array( strftime("%Y-%m-%d %H:%M", $report->created), "<a href='{$report->reported_page->url}' target='_blank'>{$report->reported_page->title}</a>", $report->report_message, $report->report_read ? "Yes" : "<a href='$page->url?mark_id_read={$report->id}'>No</a>" )); } echo "<h1>Reports to manage:</h1>\n" . $table->render(); Now, edit the "enterreport.php" file and add the code to enter a report: <?php if($input->get->page_id) { $pg = $pages->get($input->get->page_id); ?> <h1>Report page <?= $pg->title ?> (<?= $pg->url ?>)</h1> <form method="POST" action="<?= $page->url ?>"> <input type="hidden" name="page_id" value="<?= $input->get->page_id ?>"> Please leave a short reason why you are reporting this page (e.g. SPAM or offensive):<br /> <input type="text" name="report_message" size="80"><br /> <input type="submit" name="submit_report" value="Report this page"> </form> <?php } else if($input->post->submit_report) { $pg = $pages->get($input->post->page_id); $prnt = $pages->get("name=manage-reported-pages"); $report = new Page(); $report->template = "pagereport"; $report->parent = $prnt; $report->name = (new DateTime)->format("Ymd-Hisu"); $report->reported_page = $input->post->page_id; $report->report_message = $input->post->report_message; $report->save(); echo "<h1>Page '{$pg->title}' has been reported. Thank you!</h1><a href='#' onclick='window.close();'>Close this window</a>"; } else { echo "<p>No page given. If this problem persists when you try to report a page, please contant the administrator.</p>"; } All that's left to do is add the link to the report page somewhere in your template file, e.g. in a basic profile in _foot.php: <a href="<?= $pages->get("name=report-page")->url ?>?page_id=<?= $page->id ?>" target="_blank">Report this page</a> Creating a module would just mean wrapping most of the things I described here into an install routine and adding some shortcut routines (e.g. for rendering the markup that links to the report page form). You can now easily tweak the interface, e.g. by filtering the children in _pagereport_backend.php by "report_read!=1" to only show unread reports. You can add a field (e.g. the client IP) to the reportpage template and need only two lines in enterreport.php to render and save it and two in _pagereport_backend.php to display it (column header and value). Each report is actually a page underneath Manage Reported Pages, and you can even use PW's regular page tree to view or delete reports.
    6 points
  2. I read that docs "properly", too and find out that the main magic with PW is something strange like $page and $pages and of course "selectors" hmm foreach a category...let me see where i as noob could find such things...;) https://processwire.com/api/variables/pages/ (with some foreach examples) So ok pages are something like "WireArrays" what is that im curious maybe i should read this one... https://processwire.com/api/arrays/ (even there is a foreach example) Don't get me wrong but my heart is fighting a little for every newbies....and with your posts the other newbies get a wrong view... Take a breath - take the time to experiement yourself with the API in combination with YOUR HTML of choice at start with AdminCustomPage you don't have to use MarkupModules or Core UI Elements...you are free to build what ever you want and pull the data with the PW API in your Output....and ask question nice and calm. There is no way to do things right so there is no doc that say "step 1 - step 2 - step 3 - finished" Your only get many many many options to get to your goal - you have to choose yourself All that options are not documentated only the API and the whole core codebase is there....plus tutorials....plus a real great forum with posts from 2012 thats code is today working good!!! ->plus helpfull and friendly people here that offers everyone help! If you had read throw my links and studied the code from the MarkupAdminTables you have had found things like this one: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Markup/MarkupAdminDataTable/MarkupAdminDataTable.module#L171 //for the lazy people i cp all important here... if(count($this->actions)) { $out .= "\n<p>"; foreach($this->actions as $label => $url) { $button = $this->modules->get("InputfieldButton"); $button->href = $url; $button->value = $label; $out .= $button->render(); } $out .= "\n</p>"; } Ohh i learnd that i can add action buttons to the rendering of the MarkupAdminTable module...nice and second i learnd how to create UI buttons with the Core Inputfield...from reading simple the code and don't search some documentation and the great thing in PW is i can use that Markup everywhere frontend, backend.... Documentation "teach" you nothing - documentation only describes what and how you can to do with software....like i wrote in PW you only need to learn and use the API and you can do all how you want it be done.....this is the point of the matter. There is no and i hope will never be a documentation that teach me how i have to build up my system or programm my websites and applications - this task is on my own. Since this is a forum of a free opensource software, no one has to aswer carp and claiming questions in his sparetime...there are no noobish questions in this forum - al things get sorted well with this community but always with a friendly and dedicated attitude on both sides. Sorry for my harsh words but all your post seems to be impatient and reproachful - exept i'm mislead your words. Best regards mr-fan
    3 points
  3. hi desbest, welcome to the forum i did not read the whole thread but wanted to mention that there is also the helloworld module where you can see how easy it is to develop a module in processwire https://github.com/ryancramerdesign/ProcessWire/blob/master/site-default/modules/Helloworld.module other than that i would recommend using tracy to inspect whats going on (eg make a inspectable dump of a page object in the console:)
    3 points
  4. It's actually not difficult at all to add the button and make it do what you want. PW is all about HTML + PHP, no fancy magical layers and MV(V)C patterns to bump your head against (unless you really want them, that is). Like @Sephiroth said, you can use PW's Inputfields to get consistent appearance for the backend, but you don't have to. The code in _pagereport_backend.php echoes the HTML making up the interface, so just output a button with a unique name you can check for as well: echo "<h1>Reports to manage:</h1>\n" . "<form method='POST' action='$page->url'><input type='submit' name='delete_read' value='Delete all read'></form><br />\n" . $table->render(); Now you only have to check at the top of _pagereport_backend.php if a POST value of delete_read has been passed, and if yes, find all pages with report_read=1 and delete them. Deleting pages is done through the $pages variable, and finding them can be either done through $pages too, directly through the current page ($page->find()) or by limiting $page->children() to those with a read status. The syntax for finding pages (i.e. selectors) is well-documented. It boils down to snippet of code like this: if($input->post->delete_read) { foreach($page->children("report_read=1") as $read) { $pages->delete($read); // Could also use $pages->trash($read) instead to have a failsafe } }
    3 points
  5. There is no need for more documentation...you can simple create Admin pages that using a simple template file without creating a own process module. THIS is the way every newbie add admin pages/dashboards with simplest PHP... There is absolute nothing fancy. All Adminpages need a ProcessModule. AdminCustomPages is as plain as simple in around about important 15 lines of code the Process connects the created Adminpage wich Template file under /site/templats/ should called....and search for some related CSS/JS files... The rest (i think what you mean - the tables and the rendering stuff ) is all basic Processwire UI Coremodules or other such called MarkupModules that simple rendering a UI - like you see in the great example from BitPeot you can call it simple like: //render a table for me $table = $modules->get("MarkupAdminDataTable"); //fill $table with stuff //render a PageList or use some Inputfields and you could use even the $form creating from the API...search for it in the forum there is //only one important topic that has all informations //or simple use PHP to render what ever echo "FooBar"; And one important tipp - i don't know how much well documenated other projects (you mentioned some above) are, but all PW core modules and many third party modules are very very well documentated in its codebase itself. For you as experienced dev this should be great news...;) https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Markup/MarkupAdminDataTable/MarkupAdminDataTable.module https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessPageList/ProcessPageList.module https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Inputfield/InputfieldCheckboxes/InputfieldCheckboxes.module I have to admit that processwire is not for everyone a conclusive concept from the start. But personally for me as "longtime PHP scrub", i don't get the the basics of OOP programming until i found PW - where OOP is not only a programming concept - it is the whole system. Even it was deadsimple for me to create own modules, as textformatters, markupmodules and many other stuff...but in the most cases i'll stick to simple PHP template code that works. On other CMS/Frameworks you need complex basic structures to build up on them, with PW you have to build your own structure with the great API and how complex you like it. regards mr-fan
    3 points
  6. Actually the functionality of 3 and 2.8 is identical other than the fact that 3 uses namespaces. To quote Ryan: Everyone should have a thorough read through this post: https://processwire.com/blog/posts/pw-3.0.32/
    2 points
  7. ProcessBatcher is not compatible with 3.0 devns at the moment, as far as I know. But why not try some custom code? It's just four lines actually. <?php $pagesToDelete = $pages->find('id>1000,template=mytemplate'); foreach ($pagesToDelete as $p) { $pages->delete($p, true); }
    2 points
  8. Hi the truth is, you must dedicate some time to understand how Processwire works, I went through this *trap* trying to to apply MVC concept in Processwire, once you get the philosphy behind Processwire, it will be easy to work according to PW way, however you can visit my link it's been updated to adding content to your admin, most likely to finish that today, I have too much task and personal issues taking my time sadly.
    2 points
  9. For updating from the legacy Thumbnail / CropImage to CroppableImage3 read on here.
    2 points
  10. It would be very easy to change from CroppableImage to CroppableImage3, but the old Thumbnail / CropImage uses a none-conform variation naming. It uses prefix_basename.ext, but since PW 2.5.11 we have basename.-suffix.ext. The way to go would be to use a bootstrap script that iterates over all pages, looking for Thumbnailfields, and if one is found, iterate over all images and (to be save!) in a first run copy the old variations to imagevariations with the new naming scheme. After successfully copied all crop variations, you should make a DB backup!! Than you can install the CroppableImage3 module and change the fieldtype of your images field to point to it. (Do a copy of your croppsettings before changing the type) Now you need to update your template files to use $page->image->first->getCrop('grande') instead of $page->image->first->getThumb('grande') After checking if all works well, you may run a variation of the bootstrap script that delete the old prefix_basename.ext variations instead to copy them to new naming scheme. Then uninstall the old Thumbnail module. As you said it is a lifesite, I suggest to run the bootstrap copy of the variations under PW 2.7 version. This would have no effect on your site. You also may upgrade the Thumbnail module to the CroppableImage (intermediate) module first, what can be done completly under PW 2.7. This way, you would not have to update two parts at once (PW no namespace to namespace, Imagefieldtype from old to new over different naming schemes). Upgrading from CroppableImage to CroppableImage3 is easier. But, if you can lock down your site for 20 to 30 minutes while switching to PW 3, changing images fieldtype and updating template files, it should be save to change from Thumbnail to CroppableImage3 directly. <?php // for PW 2.7 (UPDATED with @jacmaes bugfix for $new filename from below post!) $debugIteration = true; // true to iterate only over the first page with a desired field, false to iterate over all pages $doFilecopy = false; // true to really copy variation files, false for debug purposes $oldFieldtype = 'CropImage'; // CropImage $newFieldtype = 'CroppableImage3'; $timelimit = 60; // per single page // bootstrap PW include(dirname(__FILE__) . '/index.php'); // collect fields and cropsetting names $collection = array(); echo "<ul>"; foreach($fields as $f) { if($f->type != 'Fieldtype' . $oldFieldtype) continue; $collection[$f->name] = array(); echo "<li>{$f->type} : {$f->name}</li>"; $thumbSettings = preg_match_all('#(.*?),.*?\n#msi' , trim($f->thumbSetting) . "\n", $matches, PREG_PATTERN_ORDER); if(!$thumbSettings) continue; $collection[$f->name] = $matches[1]; echo "<ul>"; foreach($collection[$f->name] as $suffix) { echo "<li>{$suffix}</li>"; } echo "</ul>"; } echo "</ul>"; echo "<hr />"; // now iterate over all pages and rename or copy the crop variations echo "<ul>"; foreach($pages->find("include=all") as $p) { set_time_limit($timelimit); // reset the timelimit for this page foreach($collection as $fName => $suffixes) { if(!$p->$fName instanceof Pageimages) continue; $images = $p->$fName; if(0 == $images->count())continue; echo "<li>{$p->title}<ol>"; foreach($images as $image) { echo "{$image->name}<ul>"; foreach($suffixes as $suffix) { $old = dirname($image->filename) . "/{$suffix}_" . $image->name; $new = dirname($image->filename) . "/" . str_replace(".", ".-{$suffix}.", $image->name); echo "<li>$suffix<ul><li>$old</li><li>$new</li></ul>"; if($doFilecopy) { if(!file_exists($old)) { echo "ERROR: original variation is missing!"; } else { if(file_exists($new)) { echo "file already exists"; } else { $res = @copy($old, $new); echo "filecopy: " . ($res ? "Success!" : "!ERROR: $res"); } } } echo "</li>"; } echo "</ul>"; } echo "</ol></li>"; if($debugIteration) break; } $pages->uncache($p); // just in case we need the memory } echo "</ul>"; exit(); I have tested this with one page and two images, where I have done a little damage too. This was the output:
    2 points
  11. thanks again for this awesome field! if anybody needs excel-like tables this is easily possible like this (startingpoint): create a folder like /site/modules/HandsonTable copy https://github.com/handsontable/handsontable to this folder create a runtime field with this content: return wireRenderFile('../modules/HandsonTable/HandsonTable.php'); create your php-file /site/modules/HandsonTable/HandsonTable.php <?php $config->scripts->append($config->urls->siteModules . "HandsonTable/handsontable/dist/handsontable.full.js"); $config->scripts->append($config->urls->siteModules . "HandsonTable/handsontable/dist/moment/moment.js"); $config->scripts->append($config->urls->siteModules . "HandsonTable/handsontable/dist/pikaday/pikaday.js"); $config->styles->append($config->urls->siteModules . "HandsonTable/handsontable/dist/handsontable.full.css"); $config->styles->append($config->urls->siteModules . "HandsonTable/handsontable/dist/pikaday/pikaday.css"); ?> <div id="example"></div> <script> var data = [ ["", "Ford", "Volvo", "Toyota", "Honda"], ["2016", 10, 11, 12, 13], ["2017", 20, 11, 14, 13], ["2018", 30, 15, 12, 13] ]; var container = document.getElementById('example'); var hot = new Handsontable(container, { data: data, rowHeaders: true, colHeaders: true }); </script> moment and pickaday are not needed in this example and just as a showcase and reminder... It get's a little more complicated if you need storing/editing features but i need it only to show some data and my client can copy/paste data to excel/google drive sheets.
    2 points
  12. Trekkerweb Supply & Demand https://markt.trekkerweb.nl/ Trekkerweb.nl brings agricultural mechanization news and supply & demand together in a single online platform for all the tractor and machine enthusiasts and others interested in the mechanization sector. The site is multi-language with English as default. None Dutch browsers will get the English version of the site, currently we are finetuning the German version which will be available somewhere in the near future. The search page in English and Dutch language - https://markt.trekkerweb.nl/search/ - https://markt.trekkerweb.nl/nl/zoeken/ Used modules Profields Table Profields Textareas MarkupLoadRSS (fetches brand related new from the main website) PageImageManipulator 2 (PIM2) (for placing watermark image) ProCache ProcessGetVideoThumbs TextformatterVideoEmbed WireMailSmtp LanguageSupport (Site is multi language: Dutch, German and Default English) Couple of custom made modules for user profiles and cross page linkage of the datamodel (Bower) components awesome-bootstrap-checkbox bootstrap-dropdowns-enhancement-sass bootstrap-sass bootstrap-select font-awesome formvalidation.io hashids jquery jquery-file-upload jquery-throttle-debounce jquery.mmenu js-cookie lifestampjs moment semantic-ui-sass verge Front-end user profiles (custom module) Account registration Customizable fields (in module settings) Per field privacy configurable (private, public, on a per user basis). Front-end login/ logout Reset password Email activation for account Request activation mail View profile Public profile Edit profile Set profile picture (cover image and avatar) Modify password Language choice Profile dashboard Front-end Ads management Create new ad Edit existing ad Manage media (images / video) Preview and approve ad Remove ad Data model Categories Subcategories Brands Input fields Options An intuitive data model drives the whole site. A couple custom made modules take care of the cross page assigning of categories to subcategories and brands. Per subcategory we are able to assign the related input fields and options which will be rendered on the 'Create new ad/ Edit ad' form page and combined with the given values rendered on the ad detail page. Database caching + Pro caching One of the challenges was to keep the whole project as low weight as possible. Since the data model with categories, subcategories, brands, inputfields and options is the backbone of the site we came up with the solution to have the names, titles, ids, and relations between them cached. Completely as json/javascript with pro cache and separated with database caching. With the Wire Fuel we made the $dm object available for accessing anywhere in PHP and globalJS.dm from within javascript. This means the whole data model is called only once per request, and while it exists in the database cache and pro-cache it is incredibly fast. Subcategory page The first image shown below represent one of the subcategories (Tractors) with assigned categories, brands, input fields and options. The image there after is a screenshot of the add ad page, where the input fields, options and brands are dynamicly rendered after being loaded via Ajax. Other features cookie based favourites cookie based last-viewed list advanced filter search related ads Thanks to the whole team (Ferdi, Bastiaan, Alex, John, Hessel) and last but not least Ryan for creating ProcessWire and all module developers out there
    1 point
  13. Hi Mario, Can you provide a list of the template's fields, including the type of each field, along with the csv you are trying to import so I can test at my end?
    1 point
  14. I often use a 'hreflang' field instead of a 'name' field, so I can enter anything in the field. But the few websites that I've created multilingual from the beginning - in case - have only one language activated for the frontend as of today...
    1 point
  15. If you are using the MarkupAdminDataTable $table->row(array( "Any HTML Content,see no magic here..", ));
    1 point
  16. Just crosslinking to a related topic - this one about about changing the starting page when inserting an image from another page, but there are lots of code examples and links to mini modules that I thought might be useful to help you understand what is possible.
    1 point
  17. Okay you should add that code i prepend it before the MarkupAdminTable. that way the button would be at the top, another module to look at is https://github.com/ryancramerdesign/ProcessDatabaseBackups
    1 point
  18. Hi @szabesz, thank you for your answer. With the article you linked I was able to define a hook in the admin file. With the hook I changed the output of the execute()-method in ProcessPageEditImageSelect and removed the elements making it possible to browse to other sites.
    1 point
  19. Thank you all for your help. It matters to me so much! With a few modifications and tweaks of AdminCustomPages, I can make it look more professional and match it to my needs. I like it how everyone's being helpful.
    1 point
  20. Thanks for the help guys, and sorry for my late reply. I like the 'separation of concerns' you mention Mike Rockett and I think I'll implement this. Thanks again. Tony.
    1 point
  21. Please test it with FrontendUser: 0.9.3 and report back.
    1 point
  22. Also, for a less verbose version: foreach($pages->get('/')->children() as $child) { echo "<a href='{$child->url}'>{$child->title}</a>"; } No need to assign to a variable first if you're only using once. Of course if you're using it in other places then make it a meaningful variable like $homepage - at least anything other than $page because as @horst pointed out you will overwrite the object for the current page.
    1 point
  23. @horst, I've tried running your bootstrapped script to copy the variations (on PW 2.7.3), but it stops short: It collects the field and displays the crop settings correctly, but then does not iterate over all pages. Looks like it stops running after echo "<hr />"; Edit: tried a test run on another site, and it almost works. Problem is with str_replace that also replaces the domain name (see what I've marked in bold): 'Sorolla and America' sorolla-and-america-optimized.jpg pequeno /var/www/domain.com/site/assets/files/1228/pequeno_sorolla-and-america-optimized.jpg /var/www/domain.-pequeno.com/site/assets/files/1228/sorolla-and-america-optimized.-pequeno.jpg grande /var/www/domain.com/site/assets/files/1228/grande_sorolla-and-america-optimized.jpg /var/www/domain.-grande.com/site/assets/files/1228/sorolla-and-america-optimized.-grande.jpg destacado /var/www/domain.com/site/assets/files/1228/destacado_sorolla-and-america-optimized.jpg /var/www/domain.-destacado.com/site/assets/files/1228/sorolla-and-america-optimized.-destacado.jpg Edit 2: I've managed to fix my problem with a few tweaks, and all files were successfully copied. // now iterate over all pages and rename or copy the crop variations echo "<ul>"; foreach($wire->pages->find("include=all") as $p) { set_time_limit($timelimit); // reset the timelimit for this page foreach($collection as $fName => $suffixes) { if(!$p->$fName instanceof Pageimages) continue; $images = $p->$fName; if(0 == $images->count()) continue; echo "<li>{$p->title}<ol>"; foreach($images as $image) { echo "{$image->name}<ul>"; foreach($suffixes as $suffix) { $old = dirname($image->filename) . "/{$suffix}_" . $image->name; $new = str_replace($suffix . '_', '', $old); // These two lines are my tweaks $new = str_replace('.', '.-' . $suffix . '.', $image->name); $newer = dirname($image->filename) . "/" . $new; // $newer is the new $new below: echo "<li>$suffix<ul><li>$old</li><li>$newer</li></ul>"; if($doFilecopy) { if(!file_exists($old)) { echo "ERROR: original variation is missing!"; } else { if(file_exists($newer)) { echo "file already exists"; } else { $res = @copy($old, $newer); echo "filecopy: " . ($res ? "Success!" : "!ERROR: $res"); } } } echo "</li>"; } echo "</ul>"; } echo "</ol></li>"; if($debugIteration) break; } } echo "</ul>"; exit();
    1 point
  24. @Mustafa Online There are modules, which add twig into processwire and you could also just install it yourself e.g. via composer. For the future please open your own forum thread instead of seemingly highjacking other peoples'. Also simply searching for twig in the forums/google would probably have brought up the information you're seeking.
    1 point
  25. Yes, of course. I always like it if there is a clean directory structure. So I have a folder for CSS, JS, widgets, inc and so on. It makes life easier too.
    1 point
  26. Try $p = $pages->get("/"); or $p = $pages->get("template=home"); or $p = $pages->get("name=home"); Please, better do not use $page = ..., instead use $p or some other varname. $page is a prepopulated API var from PW what holds the current page.
    1 point
  27. Thanks a million for the detailed walk-through and the full script @horst! I wouldn't have been able to do this without your expertise. You even took the time to test your script, which makes me more confident. It never ceases to amaze me how helpful the PW community is. I'm sure this will help other people who, like me, would like to upgrade but were not sure how to. I'll definitely take the site down before launching the upgrade, and do a full backup of the site beforehand in case something goes wrong.
    1 point
  28. Hello @Sunda and welcome to the Forums, If you are new to ProcessWire, probably the easiest way is to hack it with CSS and/or JS. You can have ProcessWire admin load your files this way: http://soma.urlich.ch/posts/custom-js-in-processwire-admin/ Credit: @Soma
    1 point
  29. v066 is up. The biggest thing is a new hook where you can disable a submodule or even tweaks too, based on your custom conditions. Before this hook there was no way to disable a tweak, only to disable the entire submodule or restrict by role from the module settings page. I haven't tested disabling each tweaks so please report if you think something is not working as expected. The readme contains an example on how to use the hook. There were a few CKE plugins added too and it is possible to use cke.js or cke.css from the templates directory to override things. See the readme for details. Changelog added hook AdminOnSteroids::modifyConfigData to enable or disable submodules or tweaks added helper method AdminOnSteroids::disableSubmodule to disable a submodule new helper method AdminOnSteroids::disableTweak to disable a tweak new CKEaddon plugins: oEmbed, showBlocks, CodeMirror CKEaddons: use "/site/templates/cke.js" file for custom config (if exists) CKEaddons: use "/site/templates/cke.css" file for custom styles (if exists) use asmSelect for selecting CKEaddons plugins in module config (enables ordering) CKEaddons plugins that add buttons are marked with an asterisk JS fix for compact header save button and search field overlap (RenoTweaks) various LightWire skin CSS fixes (CKEaddons)
    1 point
  30. Today I managed to get it working for the three version. Tested. In the file FrontendUserRegisterEmailValidation.module line 110 I replaced the following code : // Load the plain / html email templates $emailContentHtml = wire('page')->render(wire('fu')->getFile('validationEmail.php', 'templates'), $vars); by this code : // Load the plain / html email templates $file = wire('fu')->getFile('validationEmail.php', 'templates'); $emailContentHtml = wireRenderFile($file, ['options' => $vars], ['default_path' => '']); As wireRenderFile was introduced in ProcessWire 2.5.2, there is no problem of compatibility. We can now receive email validation on PW 3.x with all information to create new user account
    1 point
  31. For me, it follows a principal called 'separation of concerns'. Running analytics has nothing to do with the actual running of your site, and so it should be kept separate, on another domain (or subdomain, which is technically another domain). So my recommendation is the same - move PW site to the public root and move analytics to a subdomain public root.
    1 point
  32. Oh this is seriously on-topic. I am old-school. Tri-X 400 + Rodinal 1:50 (20C, 14min). For most recent work etc check https://www.instagram.com/mikaelsiirila/.
    1 point
  33. This is pretty much why I built one instead. We did some test runs with a few 3rd party options, and they were either WAY too bloated, or just felt ancient. There was one (the name I can't remember) that was pretty good, but it was SaaS and we couldn't integrate all our other systems.
    1 point
  34. In case someone is wondering about the PW 3.0.22 new password field functionality ( InputfieldPasswordComplexify ) compatibility, this is what you will need in the <head>... <link type="text/css" href="/wire/templates-admin/styles/font-awesome/css/font-awesome.min.css?v=17j" rel="stylesheet"> <script type="text/javascript" src="/wire/modules/Inputfield/InputfieldPassword/complexify/jquery.complexify.min.js"></script> <script type="text/javascript" src="/wire/modules/Inputfield/InputfieldPassword/complexify/jquery.complexify.banlist.js"></script> <script type="text/javascript" src="/wire/modules/Jquery/JqueryCore/xregexp.js?v=1466417387"></script> <script src="/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.min.js?v=101-1466417387"></script>
    1 point
  35. Hi @Gazley, There is no denying, Semantic UI is very beautiful. However UI Kit has a few more modules that lets me get work out of the door quicker (and make a bigger profit). Here are a few things that I really really like about UI Kit and some things that I don't. Grid 1. data-uk-grid-margin This will add a top margin based on the grid margin when the column is collapsed. This means on mobile no elements are sitting right on top of each other. Instead they have a nice margin between each section. 2. data-uk-grid-match Great for having columns in which you want equal heights, you can do some pretty nice visual designs with this. Such as 50%/50% full width layouts. Components 1. Parallax Like most things with UI Kit it's completely modular and I only include elements I want to use, this makes it super easy. Parallax is one of those elements, it means I can easily add in Parallax elements and still keep it all in the UI Kit Framework. Other useful components include... 2. Dynamic Grid Much like Isotope js, this allows you to create dynamic filterable grids. 3. Sliders There is many options here, there is Slider which allows for mouse scroll and is great for mobile. Slideset which is filterable, great for showing things like clients and Slideshow which is just your usual slider. This comes with plenty of animations, which is all also modular. Core 1. Flex components While not completely supported by older browsers, this gives great control over positioning of content, such as centering content in a div. Combine this with data-uk-grid-match and .uk-flex-middle, you can create absolutely beautiful looking sites. 2. Text Columns Responsive text columns are great, while they are relatively new in not widely supported in browsers, it's great you have that option for modern browsers. 3. Scrollspy Great for the elements that animate on scroll, you can add any class to this also (or even use the javascript event) to have full controls. Javascript Events You can easily hook into Ui Kits javascript events to add custom javascript when certain things happen when using the modules. I know most frameworks have this, but it's a nice things to have. Here is a CodePen showing off a few things that I mentioned (I've tried to put in as many as possible): http://codepen.io/anon/pen/dYVRgQ --- The Bad So here is the bad, not all the components are well polished and require little fixed. For example sliders (used in my example), I much prefer showing them 1 by 1 as it's nice for iPhone uses to use touch controls. However, if there is less than 4 elements, there is sometimes a white flicker on the previous slide as you slide through. It's subtle but it happens. I get around this by making the background black to the slider. It isn't a fix but it makes it less noticeable. The sticky menu doesn't play nicely with the offCanvas and will sometimes stick, I use CSS to get around this applying left: auto !important. Resizing the screen while offCanvas is open will not recalculate the width, breaking the responsive. I got around this by applying width: 100% !important; to the offCanvas overlay. One more thing is that it doesn't apply box-sizing: border-box globally by default, while this isn't much of a problem and more of a personal preference. Overall, these problems are being ironed out and github is getting more active. I do wish for the github community to grow as there are plenty of talented coders out there and UI Kit for me is a great framework which comes with many useful features and most importantly is modular to keep sites lightweight.
    1 point
×
×
  • Create New...