Leaderboard
Popular Content
Showing content with the highest reputation on 06/06/2018 in all areas
-
Dear All, I'm really proud to show you my first site done with ProcessWire! ❤️ It's called "In bianco e Nerd" and it's the official site of a very active italian nerd community. This is the url: https://inbiancoenerd.com/ Actually it's a quite complex website, I'm using different templates for almost every section and a huge part of the code is dynamic (for example on the single posts i can choose from the backend to move down the title, i can change completely the header, the colors and the featured image). Then there's a special section (https://inbiancoenerd.com/links-fighi/) that is a link gallery where i post cool stuff and you can filter the results using Algolia. And...it's full of easter eggs too ? HOMEPAGE LINK GALLERY SINGLE POST SKILLS Right now i'm using these modules: - AdminOnSteroids - ColorPicker - ProFields - Social Share Buttons - And the wondeful ProCache (it works like a charm) ❤️ - And soon I'll use ImageOptim too ? Server/hosting: Cloudways (DigitalOcean) + Cloudflare ProcessWire: 3.0.105 Hope you like it! Please let me know your thoughts! Right now i'm trying to promote ProcessWire in Italy because, in my personal opinion, it's one of the best CMS i've ever tried in the last 15 years of my career. So, thank you so much for this fantastic tool and thank you all for this amazing community.9 points
-
I'd rather have db backups stored outside the webroot then having them encrypted. By default they're protected by the .htaccess file, but screwing up that file is easy and common. But if that's working (or files are outside the webroot) only people with access to the webserver can see/use the backup files and are highly likely to also have access to the config.php and therefore the db credentials as well. In that case encryption won't give you anything anymore.5 points
-
3 points
-
Thanks @Ivan Gretsky and @lokomotivan! I meant to respond yesterday, but I got caught up in the code. I actually did go the data-id="" route which I believe will make things much easier to work with in the future. Now I just need to figure out the ajax get side (updating a div once the initial posting of ids is made) and Ill be in business. I appreciate all the help!2 points
-
This error is caused by PHP being unable to reach a source of randomness to generate random numbers (like, in this case, session IDs). The exact cause can vary, ranging from missing read access to /dev/urandom (check if it is included in php.ini's open_basedir if that restriction is configured) over too old PHP versions to improperly set up chroot jails (e.g. missing to include /dev/urandom) and probably some scenarios I can't think of off the top of my head.2 points
-
You can use JSON.stringify(data) Edit: Sorry ddint read ur post entierly :). Why dont u for example add data="<?=item->id?>" attribute to each button, then in ur script get the value var itemId = $(this).attr("data"); var data = { id: itemId, }; $.ajax({ type: "POST", url: "/intra/status/", data: JSON.stringify(data), success: function(){ console.log(itemId); } });2 points
-
This module allows you and your site editors to protect a page (and optionally its children, grandchildren etc) from guest access directly from the page's Settings tab. You can also limit access to certain roles. http://modules.processwire.com/modules/page-protector/ https://github.com/adrianbj/PageProtector It makes it very easy for editors to set up various password protected areas on their site, or to simply protect a new page or section while they are still working on it. Ability for your site editors to control the user access to pages directly from Settings tab of each page Include whether to protect all children of this page or not Optionally allow access to only specified roles Option to protect all hidden pages (and optionally their children) Ability to change the message on the login page to make it specific to this page Option to have login form and prohibited message injected into a custom template Access to the "Protect this Page" settings panel is controlled by the "page-edit-protected" permission Table in the module config settings that lists the details all of the protected pages Shortcut to protect entire site with one click In addition to the admin interface, you can also set protection settings via the API: // all optional, except "page_protected", which must be set to true/false // if setting it to false, the other options are not relevant $options = array( "page_protected" => true, "children_protected" => true, "allowed_roles" => array("role1", "role2"), "message_override" => "My custom login message", "prohibited_message" => "My custom prohibited access message" ); $page->protect($options); As alway, I would love any feedback / suggestions for improvements. Hope you find it useful! Page Protection Settings (settings tab for each page) Module Config Settings1 point
-
Hi guys! What do you think about something like this? Because I use this option regularly in the Windows File Explorer breadcrumb and it's very useful. The drop-down menu can display only published/visible child pages. I've tried to find how to do it as a module, but I'm not a coder with enough skills for that ... or I don't know if I can use hooks to do that ...1 point
-
Thank you OLSA, your response got me pointed in the right direction and I was able to make this work. I appreciate the help!1 point
-
PHP probably runs under the user configured in your anonymous authentication settings. In IIS manager, click on your website, then on "Authentication". Select "Anonymous Authentication" and click "Edit" in actions bar at the right. There you will see the user (default: IUSR). Grant this user modify permissions on the assets folder.1 point
-
Try to install a fresh copy of PW to the server you have the issue and during installation PW will let you know if your server is properly configured.1 point
-
I use this hook to inject edit icons into the breadcrumb. Unfortunately the options exposed by $this->wire('breadcrumbs') are not great, no page id's etc… so it's kind of a hack… public function init() { wire()->addHookAfter('AdminThemeUikit::renderBreadcrumbs', $this, 'renderBreadcrumbs'); } /** * Render a list of breadcrumbs (list items), excluding the containing <ul>. * * @return string */ public function renderBreadcrumbs(HookEvent $event) { if (!$event->return) { return; } $process = $this->wire('page')->process; if ($process == 'ProcessPageList') { return ''; } $breadcrumbs = $this->wire('breadcrumbs'); $out = ''; // don't show breadcrumbs if only one of them (subjective) if (count($breadcrumbs) < 2 && $process != 'ProcessPageEdit') { return ''; } if (strpos($this->layout, 'sidenav') === false) { $out = '<li>'.$event->object->renderQuickTreeLink().'</li>'; } foreach ($breadcrumbs as $breadcrumb) { $title = $breadcrumb->get('titleMarkup'); if (!$title) { $title = $this->wire('sanitizer')->entities1($this->_($breadcrumb->title)); } $edit = ''; $icon = $event->object->renderIcon('pencil'); if (strpos($breadcrumb->url, 'open=') > 0) { $pageid = explode('open=', $breadcrumb->url); $pageid = end($pageid); if (wire('pages')->get($pageid)->editable()) { $edit = " <a href='../edit/?id=$pageid'>$icon</a>"; } } elseif (strpos($breadcrumb->url, '../') !== false && wire('process')) { $pageid = wire('process')->getPage()->parent->id; if (wire('pages')->get($pageid)->editable()) { $edit = " <a href='../edit/?id=$pageid'>$icon</a>"; } // modify open $breadcrumb->url = "../?open=$pageid"; } $out .= "<li><a href='$breadcrumb->url'>$title</a>$edit</li>"; } if ($out) { $out = "<ul class='uk-breadcrumb'>$out</ul>"; } $event->return = $out; } @ryan maybe this would be a useful addition to AdminThemeUikit?1 point
-
True, it's a great module. But does it work for you in the frontend with files? Because as @kongondo said here:1 point
-
whatever version i'm using works great and has the option to use files and not pasted code, in the field config.. i thought it was the dev branch.. very stable and i have it running on 5 projects now, basically this is a completely indispensable module, i usually end up with on average 10-15 RM fields on any given project..1 point
-
Hello Thank you both for your time and help with this. I have been able to get superuser access to the site. Thanks again. David1 point
-
@MarcoPLY, Moderator Note I would have thought you've been around long enough to know that module related questions need to be posted in their respective support forums, if such do exist ?. I've moved your post to Media Library's support forum.1 point
-
I don't know which version you are using, but it already work out of the box... you do not need to hack something to get it working. It already check if the post var from step 1 is an email, if not, it check against username. https://github.com/processwire/processwire/blob/dev/wire/modules/Process/ProcessForgotPassword.module#L234 In ProcessForgotPassword 1.0.3, you can configure it :1 point
-
1 point
-
Thank you, Bernhard! I'm glad you like the GDPR page! Obviously I've all the legal stuff too on the footer but i wanted to explain (not in a verbose mode) what i'm doing for the privacy of my users. And about the Uikit...I absolutely love it and I'm planning to use it in a future project! ?1 point
-
Hi @Francesco Mugnai, welcome to the forum and thanks for sharing! I like how you did the gdpr page ? [pub] Also a nice skills page, but it seems that you are missing the Uikit CSS framework ?? [/pub]1 point
-
Hi @kixe, Sorry to bother you again. Could you please check your code again? I get the following error Error: Class 'ProcessWire\HookEvent' not found (for this line $event = new HookEvent(array('object' => $otherPage)); ) PS: Sorry, I'm still learning and have to admit that hooks are out of my range...1 point
-
Hi @louisstephens! Are you putting all that js inside a foreach? If so the variable names are the same for each list element. Therefore they get overwritten and you always get the last value in your itemId. Either change the variables to have index as part of their name (itemId1, itemId2) or (preferably) store the id as a data attribute and write a universal js which will get the corresponding data-attr value for each button click dynamically. If I totally misunderstood you case, please forgive me and provide some more details.1 point
-
1 point
-
@asilentwish - please take a look at the AdminRestrictBranch module that @bernhard mentions - it takes care of these menus and all sorts of other issues. Obviously it doesn't hide the pages you want, but you'll be able to grab the bits of code you need from that and add it to one of those gists I listed. But please also read thoroughly through that forum thread - there are issues with what you want to do - what if a parent is hidden, but the user needs access to the children?1 point
-
Then with a hook, you can remove them, look : On a module : $this->addHookAfter('LoginRegister::buildProfileForm', $this, 'renderProfileForm'); protected function renderProfileForm($event) { $form = $event->return; foreach ($form->children as $field) { if ($field instanceof InputfieldEmail || $field instanceof InputfieldPassword) { $form->remove($field); } } } or in ready.php : wire()->addHookAfter('LoginRegister::buildProfileForm', function($event) { $form = $event->return; foreach ($form->children as $field) { if ($field instanceof InputfieldEmail || $field instanceof InputfieldPassword) { $form->remove($field); } } });1 point
-
It seems that the confirm field in this module get it's id based on the name attribute instead of the id attribute . So if one changes the id attribute to a value other than the name, the confirm input id is not effected. I consider this a bug. In the module that I am developing I have multiple tabs with forms in multiple tabs. This causes id duplication when using the InputfieldPassword field on two different tabs. I can get around the problem by specifying the id for the field, but in the case of the InputfieldPassword field, it bases the Confirm id attribute on the name attribute instead of the id attribute. I am using ProcessWire 3.0.98 and have attached the modified module (see lines 209 and 241) InputfieldPassword.module1 point
-
I agree. Please create an issue for it on GitHub: https://github.com/processwire/processwire-issues/issues1 point
-
1.9.5 is uploaded. I've disabled the FileCompiler because on Win localhost it was very slow, so if you have issues try to refresh the module cache. Changelog: - fix inline pagelist items if "Always show pagelist actions" was checked (reported by ottogal) - Delete and Trash action (non-superusers): skip confirmation if ctrl key is pressed - new Skip Trash? checkbox on page edit Delete tab (SuperUsers only, requested by Robin S) - fix NavItems causing JS error on "Find Files to Translate" page Search box - hotkey save: do not add blocking overlay until html5 required attribute requirements are not resolved (reported by Robin S, #95) - asmSelect searchbox: allow wider dropdown - AdminThemeUikit, percentage-based widths ON: move AsmSelect placeholder and maxlimit fields after Required field to avoid layout issues - add namespace and FileCompiler=0 to bypass PW's FileCompiler (slow compile on Win localhost, may need modules refresh)1 point
-
Definitely an interesting move, and I'm also wondering what Microsoft is planning to do with GitHub ? How will the focus of the platform evolve and will there be new restrictions for projects or users? Do they plan to integrate GitHub more tightly with their own tools? Could this mean that they're so attached to the GitHub platform that they need to make sure one of their competitors doesn't buy it first? Or perhaps this is just one more step in their ongoing effort to impress developers? There's not enough data to make any kind of educated guesses yet, so we'll just have to wait and see how it goes. One obvious thing is that a corporate entity like Microsoft wouldn't just go around buying services/platforms for the heck of it, or because said services/platforms have a great community, or whatever. Their primary goal will always be growing their business and bringing in more money – and somehow, directly or indirectly, GitHub is now part of that. Although I'm not particularly worried, I do think it's reasonable to be a bit concerned when a massive corporation like Microsoft buys out a platform as influential as GitHub – especially when that influence is probably most prominent within the open source community and individual developers working on non-commercial projects. Anyway, I can't see how wrecking the legacy of GitHub would be good for their business, so there's (probably) no need to be worried.1 point
-
I hope this doesn't happen... if($context == "GitHub" && $owner == "Microsoft") { str_replace("Chromium","Edge", $electron); } Lately, I've been loving Electron...?. I think Atom will be surplus to requirements though. No need for in-house competition with VS Code.1 point
-
You could do this entirely just client-side, i.e. use cookies to store the pages and page-ordering. How would I save the page state? If you really want to save it in PW, simply create a textarea and save a JSON object, or maybe even a simple comma-separated list with page IDs would do the job. With Ajax, you would then simply post (save) a user-choice to PW, or retrieve it like that. No need to even use something like page reference fields.1 point
-
Found quite a few bugs in modal.js, reported them under the same issue. Thanks for your help by the way! Your quick fix worked. @matjazp1 point
-
Are you using a module or a self-generated JSON-LD snippet? Where do you see the result (Google Testing, Browser extension, ...)? It shouldn't matter but you want to use httpUrl for JSON-LD.1 point
-
You definitely should give them another try @AndZyk. Since your first post a lot of things changed. Am I really experienced? Maybe kind of. Ask me this when I finished the next 100 projects with lots of rich snippets/schema-markup. ? My examples and code snippets wouldn't be any different than any other resource out there. I really love this tool: https://technicalseo.com/seo-tools/schema-markup-generator/ You can create several kinds of markup as an example and implement them in your project. Those examples are a great starting point for everything. From breadcrumb to review or events. Test your markup over at Google and do what they want you to optimize in your markup: https://search.google.com/structured-data/testing-tool/u/0/ Check the schema.org definitions and guides for more details: http://schema.org/ Set up Google Search Console, check your markup with it and let Google crawl your optimized sites. Get reportings on errors and fix them fast. As written before: start with small parts of site (if possible) check results every 2 days for several weeks don't try to trick Google don't fake reviews don't fake review-counts or anything else If you are into Local SEO do the basics and create company and localBusiness markup with everything you can (logo, social profiles, site search, opening hours, ...), connect to Google My Business. Feel free to contact me or ask whatever you want. It's easier for me to answer a question right now.1 point
-
Hi Ryan, With the addition of the new profile, in terms of file size nearly 60% of the core is now made up of site profiles. For new users these profiles are no doubt very handy, but I think for a lot of existing users the profiles (apart from "blank") are not needed. Speaking for myself I don't have a need for the bundled profiles and so delete them each time after downloading a new version from GitHub. Doing that isn't a big deal, but it would be nice to keep things as lean as possible for users who don't need the profiles. And I'm not sure but are the profiles downloaded and discarded each time PW is upgraded via admin? What do you think about starting to make use of the Releases feature of GitHub? Each time when a new version is ready there could be a new release created, containing two zips: "processwire" and "processwire-no-profiles", or whatever naming scheme you think best. Using releases would have some other benefits too. For dev branch users it would be easier to know exactly what version of PW you are running, as opposed to the current scenario where changes to the latest version get pushed out over the week so someone who installs 3.0.105 on Saturday may have different files to someone who installs 3.0.105 on Thursday. When someone raises a problem in the forum they could say exactly what version they are running (could be an older release) and people who want to help could more easily download that exact release to try and replicate the problem. Another benefit to using releases is that you can collect metadata about downloads. That would be a great way to track the growing interest in PW over time. https://help.github.com/articles/getting-the-download-count-for-your-releases/1 point
-
Such a setup might now be even more flexible (and even easier) with the use of markup regions. You could populate regions with widgets easily just by doing something like this: foreach($page->getVisibleWidgets() as $widget) { echo WireRenderFile("widgets/{$widget->name}.php", ['page' => $page, 'region' => $widget->region]); } And the widget something like that: <div pw-append="<?= $region ?>"> my great widget </div> Only thing to do would be the user interface for defining the visible pages, I've done that once like this: https://processwire.com/talk/topic/8635-simple-example-for-widget-management/?do=findComment&comment=148216 Would be nice to put that into a module to make it reuseable! And to add a simple API just like $page->getVisibleWidgets(). If you want to sponsor/outsource that just send me PM. If you want to do it on your own I'm happy to share what I have so far and help wherever I can. Edit: Or maybe just use the selector fieldtype?1 point
-
Hi GFXmonkey, there are many option to do that. Here is very basic example. 1) Eg. outside of main pages tree, create hidden parent page, eg. "Addons" (or "Blocks", "Widgets", or...). 2) Inside "Addons" tree you create and store reusable content (pages) using various templates (eg. slider, text-image, call-to-action, downloads, etc...). 3) Now what you also need is page reference field (eg. name "widgets") on pages inside main tree - to select - pages from "Addons" tree. How to use this concept? Example: "Text-Image widget" 1) Inside "Addons", create new page using template "text-image", place some image and insert some text. 2) Go to desired page (where you have page reference field "widgets") and select newly created "text-image widget" (1) How to render it? Also many options, but simple can be: if(count($page->widgets)){ foreach($page->widgets as $widget){ // as example widgets templates are in folder "widgets" // also this part can be different, find tutorials about ProcessWire render() method... include('./widgets/' . $widget->template->name . '.php'); } } Regards.1 point
-
My opinion on JSON-LD markup is the total opposite. It works really well for my (testing) sites and for clients. By now we talk about 30+ sites so finding are quite solid in my opion. There are a few things I noticed when working with JSON-LD or any other kind of meta-data/rich-snippets. Organization Implementation: easy Results: may vary Finding: better results when used together with Google Business and when there is a good amount of BRANDED queries Product Implementation: medium Results: Rich snippets in search results with pricings, stock infos, much higher CTR Finding: takes up to a week for the first results to show up Review Implementation: medium Results: rich snippets like Product but with additional rating stars, CTR even slightly better Finding: takes up to a week for the first results to show up Breadcrumbs Implementation: easy Results: may vary - larger sites benefit from it way better than small sites and one-pager Finding: don't try to trick Google - use the same data as on the page (same title, same url, same everything) otherwise pages can drop or can disappear Site search Implementation: easy Results: may vary when sites are too small Finding: the bigger the site, the more products it containts, the more "BRAND PRODUCT/CONTENT" queries Google notices the more likely Google will place a site search in search results - working example: https://www.otto.de/ (not one of my clients) Article Implementation: easy Results: may vary Finding: works well for recent news, breaking news - not so working well on old or outdated posts and small blogs/sites. Recipes Implementation: medium Results: huge snippets, high CTR Finding: you should be one of the very first with that recipe otherwise your snippet will not show up Events Implementation: medium Results: may vary in many ways - sometimes you get a nice event list under your site, sometimes your events show up for totally different queries that belong some how to your event (listed on event sites or for that very special location) Finding: it's a good idea to create JSON-LD for events as the results can spread across the web for all kinds of search queries - perfect for events you want to see everywhere on not just for your site/your brand.1 point
-
Issue was fixed by Ryan. $options = $fieldtypes->get('FieldtypeOptions')->getOptions('YOURFIELDNAME'); foreach($options as $option) { echo $option->id; echo $option->value; echo $option->title; } This output all your options (id, value or title). This piece of code doesnt work multilingual. It only outputs the default language. If you have a multilingual site you have to output value and title in the specific language. //get value and title in different languages; if ($user->language->name != 'default') { $title = "title{$user->language}"; $value = "value{$user->language}"; } else { $title = 'title'; $value = 'value'; } $options = $fieldtypes->get('FieldtypeOptions')->getOptions('YOURFIELDNAME'); foreach($options as $option) { echo $option->id; echo $option->$value; echo $option->$title; }; Hope this is useful for others!1 point
-
Much of this defers to the GNU v2 license. My thoughts are that people should feel free to make their own admin theme and put their logo (or their clients logo) wherever they see fit. But regardless of admin theme, I do think the software name ProcessWire, version number and copyright should always remain in the footer of the admin at least. The reason for this is that I don't ever want ProcessWire to be a burden on a client. Web sites very often outlive the relationship of the site developer to the client. I think it's important for the client to know what software and version they are using and where it came from. Without that, if some future issue surfaces, the client would be blind and ProcessWire would be a burden on them. Can you imagine white label installations of any other major open source CMS out in wild, and what a security nightmare that would be? Keeping this information in a place where the client can find it keeps everyone honest about how the software is licensed. If someone just provided a re-branded PW to a client and charged them $25k for it, I think it's important that the client knows they are paying for a service from their developer and not the software. If a company still felt strongly that they needed to remove the software name, version and copyright from the admin, then I'd want them to keep and maintain a long term support contract with us and make the GNU license really clear to the users of the software.1 point