Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/03/2015 in all areas

  1. Dude, It's ProcessWire, why using an external guestbook? $entry = new Page(); $entry->template = 'guestbook-entry'; $entry->parent = $pages->get('/guestbook-entries/'); $entry->name = 'John Doe'; $entry->date = time(); $entry->comment = 'ProcessWire rocks'; $entry->save(); $entries = $pages->find('template=guestbook-entry,sort=-date,limit=100'); foreach ($entries as $entry) { echo '<h2>' . $entry->name . '</h2>'; echo '<p>' . $entry->comment . '</p>'; }
    3 points
  2. Yep..Wanze beat me to it...I thought the guestbook was something more elaborate The guestbook is just like the Blog Module...minus the posts ...You can have each message be a comment in ProcessWire attached to one page (one page = one guestbook), or have each message be a page with one comment (group of sibling pages = one guestbook). The other stuff you see in the frontend are just cosmetic stuff you can achieve with jQuery... The blocking stuff, etc, you can achieve all that with inbuilt comments module, or extend it to achieve what you want..
    2 points
  3. Works for me using $config...e.g. include($config->paths->root . 'site/guestbook/index.php'); echo $test;//this is a variable in the above index.php // output = This is my guestbook What is PW telling you? Of course I don't know what index.php in your case does/contains...So, it could be a little bit more involved than this simple example... Btw, maybe you could also convert that guestbook to a PW module? Then you can use it in a more modular way...
    2 points
  4. Just so you are aware, the InputfieldSelect that soma mentioned has nothing to do with the third party FieldtypeSelect module from Hani which is what I think you are talking about in your first post. If you want to specify optgroups with InputfieldSelect, you want to use a Page field, or the Options field type (which is in the core, but not installed by default).
    2 points
  5. Can you try this : /** * Uikit Navbar Navigation * * @param $items * @param array $templates * @param string $tag * @param int $maxDepth * @return string */ function renderNavigation($items, $templates=[], $tag="", $maxDepth=0) { $templates = (!empty($templates)) ? $templates : []; $currentPage = wire('page'); $output = ($tag!="") ? "\n<div class='uk-dropdown uk-dropdown-navbar'><$tag class='uk-nav uk-nav-navbar'>" : ""; foreach($items as $item) { $class = []; $dropdown = ""; $hasChild = FALSE; $url = $item->url; $caret = ""; $filter = ""; if(! empty($templates) && !in_array($item->template, $templates) && $maxDepth) { $filter = "template!="; $x=1; foreach($templates as $template) { $i=$x++; $separator = ($i!=count($templates)) ? "|" : ""; $filter .= $template.$separator; } if($item->numChildren($filter) > 0) { $hasChild = TRUE; $class[] = 'uk-parent'; $url = '#'; $dropdown = " data-uk-dropdown"; $caret = " <span class='uk-icon-angle-down'></span>"; } } // Set Active Class ! if($currentPage->id == $item->id || $currentPage->parents("id=$item->id,template!=home")->count() > 0) $class[] = 'uk-active'; $class = (!empty($class)) ? " class='" . implode(' ', $class) . "'" : ""; $output .= "\n<li{$class}{$dropdown}><a href='{$url}' title='{$item->title}'>{$item->title}{$caret}</a>"; if($hasChild) $output .= renderNavigation($item->children($filter), $templates, "ul", $maxDepth-1); $output .= "\n</li>"; } $output .= ($tag!="") ? "\n</$tag></div>" : ""; return $output; } // Usage : $homepage = $pages->get(1); $navigation = renderNavigation($homepage->and($homepage->children), array("don't", "display", "these templates", "children"), "", 1); echo "\n<nav class='uk-navbar'> \n\t<ul class='uk-navbar-nav uk-hidden-small'> \n\t\t{$navigation} \n\t</ul> \n</nav>";
    2 points
  6. Since this topic popped up I have been thinking on how to help PW grow from my possibilities. I am no whizz coder, but surely I can pull off some websites and maybe some other tricks, but in the end I'm rather a designer that deals with small to mid size business demands. I try to participate as much as I can supporting users, but I find that most of the times my experience is not enough, so maybe I can put my other "stuff I know how to do" to help. PW seems to already have an experienced audience, that are migrating from other software some more complex, some from the popular systems available, but I don't really think there's much material for people who handle front end technologies with average skills who want to transition into server side solutions to achieve a full stack developer status that let's them take on bigger projects and not just pure front end. I think Processwire is a killer weapon for that type of developer because of all the heavy lifting from Processwire without compromising flexibility, makes it really friendly who people who already know the basics of coding and probably has experience with javascript. So after explaining a bit where I stand, I had this ideas for tutorials series: - How to make a one page website with Processwire. - Portfolio from scratch with Processwire. (here goes my blog!) - How to make your comic book website with Processwire. I think this kind of "generic" type of tutorial, will attract people starting with frontend technologies and middle to advance users will get the grasp of how things work in Processwire and just dive into it. So, that's why I'm making all this noise about the live coding and stuff haha, I just think Processwire needs more media out there that shows solutions for practical problems that learning web developer's could be potentially searching for. Sorry if the conversation drifted away, just wanted to expose my goals. What do you guys think?
    2 points
  7. I'd love a native solution too! Let me clarify: To me, the main issue is not the amount of installed fields . Like I said, we shouldn't let then number of fields be the overriding factor to guide our data storage needs. Rather, it is the questions I raised earlier. Fields are actually just Fieldtypes themselves . The idea behind using custom Fieldtypes was not necessarily about avoiding using pages. Fieldtypes are (usually [always?]) attached to pages . One of the ideas with custom Fieldtypes is to help better organise data, avoid duplication and redundancies. There are other advantages as well. Custom Fieldtypes can also be used in conjunction with core Fieldtypes, e.g. we could reuse the title Field, if you are using pages, say, for threads. Another example, consider the FieldtypeEvent that was linked to above. It stores three pieces of custom information on each row - notes; location and date all in one table. If we were to duplicate that using 'normal' fields, we would need at least three fields for each piece of information, a date field, and maybe two text fields. Those are three tables. Yes, that will also work, but at some scale, it is more efficient to query only one table than query several tables. Maybe even some custom Fieldtype could act as an 'external db table', but I don't know how feasible it is to have a Fieldtype that doesn't interact with a page. Anyway, I've gone overboard .... Looking forward to see the forum! Maybe then we'll have a clearer picture of what could be tweaked RE data storage, presentation, etc.
    2 points
  8. The Background In April 2015, we were asked by CSDC Systems, to revamp their website. CSDC Systems is a Toronto-based company selling cloud-powered, process improvement technology to local governments, regulatory institutions, courts, universities, and granting agencies all over the world. CSDC Systems had a website that was built on Drupal 7.x, was difficult to update internally by their staff, had maintenance issues apart from being a very design dated website. The Objectives >> Create a modern, world-class website that sells CSDC's Solutions >> Highlight the benefits and advantages of the solutions and the company >> Make the site responsive and browsable across devices >> Give them a system that could be updated by non-technical users in their company. The Challenges >> Re-architect the entire website to make it usable by b2b clients >> Rewrite the copy with pain/gain/ benefits orientation >> Redesign to make it more visually appealing despite long copy >> Get results Re-imagining the CSDC Systems Website >> The old site had 350 pages of information with the bulk of it being blogs/ news. Blogs and News were ported and reformatted to make it visually appealing. >> 120 pages of copy to do with Solutions, Services, Platform, Case Studies and Whitepapers were rewritten and visualized ground up >> The persuasion structure with social proof - testimonials, Case Studies, Why CSDC was re-imagined and then reconstructed The Technology >> This was more a fairly large, prestigious, communications-driven website without any major technology challenges. >> The site uses Processwire CMS with Foundation 5 CSS framework >> The front-end page structure and design were mirrored using repeaters and fields at the backend. >> Forms, Profields, Autolinks, Tags, SEO are some of the plugins used >> The site uses ProCache. The Result The tutorial for the client over Skype lasted one hour and the happy part is that they are up and way confidently after that. The client's response: I was surprised that the site administration could be so intuitive and manageable by anyone with little technical knowledge. Coming from an old Drupal website, we shall take that as a true compliment for Processwire. The site is blazing fast. Records A: 94% on Google Page Speed and A: 92% on YSlow at GTMetrix. A nifty 1.6s load time with proCache turned on. You can view the new site at: http://www.csdcsystems.com/
    2 points
  9. WireMailBranding Add email templates to wireMail From this: $mail->bodyHTML("<h1>Hello</h1><p>I'm WireMailBranding</p>"); To this: (or whatever template you create) How it works? Create an email template without content. On the spot where you wish to have your content place the tag {bodyHTML}.The markup you've set with $mail->bodyHTML('<p>Markup</p>'); will replace that tag. You could set the defaults in the Module configuration or set the properties with the API. (See below) The API will overwrite the default settings $mail = wireMail(); $mail->to('user@some-domain.ext')->from('you@own-domain.ext'); $mail->subject('Mail Subject'); // Set path to template (overwrites default settings) $mail->template('/site/templates/template_wrapper.php'); // Enable/Overwrite the Emogrifier CSS inliner. (0, bodyHTML, wrapper) $mail->inlineCSS('bodyHTML'); $mail->bodyHTML('<p>This paragraph will replace the {bodyHTML} tag in the mail template.</p>'); $mail->send(); CSS inliner We have added the beautiful css inliner Emogrifier to inline the CSS styles. When using the Emogrifier CSS inliner applying it on the bodyHTML only is the most efficient way. We recommend you to write the inline styles for the wrapper manually. The module is sponsored by Calago.nl. Thanks guys ! Updates 0.1.2 Bug fixes : - Fixed redeclare Emogrifier bug. Improvement - Added error logging for Emogrifier - Added inputfield error for the lack of PHP's mbstring in the module configuration. - Some code cleaning and other cosmetics 0.1.3 Bug fixes : - Fixed bug when module couldn't grab bodyHTML (resulted in doing nothing at all). GitHub https://github.com/Da-Fecto/WireMailBranding Modules directory http://modules.processwire.com/modules/wire-mail-branding/
    1 point
  10. After finding ProcessWire, I knew it was the perfect fit for our corporate site. The power behind PW meant I could do anything I wanted quickly and efficiently. I very quickly moved on from WordPress to PW for our clients and I have never looked back. WordPress has always been frustrating to use however I felt the alternatives I found came with their own faults also. However this is a very different story with ProcessWire, it ticks every box. The API is powerful, versatile and easy to use. The CMS is secure with no known venerability (how great is that!), The templating is very easy and sticks to PHP convention. There is plenty of custom fields in the core, but great module support also. But also it's very easy to use for clients. All these are important and ProcessWire ticks every box (including multi-language). I can't thank you enough Ryan (and others working the project) you have really made an excellent product. http://www.thebrandnewidea.co.uk/ I look forward to hearing your feedback.
    1 point
  11. I actually registered back in January but then proceeded to bounce around CMSs, then went back to wp because it's just so easy to find and activate a plugin. Now I have a multisite with ummm, 40+ plugins and a highly functional theme. I cringe on every update. I even have a couple I can't update because I had to tweak them. Lucky for me, there's a plugin to prevent other plugins from being updated accidently. Time for some sanity and some learning. I know html/css pretty well. Last year's versions at least. php or programming in general? Not so much. Took the UK Kent Univ programming aptitude test and didn't do too bad, considering I've never taken an algebra class. I've been blue collar all my life. Electric sign fabricator for 25+ years. Large projects that took weeks. Did many high profile jobs but towards the end, no matter how fancy it was, it was boring. Time for something new. Getting too old for all the climbing, stooping, lifting and breathing toxic fumes typical of a sign shop. Inks, paint, welding etc. Likewise, getting into another blue collar field is not much of an option at 50 so I've decided web dev as my new career. Jumping into a tech career at 50. Did I say sanity? Nevermind. Winter's coming on here and I've set this winter aside for learning php and a CMS thouroughly. Or as thouroughly as I can in one season. It was going to be wp but I just can't stand the UPGRADE TO PRO atmosphere and worry it might be contagious. (there are exceptions of course as I have come across some stand up guys and gals there) I've got a lead on building a site for a small nearby city and the thought of using wp brought feelings of panic and nausea. Depending on their time frame, I may have to use a responsive html/css/js site and upgrade them to a cms later. I don't have the job yet so I'm not going to stress about it. However, I still want to get into something a little more structured yet flexible and it really comes down to ss or pw. I think they're pretty similar but pw looks to have a less steep learning curve. So here I am. I am the type of person that likes to figure things out or find things on my own but I'm sure I'll have plenty of ignorant questions. Thanks for your patience in advance, John
    1 point
  12. @tpr - glad it works and that Migrator helped to save your *ss too Firstly, I do have a working solution for you, but first a little background It is weird that nothing is getting exported - it is definitely exporting a valid CSV file for me. The only problem I am seeing is that I can't control the fields that are exported - it is defaulting to: Set Password, Email Address, Roles The problem is that if you allow the Home > Admin > Access > Users to be separately configurable you should be able to specify the required fields, but the settings don't save, because that page is locked for editing by PW so we are out of luck with that. BUT, here is my working solution, which I think is cleaner than making users navigate to that deep page anyway: Grab the latest master version (there is one critical change to make this work). Create a new page somewhere in the main page tree (not inside the Admin tree) - maybe called "User CSV Export". Make this new page separately configurable in the BCE "Where editing tools are available and separately configurable" settings section. Go to the Settings tab of this new page and configure it to enable Export mode. In the Content / Deletion / Protection section, set the Parent Page to: Home > Admin > Access > Users In the CSV Export Settings, set up the fields to export. You will likely want Name, Email Address, and any custom fields you may have set up. Save settings and then go to where you have BCE displayed (maybe an Inline Fieldset would be a good idea in this case) and click Export. Works great here, so please test and let me know.
    1 point
  13. @GuruMeditation, Sure thing. At least I can listen to what you have in mind...
    1 point
  14. Thanks! Just tried and it works fine. BCE and Migrator saved my *ss today when I needed to migrate 100+ pages, so thanks for these
    1 point
  15. Kongondo, I've just read through your posts again, and it all makes sense to me. I'm sorry if my response made it sound like I hadn't taken in what you said, it's just all new to me at the moment I was wondering if I could send you a PM regarding a very simple and minimalist Fieldtype example I have in mind. I am keen to get my head around them, and if you can spare some free time I would really appreciate it. If not, I understand and you've been more than helpful. But I would really prefer to use Fieldtypes to store some of the data.
    1 point
  16. Thanks for reporting @tpr - I have fixed this on the master branch. I have some uncommitted changes to the dev branch at the moment, so the fix won't be on that branch just yet.
    1 point
  17. not urgent at all, as it works once updated manually - i just wanted to report it to further improve the module
    1 point
  18. @Macrura, It was updated to work with 'save' also a while back, I think either a @teppo or @soma PR/request IIRC. @icietla, Have you tinkered with the other settings? (see screenshot)
    1 point
  19. Bernhard, I have on my todo list answering to this, but still couldn't have a proper look at it. Just to let you know.
    1 point
  20. Do you use A) different values for $config->userAuthSalt in site/config.php B) different PHP versions with the environments ?
    1 point
  21. Use an images field on your template and if you have a field with ckeditor there is an image icon click it and you will see uploaded images to your page. Select image and make your align left, right or center. Save the page After you did these steps add class to your css file about alignments you can find sample css codes here : https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/templates-admin/styles/main.css#L432 Also if you add description on your uploaded image, alt tag will be appear with your description.
    1 point
  22. I would like to see a native forum. So I'll take a look at your module
    1 point
  23. 1 point
  24. I also started with "discuss" a simple, extendable forum module based on PW pages few month ago, but stopped work in favor of Flarum (Demo). I like the EsoTalk successor and maybe start an integration for my small forum site instead of a native PW forum...
    1 point
  25. Quite nice indeed, though I have a few suggestions/recommendations: Fonts are inconsistent. Some areas use Open Sans, others use Droid (which defaults to serif and has no @font-face). (Though, at a second glance, I see that there are references to "Droid, serif" where it should be "Droid Serif, serif" - I take it "Droid" is not a font, which is why its defaulting back to serif (in my case, Times New Roman, which is a terrible font)). The shadow under the main menu (nav bar and drop-down) is at a 45-degree angle, leaving an area of whitespace to the left of the shadow - doesn't look natural. I recommend changing that shadow to: box-shadow: 2px 0px 14px rgba(0,0,0,0.2) The submit button in the footer needs extra styling - specifically, a border is needed there. The two rows of white blocks with the learn more buttons should have a transparent border applied. Why? Because when you hover over them, a new border is applied, and the text moves down. Applying a transparent or white border should resolve that. I think that the search box could do with some more work... It's quite small, and doesn't seem to fit nicely in the navigation/header bar. On content pages, I think the breadcrumbs bar could do with a light grey background. The sitemap list could do with some styling - perhaps some custom bullets or block elements would help on that front. That's all I can think of at the moment. Well, that's all that is prominent to me at the moment. Otherwise, nice site, and congrats on the release. Quick tip: Your post content is in a code block, which means I have to scroll left and right to read the content...
    1 point
  26. 1 point
  27. First of all, fieldtype modules are not inputfields, so your posted code does not work no matter which field you actually want to add. Additionally some inputfields depend on their corresponding fieldtype, which makes them unusable in plain inputfield mode, which the module settings are using. Fieldtypes are only used in context of templates, as they handle things like persisting data to the db, which is only needed for pages. This module does not even have an inputfield, because it's using the core one, so to get the same functionality in the modules settings you can copy the code from the getInputfield() function of the module into your code.
    1 point
  28. ProcessWire is that CMS/CMF for real craftsman! Other CMS give you the structure (mostly strange and not comprehensible) - and PW gives you the toolkit to build up websites along with your actual knowlegde and learning process. There will always be room for new improvments and enhancements in your skills while you building websites with PW, without break something or "crying on a update"...a little bit like playing a game and level up with every project/website that you learn something new. Best hint at start is to change general thinking. Much more reflect the basic structure, data and possible enlargements on your project, than simple installing plugins. Build your website just with HTML/CSS like you need it and then carve out the needed data and form it with PW templates and fields. First important advice on the forum is to search with google and not use the forum search itself, since this search is not that good. Second important advice is to wish you the same fun that i have after switched to Processwire - you will get some great moments if you are open to the basic concepts and ideas behind this piece of software. best regards mr-fan
    1 point
  29. Welcome John, We're a pretty friendly bunch around here. As long as you're willing to learn, you'll get plenty of help! I am certain you'll find PW a huge relief after the pains of WP!
    1 point
  30. Usually I would agree with @SteveB on such "unnecessary" features, but the weird thing is that in this case I quite enjoyed the "typewriter effect". Combined with the overall style of the site, it felt almost mesmerizing, and made me focus more on the content. All in all browsing this site was an enjoyable experience – great work!
    1 point
  31. hi diogo, thanks for the great module! i just moved a site from dev to live server and got an open basedir restriction error. it looked for the template file unter /var/www/site/... instead of /var/www/vhosts/xyz.com/site/... i had to go to that page and assign the template again. maybe you can change this to use relative paths down the PW rootpath? thanks PS: no problems with the scripts and styles paths!
    1 point
  32. So, I figured it was time to post an update to this great thread. Thanks to the truly exceptional help from Bernhard, and from others including kixe, OrganizedFellow, Peter, and cstevensjr, I am on my feet with this. while I didn't exactly follow the summary that Bernhard posted in the immediately previous message, it was close enough. The site is loaded and functional! This has allowed me to begin exploring the inner workings of the site - expect me back at any time without notice! Thanks again, guys. It was great help.
    1 point
  33. 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.
    1 point
  34. i think he wants to get the version of the old installation which is not running (only html + sql, right?)... you can find the old version number here /wire/core/ProcessWire.php: 32 class ProcessWire extends Wire { 33 34 const versionMajor = 2; 35 const versionMinor = 6; 36 const versionRevision = 1; was also my guess but i don't know to be honest. i would try it with blank-profile. good luck! edit: in admin you see the version on the bottom left corner
    1 point
  35. Put this in one of your templates, <?php echo $config->version; ?>
    1 point
  36. I recommend the following steps: make a new clean install of PW put your templates, assets, modules in the site folder download Ryans Module Database Backups here: http://modules.processwire.com/modules/process-database-backups/ go to Setup > Database Backups > Upload upload your sql If necessary reset admin password with the following code in your home template $users->get("admin")->setOutputFormatting(false)->set('pass', 'newpassword')->save(); look what happens. If needed switch on debug mode to clean-up your templates $config->debug = true; // in config.php Add your IP adress to HTTP hosts whitelist $config->httpHosts = array('xxx.xxx.xxx.xxx'); // in config.php
    1 point
  37. My preferred approach is to create a high level "Slideshows" page. Then I will create a parent "Slideshow" page and add individual slides as child pages. On the page where a slideshow needs to be assigned, I create a Page field that allows for a single slideshow selection. Using repeater fields is a bit limited in that you have to completely delete the slide from the slideshow if you no longer want to use it. Some of my clients want to unpublish a slide and then use it again in the future. Using pages as individual slides provides them more flexibility, and using pages as slideshows allows them to create a variety of slideshows that can be swapped out. For example, a client may want to change Home page slideshows on a seasonal basis.
    1 point
  38. ProcessWire IS successful. I've not read all but think it's all kinda way off to what PW is in its philosophy and core. Sorry, but I usually am too lazy to read more than 2-3 paragraphs. You need to work on your end-user usability (me reading your post, or not).
    1 point
  39. The notifications are part of the admin. PW doesn't get involved with your front-end output, so it's not attempting to provide anything with regard to notifications on the front-end. However, you can still use the API to add notifications to any user, but they'll need to go to the admin before they will see them, unless you provide your own output code on your front-end. If you wanted to output notifications on the front-end of your site, it would actually be as simple as this: foreach($user->notifications as $no) { echo "<p>$no</p>"; } There are of course several other properties, methods and flags that you can access from the Notification ($no) object. But outputting a notification is basically just a matter of iterating through the $user->notifications field and outputting them all, or just the ones you want. So in this sense, it actually would be quite easy to utilize on the front-end, but like with anything in PW on the front-end, you have to decide how you want the output to be handled. Currently it's using the same method as the forum we're typing in (IP.Board). I have not kept up with websockets technology lately, but was under the impression we weren't there yet unless you had specific client-side and server-side libraries to handle it and provide the fallbacks, or were using node.js, etc. I'd gladly implement websockets in the future if they enable us to accomplish the same thing more efficiently, easily and reliably without bloat. Last I researched this, we weren't there yet, at least in our LAMP context. But you likely know more than I do about that technology at this point, so interested in hearing more.
    1 point
  40. One aspect of this discussion, that derived from a very different meant thread of mine, is the difference in the definition of the word "developer". For one party, this is equal to front-end, while the "other ones" are coders/programmers. The other group defines development as both front- and backend. So even the claim of being a "developer-friendly" system includes potential annoyance. The web development universe becomes more complex, more powerful and more amazing every day - but the words and titles do not catch up. I think one has to keep this in mind especially in discussions like this where one could easily generalize "...but a developer has to this and that".
    1 point
  41. Dude! I've always wanted to do on-the-fly PDF brochures of some pages on a site I have, but have always put it off as thinking I don't have enough spare time to justify it, and don;t really want to fight stupid PDF libraries to get a decent result.. Well, after reading your tut I decided it looked easier than I have previously thought. In about 2 hours this morning I've nailed this with some outstanding results, sooo easy! I thought there would be issues getting PDF data to display right etc (these things are never straight-forward) but no, mpdf is the bomb! So thanks for the enticing post that got me going with this, and guys, if you like me think PDF generation will be more trouble than it's worth, I encourage you to give it a go.
    1 point
×
×
  • Create New...