Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/02/2014 in all areas

  1. This module adds a "SEO" tab to every page where you can define a special title, description, keywords, etc. Try it http://aluminum-j4f.lightningpw.com/processwire/ Name: demo Pass: demo123 How to use You can choose between include automatically or use the following methods: $config->seo // includes all the default values and configuration settings // e.g.: $config->seo->title $config->seo->keywords $page->seo // includes all the default values mixed with the page related seo data // e.g.: $page->seo->title $page->seo->keywords // for rendering: $page->seo->render . . Screenshot Download You can download it in the modules repository: http://modules.processwire.com/modules/markup-seo/
    2 points
  2. Nico, I like what you are getting at, but think an option like that might be a source of confusion because it would change the entire way that templates work, as well as the way that viewability is determined. Most likely this would be problematic for PW's internal templates and logic. What I would suggest instead is repurposing of the existing $config->appendTemplateFile option and letting that serve is your defaultTemplateFile. In order to make sure that PW considers your page viewable, you'd still have to have a file for the template, but it could be completely blank. While I'd prefer the method mentioned above, another alternative would be to automatically populate the altFilename property of every template that you wanted to behave this way. For example, in your /site/templates/admin.php file you could add something like this: foreach($templates as $template) { if($template->flags & Template::flagSystem) continue; if($template->filenameExists()) continue; $template->altFilename = 'ajax.php'; $template->save(); }
    2 points
  3. Because you want a user to see a menu item if they have one or more, i. e. any of that item’s roles, you want to break out of your foreach as soon as the first matching role is found. Otherwise, any missing role will set $menuVis to false. That would be a good idea if you wanted a user to require all of the item’s roles, in which case you would have to break out of the loop at the first missing role, lest any further iteration sets $menuVis to true again. if($child->menu_roles->count()) { $menuVis = false; //Assume false in case the foreach doesn't find any matching roles and sets it true foreach($child->menu_roles as $cmr) { $cmrRole = wire('roles')->get("$cmr->name"); if (wire("user")->hasRole("$cmrRole")) { $menuVis = true; //has this role, so no need to check more roles break; } } } if($menuVis == false) continue;
    2 points
  4. Conveniently forgetting that best practice says you should base your media queries on what works best for your design and not the other way around, what are you favourite breakpoints? What are the numbers that make you zing!!? Playing around with response.js and trying to work out a common list between that and my css, I have come up with this provisional little list. This is mobile first, so only uses min-width in ems, though I have put the px in the comments. /* 321px 20.063em phone portrait for larger phones - when would I use this? */ @media only screen and (min-width: 20.063em) { } /* 481px 30.063em - Phone landscape */ @media only screen and (min-width: 30.063em) { } /* 530px 33.125em - small tablet portrait/Kindle */ @media only screen and (min-width: 33.125em) { } /* 768px 48.000em - ipad portrait and small tablet landscape */ @media only screen and (min-width: 48.000em) { } /* 1025px 64.063em - One pixel higher than ipad landscape so for laptops and small screens and nexus 10 landscape */ @media only screen and (min-width: 64.063em) { } /* 1281px 80.063em - one pixel higher than my normal width, so for wide desktops only */ @media only screen and (min-width: 80.063em) { }
    1 point
  5. Hi hettiger, Welcome to ProcessWire! Do you have template cache enabled or using MarkupCache by any chance? If it's a multilang site: Does the guest user maybe have a language where the image description isn't filled/translated? Cheers
    1 point
  6. Sure, I'll include it.
    1 point
  7. The alternate domain option is probably uncommon in general. If you include it, would you mind making the status codes configurable? That way I could potentially use your module.
    1 point
  8. Doesn’t seem to happen for me. I’m also using the start and limit parameters and sorting by an integer field. This might have something to do with your DB configuration and thus not affect all PW sites equally. Perhaps posting your full selector string can shed some light on this, although I doubt anything short of using sort=random as a second parameter can explain this In any case, if you sort by something you expect to tie frequently, it’s definitely bad practice to not specify a second field. Databases do all kinds of magic and usually can’t guarantee tables to be read in a reliable order. For perfect consistency (pages can have identical titles as well), best sort by ID, which must be unique anyway.
    1 point
  9. Thakns for the Info. We might also have to look into this issue. Maybe our server admin can figure it out and then we can report back.
    1 point
  10. new german updates for actual PW dev 2.5.7 (01 November 2014). https://github.com/Manfred62/pw-lang-de/tree/dev
    1 point
  11. OK, I think I'm all done fiddling. This latest version seems really stable, and ready for primetime. I would still suggest that you test it in a development environment first. ProcessRedirects.zip Configuration fields Wildcard redirects
    1 point
  12. The text ist comming from the label "login_submit" of the login button. I'm not sure how you customized this, so you might either want to remove the label on the template or better, hide it with a custom CSS rule. EDIT: This CSS rule should hide the label: .Inputfield_login_submit label {display:none;}
    1 point
  13. Firstly, the $session->password will never work, because I am not using eval to pass the contents of the email, but rather using the {} as a replacement mechanism. The problem with getting a password manually entered via the API was that I was using the InputfieldPassword::processInput hook to grab the password before it is encoded. This won't be triggered when the password is set via the API. I just committed an update that uses the Password::setPass hook instead and it seems to be working well in all scenarios, including setting the password via the API. Could you please test and let me know if that fixes things for you?
    1 point
  14. @Joss, my recent experience FWIW; Been playing with PocketGrid for the past couple of days also. Found it to be a very sweet little system. Redesiged an entire non-responsive site to be fully mobile-compatible (my first responsive site) in about 6 hours, including developing my own responsive menu, learning the grid (10 mins max, so simple) and converting content with new styling. To say I was impressed is an understatement. I've tried Bootstrap, Foundation, Pure, and a pile of other grid systems in the past few weeks and kinda felt "weighted down" by them, and doing exactly what I wanted often caused more problems than it solved. This could be because I'm not fluent enough in their use - I know others rave about Foundation etc - but really, PocketGrid was so easy to use and I felt like I still had complete control of the pages. I like that
    1 point
  15. I think it always works with real life examples. If you see a book with the title "Cooking for newbies", you expect it to have a long list of pre-made products and the indication of the supermarkets where you can buy them? Or you expect it to have a section where you are taught the basics (like making different kinds of dough, basic sauces, cutting vegetables) and a second section with some recipes where you can make complete dishes by using those techniques? I would say it's the second. Because "Cooking for newbies" teaches you how to cook. If you're not interested in learning how to cook, you have of course the option to buy a pre-made pizza, and that's completely fine, but for that you don't need a book...
    1 point
  16. It's not that difficult to make your own slideshow though. I think what makes it hard to do this kind of things with jQuery is not jQuery itself, but having a good understanding of CSS. What you need to do with jQuery it's quite simple actually. Not much more than updating classes and creating the buttons. All the rest is CSS, with the trickiest part being, understanding very well the "display" and "position" properties. In the end, what I mean is, study CSS, make a lot of "trial and error" by changing the CSS properties of images in a list of images. After that, jQuery will be the easiest part.
    1 point
  17. Hi everyone, I'd like to announce a complete overhaul of this module - problem is that I am not sure whether to release it as an update to this module, or perhaps as something completely new, perhaps called PageProtector. UPDATE: The functionality described in this post is available as a separate module: PageProtector This new version (not on github just yet) makes it very easy for site 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. New functionality Ability for your site editors to control the user access to pages directly from Settings tab of each page Includes whether to protect all children of this page or not Optionally allows access to only specified roles 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 above "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 What do you all think - replace the existing module, or release this functionality as a separate version? Module Config Settings Page Protection Settings
    1 point
  18. Andi, nico has build an SEO tool not an encyclopedia.
    1 point
  19. Hello, Is there a way to enable attributes in HTML tags such as class="" and style="" for CKEditor ?. Im building a website with alot of fields that can be edit from admin pannel, would be alot easyer if i could use CKEdit. Ty in advance
    1 point
  20. The page statuses are a bitmask so it's possible for there to be multiple statuses on a page, like unpublished and hidden. So it's best to add and remove statuses with the addStatus and removeStatus functions, i.e. $page->addStatus(Page::statusUnpublished); // same as: $page->status = $page->status | Page::statusUnpublished; $page->removeStatus(Page::statusHidden); // same as: $page->status = $page->status & ~Page::statusHidden; You can also check the status of a page by using the is() function: if($page->is(Page::statusUnpublished)) { ... } // same as if($page->status & Page::statusUnpublished) { ... }
    1 point
×
×
  • Create New...