Leaderboard
Popular Content
Showing content with the highest reputation on 08/16/2016 in all areas
-
4 points
-
I have it working in the current 3.x version (3.0.30 devns), no problems or hick-ups so far. thanks for the module @adrian @mr-fan4 points
-
Hi Henning, Interesting approach on how to use the module Looks like a caching problem to me, could you try to add $this->pdf = null after this line: https://github.com/wanze/Pages2Pdf/blob/master/Pages2Pdf.module#L218 The code should then look like the following snippet: [...] } else { $this->create($page, true); $name = $this->getPDFFilename($page); $this->wire('session')->message(sprintf($this->_("Pages2Pdf: Created PDF file(s) '%s'"), $name)); } // Add me! $this->pdf = null; } Cheers3 points
-
I guess you need to reload the page you're actually on and not the one you call with ajax. If so, send back a 'success' message (json) from the login page (from ajax) and if you got this on the login page, do the redirect with js (location.reload() or location.href).3 points
-
Looks like the markup for post-headline is set here: https://github.com/kongondo/Blog/blob/master/MarkupBlog.module#L916 This should work I think: $out .= "<$h class='post-headline' style='background-image:url({$page->blog_images->first->url});'><a href='{$page->url}'>{$page->title}</a></$h>"; You may want to resize the image - see the API methods for this. There is a support thread for the blog module. I believe @kongondo is away at the moment but if you post questions there other users of the module may have advice.3 points
-
You deserve the gold medal anyway! Works fine. Now I can easily create screenshots for forum support too, should I feel the need to (With AOS on it might generate some confusion to demo the admin... so this is just another case to justify the need of this feature...)3 points
-
Adrian is right....my github account is only the host of the module...he is owner of the credits on this smart piece of code....;) But i haven't tested the module with 3.x version...since there are a lot of changes on the image handling....i don't know if it works. regards mr-fan3 points
-
Hi all, Just in front of the Easterweekend, my first contribution to the modules section of ProcessWire. I created a module to send Tweets when selected at the page editor. From version 0.8.3 up the module is only to use in v3.x. When using ProcessWire v2.x you should use version 0.8.2. In short this module offers an option to publish a page to Twitter when the date for publishing is past/scheduled. After filling out the Twitter credentials, select your preferable template(s) which should have the option added to Tweet the pages using it. Additional select the field to use as publicationdate to check if the Tweet should be send now or later, a field which contains the page title. Optional you can fill out the name of the website which will be added after the title (in case space is available). Optional you can select the field where the page image(s) are placed (only one will be tweeted). Optional you can fill out Bit.ly credentials for shortening URLs. Includes instructions to set a cron (template or LazyCron), returns log in assets folder. Uses (included) TwitterOAuth PHP library written by abraham. http://modules.processwire.com/modules/publish-to-twitter/ https://github.com/FerdiAgrio/PublishToTwitter Enjoy!2 points
-
2 points
-
2 points
-
Read this @mel47 : https://processwire.com/docs/tutorials/how-to-use-url-segments/ And you can find the wiki url under archive.org : https://web.archive.org/web/20150422040149/http://wiki.processwire.com/index.php/URL_Segments_in_category_tree_example An interesting thread:2 points
-
Just for reference, here is the origins of that module:2 points
-
At the moment I write the needed javascript code to extract / execute the transfered json code and remove the temp. dom elem. The code take care about async script file load with browser caching enabled (jQuery ajax() method) style file (un-)load unload because of css side effects with different pages and css styles prevent css file to be loaded twice or multiple times browser caching enabled (default, nothing to do ;)) inject / replace inline styles code inject inline scripts code It works, but I don't know about existing side effects... $( document ).ready(function() { Intercooler.ready(function (elt) { var pwJsonTransfer = '#pwJsonTransfer' var ProcessWire = JSON.parse($(pwJsonTransfer, elt).text()); // get json information from response $(pwJsonTransfer).remove(); // remove temp json transport element from dom // load css files if not existing in the DOM $(ProcessWire.styles).each(function () { if ($('link[href="' + this + '"]').length < 1) { loadCSS(this); } }); // Remove "old" async loaded stylesheets because it could break the current page $('body').children('link').each(function () { if ($.inArray(this.href, ProcessWire.styles) == -1) { $(this).remove(); // remove unused stylesheet (not in the current css array) } }); // load js files if not existing in the DOM $(ProcessWire.scripts).each(function () { if ($('script[src="' + this + '"]').length < 1) { $.ajax({ url: this, dataType: 'script', cache: true // to prevent multiple file download }); } }); // inline custom styles of current page if (ProcessWire.inlineStyles === null) { $('.pwAsyncCustomCSS').remove(); // no custom css, remove element } else if ($('.pwAsyncCustomCSS').length > 0) { var inlineStyles = $('.asyncCSS'); // reuse existing element inlineStyles.innerHTML = ProcessWire.inlineStyles; } else { // element not exists, create a new one var inlineStyles = document.createElement('style'); $(inlineStyles).addClass('pwAsyncCustomCSS'); $('body').append(inlineStyles); inlineStyles.innerHTML = ProcessWire.inlineStyles; } // append inline scripts var inlineScripts = document.createElement('script'); inlineScripts.innerHTML = ProcessWire.inlineScripts; inlineScripts.type = 'text/javascript'; $('body').append(inlineScripts); }); }); I think I'll create and upload the two modules TemplateFileHelper and IntercoolerJS soon... but dev / unstable!!!2 points
-
Tracy Debugger for ProcessWire The ultimate “swiss army knife” debugging and development tool for the ProcessWire CMF/CMS Integrates and extends Nette's Tracy debugging tool and adds 35+ custom tools designed for effective ProcessWire debugging and lightning fast development The most comprehensive set of instructions and examples is available at: https://adrianbj.github.io/TracyDebugger Modules Directory: http://modules.processwire.com/modules/tracy-debugger/ Github: https://github.com/adrianbj/TracyDebugger A big thanks to @tpr for introducing me to Tracy and for the idea for this module and for significant feedback, testing, and feature suggestions.1 point
-
1 point
-
1 point
-
WHOA! I'm trying to figure out what all this does #BashNewb1 point
-
Then start with catching the submit event wth Js, and start the Ajax call manually. But I guess you are already there.1 point
-
1 point
-
If I get it right these pages are in one applicaton (and not on a remote server). You would need to identify what causes the page reload, I guess there's (PHP) redirect somewhere. Instead of that you should do something else. Using an iframe wouldn't do here? The iframe won't close in a modal unless the user clicks to close.1 point
-
1 point
-
I'm not familiar with the blog module, but I assume that "blog_images" is an images field in the blog post template. If so, you don't want to iterate over the images in that field but rather you want to iterate over the PageArray of blog post pages. So something like: <?php $posts = $pages->find("template=blog_post"); foreach($posts as $post): ?> <div class="blog-post"> <div class="post-thumbnail" style="background-image:url(<?= $post->blog_images->first->url ?>);"> <h3><?= $post->title ?></h3> </div> Other summary content here... </div> <?php endforeach; ?> No doubt the blog module has some cool features, but it's not difficult to build blog functionality into your website using the basic PW fields and no module. Give it a go! That way you'll know exactly what's going on behind the scenes, learn about several different field types, and buzz-out when you see how easy PW makes it to build whatever is in your head.1 point
-
@adrian Non-ProcessWire Template Variables panel question: we have a column labelled "Returns" with object, array, string, etc... in it. However, is it just me who is missing the result of a get_class()call? It would be much more informative to see which class the object is the instance of. Is it possible to implement?1 point
-
@hansv Thanks for feedback about the reason! I'm happy you solved the problem It just use the power of Processwire API and hooks1 point
-
@pwFoo Problem solved. No blames to the FrontEndUser-module, all shame is for me!!! In my _main.php there was also code to log in. It was ment for a button to login. Conclusion: there was interference between login-code in the _main.php file and the login-code in the template file. Sorry for wasting your time, the FrontEndUser-module is excellent.1 point
-
One more thing: when AOS is used to heavily customize the admin, one can easily see that it is enabled. But what if it's not so prominent? A globally accessible enable/disable button would also indicate in what state the admin is. Is it on steroids or not? It is an especially important question during the Summer Olympics1 point
-
That sounds like a problem with your installation or missing module. $result would be (exactly) true if a new user is registered. /** * Save the temp User object * @param User $user Temp User object to save * @return boolean Sucessful (true) saved or not (false) */ protected function ___save($user) { if (empty($user->name) || empty($user->email) || $user->pass->hash == '') { return $this->_('Register process unexpected failed!'); } if ($user->save()) { return true; } return $this->_('User registration failed!'); } And the save() method will prevent duplicates. I don't think the loop is generated by the module. Should be template code like the prevent redirection loops example. Do you redirect to the current page or is there a htaccess rewrite? Redirect to login page? ... Anyone else have such problems with the module? Additional examples could be helping.1 point
-
@adrian I may found two bugs for the Mail panel: it doesn't intercept emails for the backend. I have to add the Mail panel for the Frontend to make it work. If you need I can give you access to a pw setup that sends emails from the admin. "Clear emails" button loads this page when clicked: "/page/edit/bookmarks/"1 point
-
Hi, you should execute the login() method one time. In your code it's called twice. If the login was successful you will redirected by the process() method to the destination. It looks like your $fu->process(...) call is executed every time. Could you add some debugging output and break the execution of the template file with the php exit? So you should see your debugging information and debug your code.1 point
-
Hi I also stumbled across this problem. It looks like the new variable handling of php7 is responsible for that... I found a solution wich works on php 5.6 and 7. Just posted an github issue with explanation... https://github.com/adrianbj/TableCsvImportExport/issues/1 greetings, tom1 point
-
Media Manager version 005 (released (07/08/2016)) Happy to announce the latest release of Media Manager. Changelog Media Manager in Repeaters: Media Manager (Fieldtype- and InputfieldMediaManager) can now be used in Repeaters with full access to your Media Library. Demo video and instructions are here.1 point
-
I would not necessarily rely on composer being installed. But you can use the new psr-4 classloader of processwire, which is shipping with 2.8/3.0. $classLoader->addNamespace('MyNamespace', $config->paths->templates . "includes/"); And if you want your module to work in both 2.8 and 3.0 simply do not use the ProcessWire namespace, which will be dynamically injected by the module/template compiler in 3.0.1 point
-
hi, i also think that this would be a great addition but should NOT be the only option. playing around with the jquery demo (http://jonom.github.io/jquery-focuspoint/demos/helper/index.html) i see that it would lead to problems when you only want to show a small part of the image that is located near the border of the image. i think a more advanced concept like the imagefoucsarea plugin would be better. the best would be to have the good old cropping plugin with predefined ratios and/or dimensions, have a simple focus point option and even more have a more advanced focus-area option like in the plugin linked above1 point
-
Hi @paulbrause, Lots of great suggestions above regarding PageTable fields etc, but I just put together a quick module that I think does exactly what you are looking for. https://gist.github.com/adrianbj/2b3b6b40f64a816d397f To make it work as is, you will need these: Templates: album (for the album parent pages) image (used for the automatically created child pages) Fields: images (for the album template) image (for the image template)1 point
-
1 point
-
I'm working with a events calendar myself, though I elected to take a more service oriented approach using google calendar and outlook generated *.ics feeds. If your calendar is going to be as simple as you describe, you might be able to get away with the following approach. Set up three datetime fields - event_start, event_end, and recurrence_end. Set up a text field, recurrence_rule (rrule). Add the PHP When library to your project. For recurring events, set your rrule based on byweekday, bymonthday, etc. You can generate rrules with a google calendar (add a recurring event and look at the ical feed) if you're new to them. For the range to be displayed (e.g. today + 3 months) you can use the api to get all events that have start/end OR start/end-recurrence overlap with the displayed range. Set up an array and loop the events, using PHP When to generate a list of occurences if an rrule exists, push rule occurences and non-rrule events in as as siblings, sort by event_start/occurence_start. Render the list of occurences. That's the basic formula anyways.. If you are avoiding google only because of the look of thier embeded calendars, you might consider rendering your own calendar of events with PHP When and the raw icalendar (*.ics) feed they provide. Edit: grammar.1 point