Jump to content

Leaderboard

Popular Content

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

  1. I would disagree on the last one. For bigger systems let the writers focus on the content not on the visual output. When you let them focus on desktop experience changes are they will write for desktop. In my opinion content should separated from view, articles should be device independent. For you as developer you have to give them the fields they have to fill in. This way you can get the content that is suitable for the platform where you wish to publish it. In my opinion: A system should be a content management system (CMS), not web publishing tool per definition. The content should be written platform independent, (Not writing for a specific device).Provide enough fields to pull from, when the need is there. The content should be modularity, so that it's it's easy to add different types of content.Your example of page table would work. Insure your data is accessible and could be queried from other platforms (JSON API). Don't pollute your data with structural markup.Don't use div's or image strings etc in you text directly. Use Page tables or something for images, video's etc.
    4 points
  2. Have seen that it was mentioned in last ProcessWire Weekly. (sighh, have hurried up with it) I have tested it with PW versions 2.3, 2.4, 2.5, 2.6, 2.7 and with PHP 5.3 and 5.4. It works good from PW 2.4+ up! With PW 2.3, the Javascript Color Picker doesn't function. But 2.3 is really old and if someone has maintained a site until now without ALIF, he will do it fine in future too. Only thing I want to know is: in wich PW version was "showIf" introduced to show / hide Inputfields in the admin? Would be nice if someone can point me to that. So, it is ready for the masses now!
    4 points
  3. Here's the code: function convertGeoToPixel($lat, $lon) { $mapWidth = 38; $mapHeight = 109; $mapLonLeft = 16.37007904846189; $mapLonRight = 17.151481636352514; $mapLonDelta = $mapLonRight - $mapLonLeft; $mapLatBottom = 56.1947686858922; $mapLatBottomDegree = $mapLatBottom * M_PI / 180; $x = ($lon - $mapLonLeft) * ($mapWidth / $mapLonDelta); $lat = $lat * M_PI / 180; $worldMapWidth = (($mapWidth / $mapLonDelta) * 360) / (2 * M_PI); $mapOffsetY = ($worldMapWidth / 2 * log((1 + sin($mapLatBottomDegree)) / (1 - sin($mapLatBottomDegree)))); $y = $mapHeight - (($worldMapWidth / 2 * log((1 + sin($lat)) / (1 - sin($lat)))) - $mapOffsetY); return array($x, $y); } $pposition = convertGeoToPixel($pl->map->lat, $pl->map->lng); echo "<div class='litenkarta'><div class='punkt' style='left: {$pposition[0]}px; top: {$pposition[1]}px; '></div></div>";
    2 points
  4. I'm using this code and the InputfieldMapMarker to mark positions on an image. You can see it in action here (the small blue images with a white dot): http://alltpaoland.com/
    2 points
  5. Sure! I agree this type of thing should be in the core. Did you make an issue or a pull request on github? I think this way we will have more chance.
    2 points
  6. ALIF - Admin Links In Frontend EDIT: latest version update with PHP 8 fixes on 05. Nov 2023 (!) The version now is 1.1.9 (!) This module combines some of the admin links that we want to use on the frontpages sometimes. It is a comfortable and easy way to do so. After you have installed and configured the module, you can inject the links into the frontpage with code like this in a template file: echo $modules->isInstalled('AdminLinksInFrontend') ? $modules->get('AdminLinksInFrontend')->render() : ''; . Credits: The comfortable Javascript Color Picker in the Configpage comes from Jan Odvarko (http://jscolor.com). Many thanks for this! * Toolbar The toolbar can be positioned by css values for top/bottom and left/right. It can expand in vertical or horizontal direction. The buttons are links to the PW admin, for logout, or for editing the page in admin, or informational ones. All settings, including the colors, can be defined in the modules config page. This is available for all PW versions from PW 2.3 up to now. Depending on how you configure this part, it can be used for authors and editors too, maybe. * Import / Export Settings It has the possibility to export and import its settings via two textarea fields. When importing settings, you get a second screen where you can select which settings you want to import. * One-click User Account Switcher For PW versions 2.6.8+, there is one really nice function available, that I use when developing / testing sites with different user / roles. A fast User-Account-Switcher that lets you view the same page from different user accounts with only one click. To enter this mode, you need to login as a superuser one time, and the feature needs to be enabled in the module of course. After that, you can log out, login with different user roles, etc. At least the toolbar buttons for the User-Account-Switcher will stay visible for you. This is session based. There is also an extra button with a trash can and the text "Session", that helps you to leave this mode once you are finished. As you can see in the screenshot, after clicking "guest", I was logged out, but a regular login button, a warning for debug mode and my three defined buttons for user accounts are available. When clicking another user button I login with this account. Very handy. ATTENTION! The use of the One-click User Account Switcher is mainly intended for dev sites, not for public sites! You should be aware that there is a huge security risc when using this feature on public reachable sites! We completly leave ProcessWires comfort zone in regard of security, - and the only thing between your site and potentially hackattacks is this module. (Oh mom, - what have I done?) PW 2.6.8+ has a comfortable function for admin tasks, that let us log into different user accounts via API without using passwords. This module uses this function! All data that is needed during a User Account Switcher session is stored in the session data on the server. So, if someone steel your session cookie, there is potentially risc that he can login as a superuser, depending of the user account buttons you have in your admin links collection! To prevent SessionHijacking, the module can be bound to a single IP address, it uses a fingerprint depending of IP(s) and UserAgent string. And you need to define a max time to live in minutes between 2 and 60, a User Account Switcher session may run. A User Account Switcher session only can be initialized by a Superuser who also explicitly has set a permission called 'alif-user-account-switcher', what is defined by the module, when installing it. So, the prefered way to use this module is, to enable and use the User Account Switcher while the site is unpublic, and before it goes public, remove the permission from the superuser role. This way, you can use its menu function, but not the UAS anymore. On a sidenote, for those rare cases where multiple superusers simultaneous developing on a site and want to use the ALIF, but the UAS should be used only by one, you can leave the 'alif-user-account-switcher' permission removed from the superuser role, but need to assign the role 'alif-superuser' to the single user account. This way, only that single superuser has the permission for UAS, whereas all other superusers doesn't have it. . . * The Configpage * Online demo I have pasted it into this old site and enabled it to be present every time (when the site is in demo mode only!). So, it is an earlier state, but the switcher is functional there: http://pwlaf.biriba.de/dbinfo/ * Download From our modules directory or from github repo
    1 point
  7. Hi @rick You make some really good points, particularly regarding fine-grained associations and their impact on SEO. I really appreciate your thoughts on this!
    1 point
  8. I read through this quickly so might have missed something. Just wanted to point out that Blog (since version 2.3.2) has a 'related' posts implementation: renderRelatedPosts(). Posts can be related by tags, categories or both. Have a read from here onwards and examples here. This is yet to find its way to the documentation, sorry.
    1 point
  9. In my opinion (and that is all that it is), your categorization issue is a bit more complex than just a simple tag reference. For example, the general tag, 'Hair', as related to the 'Fashion' category, is not sufficient to determine a related post. The post context might be referencing hair-removal, while a related post based only on the tag 'Hair' could return a post with content relating to hair-coloring. While this may seem trivial at first, consider how the google dertermines content ranking. It quite possibly could harm your seo results by having 'un-related' references. Creating finer grained tags such as, Hair -> Removal, Hair -> Coloring, and Hair -> Styling, etc., would allow for more accurate relational results. Also, by having a finer-grain tagging system, it would limit the number of related posts results. Personally, I would limit the results to three related references, regardless of the number returned. /$.02
    1 point
  10. Just remove the minified version and it will fallback to the unminified one. Also enabling debug mode would work, which does automatically ignore the minified versions for the time being.
    1 point
  11. I'm rather thought about /site/InputfieldDatetime/InputfieldDatetime.js. Not trying to overwrite any settings, but set them, when a timepicker is initialized (otherwise you cannot be sure you're setting the defaults early enough.
    1 point
  12. I'd suggest using wireCopy(), but you should also make sure, that php does have sufficient access rights to the sourcefile as well as the destination folder. Edit: Sry, thought this would also be for single files, but it seems it's only for copying whole directories.
    1 point
  13. I am thinking about resp. working on a version which allows multiple values too, something like Setting: date(Y), parent.name, id Result: /myparent/2015-myparent-5067/ This is a bit tricky since some values are provided in the moment when page will be created, some after. I'll keep you informed about how it is going on. If it is working well I will do the PR.
    1 point
  14. Relevant thread: https://processwire.com/talk/topic/132-redirect-after-login/
    1 point
  15. i'm using the updated timepicker and it works fine so far - you would want to duplicate the inputfield (datetime) into your site directory and then tell PW to use that one; from there you can make your changes... (like to the CSS file) you may also need to add something like this to your admin custom files (ProcessPageEdit.js) if(typeof $.timepicker != 'undefined') { $(function(){ $.timepicker.custom = { stepMinute: 15, controlType: 'select', oneLine: true, }; $.timepicker.setDefaults($.timepicker.custom); }); } word is that the next version of PW will have the updated timepicker addon
    1 point
  16. TrellisWire? So when/if someone were to Google: Trellis, ProcessWire would show up alongside WordPress
    1 point
  17. I made it today. I would like to see it in core. If it will not find the way in the core I will load it up to the modules directory.
    1 point
  18. I´m a happy customer of padloper thanks for all your work apeisa
    1 point
  19. Andi, nico has build an SEO tool not an encyclopedia.
    1 point
×
×
  • Create New...