Leaderboard
Popular Content
Showing content with the highest reputation on 05/21/2018 in all areas
-
And now for something totally different... This project is neither about layout nor about fancy eye catchers. Its about a game from last century which celebrates its 30th anniversary this year and still has a some more or less active community. The idea behind the funky layout is to reutilize the original game graphics and fonts to obtain some corporate feeling, so it intentionally pixelates. On the other hand the bootstrap-based layout is modern enough to be responsive. The forum was originally founded in 2003 on ezBoard which morphed into YuKu around 2007 and ended in acquisition by Tapatalk in 2017. Most of its original flair had gone due to those provider changes and Tapatalk's ideas about collecting data didn't seem to be very compatible with the upcoming GDPR. Some action was required. My obvious first thought was, which forum system to choose. Second thought was, why not build a forum on ProcessWire? First hurdle to take was grabbing the existing forum content from Tapatalk, since they simply do not provide any kind of backup or export mechanism (at least not for free boards). Luckily nowadays we have jQuery and JavaScript which easily loads any website into a DOM tree which can be parsed and analyzed with little efford. Quickly we had one big structured JSON file with all forum content. It took another day to write a test importer and restore that content into a hierarchy of about 5000 ProcessWire pages to get an idea about the resulting performance and that looks pretty promising. In fact the final forum is still located on a shared host without much optimization and performs pretty well (response times around 100mSec except on root). Another goal, probably not possible at all with "standard" forum software, was the ability to play some background game music during the forum visit, so content update is entirely driven by AJAX which, in turn, nicely reduces data payload as well. From a technical standpoint the implementation uses the page fields created and modified to maintain its author and realize the typical "new posts" functionality, which needs some tweaking to keep everything in sync. PW Form Builder is used to simplify handling of input forms and configuration management of the frontend CKEditor (which is equipped with a dozen of plugins to provide emoticons, a per-user image repository and other fun stuff). Have fun https://forum.tom-productions.de/gameofrobot/ https://tom-productions.de/4 points
-
Hello, Is anyone able to explain this behaviour? When I open a repeater item for the first time, it has a 1px outline left and bottom, however if I close and open it again the outline is gone. I've checked with the inspector but can't really understand what's causing this. I've added a video of the problem below. Running ProcessWire 3.0.98 and Uikit admin theme. Thanks, Beetrootman repeater.mov1 point
-
Bingo! We have a winner! Everyone can go home now, @Robin S done won the prize. ? I cannot tell you how long that would have taken me to figure out. I'll give you a hint: I'm old and don't have that much time. Thank you and thank you to everyone that helped. This forum community makes a defining difference between other CMSs.1 point
-
When you use a single "." at the start of a URL it means "the current path". Your Javascript executes from "/admin/myprocess/option1/", so when you define the AJAX URL as "./option1-list/" the resulting URL will be "/admin/myprocess/option1/option1-list/". There is no execute method for that URL. Generally you would expect a 404 error, but because URL segments are enabled for Process modules the URL segments are parsed and the valid segment "option1/" is found, and the "option1-list/" doesn't resolve to anything so is effectively ignored. So that is why executeOption1() is executing and you are getting that data back in the AJAX response. For your own clarity I suggest assigning an absolute URL to a variable in Javascript and using that as your AJAX URL. That way you can log the URL to debug and be sure it is what you are expecting. var url = ProcessWire.config.urls.admin + 'myprocess/option1-list/'; console.log("url: " + url); // ...1 point
-
Can you try to change url (without "-" separator) ajax: { url: './option1list/', dataSrc: '' },1 point
-
Glad you sorted it out eventually. Perhaps now is a really good time to implement a Backup Strategy whilst the lesson of hardship & panic is still fresh in your mind ?1 point
-
Just checked and I get the same error on my local wamp server. Site itself works great but get 404 on admin. Any ideas? ? ?1 point
-
Did you lose for some reason permission in admin template ? Check if you have to add "useRoles":1 in data for admin template.1 point
-
Did you install processwire this time in the root or again in a subfolder ? I am running out of ideas, maybe an eperienced coder will step in and have more ideas.1 point
-
I have it installed. I get [2018-05-21 15-17-19] PHP Notice: Trying to get property of non-object in ..../novo/site/templates/cenik.php:20 @ http://barbsart.si/novo/si/cenik/ [2018-05-21 15-17-20] PHP Notice: Trying to get property of non-object in ..../novo/site/templates/settings.php:2 @ http://barbsart.si/novo/si/nastavitve/ Not sure what this means ? all looks fine on those files and was working great until now. I will try ti install a fresh copy and copy the site folder and DB and hope this will fix the problem. I'll get back if all goes well. Thank you. R1 point
-
How long can it take to install a fresh new processwire installation and copy back the site folder and database, 10 minutes ??? That is of course your problem is not lurking somewhere (e.g. a typo) in your templates or corrupted database record.1 point
-
Sometimes searching for the cause of a problem can take more time than installing a fresh new processwire installation, and copy back the site folder and database.1 point
-
There was a similar thead a few days back but sadly without a solution: I never tried to run a PW instance on an IP address in a subfolder. Maybe there .htaccess issues or something like that.1 point
-
Hi rick, I think you need a trailing slash for AJAX URLs in PW. Try "./some-thing/"1 point
-
If someone is interested, here is example how to automatically assign icon to file depends on file type. No images or empty HTML tags "<i class="fa..."></i>", only CSS pseudo elements. Link to Codepen Regards.1 point
-
Hello Matthew, the same things happened to me few times on PW 3.0.xx, this is not some help, only few facts what I noticed. I rember that I had some errors in session logs (did not investigate). What works in my case was to use shortcut to edit pages from front-end ("go to back-end from front-end" and admin page tree problem disappear). Also you can try, logout, CTRL+F5 (clear browser cache), and login again. Regards.1 point
-
Is there anything showing up in the dev console? Any JS or 404 errors? Is this a local (WAMP, XAMP, MAMP, Laragon) or remote/server setup?1 point
-
2018 update: You can also use strtotime in selectors since a while (don't know in wich PW version, but it works in versions > 3. So you could do: $pages->find('template=invoice,created>"first day of this month",created<"last day of this month"'))1 point
-
Thanks horst. I did some searching and thought it might be useful to compile a list of the issues, which are mostly (or perhaps all) resolved now. Solved: The issue mentioned above where some images were lost when multiple large images were uploaded simultaneously. https://github.com/ryancramerdesign/ProcessWire/issues/1871 https://processwire.com/talk/topic/13522-problem-with-ajax-images-upload-and-sessionhandlerdb/ Solved: Session times recorded incorrectly when MySQL timezone does not match local time. https://github.com/ryancramerdesign/ProcessWire/issues/1838 https://processwire.com/talk/topic/13307-session-handler-database-times-out-by-two-hours/ Solved: Truncated session data when Tracy Debugger installed. https://processwire.com/talk/topic/15784-what-will-trigger-a-csrf-error/ Solvable: Old sessions not deleted on some Ubuntu servers. I have struck this one myself and @horst's suggestion in the post below solved it. https://processwire.com/talk/topic/5796-session-handler-database-do-not-delete-old-sessions/?do=findComment&comment=56596 Fatal error thrown on Windows server using IPv6. https://github.com/ryancramerdesign/ProcessWire/issues/1596 https://processwire.com/talk/topic/12935-issues-moving-from-iis-localhost-machine-into-windows-server-production/ Slow performance with large number of sessions. https://processwire.com/talk/topic/18718-session-handler-db-issue/ But with huge amounts of traffic performance may be affected without SessionHandlerDB installed too. Login problems after website migration. Might be solvable by clearing caches. https://processwire.com/talk/topic/5317-cant-log-in-this-request-was-aborted-because-it-appears-to-be-forged/?do=findComment&comment=142160 https://processwire.com/talk/topic/13781-problems-after-installing-remote-copy-to-local/1 point
-
@SIERRA You could try this this module made by @adrian before going further : https://gist.github.com/adrianbj/e391e2e343c5620d07201 point
-
This module is meant to give a lt/lng position of an address so we can display a marker on a map. It is not an address field type. When you set the marker on the page that you edit, it will get the address for the lat/lng that you have set in the GUI by reverse geocoding it through the Google geocoding API. This returns the long address string that you can get in your template with $page->mylocationfieldname->address. To answer your question, there are ways to get a properly formatted address but all of them involve some work: 1. extend the module yourself to store address parts. Or read posts in this thread from here on and than use @BrendonKoz or @patman forks: 2. add fields to your template for postcode, street address, city, country. Fill them manually when you edit the page. Then you can render them in your templates. This should be the easiest way. 3. switch to the Map Marker Module which uses Google Maps and read from this post on where @adrian has extended the functionality to give you exactly what you want:1 point
-
I also use something like @horst but only with without eot, svg and ttf (plus with a stylus or scss mixin), see https://stackoverflow.com/questions/36105194/are-eot-ttf-and-svg-still-necessary-in-the-font-face-declaration1 point
-
1 point
-
I ever use absolute urls, because then I can match them from within different located css files. Normally I store all fonts under /site/templates/styles/fonts/.1 point
-
No surprise here.. I guess I am from the old school. A 'long time' ago, logos used to be background images set on anchors (<a> tags). Menu items (<a> tags) used to have background images called sprites that would 'shift' on hover to create a nice hover effect...1 point
-
This thread is literally years old. See here for the options regarding disabling the session: https://processwire.com/blog/posts/multi-instance-pw3/#more-session-control1 point
-
1 point
-
Building a website is not the problem. Running a business with it can become the problem. Collecting e-mail addresses, tracking visitors and monitoring visitor-behaviour, combining it with 3rd parties like Facebook and ad networks will be a much bigger thing now. Cookie permissions here, double-opt-in there, and so on... it will be much more challenging than before. Don't know anything special about sources in Spain, UK, US but here in Germany there are some lawyers offering (free and paid) help for all kinds of businesses. Just to name two I prefer: https://www.e-recht24.de/ and https://drschwenke.de/ And as always with legal stuff: lawyers are my one and only trusted source. Not other companies (like the one above) that offer checklists, guides and tutorials.1 point
-
1 point
-
To enable this, depending on your PW-Version, you may need to set the $config var useFunctionsAPI to true: $config->useFunctionsAPI = true; // pages()->find(), sanitizer()->pageName(), region('content', $markup), Links: https://processwire.com/blog/posts/processwire-3.0.40-core-updates/ https://processwire.com/blog/posts/processwire-3.0.39-core-updates/#new-functions-api https://processwire.com/blog/posts/processwire-3.0.39-core-updates/#new-region-function PS: To easily find things on the PW site, you may use g**gles search like this: site:processwire.com $config->useFunctionsAPI1 point
-
Here's the simplified version of your JS. One thing you should look out for is that inside your form submit handler, you were preventing default submit action, but then submitting again without removing the handler, which caused the same routine to run repeatedly (submit? can't -> validate -> submit -> can't ,,, repeat). When the form validates and you're ready to submit, remove the handler (that prevents the default action), so that the form can submit properly. // Stripe API var stripe = Stripe('pk_test_*****************'); var elements = stripe.elements(); // DOM Elements var form = document.getElementById('payment-form'); var displayError = document.getElementById('card-errors'); // Card style var style = { base: { fontSize: '16px', lineHeight: '24px' } }; // Create an instance of the card Element // Add an instance of the card Element into the `card-element` <div> var card = elements.create('card', {style: style}); card.mount('#card-number'); card.addEventListener('change', function (event) { if (event.error) showError(event.error.message); else showError(); // remove previous error }); form.addEventListener('submit', handleSubmit); function handleSubmit(event) { event.preventDefault(); stripe.createToken(card).then(function (result) { if (result.error) { return showError(result.error.message); } // remove previous errors showError(); // Send the token to your server injectToken(result.token.id); // prevent infinite loop form.removeEventListener('submit', handleSubmit); // send the form form.submit(); }); } function injectToken(tokenId) { // Insert the token ID into the form so it gets submitted to the server var tokenInput = document.createElement('input'); tokenInput.type = 'hidden'; tokenInput.name = 'stripeToken'; tokenInput.value = tokenId; form.appendChild(tokenInput); } function showError(errorMessage) { // if error is not given, remove previous error errorMessage = errorMessage || ''; displayError.textContent = errorMessage; }1 point
-
Hello, If you use this module, you may be interested by my fork https://github.com/jlj/MarkupTwitterFeed, that adds the following features to the official MarkupTweeterFeed module: support of the recent Twitter extended tweet format (tweets longer than 140 chars); support of emoji characters in tweets; display of image in a tweet (only the first image is displayed in the curent version); display of video in a tweet (with a html5 video markup); for retweets, display of the original author and avatar in the tweet. Also, it allows a more flexible per-item rendering, as in the following example: $t = $modules->get('MarkupTwitterFeed'); $t->limit = 10; $renderOptions = array( 'showDate' => 'before, after', 'dateFormat' => __("M j, Y"), // Tweet block date format 'listItemOpen' => "\n\t<div class='tweet-item'>", 'listItemClose' => "</div>", 'listItemText' => "<i class='fa fa-twitter'></i> <span class='tweet-text'>{text}</span>", 'listItemDate' => " <div class='date'><i class='fa fa-calendar'></i> {date}</div>", 'listItemLink' => "<a rel='nofollow' href='{href}'>{url}</a>", 'videoAttributes' => "autoplay loop muted", 'preserveLineBreaks' => 'coalesce', ); foreach($t as $tweet) { echo $t->renderItem($tweet, $renderOptions); } Examples from my website: This module has been tested with pw 2.7.2 only, so I cannot guarantee the proper working with 3.0… Hope this will be useful for others here.1 point
-
@benbyf I forked the module and added the functionality, you can find the module at github: https://github.com/flydev-fr/MarkupTwitterFeed To search hashtag use it as the following : $options = array( 'searchQuery' => 'ProcessWire', 'limit' => 3 ); $t = $modules->get('MarkupTwitterFeed'); $out = $t->search($options); echo $out; The function search() act like render(). Thanks again for the suggestion (searching for hashtag). I think we can improve it a bit, let me know for any needs.1 point