Leaderboard
Popular Content
Showing content with the highest reputation on 03/03/2016 in all areas
-
10 points
-
WOW, that was it, suhosin was the culprit. I recompiled Apache with the same exact settings as last time except I removed suhosin. Everything just works now (just like the Processwire I know and love) Image uploads now work even while using the deprecated CropImage module on an 2.7 install (upgraded from 2.3), inside a repeater, which was previously simply unthinkable. (not using this in production, just doing an upgrade on an old site and thought to check). The server is even a lot more responsive, the time to first byte decreased from 2-3 seconds to 0.6 seconds, and that was another problem I was trying to solve. Suhosin is now officially a plague upon humanity as far as I am concerned, I can't believe I didn't know about its effects. Thanks so, so, much Ryan and everyone else who helped! So happy I could dance right now Now, about that payment? I normally run much tighter permissions, that website is not a live one, I just used it to try and debug the issue. It had those permissions left over form when I had a different PHP handler that required them and I left them like that to try an rule out any permissions issues. The suhosin issue was happening even on 640 permissions.6 points
-
3 points
-
I suggest to read https://www.littlebizzy.com/blog/ttfb-meaningless, and especially look for TTLB (Time To Last Byte). IMO, TTFB is completly meaningless,the only thingthat matters is: how fast can a user read / see the content of a page. And if you read on Wikipedia TTFB_vs_Load_Time or the more in depth article why it is meaningless, you may see that this doesn't matter. One thing, what is described there for example, is, that if you use gzip compression for your html / js / css content, you get a higher TTFB, but the TTLB is 20-30% lower! But besides that, using ProCache is the fastest way to serve your content. It also includes a part that assist you to setup the server for gzip, caching etc, it can collect and minify your JS, CSS, and HTML files, and you completly ommit invoking the PHP engine and connecting to a DB.2 points
-
Thanks @matjazp - that helped - I had forgotten to consider text after the last closing php tag. I have a fix that is working here. I have something else I am working on with Tracy right now so I'll commit both things fairly soon.2 points
-
@Ovi_S, Could you please mark your other two threads solved, thanks. Maybe also decide which of your three forum handles you want to keep2 points
-
@Lenz: the fields works like a charm on 3.0.9. The message you get is because to work, ImageMarker needs a regular image field as well on the template. You add the image field to the template and enter the name of that image field in the imagemarker field's settings. Then, on a page with that template, you add an image to the imagefield, save the page and imagemarker picks up the image from that field.2 points
-
An option already exist for that. Is "post_comments". By default the option is set to 1 (it show the comments count on top). You can found further more options and their description/value in the file MarkupBlog.module, renderPosts() method. Possible values for this option are, from the source code comment : 0=off, 1=comments count top, 2=comments count bottom, 3=comments count top & bottom So given my previous exemple of renderPosts(), we add the option in the array : [...] //Render limited number of posts on Blog Home Page $content .= $blog->renderPosts("limit=$limit", false, array('post_href_in_title' => false, 'posts_comments' => 0)); [...]2 points
-
2 points
-
@pwired There's nothing fancy about it. I've a small process module as well, which does the execution of the functions as well as storing which migrations are migrated and which aren't. // Migration.php abstract class Migration extends Wire{ public static $description; abstract public function update(); abstract public function downgrade(); } // 2016-03-03_18-27.php class Migration_2016_03_03_18_27 extends Migration { public static $description = "Update Homepage title"; public function update() { $this->pages->get('/')->setAndSave('title', 'Super fancy new Homepage title'); } public function downgrade() { $this->pages->get('/')->setAndSave('title', 'Home'); } }2 points
-
It's working now! Thank you very much Can and LostKobrakai!!! I splited the form in two steps. That was easier for me. And i did not save the form to pages. The files are stored on the server and our workflow system can get it. Maybe it is not the best but for now it's working. I did a little start over. This is now my site. On the first step i only validate the email field. <!-- include head start --> <?php include('./_head_pluploadtest.php'); ?> <!-- include head end --> <!-- include header start --> <?php include('./_header.php'); ?> <!-- include header end --> <div id="basic-site-text" class="row content-box"> <div class="large-12 columns"></div> <div class="medium-9 columns content-box-column-left"> <?php /** * ### Example front-end form template with file upload and fields ### * * - with files (images) upload to page field * - adds new page on the fly and adds uploaded images * - prevents CRSF attacks, this also prevents double post by refresh page after submit * - has required fields with error messages inline * - sanitizing and saving values to a page * - jquery example with disabled submit button on form submit * * Edit add or remove form markup below and configure this section according to what you need. * */ // ------------------------------ FORM Configuration --------------------------------------- // --- Some default variables --- $success_message = "<div id='form-success-message' class='text-center'><i class='fi-check'></i><br><h4>Danke, Ihre Daten wurden übermittelt.</h4></div>"; // --- All form fields as nested array --- // using html form field name => template field nam, from the page you're going to create $form_fields = array( 'email' => array('type' => 'email', 'value' => '', 'required' => true) ); // --- Page creation settings --- $template = "service-upload-files"; // the template used to create the page $parent = $pages->get("/service/pluploadtest/"); $page_fields = array('email'); // $page_fields = define the fields (except file) you want to save value to a page // this is for the form process to populate page fields. // Your page template must have the same field names existent // ------------------------------ FORM Processing --------------------------------------- include("./form-plupload-test.php"); ?> <!-- ========================= FORM HTML markup ================================== --> <?php /** * Some vars used on the form markup for error and population of fields * * $errors[fieldname]; to get errors * $form_fields[fieldname]['value']; * * Some helper function to get error markup * echo showError(string); * * Prevent CSRF attacks by adding hidden field with name and value * you an get by using $session->CSRF * $session->CSRF->getTokenName(); * $session->CSRF->getTokenValue(); * * $errors['csrf']; used to check for CSRF error * */ ?> <?php if(!$success) : ?> <?php if(!empty($errors)) echo showError("Die Form enthält Fehler!"); ?> <?php if(!empty($errors['csrf'])) echo showError($errors['csrf']); ?> <form name="myform" class="myform" id="fileUploadForm" method="post" action="./" enctype="multipart/form-data"> <input type="hidden" name="<?php echo $session->CSRF->getTokenName(); ?>" value="<?php echo $session->CSRF->getTokenValue(); ?>"/> <div class=" <?php if(isset($errors['email'])) echo "error";?>"> <label for="email">Ihre E-Mail Adresse: * </label> <input type="text" name="email" id="email" placeholder='max.mustermann@email.de' value="<?php // zeigt die E-Mail Adresse des Users wenn eingeloggt. if($user->isLoggedin()) { if (empty($_POST["email"])) echo $user->email; } echo $sanitizer->entities($form_fields['email']['value']); ?>"/> <?php if(isset($errors['email'])) echo showError($errors['email']); ?> </div> <?php // if user is logged in... show some content specifically for logged-in users if ($user->isLoggedin()) { echo "<div class='callout secondary'>"; echo $page->service_email_info_logged_in; echo "</div>"; } else { echo "<div class='callout secondary'>"; echo $page->service_email_info_logged_out; echo "</div>"; } ?> <div> <!--<div id="fileList"></div><br><br>--> <input type="hidden" name="action" id="action" value="send"/> <input data-toggle="loadingModal" type="submit" name="submit" id="submit" value="nächster Schritt" class="button service_button float-right"/> </div> <!-- Fehlermeldung plupload <pre id="console"></pre>--> </form> <div class="full reveal" id="loadingModal" data-reveal> <div> <img src="<?php echo $config->urls->templates?>images/loading_circle.gif" alt="Intropsective Cage"><br> </div> </div> <?php else: ?> <!-- <p><?php echo $success_message; ?></p> <form id="fileUploadForm" method="post" action="./" enctype="multipart/form-data"> <div id="dropArea"> <input class="dragDropFileUploadField" type="file" name="file[]" accept="jpg,jpeg,png,gif,mpg,mpeg,mp4,avi,wmv,mov,zip" multiple> <button type="submit" name="action" value="submit">Upload</button> </div> </form> <div id="fileList"></div>--> <form method="post" action="./" enctype="multipart/form-data"> <div id="uploader"> <p>Your browser doesn't have Flash, Silverlight or HTML5 support.</p> </div> <input type="submit" name="submit" id="submit" value="Absenden" class="button service_button"/> </form> <!-- <?php echo $_POST['email']; ?> --> <!-- übergibt die E-Mail Adresse an die nächste Seite --> <?php $session->newemail = $_POST['email']; ?> <?php endif; ?> </div><!-- Ende Container --> <div class="medium-3 columns content-box-column-right"> </div> </div> <!-- include footer start --> <?php include('./_foot.php'); ?> <!-- include footer end --> <!-- include footer start --> <?php include('./_foot_service_pluploadtest.php'); ?> <!-- include footer end --> On the second site i used pluploader with queue widget When i now add some files... the get uploaded if i hit the submit button And my xml files get generated with the email adress inside Form validation: <?php // ------------------------------ FORM Processing --------------------------------------- $errors = null; $success = false; // helper function to format form errors function showError($e){ return "<div class='alert callout'><p class='error'>$e</p></div>"; } // dump some variables // var_dump($_FILES,$_POST,$_SESSION); /** * Cast and save field values in array $form_fields * this is also done even form not submited to make populating the form later easier. * * Also used for pupulating page when form was valid */ $required_fields = array(); foreach($form_fields as $key => $f){ if($f['type'] == 'email'){ $form_fields[$key]['value'] = $sanitizer->email($input->post->$key); } // store required fields in array if($f['required']) $required_fields[] = $key; } /** * form was submitted, start processing the form */ if($input->post->action == 'send'){ // validate CSRF token first to check if it's a valid request if(!$session->CSRF->hasValidToken()){ $errors['csrf'] = "Die Formulardaten wurden nicht richtig ausgefüllt. Bitte versuchen Sie es erneut."; } /** * Ceck for required fields and make sure they have a value */ foreach($required_fields as $req){ // reqired text fields } if($form_fields[$req]['type'] == 'email'){ if(!strlen($form_fields[$req]['value'])){ $errors[$req] = "Bitte geben Sie Ihre E-Mail Adresse an."; } } /* * if no required errors found yet continue file upload form processing * if(empty($errors)) { // create the new page to add field values and uploaded images $uploadpage = new Page(); $uploadpage->template = $template; $uploadpage->parent = $parent; // add title/name and make it unique with time and uniqid $uploadpage->title = date("d-m-Y H:i:s") . " - " . uniqid(); // populate page fields with values using $page_fields array foreach($page_fields as $pf){ if($templates->get($template)->hasField($pf)){ $uploadpage->$pf = $form_fields[$pf]['value']; } else { throw new WireException("Template '$template' has no field: $pf"); } } // RC: for safety, only add user uploaded files to an unpublished page, for later approval // RC: also ensure that using v2.3+, and $config->pagefileSecure=true; in your /site/config.php $uploadpage->addStatus(Page::statusUnpublished); $uploadpage->save(); */ // $success_message .= "<p>Page created: <a href='$uploadpage->url'>$uploadpage->title</a></p>"; $success = true; // reset the token so no double posts happen // also prevent submit button to from double clicking is a good pratice $session->CSRF->resetToken(); /* }*/} the upload handler for plupload: <?php // --- WireUpload settings --- $upload_path = $config->paths->assets . "files/service_upload_files/pluploadtest/"; // tmp upload folder $file_extensions = array('jpg', 'jpeg', 'gif', 'png', 'tif', 'tiff'); $max_files = 0; $max_upload_size = 1*14336*14336; // make sure PHP's upload and post max size is also set to a reasonable size 1*102400 = 100 MB $overwrite = false; $newemail = $session->newemail; // RC: create temp path if it isn't there already if(!is_dir($upload_path)) { if(!wireMkdir($upload_path)) throw new WireException("No upload path!"); } // setup new wire upload $u = new WireUpload('file'); $u->setMaxFiles($max_files); $u->setMaxFileSize($max_upload_size); $u->setOverwrite($overwrite); $u->setDestinationPath($upload_path); $u->setValidExtensions($file_extensions); // start the upload of the files $files = $u->execute(); // create XML files for switch // remove extension from files $withoutExt = preg_replace('/\\.[^.\\s]{3,4}$/', '', $files); foreach($withoutExt as $withoutExt_string) { $doc = new DOMDocument('1.0'); // we want a nice output $doc->formatOutput = true; $root = $doc->createElement('phpemail'); $root = $doc->appendChild($root); $email = $doc->createElement('email'); $email = $root->appendChild($email); $text = $doc->createTextNode($newemail); $text = $email->appendChild($text); $doc->save($upload_path . $withoutExt_string . ".xml"); } ?> And the plupload config in my footer: <!-- jQuery first, then foundation JS. --> <script src="<?php echo $config->urls->templates?>scripts/vendor/jquery.min.js"></script> <script src="<?php echo $config->urls->templates?>scripts/vendor/what-input.min.js"></script> <script src="<?php echo $config->urls->templates?>scripts/foundation.min.js"></script> <script src="<?php echo $config->urls->templates?>scripts/app.js"></script> <script src="<?php echo $config->urls->templates?>scripts/onchange_dropdown_service.js"></script> <script src="<?php echo $config->urls->templates?>scripts/email_service_validation.js"></script> <script src="<?php echo $config->urls->templates?>scripts/plupload.full.min.js"></script> <script src="<?php echo $config->urls->templates?>scripts/jquery.plupload.queue.js"></script> <script src="<?php echo $config->urls->templates?>langs/de.js"></script> <script type="text/javascript"> $(function() { // Setup html5 version $("#uploader").pluploadQueue({ // General settings runtimes : 'html5,flash,silverlight,html4', url : 'uploadplupload/', //chunk_size: '1mb', unique_names: false, rename : true, dragdrop: true, filters : { // Maximum file size max_file_size : '200mb', // Specify what files to browse for mime_types: [ {title : "Image files", extensions : "jpg,jpeg,gif,png,tif,tiff"} ] }, // max file restriction with errors init : { FilesAdded: function(up, files) { var max_files = 3; plupload.each(files, function(file) { if (up.files.length > max_files) { alert('Sie dürfen bei einem Durchgang nur ' + max_files + ' Dateien hochladen.'); up.removeFile(file); } }); if (up.files.length >= max_files) { $('#pickfiles').hide('slow'); } }, FilesRemoved: function(up, files) { if (up.files.length < max_files) { $('#pickfiles').fadeIn('slow'); } } }, // Resize images on clientside if we can //resize : {width : 320, height : 240, quality : 90}, flash_swf_url : '../../js/Moxie.swf', silverlight_xap_url : '../../js/Moxie.xap' }); // start file upload ob drop //var uploader = $("#uploader").pluploadQueue(); //uploader.bind('FilesAdded', function(up, files) { //uploader.start(); //}); // Client side form validation // uploads the files in queue and submits the form $("form").submit(function(e) { var uploader = $("#uploader").pluploadQueue(); // Validate number of uploaded files if (uploader.total.uploaded == 0) { // Files in queue upload them first if (uploader.files.length > 0) { // When all files are uploaded submit form uploader.bind("StateChanged", function() { if (uploader.total.uploaded == uploader.files.length) $("form").submit(); }); uploader.start(); } else alert("Sie müssen mindestens eine Datei auswählen."); e.preventDefault(); } }); }); </script> <noscript><p><img src="//piwik-gbd.de/piwik.php?idsite=5" style="border:0;" alt="" /></p></noscript> <!-- End Piwik Code --> </body> </html> I will made a step by step tutorial. This becomes too big. Maybe i can improve something. But for now it works! :)2 points
-
Hi and welcome. You can check this thread too : https://processwire.com/talk/topic/12094-jquery-functions-and-path/?hl=ajax A small snippet I use at this moment : <script type="text/javascript"> // PW dynamic js var <?php $jsConfig = $config->js(); $jsConfig['debug'] = $config->debug; $jsConfig['urls'] = array( 'current_url' => $page->url, 'root' => $config->urls->root, 'templates' => $config->urls->templates, ); ?> var config = <?php echo json_encode($jsConfig); ?>; </script> Assuming you put your file "contact_me.php" in the root folder, to call it from JS, you can write something like that : [...] $.ajax({ url: config.urls.root + "contact_me.php", [...]2 points
-
as this is now built in the core i will not take this further... https://processwire.com/blog/posts/processwire-3.0.9-adds-new-long-click-and-save-actions/#new-page-edit-save-actions2 points
-
@horst you could also use the (relatively) new $sanitizer->int($value) or $sanitizer->intUnsigned($value) method like if(wire("sanitizer")->int($input->get->id)) {...}2 points
-
Update: Version 6 (on dev branch only for now) Changes Thanks to @BitPoet, on a paginated coordinates' table, clicking on a marker will, where necessary, bring its page into view --------------------------------- @BitPoet, thanks! Following your ideas, I did it like this: Server-side, add a data-row='n' to each marker specifying its row in the coordinates' table (same number you see on the markers ) In the pagination function (js) for each page, get the number of the first row and add that to a data-first-row='n' attribute for each respective span Created a function that, on clicking a marker, it finds the first span (#2 above) whose data-fist-row is greater than the marker's data-row. If found, our marker's page is the immediate previous page, so we click on that if it's not already in view (!class='active'). If span 'is out of bounds', it means we are on the last page so we click on that instead. If selector returned nothing, it means there's no pagination in place, so we do nothing. Demo2 points
-
Fieldtype and Inputfield ImageMarker As of 02 January 2018 ProcessWire versions earlier than 3.x are not supported Version: Stable Project Page: Github Modules Directory: http://mods.pw/Bk OR http://modules.processwire.com/modules/fieldtype-image-marker/ Requires: ProcessWire 2.4 or greater ######################## About This module allows you to easily 'place markers' on an image. Each placed marker's position/coordinates (x and y) are saved in the field as well as the ID of the ProcessWire page the marker refers to. In the backend markers are placed on a specified base image. In the frontend, using each saved page ID you can then retrieve any information you want about the pages being referenced and display that on your website over the same base image you used in the backend. The module is useful for a diverse number of uses including: Product demonstration: place markers on various parts of your product to showcase its features. Using a bit of CSS and/or JavaScript you can create pop-up boxes displaying more information about that feature of the product. The information (in this case, feature), would be information you've stored in some field (e.g. a text field) in the page marker (i.e. the page being referenced by the coordinates). Office locations: place markers on a map showing global offices of a multinational company Points-of-Interest: place markers showing points of interest on a map or location or anything. The coordinates are saved as percentages. This means they will scale well with the image being marked. This module came about as a result of this request. @credits Ryan Cramer: This code borrows from his FieldtypeEvents. @credits Helder Cervantes: Module concept, HTML, CSS, JavaScript. @credits Roland Toth: CSS, Inspiration. API In the frontend, the field returns an array of ImageMarker objects. Each of these has the following properties info (integer): The page ID of the marker (i.e. the page being referenced by the marker. Using this, you can get the referenced page and have access to all its data. infoLabel (String): The title of the page (above) referenced by the marker (runtime only). x (Integer): The x-coordinate of the marker (%). y (Integer): The y-coordinate of the marker (%). You grab the properties as in any other PW field, e.g. $out = '<img src="'. $page->base_image->url . '" alt="">';// image to place markers on 'base_image' is the name of the file field foreach ($page->marker as $m) { // do something with the following properties $m->id;// e.g. $pages->get((int) $m->id); $m->x; $m->y; $m->infoLabel; } // the CSS and HTML are up to you but see InputfieldImageMarker.module for examples Frontend implementation is left to you the developer/designer1 point
-
I didn't noticed your PS above. I will check it out. Thanks for the suggestion.1 point
-
What's your use-case for passing a path to jQuery like that, or was it a made up example? base64 enc/de-coding shouldn't be necessary if you're using the get parameters. It might be easier to just pass in the script name "jquery-2.2.0.js" and use $config to build the URLs to the file, though.1 point
-
(https://en.wikipedia.org/wiki/Time_To_First_Byte) ProCache does serve static HTML files! PS: TTFB is meaningless1 point
-
wow astonishing the fast reaction time. Thanks BitPoet and Kongondo, i already had a regular image field assigned to my template, but i forgot to enter the name of that image field in the imagemarker field's settings. Now that i did this imageMarkerfield fetched my image. So far so good. But there are no markers available yet, even not, after i selected a page to add as marker. The selected page appears as a green row like a field in a template. But i only see an empty table header below the fetched image, saying "Marker Information Page" - "Marker X-Coordinate" - "Marker Y-Coordinate", but no input fields or information. ok, maybe this is because i curiously add a regular product page with many content as marker although this doesn't make any sense actually because i only need a few words of infos as marker-content... should i instead better create a (hidden) page (somewhere in the tree) for every marker-information and add this as marker? am i right about this? Thanks for your patience arrgh, sorry , i forgot to save. After saving all is good. Really fun to work with processwire. Couldn't imagine that a cms can be this flexible and letting the developer this much freedom. Again congratulations. Ok, maybe this gratitude stems from some torture in the past using systems, which are not so flexible and easy to use...1 point
-
Thanks again. It works, when I change it in the markup-blog. render Posts somehow didn't work... Great stuff! Love the forum All the best Jakob1 point
-
The position of the Tracy script after </html> might be a little weird - I am not sure their reasoning for this, but it's definitely a core Tracy thing, rather than an issue with this module. Take at look at their demo page and you'll notice the same thing: https://nette.github.io/tracy/tracy-exception.html As for the extra "?>" - that looks to be related to the Variables panel - I am injecting code into the end of the compiled template files to make this work. I thought my regex was handling all scenarios, but perhaps not. Could you please try clearing your FileCompiler templates cache and let me know if the issue remains. If it does, please post the last few lines of your template file so I can test here and fix it.1 point
-
Thanks for those links. I understand better now that getMatchQuery() is used for searching subfields in pages. That function in my fieldtype is adapted from the Comments module and is working as expected. I realized the find() method is for searching the webmention fields outside of a $page context, i.e. in the Webmentions Manager (also adapted from the Comments module). I ended up adding a find() method to my main Webmention module that finds the first FieldtypeWebmention and calls its find() method directly, so I can call $Webmention->find('author_email=user@example.com') and get the WebmentionArray I want.1 point
-
Thanks for reporting back. Glad to hear that was it and that everything is working now!1 point
-
Hi Citech. Welcome to the forums and ProcessWire. What @adrian said. Here's more info and workarounds/options:1 point
-
1 point
-
Aaah, so easy Didn't know that it's a module. Thanks a lot, adrian!!1 point
-
Hi Esther and welcome. Unfortunately that is a pretty vague question. The content of every website is output as HTML. Are they designing your landing page, or coding it in HTML? If we can get some more details we can provide a more accurate answer. But, the short answer is yes!1 point
-
Just go to settings for the core module ProcessProfile and check the avatar field.1 point
-
The idea of the process that I described is exactly to avoid locking the live site. That's why doing all the nondestructive changes on the live site and avoiding any DB changes on the local copy.1 point
-
Just use FieldsetTabOpen and FieldsetClose as normal on the user template, sandwiching the fields you want on a separate tab in between these two. Get to the user template by filtering for 'show system templates'1 point
-
Hi @Ipa, It's working fine for me on Safari, Chrome, and Firefox on my Mac with Sublime so I am guessing it's an eclipse issue. I wonder if it could be solved in your applescript with the urldecode line from this snippet? using terms from application "Quicksilver" on process text theurl return do shell script "php -r 'echo urldecode(\"" & theurl & "\");'" end process text end using terms from https://qsapp.com/wiki/Encode/Decode_URL_(AppleScript) or maybe one of these options: http://harvey.nu/applescript_url_decode_routine.html http://macscripter.net/viewtopic.php?id=3675 If that doesn't work, here is the route of the "problem": https://github.com/adrianbj/TracyDebugger/blob/master/tracy/src/Tracy/Helpers.php#L49 Of course that is part of the Tracy core so I'd rather not edit it. I did however test with Sublime by removing the `rawurlencode` on that line and it works fine. Maybe if you can't get Eclipse to work, you could post on the Tracy forums to see if they would remove the encoding, although I expect it is important if there are spaces in the path? I'd actually like to start compiling a list of resources for all of the various editors and platforms. I will add these to the module's readme as they are provided by you guys!1 point
-
I haven't done this, but I think you are correct in assuming that getMatchQuery() is what you need to have: https://github.com/ryancramerdesign/ProcessWire/blob/8eb350b0362c1c70003d3895c6961b3a1655ffc5/wire/core/PageFinder.php#L588 Take a look at kongondo's Matrix for an example of a 3rd party module using this method: https://github.com/kongondo/FieldtypeMatrix/blob/master/FieldtypeMatrix.module#L5071 point
-
It's an old problem, and no, there isn't a simple solution. I think the most commonly adopted solution is still this one, back from 2011 http://ben.kulbertis.org/2011/10/synchronizing-a-mysql-database-with-git-and-git-hooks/1 point
-
You know, I've encountered Suhosin three times on various shared hostings so far — and it was always interfering with running websites we put there. "Suhosin, premiere tool for misconfiguration of PHP."1 point
-
Probably WordPress. I'm guessing its default configuration has at least something to do with WP. There doesn't seem to be anything inherently wrong with Suhosin (rather, just how it's configured), and in fact it seems like it could be quite a useful security tool. But it would have to be configured for the software it's running with, otherwise seems like it's very likely going to interfere with that software.1 point
-
A simple call with the right option should do the trick : $(document).ready(function(){ var popup = new Foundation.Reveal($('#myModal')); popup.open(); }); the docs : http://foundation.zurb.com/sites/docs/reveal.html1 point
-
Looks great, thanks! Those preview images always remembers me of pox1 point
-
Regarding (ii) and after a cursory glance at the JS: Store the page numbers in an attribute in the pager's spans in paginateTable In the marker's click event, calculate the row position through row.prevAll('tr').length Calculate the matching page number from the position and limit Find the matching pager item through the attribute in the first step and fire a click event on it1 point
-
Updated to the latest version to test callouts. Looks great. With short names as in this particular use case, callouts greatly improve usability. BTW, should probably update the description on the first post in this thread: "one can only choose from one type of marker (circle) at the moment". No longer the case.1 point
-
Well that took me a lot less time to implement than it did to add the content I needed for testing it out. Worked like a charm, didn't need any tweaking at all. The only thing I noticed missing was the keyboard fine-tuning. But that would conflict with Reno theme's expanding / collapsing of the left column, so best leave it as it is. In this case, on the frontend I have a rollover behavior that pops up an info box on each spot. The box pops to the right, so I'd have a problem with the ones closer to the right edge. But since the module returns % based positions, I can easily add a CSS class whenever the dot is over 50% horizontal, to make the popup appear to the left instead. The filtering options for the page selector also worked great. Limited that to a specific template and voilá. On the image below you'll see I have white and red dots on the frontend. Those are according to the parent of each dot. Easy as pie. Great work @kongondo. Here's a side by side of the field, and the end result:1 point
-
Update: Version 3 Unified markers working fine (thanks @heldercervantes) Fixed position differences between the 3 marker styles; (thanks @heldercervantes) Unified look, so that all marker styles feature the same kind of border and colors; (thanks @heldercervantes) Improved the way markers are highlighted; (thanks @heldercervantes) Added a higher z-index to the highlighted marker, bringing it on top of the others; (thanks @heldercervantes) Tweaked draggable event to remove the snapping that happened when user started dragging the marker. (thanks @heldercervantes) Callout markers display referenced page title instead of marker number Confirmed testing OK with Reno Theme Ready to grab from Github Pending: ReadMe/Docs...+ long coordinates table..1 point
-
1 point
-
@kongondo, just made a little tune-up on your code: Affected files: InputfieldImageMarker.css InputfieldImageMarker.js Changes: Fixed position differences between the 3 marker styles; Unified look, so that all marker styles feature the same kind of border and colors; Improved the way markers are highlighted; Added a higher z-index to the highlighted marker, bringing it on top of the others; Tweaked draggable event to remove the snapping that happened when user started dragging the marker. Suggestion: Callout and teardrop styles seem redundant. I suggest that on callout style, instead of the number, we show the page name. CSS is ready for this change, just output the name in the span and it expands from the center. You can find the update here: heldercervantes.com/experiments/ifim/FieldtypeImageMarker_2.zip I'm starting to implement this on a website right now. It will be a good testing ground. First impressions are good, second impressions coming soon.1 point
-
I can help in css but only about a week later, if all goes well.1 point
-
I need to rewrite that post because there are many improvements and simplifications in that process. My ultimate goal is to create a site profile (maybe a multilanguage one) with Latte.1 point
-
Hello. You can try to switch off ACF ("No") and check what you get. But also here is another working solution (in two 2 steps): 1. in site/modules/InputfieldCKEditor create newstyles.js with content: CKEDITOR.stylesSet.add( 'newstyles', [ { name: 'Left aligned', element: ['address', 'p', 'ul'], attributes: { 'class': 'left' } }, { name: 'Right aligned', element: ['address', 'p', 'ul'], attributes: { 'class': 'right' } }, { name: 'Read more button', element: ['a'], attributes: { 'class': 'button' } } ]); 2. inside field settings need to set this: - Use ACF: No - Custom Editor js Styles Set: newstyles:/site/modules/InputfieldCKEditor/newstyles.js NOTE: After this, you will see dropdown list of additional classes only when you inside editor select tag from the list (address, p, ul, a). Regards.1 point
-
I don't know if you read the documentation for "Allowed Content Rules", but there it states that [] are for attributes, {} for styles and () for classes. Therefore you need to use *[id] to allow id's. You can only allow/disallow specific contents for the style and class attribute. All the other attributes (including id) are either allowed in any form or not. Edit: Your version would allow for this: <a centre="something" gras="green" noir="dark" credit="given">I'm a link</a>1 point
-
Hi @soma, thanks for the continuous maintenance of this (and other) tool(s). This is one of my favourite modules.1 point
-
I definitely don't want people to have to create any large amount of templates just for user access, so would want to find a solution for that. Though I'm still not sure that I understand the scenarios where a template needs to exist just for user access? Hundreds of templates just for UA (or even far less) would be a deal killer for sure, so we will definitely want to find an alternative there. Seriously, hundreds or even dozens of templates for ua?… I'm doing something wrong. Help me understand these access control scenarios–The more I can understand these types of access control scenarios I think the better. My thought is that we will offer page-level access control, but that the template-level access control provides us a better and more straightforward foundation for the core. That leaves us room to handle more complicated scenarios with needs targeted, specific solutions. I've always wanted to keep the core as simple as possible, primarily for the end-users, but also for long term maintenance and reliability of the software. Page level access control could be provided as something built-in, or as a special fieldtype that one can add to any template that then allows them to override the template-level access definitions. In such a case, template-level definitions would serve as starting points [defaults] rather than ending points. As much as I don't care for access being defined in the same place where it is granted or revoked, I'm certainly not opposed to providing this option where it makes things simpler. There are no sacred cows and the goal is always to make things simpler.1 point