Jump to content

Leaderboard

Popular Content

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

  1. Pretty much exactly what I offer as a web designer -> look at wix or sqaurespace and if you want to do something more interesting in functionality or design then come to me and I'll make up a PW site with the extra requirements. I like working on new and interesting projects not just banging out the same site again and again, so PW works well for me. Plus the community are super helpful! I never enjoyed the swamp of wordpress and drupal modules and forums
    5 points
  2. I'd say that if your small business can afford week or more development time (high quality and/or unique look and feel, some custom processes, integrations or just big site), then ProcessWire is excellent option. If they just need lot's of bells and whistles out of the box, then some high quality WordPress themes or SaaS offerings (wix, squarespace etc) would be best. Due the nature of ProcessWire, it is actually also very nice for pretty static websites, where only few places are editable (maybe news, menu or price lists etc).
    5 points
  3. Quick update to the CreateUsersBatcher action. It now allows two options: 1) Define Username and email address (requires EmailNewUser to generate password). 2) Define additional user template fields (whichever ones you want). If you use this option and include the password, then you don't need the EmailNewUser module. You could even given all staff at a client's office the same temp password and let me know by phone (this way there is no security risk with emailing even a temporary password that will be changed) - it's your choice. Hopefully this screenshot will help to explain it better - note that the "New Users" textarea lists the fields from the user template and the order they need to be entered. In this example I have additional "first_name" and "last_name" fields, as well as the field added by the PasswordForceChange module which you can set to 1 to enforce this if you want.
    4 points
  4. If I'm not mistaken, browsers will complain if pages are being served as HTTPS with insecure resources. Further, I understand that Google is beginning a process that marks non HTTPS sites (or pages) as insecure. As such, my recommendation is simply to turn it on for everything and ensure it never expires. Reference: Google Chrome to start marking HTTP connections as insecure
    3 points
  5. If you use Hanna Code, you will place the Hanna Code in the RTE textarea of your page ,e.g. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras et rhoncus nisl, a facilisis turpis. Integer sit amet fringilla velit, quis lobortis leo. Aliquam vitae ante tristique, sollicitudin est sit amet, scelerisque leo. [[widget]] Pellentesque iaculis mi dolor, id pretium dolor pellentesque eu. Proin in tincidunt mauris, eget facilisis nibh. Mauris eget euismod magna. Nunc eu mi pellentesque justo pharetra dapibus. The 'widget' will be read by Hanna Code and it will apply the PHP code present saved for that widget in Hanna Code editor. I can give you example code. All your clients would have to do is to put [[widget]] on each page, or if passing values, [[widget data_type=whatever, etc]]. Would they be able to do that. As for the other alternative, you could use a normal textarea without RTE and instruct the Hanna Code [[widget]] to get its values from that textarea. Hope this makes sense. Edit: Beaten by Robin S. More thoughts: Scenario 1 If your widget code will be place before or after your body text, then you don't need Hanna Code; only a non-RTE textarea field. In your template you would have two fields. One is your RTE textarea and the other the non-RTE one. In the RTE enter body copy as normal. In the non-rte one, let's call it widget_textarea, your editors will place the code. If the whole code will be changing, as opposed to parts of it, then they will put in that textarea the whole code. You will then only have to do the following in your template file echo $page->body;// RTE body copy echo $page->widget_textarea;// will echo your <healcode-widget></healcode-widget> code Scenario 2 If your widget code will be appearing in between text, then you can either use Hanna Code only or a combination of Hanna Code and the widget_textarea. Then in your template file, you would only need to do the following: // since the body field has the Hanna Code, whatever that Hanna Code is returning will be displayed in the place where you placed [[widget]] // it will be specific to the page being viewed echo $page->body; If you want to go with Hanna Code, let us know and we'll give you example code
    3 points
  6. Custom Inputfield Dependencies A module for ProcessWire CMS/CMF. Extends inputfield dependencies so that inputfield visibility or required status may be determined at runtime by selector or custom PHP code. Overview Custom Inputfield Dependencies adds several new settings options to the "Input" tab of "Edit Field". These are described below. Note that the visibility or required status of fields determined by the module is calculated once at the time Page Edit loads. If your dependency settings refer to fields in the page being edited then changes will not be recalculated until the page is saved and Page Edit reloaded. Usage Install the Custom Inputfield Dependencies module. Optional: for nice code highlighting of custom PHP install InputfieldAceExtended v1.2.0 or newer (currently available on the 'dev' branch of the GitHub repo). The custom inputfield dependencies are set on the "Input" tab of "Edit Field". Visibility Show only if page is matched by custom find Use InputfieldSelector to create a $pages->find() query. If the edited page is matched by the selector then the field is shown. Show only if page is matched by selector As above, but the selector string may be entered manually. Show only if custom PHP returns true Enter custom PHP/API code – if the statement returns boolean true then the field is shown. $page and $pages are available as local variables – other API variables may be accessed with $this, e.g. $this->config In most cases $page refers to the page being edited, but note that if the field is inside a repeater then $page will be the repeater page. As there could conceivably be cases where you want to use the repeater page in your custom PHP the module does not forcibly set $page to be the edited page. Instead, a helper function getEditedPage($page) is available if you want to get the edited page regardless of if the field in inside a repeater or not. $edited_page = $this->getEditedPage($page); Required The settings inputfields are the same as for Visibility above, but are used to determine if the field has 'required' status on the page being edited. https://github.com/Toutouwai/CustomInputfieldDependencies http://modules.processwire.com/modules/custom-inputfield-dependencies/
    2 points
  7. 2 points
  8. Just an ordinary textarea - make sure the Inputfield Type is set to "Textarea" and not "CKEditor. Don't add any textformatters to the field.
    2 points
  9. Google's Matt Cutts: Source: YouTube
    2 points
  10. Hello @werner, welcome to the ProcessWire forum. The fact that you're fiddling with sql suggests that you are an advanced user, so why inject PHP directly into a text field? That's not what it's for. If you really want to execute individual PHP code on each page, you might want to use something like Hanna Code.
    2 points
  11. CKEditor is stripping out your code since <healcode...> is not a valid HTML tag. You can tell it, via its ACF and/or Extra allowed content settings, to allow that tag, though am not sure even that would work. Another possibility is to use Hanna Code to insert that code at runtime. Parameters would have to be passed to it (the values you want the client to be able to change) so as to render them at runtime. The Hanna Code would be could like so in your body field: [[widget a=value1 b=value2 c=value3]] where a, b and c are the parameters whose value the editor can change. You can rename them to something your client would understand, e.g. type,partner,id, etc...However, do you still want your client to be editing the Hanna Code like that? Alternatively, you can create a field(s) to store your editable values and via the Hanna Code, tell it to read from that field(s). Or, if the values will always be coming from a set pool, you can save them beforehand to a pagefield. The client would then have select the applicable values in that pagefield. Hanna Code would then grab the values from that pagefield. Note that the above is not the Hanna Code code itself; just how to call it on your page. Anyway, please describe your scenario with a bit more specifics so that we can tailor our responses to that.
    2 points
  12. Hi everyone, To celebrate @teppo featuring this module in PW Weekly, I have added a new action: Create Users Batcher It lets you quickly create many users by entering: "username, email address" on separate lines in a textarea. This action requires the EmailNewUser module and it must be configured to automatically generate a user password. The action checks for this module and that setting before it will let you proceed. I also recommend that you install the PasswordForceChange module to reduce the risks of having emailed a password to a user. You can set multiple roles to be added to each new user. Be aware that at least one of these roles must have the "profile-edit" permission so that the user has the ability to change their password when they first login. Note that EmailNewUser will report each successful user creation and email sent success. I hope that the next time you need to create several users for a new client that you'll give this a try. And of course, don't forget to send me your own actions for inclusion with the module
    2 points
  13. If you enter PHP code into an inputfield in Page Edit you would have to eval() it in your template in order for it to execute. But the idea of entering PHP code into Page Edit is really not good. If you want to execute a PHP block within some HTML coming from Page Edit then use the Hanna Code module.
    2 points
  14. Hello, My comment might not be of much help, but why do you try to mix http and https (provided that is the case...)? I consider it to be an outdated practice. The web is quickly moving towards being https only anyway.
    2 points
  15. Whether it is actually meaningful or not, it might help convince your clients - ProcessWire won the best small business CMS for 2016: https://www.cmscritic.com/awards/
    2 points
  16. May someone else finds this helpful. I wanted to create comments (using built-in comments fieldtype module) via API, as I needed this is for an easy migration from an existing site. I figured following does the job: <?php // get the page that you want to add comment(s), contains a "comment" fieldtype $p = $wire->pages->get("/guestbook/"); // create new Comment object $c = new Comment(); // fill the object with values $c->text = "Hello World!"; $c->cite = "John Average"; $c->created = time(); // timestamp, if you got to migrate a existing datetime you can convert using strtotime("2011-04-09 15:14:51") $c->email = "john@average.com"; $c->ip = "..."; // not needed (only for akismet) $c->user_agent = "..."; // not needed (only for akismet) $c->created_users_id = "..."; // not needed, automaticly set by pw // set status (Spam = -2; Pending = 0; Approved = 1; ) $c->status = 1; // add new comment object to the page "mycomments" field $p->mycomments->add = $c; // save page $p->save(); ?>
    1 point
  17. New website for Fabrica Captial – Commercial Real Estate Investment http://fabrixcap.com/ (previously at http://www.fabricacapital.com/) Design by http://crookdesign.co.uk/
    1 point
  18. Thank you @adrian. This can definitely come in handy now and then.
    1 point
  19. https://processwire.com/talk/settings/ Here you should be able to change your display name.
    1 point
  20. Interestingly, that does look quite nice. I've emulated that with one row on the new design, and it would definitely need a little tweaking. My issue, though, is that the UI would like quite inconsistent, as you can tell, when some links have descriptions and others do not. (Note: The Type column has not been finalised yet - there will be SVG icons there, as per previous screenshots.) I know this is maybe not the perfect idea, but what about a tooltip? That way, it doesn't reduce the density of the table, and you can still easily see the description of a link if it is not easily understood.
    1 point
  21. @tpr I have pushed 1.5.44 which fixes the selectors issue.
    1 point
  22. Sorry about that - more than likely an oversight on my end. Will review and see what can be done. When I began working on this module, naming support was present. In the first alphas, however, it was indicated that this was not the greatest idea, and so the feature was removed. Jumplinks 2 uses Datatables with a filterbox. Most of the time, you would find that a name contains a keyword from either the source or the destination, and so you could enter that specific keyword into the filter box. Per your example, that title would have the keyword event in it - searching for that would yield pretty much the same result. As such, I don't plan on adding name support, especially considering the bulk it adds to the user interface.
    1 point
  23. @Robin S thanks for the report. I will add an extra json settings field for modes in the field config. I am sick right now but I'll look into it, later this week. Edit: Can't test right now, but you might be able to set this in the advanced options of the field config.
    1 point
  24. Spotted a couple of things here. I think you want the last breadcrumb item outside of the foreach loop - otherwise when there are multiple parents you will get multiple copies of the 'active' item. And folks argue over what is the semantically correct markup for breadcrumbs, but when using an ordered list I think the "You are here" text should be outside the list as it doesn't represent a page in the site hierarchy.
    1 point
  25. Hello Robin S. I knew it has to be something easy however I did not just realize that I can request an id from any resource and that is why I had to improvise. What I like more in your approach is the elegance of the code with no additional variables added to the equation. Thank you very much for the simple but important reminder how superb is the PW API.
    1 point
  26. The body class 'hasWireTabs' will only be set after a call of JqueryWireTabs. We can use it in the selector of the JavaScript. This should help. $(document).ready(function() { // instantiate WireTabs if defined $('body.hasWireTabs #ModuleEditForm').WireTabs({ items: $("#ModuleEditForm > .Inputfields > .InputfieldWrapper"), }); }); Furthermore the module should call the JavaScript and instantiate WireTabs without autoload set to true like ProcessPageEdit do or simply include the script via constructor instead of init(). I edited my post above.
    1 point
  27. Hi @adrian, Good catch. Yes, raw SQL would be the way to go. I'm still mulling and testing most efficient way to go about this.
    1 point
  28. @MaryMatlow , if the widget always occurs in the same place in your template (i.e. the editor doesn't need to move it around) then you could have a dedicated textarea field in your template for the code snippet.
    1 point
  29. In some modules I am conditionally loading JS to the module config page like this: if($this->input->get->name == $this->className) { // load script }
    1 point
  30. Yesterday I tested what @kixe said and it worked...to some extent. I could get the tabs but their content (i.e. all but the first tab's) were not getting loaded until one reloaded the page. I didn't have time to investigate further so left it at that. Basically, you would need to do three things: 1. In your module's getModuleConfigInputfields method, initialise WireTabs module. It is a static method so you would need: wire('modules')->get('JqueryWireTabs'); 2. Include the JavaScript that initiates WireTabs client-side: For instance, if you had that code in your NameOfYourModule.js, you could do this in your getModuleConfigInputfields : $dir = wire('config')->urls->ProcessModuleName;// whatever your module is called. Here we assume a process module wire('config')->scripts->add($dir . 'ProcessModuleName.js');// or whatever file you have your JS in, e.g. config.js The code in your .js file for your Tabs: $(document).ready(function(){ var $form = $("#IdOfYourForm"); // remove scripts, because they've already been executed since we are manipulating the DOM below (WireTabs) // which would cause any scripts to get executed twice $form.find("script").remove(); $form.WireTabs({ items: $(".WireTab"), skipRememberTabIDs: ['ProcessModuleNameTabID'],// if you need this option rememberTabs: true// if you need it }); }); The ID of the form is the tricky bit. I am not sure if you can use your own form ID in getModuleConfigInputfields. I tried but it was not getting recognised. If not, try using the existing form's ID which would be: ModuleEditForm. 3. Still in getModuleConfigInputfields, build your inputs, add them to your tabs which you then add to the form. I am too lazy to type now, so please have a look at modules that use tabs...Hanna Code, Menu Builder, Batcher, etc on how to do this.
    1 point
  31. yeah, i know you can do all kinds of stuff in the admin. still i think it would be good to have a checkbox for that. there have been lots of people requesting such kind of field-groupings over the time and i think it would be better to solve that by providing a checkbox than letting people solve the problem all on their own and having no standard way of doing it (you can remove it by php, by css and also by js...). second best option would be to have it in AOS. maybe i find the time to file a PR next year for that...
    1 point
  32. I think this should work... <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion-1" href="#accordion-1-<?php echo $presalefaq->id; ?>"><?php echo $presalefaq->title;?></a> ... <div id="accordion-1-<?php echo $presalefaq->id; ?>" class="panel-collapse collapse"> ...but your solution is fine also.
    1 point
  33. How about using InputfieldSelector for the page selection and using InputfieldIcon for the icon selection?
    1 point
  34. Have updated it now to version 0.9.17. There was another one pending with this part of the code. I thought I had already comitted it. Sorry!
    1 point
  35. Check out Profields Table, Repeater or Profields Repeater Matrix, PageTable (can't find a good link for this but it's an installable core module).
    1 point
  36. I don't think this is the place to ask which cms you should choose. It's PW forum and i doubt there will be people who'll tell you you should use another cms. I doubt there is something you can't build with PW, or the others cms too, the questions is which one is the easiest to work with.
    1 point
  37. What's in the new master version 3.0.42, and covering the release of the new ProDevTools modules: ProfilerPro and API Explorer. Plus, a look at some of what we'll be focusing on in 2017! https://processwire.com/blog/posts/processwire-3.0.42-is-out-and-prodevtools-is-released/
    1 point
  38. Just to add to your testing, I can confirm that I have been using this awesome module with 3.x for probably 6 months now without any problems!
    1 point
  39. Just announcing that I've tested and can confirm that Matrix is compatible with ProcessWire 2.8.x and ProcessWire 3.x
    1 point
  40. Hi @Junaid Farooqui, welcome to the PW an the Forums. I use a similar approach like you described. But I don't have to use templatefiles for all of my blocks. I only use a few main template files (mostly 2-5, and max around 10 for really large sites). For the blocks I use the Profield RepeaterMatrix, what is explained here: https://processwire.com/blog/posts/more-repeaters-repeater-matrix-and-new-field-rendering/#repeater-matrix-is-released-alpha https://processwire.com/api/modules/profields/repeater-matrix/ With repeater-matrix you are able to level down the block / field files to different extends. My prefered usage is one matrix field with different blocktypes but one rendering file under site/template/fields. But one also can use one separate rendering/view file per blocktype under site/templates/fields/... Also it is possible to mix those usecases how you like. Repeater-Matrix was alpha in January 2016, but is stable now. Do cost a bit money, but is more than worth the saved time. You are able to build nearly an exact usage scenario with the free available Pagetable Field and additional template files for each blocktype. But it is more work and feels not that smooth like Repeater Matrix. Just another possibility here.
    1 point
  41. I created this helper nearly a year ago! (time passes very fast!). In the way I learned new tricks and Processwire also have many new things that could improve the rest helper. So that could be a really good idea.
    1 point
  42. Thanks again. That helped. I'm using the API to build my forms. They have different names and ids already. When I create the submit button like // submit button! $submit = $modules->get("InputfieldSubmit"); $submit->label = " "; $submit->attr("value","Save Changes"); $submit->attr("id+name","submitprofile"); //Notice submitprofile here - that did the trick $submit->attr("class","btn btn-success"); $profileForm->append($submit); and check if data should be processed with if ($input->post->submitprofile) { //do processing here } It is working and other form submissions do not interfere anymore
    1 point
  43. massage and error for admin no ? use them like this u can two $pages->error('bad man'); $session->message('hi'); wire('pages')->error('bad bad.man'); wire('session')->message('hiho'); work.for any api vrable it does
    1 point
×
×
  • Create New...