Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/27/2015 in all areas

  1. i offered msummers to take a look at his files and i think i got everything working. thats what i did: did a clean 2.3 installation copied the old site-folder to the new installation (overwrote existing files) replaced the database looked up admin url (db table "pages" id = 2 showed "sample" so admin url was example.com/sample/ ) find out username of superuser and reset password $admin = $users->get(41); $admin->setOutputFormatting(false); $admin->pass = 'admin'; // put in your new password $admin->save(); echo $admin->name; die(); backup working 2.3.0 site (files+db) copied ProcessWireUpgrade to modules folder and installed it... error: Error: Cannot call constructor (line 85 of /var/www/html/site/modules/ProcessWireUpgrade/ProcessWireUpgrade.module) renamed wire -> wire2.3.0 index.php -> index2.3.0.php .htaccess -> .htaccess2.3.0 downloaded pw 2.6.1 and put into old site: wire index.php .htaccess installed processwireupgrade module installed site profile exporter and exported 2.6.1 site profile with data from old page old version had a custom admin - don't know how/where to activate this in 2.6.1 as it shows the standard admin again. have no more time to investigate further, sorry.
    4 points
  2. Hi All, So I started working on my own site about a month ago. I think we can all relate to the pain behind one doing one's own site (nothing is ever perfect, frustration, etc.). That said, I'm enjoying it this time around (yes, I've tried several iterations over the last few years). Why? Because I'm keeping framework usage to a minimum, and employing my own methods to get certain things done. So, it's becoming a learning experience for me - I guess that's one of the best methods to 'open one's mind'. Anyways, I'll be keeping an updated version here: sb201510.foundrybusiness.co.za Quite liking the home page thus far. It's responsive, and I think it does a really good job at that. Far from perfect, but a good step in the right direction. Of course, I need to add a few more things to the page before I continue with the others, and then, eventually, port over to PW. Opinions and ideas are most welcome.
    3 points
  3. Yep. Everything startup related is basically in this order: index.php -> /wire/core/ProcessWire.php ^ index.php -> /wire/modules/Process/ProcessPageView.module
    2 points
  4. I had this idea yesterday of coding my website in livecoding once I have it designed, though I want to ask you people.. Do you think it's worth it if I'm kind of a noob? I mean, you won't be seeing some ninja code, more like toddler with crayons (although kids do have a lot of fun with their crayons!) Should it accomodate to the "processwire user distribution map", with this I mean that a lot of PW users seem to be in Europe and I live in America, so I the best strategy would have to be doing this either really late (to get to most of people really early), or really early (to get people in the late afternoon).
    2 points
  5. There's the page_parents table in the db, which holds all the hierarchy related information. And the actual db query is just more or less a simple $pages->get("path=/mens/tshirts/…/");, which you can find in ProcessPageView::getPage(). If the first try won't find anything it just checks each hierarchy above if pages are found and if so, the other parts of the url are further evalulated as urlSegements. The actual domain is only checked against the $config->httpHosts whitelist and not really involved in the page finding process.
    2 points
  6. Here is a new module for ProcessWire 2.1 that imports pages from a CSV file. By default it will create new pages from data in the CSV file, but you can also configure it to modify existing pages too (existing pages that have the same title). Please give it a try and let me know how it works for you and if you run into any issues with it. This module is something I've had in the works for awhile, and regularly use on various projects, so figured I should clean it up a bit and release it. Also attached are a couple screenshots from it. How to Install: 1. Download from: https://github.com/r.../ImportPagesCSV 2. Place the file ImportPagesCSV.module in your /site/modules/ directory. 3. In ProcessWire admin, click to 'Modules' and 'Check for new modules'. 4. Click 'install' next to the 'Import Pages CSV' module (under heading 'Import'). Following that, you'll see a new menu option for this module on your Admin > Setup menu. Supported field types for importing:* PageTitle Text Textarea (including normal or TinyMCE) Integer Float Email URL Checkbox (single) *I'll be adding support for multi-value, page-reference and file-based Fieldtypes in a future version.
    1 point
  7. I will share a little texformatter from a actual project for a client. In my former CMS i had an easy addon where i could preset terms like in a glossary that will replaced in the Wysiwyg fields on every page. So there are solutions that i know but the all work not that easy like my former used addon. The title of the glossary_item is used for the termsearch. This textformatter search for terms in ||termexample|| or ||example term|| and replace them complete. If a term was in ||pipes|| and there was no hit in the glossary entries the pipes will deleted from the term and only the clean value will returned. So no room for wrong user entries like if i used HannCode or something else. This is great for abbreviations, external- and internal links and could extended for every possible replacement that makes sense like footnotes and so on. I like the pages concept for content and so i use pages for glossary and simple replacement where a user wanna have it. No autolinking without control, easy use pipes on abbreviations and links and it simple works. Some explanations from the Github Readme: Setup You have to use a pagestructure for the glossary items holder Page for entries template "glossary" glossary items template "glossary_item" The type of a glossary item could be a abbreviation, a external or internal link. Everything you need could added to the textformatter like more complex stuff, footnotes or other replacements. Why? There are working solutions like the great module from Ryan Cramer Autolink in the Profields https://processwire.com/api/modules/profields/autolinks/ But here Users don't could setup easy the terms to replace - this is only ment for webmasters or admins. There are a module for abbreviations from sunlix https://processwire.com/talk/topic/7467-module-processabbreviate/ But here i only have options for abbreviations and i couln't easy add stuff or replacments i need. Links Github: https://github.com/mr-fan/TextformatterGlossary Example Templates for Import: https://github.com/mr-fan/TextformatterGlossary/blob/master/template-examples.json Best regards mr-fan
    1 point
  8. hi everyone, i'm happy to share my first little module that could have broader use... use at your own risk! i'm quite new to module development Usage Just install the module and place your preview images in the folder /site/templates/TemplatePreviewImages filename = template-name.png Github https://github.com/BernhardBaumrock/TemplatePreviewImages Notes jquery image picker used in this module (MIT license): http://rvera.github.io/image-picker/ Room for improvement / roadmap: Images are resized via CSS (height: 200px) Images could be placed via masonry or the like create image-field to upload preview images directly to the template looking forward to hearing your feedback ps: is it intentional that i am only allowed to choose from 2 templates when adding the page and have more options available when editing the template settings of the page like you can see in the video? i'm wondering why this should be like this?!
    1 point
  9. So this is basically a recreation of a menu tutorial from W3Bits, tweaked to include the Advanced checkbox hack. Demo. Even the Advanced hack itself was tweaked: apparently this bit is causing issues with Safari, so I removed it: @-webkit-keyframes bugfix { from {padding:0;} to {padding:0;} }I found this particular configuration to work quite nicely. A previous menu I tried had a problem with the menu items staying expanded between media query breakpoints, when resizing the browser. Below is the CSS for the menu. You will notice that it is mobile-first: /* Menu from http://w3bits.com/css-responsive-nav-menu/ */ /* Note: the tutorial code is slightly different from the demo code */ .cf:after { /* micro clearfix */ content: ""; display: table; clear: both; } body { -webkit-animation: bugfix infinite 1s; } #mainMenu { margin-bottom: 2em; } #mainMenu ul { margin: 0; padding: 0; } #mainMenu .main-menu { display: none; } #tm:checked + .main-menu { display: block; } #mainMenu input[type="checkbox"], #mainMenu ul span.drop-icon { display: none; } #mainMenu li, #toggle-menu, #mainMenu .sub-menu { border-style: solid; border-color: rgba(0, 0, 0, .05); } #mainMenu li, #toggle-menu { border-width: 0 0 1px; } #mainMenu .sub-menu { background-color: #444; border-width: 1px 1px 0; margin: 0 1em; } #mainMenu .sub-menu li:last-child { border-width: 0; } #mainMenu li, #toggle-menu, #mainMenu a { position: relative; display: block; color: white; text-shadow: 1px 1px 0 rgba(0, 0, 0, .125); } #mainMenu, #toggle-menu { background-color: #09c; } #toggle-menu, #mainMenu a { padding: 1em 1.5em; } #mainMenu a { transition: all .125s ease-in-out; -webkit-transition: all .125s ease-in-out; } #mainMenu a:hover { background-color: white; color: #09c; } #mainMenu .sub-menu { display: none; } #mainMenu input[type="checkbox"]:checked + .sub-menu { display: block; } #mainMenu .sub-menu a:hover { color: #444; } #toggle-menu .drop-icon, #mainMenu li label.drop-icon { position: absolute; right: 0; top: 0; } #mainMenu label.drop-icon, #toggle-menu span.drop-icon { padding: 1em; font-size: 1em; text-align: center; background-color: rgba(0, 0, 0, .125); text-shadow: 0 0 0 transparent; color: rgba(255, 255, 255, .75); } label { cursor: pointer; user-select: none; } @media only screen and (max-width: 64em) and (min-width: 52.01em) { #mainMenu li { width: 33.333%; } #mainMenu .sub-menu li { width: auto; } } @media only screen and (min-width: 52em) { #mainMenu .main-menu { display: block; } #toggle-menu, #mainMenu label.drop-icon { display: none; } #mainMenu ul span.drop-icon { display: inline-block; } #mainMenu li { float: left; border-width: 0 1px 0 0; } #mainMenu .sub-menu li { float: none; } #mainMenu .sub-menu { border-width: 0; margin: 0; position: absolute; top: 100%; left: 0; width: 12em; z-index: 3000; } #mainMenu .sub-menu, #mainMenu input[type="checkbox"]:checked + .sub-menu { display: none; } #mainMenu .sub-menu li { border-width: 0 0 1px; } #mainMenu .sub-menu .sub-menu { top: 0; left: 100%; } #mainMenu li:hover > input[type="checkbox"] + .sub-menu { display: block; } }Below is the markup outputted using mindplay.dk's method. I found it impossible to output with MarkupSimpleNavigation or MenuBuilder. The homepage is added as the first top-level item. Notice the onclicks that make it work on iOS < 6.0. The clearfix class cf for the top ul is important. Otherwise the element will have no height (got bitten by this..). <nav id="mainMenu"> <label for='tm' id='toggle-menu' onclick>Navigation <span class='drop-icon'>▼</span></label> <input id='tm' type='checkbox'> <ul class='main-menu cf'> <?php /** * Recursive traverse and visit every child in a sub-tree of Pages. * * @param Page $parent root Page from which to traverse * @param callable $enter function to call upon visiting a child Page * @param callable|null $exit function to call after visiting a child Page (and all of it's children) * * From mindplay.dk */ echo '<li><a href="' . $pages->get(1)->url . '">Home</a></li>'; function visit(Page $parent, $enter, $exit=null) { foreach ($parent->children() as $child) { call_user_func($enter, $child); if ($child->numChildren > 0) { visit($child, $enter, $exit); } if ($exit) { call_user_func($exit, $child); } } } visit( $pages->get(1) , function(Page $page) { echo '<li><a href="' . $page->url . '">' . $page->title; if ($page->numChildren > 0) { echo '<span class="drop-icon">▼</span> <label title="Toggle Drop-down" class="drop-icon" for="' . $page->name . '" onclick>▼</label> </a> <input type="checkbox" id="' . $page->name . '"><ul class="sub-menu">'; } else { echo '</a>'; } } , function(Page $page) { if ($page->numChildren > 0) { echo '</ul>'; } echo '</li>'; } ); ?> </ul> </nav>Edit: fixed the end part, thanks er314.
    1 point
  10. When i'm uploading multiple Images in backend everything looks fine first. - All Images are uploading - All Images are shown as Thumbnails but after saving, about 50% of the images are gone. For Example: I upload 10 images, every image is shown in the form, but after saving i have just 5 or 6 images assigned. I don't get any errors, not in Developer Console, not in PW logs, no PHP Errors If i drag and drop them one after on the upload area (same files) and wait until thumbnail is shown and then save the form, everything works fine. If i try the same form local on a XAMPP installation, everything works fine. Any idea ?
    1 point
  11. Great module - I love it! But I had difficulties at the beginning display to the images. When I looked into the source code, i noticed that you are looking at line 69 in the folder /site/templates for the preview images and not as stated in the description in the module folder /site/modules/TemplatePreviewImages. I changed the code line in 69 $src = $this->config->urls->templates . $this->className . '/' . $tpl->name . '.png'; to $src = $this->config->urls->templates . 'img/preview/' . $tpl->name . '.png'; and now i can store the images in the folder templates/img/preview.
    1 point
  12. List of PW modules on Packagist: https://phppackages.org/s/processwire https://packagist.org/search/?q=processwire Makes me wonder - should all module authors be submitting their modules to this list, especially now that PW 3.0 will have composer support?
    1 point
  13. Yes, I certainly will do that.
    1 point
  14. 'Fake page effect' was just my stupid description of the fullpage/one page scroller It's very hot atm. You've given it thought so that's perfectly fine. Small things make the difference in user friendliness. That one page scroller you linked to looks pretty nice. As for flexbox support; it should be right around 90 to 95 %, depending on where your audience is, especially if you use the appropriate prefixes (autoprefixer ftw). Certainly Edge should be fine but there are some known issues wkth certain browsers. See http://caniuse.com/#feat=flexbox
    1 point
  15. Hello, I've already used Reel once on a website: http://jquery.vostrel.cz/reel See "Who uses it?" for an example with logos. I think you can also make it work vertically. You can use sprites or several individual images. NB: I will remove this part later... http://www.emballagescartofrance.fr/2/guide-d-achat-cannelures-caisses-carton-americaines/ One of the two websites I made with ImpressPages CMS. I knew very little about ProcessWire when I had to create this website and choose a new CMS. Several instances of Reel (too many) on the page. You can use the mouse (wheel).
    1 point
  16. The one page scroller is something I'm always asked for, I have always used fullpage.js it has a lot of useful mumbo jumbo, nice to see another option! Then again, since I'm constantly asked for this line of design in websites, I feel it is that mobile oriented design is kind of filtering into desktop design, so I kind of understand your point of attracting this type of client who prefer more fanciness than "here's all you need to know about this bussiness in half page". Me, I don't know that to think anymore, haha, I just want their deposit in my bank account
    1 point
  17. I want to mention that i don't mean to sound harsh. I just have some concerns about the emptiness of the first part of the page and the usability of this kind of 'fake page' effect design. PS i see that you use flexboxgrid? How is that working out? I thinking about redoing a site making use of flexbox but i'm not sure yet that i can skip IE<10 support.
    1 point
  18. I'm not much of a help here, but I had to smirk when reading "smooth jquery animation" in the description. If it should be smooth one shouldn't use jquery.
    1 point
  19. Thanks! The current site is really just a quick placeholder. There was a nice site before it, but I wasn't enjoying the development of it at the time. The menu appears after you scroll past the top of the white pane. I am thinking of making the hero image darker (with a white logo and arrow), and then using a darker menu as well. Will play around first... livecoding.tv looks cool, but I have bandwidth constraints, which is a mission for me to get around at the moment. Will stick to my little subdomain for now. ;-)
    1 point
  20. I don't want to really confuse things here now, at this stage, but in this situation I would always recommend looking at everything you already have, and get that working first. Troubleshoot any and all problems that occur. Once that's stable and functioning, then go about upgrading and/or continuing development, saving progress or backing up as you go. That advice is not just relevant to ProcessWire, but whenever inheriting projects of any type. From experience, this minimises debugging and troubleshooting time, and the wondering if a particular problem was there previously, or if it's related to the new environment or upgrades. If any problems in upgrades or development do occur, you've only got one step (the last one you did!) to undo and get back to the last working state. I think using new versions and/or tools, in this situation and in this way, introduces several (unnecessary) points of failure which may not be immediately obvious and would only serve to throw spanners in the works
    1 point
  21. Thanks, guys! I got it. We'll see where this gets me soon.
    1 point
  22. You have to tell us your twitter name so we can follow you
    1 point
  23. @Juergen Thanks for reporting. You cannot open or restoring a backup from CronjobDatabaseModule but in ProcessDatabaseBackups which is a module made by Ryan. I couldn't reproduce your error in PW 2.6.21. You maybe could post a new topic in general support forum. Some more information would be helpful: is CronjobDatabaseBackup still doing its job? Could you try to restore from a backup created in the 2.6.21 environment? Thanks.
    1 point
  24. I just tested Macrura's group approach and it works for me on an ImageExtra field. It's modified slightly to match the fields/templates I have in my current sandbox install. I can't imagine why CroppableImage would affect this. $q = 'testtag'; $matches = $pages->find("template=home, (title|first_name|body%=$q), (images.tags*=$q), limit=150"); foreach($matches as $p) { echo $p->title; } What happens if you strip it down to the basics, like this: $q = 'testtag'; $matches = $pages->find("images.tags~=$q, limit=150"); foreach($matches as $p) { echo $p->title; } Also, try putting this as is in a template file to make sure nothing is going wrong in getting $q to the selector. Of course you could also just echo the value of $q in your search template as well, but you see where I am headed
    1 point
  25. Details please! So, what motor does have it? Model? Color?
    1 point
  26. This post shows how: https://processwire.com/talk/topic/5610-field-template-context-on-frontend-forms/
    1 point
  27. Hi Ivan, nice catch. I made that change. I'll sent a PR to Ryan in the next few days so he can include an updated version of Reno in the core. In the meantime, you can update your copy. Just swap out the renderTopNav() method in AdminThemeRenoHelpers.php public function renderTopNav() { $items = array(); $class = ''; $user = $this->wire('user'); $config = wire("config"); $adminTheme = $this->wire('adminTheme'); $fieldName = "avatar_field_" . $user->template->name; $adminTheme->$fieldName != '' ? $avatarField = $adminTheme->$fieldName : $avatarField = ''; $avatarField != '' ? $imgField = $user->get($avatarField) : $imgField = ''; $avatar = "<i class='fa $adminTheme->profile'></i>"; // View site $items[] = array( "class" => "", "label" => "<i class='fa {$adminTheme->home}'></i>", "link" => $config->urls->root ); // Search toggle $items[] = array( "class" => "search-toggle", "label" => "<i class='fa fa-search'></i>", "link" => "#" ); // Superuser quick links if ($this->user->isSuperuser()){ $items[] = array( "class" => "superuser", "label" => "<i class='fa fa-bolt'></i>", "children" => array( "<i class='fa fa-life-ring'></i> " . $this->_('Support Forums') => array('http://processwire.com/talk/', 'target="_blank"'), "<i class='fa fa-book'></i> " . $this->_('Documentation') => array('https://processwire.com/docs/', 'target="_blank"'), "<i class='fa fa-github'></i> " . $this->_('Github Repo') => array('https://github.com/ryancramerdesign/ProcessWire/', 'target="_blank"'), "<i class='fa fa-code'></i> " . $this->_('Cheatsheet') => array('http://cheatsheet.processwire.com', 'target="_blank"'), "<i class='fa fa-anchor'></i> " . $this->_('Captain Hook') => array('http://processwire.com/api/hooks/captain-hook/', 'target="_blank"'), ) ); } // Avatar field for user information if ($imgField != '') { $class = 'avatar'; count($imgField) ? $img = $imgField->first() : $img = $imgField; $userImg = $img->size(52,52); // render at 2x for hi-dpi (52x52 for 26x26) $avatar = "<img src='$userImg->url' alt='$user->name' />"; } // User information and logout link. Check for profile-edit permission below. $userItem = array( "class" => "avatar", "label" => "$avatar <span>" . $this->getDisplayName($user) . "</span>", "children" => array( "<i class='fa $adminTheme->signout'></i> " . $this->_('Logout') => $config->urls->admin . "login/logout/" ) ); // if user has profile-edit permission add and edit link to the userItem['children'] array. if ($this->user->hasPermission('profile-edit')){ $profileEditLink = array("<i class='fa fa-user'></i> " . $this->_('Profile') => $config->urls->admin . "profile/"); $userItem['children'] = array_merge($profileEditLink, $userItem['children']); } // add the userItem to the menu $items[] = $userItem; return $this->topNavItems($items); } I'm not sure about the translation issue. I will try to look into it later today.
    1 point
  28. I use sass for bigger projects. I like to separate parts of the stylesheet to individual files as it is easier to maintain. Especially with media queries & stuff... scss: _mq-mobile.scss _mq-tablet.scss _mq-normal.scss _mq-huge.scss _default.scss _helpers.scss _icons.scss _normalize.scss _print.scss in style.scss: @media only screen and ( max-width : 479px) { body:before { content: 'mobile'; }; @import "mq-mobile"; } @media only screen and (min-width : 800px ) and ( max-width : 959px) { body:before { content: 'tablet'; }; @import "mq-tablet"; } For smaller projects, just plain old CSS. For the preprocessing I used codekit, love the xtra's you get for validating css & js etc. The reason I use sass is that the syntax looked great, then I decided to stick with it & not look anymore for Stylus or Less. In bigger projects, a time saver.
    1 point
×
×
  • Create New...