Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/11/2013 in all areas

  1. So with all the love I have for ProcessWire page labels have always been a little less awesome than I hoped. Say like in the Skyscrapers profile you want to show the height of the tower along side the tower name, the output will end up something like: Cool Tower Name, 780 To me this just isn't good enough and doesn't always offer a lot of value to the end-user/client, so I made "PageListBetterLabels". Which gives you the power to output something like this: That there is done with this (as the setting for "List of fields to display in the admin page list" setting under advanced): images title height --ft -tall floors -floors Opened- In- the- year- year How it works anything that starts or ends with a dash does not get processed as a page field anything with the dash(s) at the beginning gets appended to the field before it anything with the dash(s) at the end gets prepended to the field after it (I hope this makes sense) one dash means leave a space, two means don't I used Soma's PageListImageLabel module as a starting point for supporting Image labels in this module, so a big thanks goes out to him and his wonderful work (I simplified the options in my implementation, to get things up and running). I mostly added this feature as I assumed the two would not work together, I may be wrong though. I will add this to the modules directory, right now I need to pick up my Wife from work. DOWNLOAD
    12 points
  2. My second Admin Theme! Wow! I went for a more "App-like" style this time, I find this type of design can help a great deal with usability and some clients just really prefer it. Now the important part, screenshots! THEME - DOWNLOAD Login Page List Edit Page Page Item Move I've also attached a custom theme for TinyMCE install: compliance.zip copy to {your_site}/wire/modules/Inputfield/InputfieldTinyMCE/tinymce-3.4.7/themes/advanced/skins change the "skin" setting in {your_site}/wire/modules/Inputfield/InputfieldTinyMCE/InputfieldTinyMCE.js from "o2k7" to "compliance" ALSO put together an AdminBar mod to match, that include a search field to search entries on the back end, just because I wanted to see how that would feel. AdminBar.zip THEME - DOWNLOAD UPDATE 1.0.1 - Pushed some fixes for modal styling UPDATE 1.0.2 - Big improvements to Internet Explorer compatibility. NOTE: Relies heavily on CSS3, only tested in Chrome so far. Will be updating frequently will new feature and fixes, I just couldn't wait any longer to release it!
    11 points
  3. Hello guys We reached some over 100 modules on http://modules.processwire.com It was like 5 when I joined 1.5 yeah ago? Keep it up but remember quality > quantity I'm a PW addict, when I've not created a module for so long I get nervous.
    3 points
  4. Added support for Admin Themes install. Let me know if it works for you. It's now updated to 1.0.2 and can be updated using Modules Manager, just refresh the cache and go. Thanks Adam for reminding me implementing it! - When installing it, it will throw a JS confirm as it will delete the templates-admin folder in site/ when found. - It will look for a folder templates-admin in the downloaded folder and install it, or if not found it will move the content of the extracted folder to site/templates-admin (assuming it's already the templates-admin folder). Thanks
    3 points
  5. No I think WillyC has some insight here. A page tree can be a type of fractal, which is what I think he's trying to show with that image. And the man is presumably creating and manipulating the tree (fractal) as you would in ProcessWire. Translation: the nature/secret of categories is that they are just pages. world=your site, catpage=category+page. So your site is made of categories or pages, and the distinction does not matter as it's all the same. Translation: Once you know the true nature of pages, you can create anything. Self actualization or something? Do I have this right WillyC?
    3 points
  6. HI Carlos Just a couple of thoughts which are possibly a little less about ProcessWire and more about the possible construction of the site. These come from personal (and quite recent) experience dealing with a campaign. The general rule is that Political Party Websites are always vulnerable and WILL get attacked - this I know from personal experience. So, if you want intranet type functions for party members, host them separately and securely so if your campaigning site gets attacked, that is all that happens. Bare in mind that CRMs inevitably hold confidential information - political party contact lists are highly prized! Although Buddy press type functions can seem a lot of fun and give lots of freedom, they are far better aimed at a general community than a political party. A party website should have very strict editorial control so that articles are submitted for publication and then go through an editorial process before they are published. This stops accidental mixed messages, undermining party policy, bending the brand and so on. The Party website is a huge advert at the end of the day (and there is nothing wrong in that) but like any form of advertising if it is not consistent with its messaging it backfires very quickly. ProcessWire has good user functions which would allow you to set up an editorial process and, of course, you can create any sort of content and a huge variation of templates. Scalability wise, Ryan mentioned on another thread that it can handle huge applications without a problem - probably more a case of making your server solution scalable, perhaps, but I am no expert on this! So, my thought would be to separate out the promotional site from the community site so there is less confusion. I am sure there will be plenty more technically helpful solutions coming along shortly! Joss (Who is a whole ocean away from Connecticut!)
    3 points
  7. Just had to implement admin theme install feature in ModulesManager to more easily install because I'm lazy dog.
    2 points
  8. That is awesome! Wish I wasn't being called down to cook dinner right now, I can't wait to try this out.
    2 points
  9. the.nature the real secret of category is the.world made of category. the world made.of page catpage in.catpage if you.know catpage.that world is made of you.make of it whatever you wish.
    2 points
  10. I keep threatening to do one too but haven't found time yet... which is silly as I think it would take me less time than I spent on theming the forums!
    2 points
  11. Hey Everyone, It's Friday.... I'm glad that no ProcessWire sites show up in the results here: http://www.theuselessweb.com/ Thanks, Matthew
    2 points
  12. Welcome to the ProcessWire forums Carlos. Good idea. Even better might be to go managed dedicated (like what we're using here from ServInt), or one of the platforms that can scale like StormOnDemand. Drupal and WordPress = Republicans and Democrats It should handle massive traffic better than most. It's certainly lighter weight than the others you are considering. ProcessWire performs very nicely without any caching features turned on. But as your needs to handle higher traffic increase, you'll want to take advantage of more caching features. ProcessWire includes some very nice full-page caching features (controlled in the template settings), and partial-page caching features (controlled by the MarkupCache module). I am also working on a so-called "Supercache" that completely bypasses the PHP/MySQL and enables delivery of high traffic pages as quickly as plain HTML files. This is not yet ready, but is in the works. Beyond caching, you may also want to move your static assets (CSS files, JS files, image files) to a CDN, so that your main server doesn't have to do anything other than render and serve markup. I have not personally had to manage a site that needs to deal with CNN mentions, so I'd recommend calling ServInt and asking what they'd advise, as they do host a lot of high traffic stuff there and know what's necessary. They are in the DC metro area, and have both DC and NoVA data centers, so are experienced with high traffic government/political related sites as well. While you can make ProcessWire do just about anything (and it'll make a great CRM), I would suggest keeping your website focused purely on delivery of web pages and use SalesForce (or something else) as your CRM. ProcessWire will integrate easily with SalesForce, at least with regard to submitting form data into it. Given your potential traffic considerations, I would probably separate your main site from your state party websites. Perhaps run all the state party websites from a separate server or VPS, and enable either to be a backup for the other. Stick with MailChimp. Don't bother with a built-in newsletter module from another system. This will save you from having to deal with a lot of annoyance, server, DNS and potential blacklist issues. In my opinion, the currently available forum software (especially the one we're using IP.Board) is so good that I wouldn't even consider a CMS forum add-on from EE or the like. IP.Board provides lots of API connections that can be used with ProcessWire. Pete (our administrator) has has written modules that connect IP.Board with ProcessWire. They are not released, but are in use on his site and will eventually be in use here as well. The only reason they aren't already is just that there isn't a lot of crossover between what happens in the forums and rest of the site here, so we're finishing the site redesign before doing it, but will get done. Perhaps Pete could reply to explain a little more about what's possible between IP.Board and ProcessWire. Much of this is also possible with IP.Board. Ultimately though, your users are going to still go to Facebook regardless of what you setup. So I'd focus on Facebook integration more than BuddyPress. I highly recommend Shopify, should you want to step beyond the donation form to sell other party items. BrainTree is an excellent merchant account/gateway to go with it (and avoid PayPal, obviously). This is a lot simpler and more secure than trying to self host. At least in the US, the laws/rules (PCI compliance) governing servers involved in any kind of data collection as it relates to transactions are something you want to let an expert provider run for you, unless you want to spend the rest of your life doing nothing but PCI compliance. Btw, since you run that Justice Party site: very attractive site, but took me awhile to get the message. I was sure this was something tea party related, until I saw the nice table on this page that clarified it all. Might be nice to see that table, or some variation of it, right on the homepage. I would bet that it would decrease the bounce rate significantly.
    2 points
  13. This is really nice. Great Work. I am gonna test this out ASAP. All these great themes are inspiring me to stop sitting on my hands and do one of my own
    2 points
  14. Form Builder will always work on whatever the current version of ProcessWire is. The current Form Builder versions work on either 2.2 or 2.3. Though Form Builder, like most ProcessWire modules, are very likely to keep working just fine, regardless of version. All Form Builder versions include 1 year of support and upgrades. The only reason to go for the 'dev' version would be if you planned to install it on some unknown quantity of sites you develop over that year (as there is no limit). Whereas the 'pro' version is for 3 sites, and the 'single' version is for 1 live site. But all include the 1-year of support and upgrades. You can always go for the 'single' or 'pro' and later upgrade to the 'dev' (we just subtract what you've already paid from the total, when you upgrade).
    2 points
  15. If you upgrade to 2.3 now, you'll just want to test everything in your site out to make sure it still works how you expect. There have been some core changes and optimizations that should not change any behaviors, but sometimes small things don't become apparent until it's in broader usage. So just test thoroughly. Also note that once you've got 2.3, you shouldn't go back to 2.2. It does make some minor DB schema changes in some cases, which 2.2 wouldn't know about. It also uses a different hashing mechanism for passwords that 2.2 doesn't support.
    2 points
  16. Are you looking for this? $t = new TemplateFile($config->paths->templates . "./{$page->template}.php"); $t->set( "hello", "hello world" ); $t->set( 'input', $input); echo $t->render();
    2 points
  17. I have to agree with Matthew that I have mixed feelings with inline editing. Having said that, where it is implemented to allow basic tweaking rather than complete rebuilding, I think it can have its place. Since most of the JQuery/HTML5 editors are implemented on a tag by tag basis, it is easy from the template point of view to allow inline editing on some parts and not others. Personally, I do like simply clicking on an edit button and going to a neat, proper edit page (either by popup or other) where you have the tools as set out when originating an article and then returning to the published page on save. Consequently, my main interest in the new generation of editors is their clean lines, simple implementation and speed. A lot of this is down to the design of the actual page which is being edited. If you look at Google Sites, you have a very fixed page structure and when you go into edit it will look exactly the same and yet be fully and properly editable. If your page is split up with all kinds of boxes, interrupted with adverts and so on, it really does not work quite as well. In addition, an author should write to make best use of the subject first and layout second. It is up to the editor or editing process to make sure the final piece fits in the necessary hole. Personally, I don't think any edit tool I have come across gets the balance right - they seem to be either too quirky or completely overblown
    2 points
  18. It's not a bad idea (the first idea, not the second one ). The easier you make it to install a particular profile the better, but my idea (which I remember posting ages ago) was to have the PW download page a bit like the jQuery download page where you build a package. Think of it - the core and default profile are ticked for download. You can select a different profile and that's your basic options. On top of that though, there could be a list of useful modules - by this I mean the most often used/searched for (there must be some stats from the modules directory - I'm looking for them now on Google Analytics). The downloader would then fetch the relevant packages from GitHub and merge them together into one zip file on the fly. I seem to recall the biggest issue for this being how to fetch stuff from GitHub, but someone's already solved that with the ModulesManager EDIT: There is obviously some overhead to this, but this is a dedicated server after all, plus this idea makes us look quite slick, gives users what they want and puts it all together so all they need to do is install it. Version 2 is a single file they upload to their server and they do the same thing but it fetches all the files to their server and installs it based on the settings in the single file installer
    2 points
  19. Two likes for this. Would be three if a "t" wouldn't be missing
    2 points
  20. Hi Folks, today we will learn how to set up a simple jquery plugin called calendario and fill events trough our admin backend. || ATTENTION || Modern Browser needed First of all, we need the jquery plugin. Grab your copy here: http://tympanus.net/...alendar-plugin/ Now create a new template file, lets call the file calendar.php In the next step we have to include all the needed files from the .zip package. You need the following .css files: calendar.css custom_2.css demo.css Just include them in the <head> </head> of your template file. Feel free to merge them together, so you could save some http connects. Now we need to include the needed javascript. Make sure you have included the latest jQuery library. Include the jquery.calendario.js and the modernizr.custom.63321.js right into the bottom of your template file. Save the calendar.php Now we will set up Processwire where the magic wil happen. We just need one new template. Create a new template called calendar. Assign the field headline to our template. Allow children to just use this template. Hit the save button. Now create a new Page as child of home and call it Calendar. Assign our calendar template to this page. Almost ready. Now we have to do some little scripting in our template file calendar.php Add this html markup to our calendar.php <div class="custom-calendar-wrap"> <div id="custom-inner" class="custom-inner"> <div class="custom-header clearfix"> <nav> <span id="custom-prev" class="custom-prev"></span> <span id="custom-next" class="custom-next"></span> </nav> <h2 id="custom-month" class="custom-month"></h2> <h3 id="custom-year" class="custom-year"></h3> </div> <div id="calendar" class="fc-calendar-container"></div> </div> </div> Now we have to call the javascript function, to get the calendar running. Just put this snippet right under the included jquery.calendario.js <script type="text/javascript" $(function() { var transEndEventNames = { 'WebkitTransition' : 'webkitTransitionend', 'MozTransition' : 'transitionend', 'OTransition' : 'oTransitionend', 'msTransition' : 'MSTransitionend', 'transition' : 'transitionend' }, transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ], $wrapper = $( '#custom-inner' ), $calendar = $( '#calendar' ), cal = $calendar.calendario( { onDayClick : function( $el, $contentEl, dateProperties ) { if( $contentEl.length > 0 ) { showEvents( $contentEl, dateProperties ); } }, caldata : { <?= getEvents(); ?> // this is our function to grab our events }, displayWeekAbbr : false } ), $month = $( '#custom-month' ).html( cal.getMonthName() ), $year = $( '#custom-year' ).html( cal.getYear() ); $( '#custom-next' ).on( 'click', function() { cal.gotoNextMonth( updateMonthYear ); } ); $( '#custom-today' ).on( 'click', function() { cal.gotoNow( updateMonthYear ); } ); $( '#custom-prev' ).on( 'click', function() { cal.gotoPreviousMonth( updateMonthYear ); } ); function updateMonthYear() { $month.html( cal.getMonthName() ); $year.html( cal.getYear() ); } // just an example.. function showEvents( $contentEl, dateProperties ) { hideEvents(); var $events = $( '<div id="custom-content-reveal" class="custom-content-reveal"><h4>Termine am ' + dateProperties.day + '. ' + dateProperties.monthname + ' ' + dateProperties.year + '</h4></div>' ), $close = $( '<span class="custom-content-close"></span>' ).on( 'click', hideEvents ); $events.append( $contentEl.html() , $close ).insertAfter( $wrapper ); setTimeout( function() { $events.css( 'top', '0%' ); }, 25 ); } function hideEvents() { var $events = $( '#custom-content-reveal' ); if( $events.length > 0 ) { $events.css( 'top', '100%' ); Modernizr.csstransitions ? $events.on( transEndEventName, function() { $( this ).remove(); } ) : $events.remove(); } } }); </script> We are almost finished, but we are missing some very essential, have a look to our javascript. We are calling a function named getEvents() This function will grab our events and fire it right to our calendar. So here is the code: function getEvents() { $events = wire('pages')->get("/calendar/")->children(); foreach ($events as $event) { echo "'$event->title' : '<span>$event->headline</span> ',"; } } Put this snippet above the javascript includes. We will now create our first entry. Go back to the PW admin backend and create a Child of Calendar. Title and name need the Date on which the event has to be displayed. You have to form a date in this format: mm-dd-yyyy e.g. 12-27-2012. The headline field is our Event description. Hit the save button, go to your site and enjoy your event calendar. With a little coding you could extend the calendar to let it look like mine attached as screenshot. Hope this was useful to somebody. Cheerio.
    1 point
  21. ProcessDateArchiver ProcessWire Date Archiver Process Automatically archives pages based on a Datetime field (e.g. /news/2013/01/03/some-news-item/). Behavior - When you add a page with a specified template, the module will automatically create year/month/day archives for it. - When you change the date in a specified Datetime field, the page is automatically moved to the correct year/month/day archive. - When moving or trashing a page, the module will automatically clean up empty year, month and day archives. How to create an archiving rule 1. Go to the Setup -> Date Archiver screen in the ProcessWire admin. 2. Click on Add New Archiving Rule. 3. Specify the template that should be archived (typically the news-item template). 4. Specify the Datetime field that should be used to determine the date to archive by. 5. Specify the template that should be used for creating year archives. 6. Optionally specify the template that should be used for creating month archives. 7. Optionally specify the template that should be used for creating day archives. 8. Click Add Rule. Tips and tricks - Configure the archive templates that will contain other archives to sort its children by name. - Configure the archive template that will contain the news items to sort its children by the specified Datetime field. - You will improve usability if you dont allow the user to create date archives manually. How to Install 1. Install the module by placing ProcessDateArchiver.module in /site/modules/. 2. Check for new modules on the Modules screen in the ProcessWire admin. 3. Click Install for the Date Archiver Process. Module download: https://github.com/u...hive/master.zip Module project: https://github.com/u...ssDateArchiver/
    1 point
  22. Hello, I've used a good number of CMS/Blogs over the years (Mambo, Joomla, WordPress Expression Engine, etc). This past Nov. I joined a new political party called the Justice Party (http://justicepartyusa.org) and now find myself running their website. The previous designer/developer selected 'Nation Builder' (http://nationbuilder.com) to run the party's website. Nation Builder is a hosted content management system that lends itself to organizations. It has typical functions such as blogs, polls and so on. It took me about two days to pick it up. I can see for organizations, political parties and political candidates, it has a lot to offer. Especially the areas related to campaign donations and fund raising. The downside to Nation Builder is that it is hosted (which is an upside to others) so I can't get under the hood so much. In addition, the monthly fees can be high for a new political party just starting out (different when you have millions coming in like Democrats and Republicans do... lol) I've been recommending that the Justice Party pick up a VPS and run its own CMS. I looked over the major candidates in 2012 and a good number of their sites are running on Drupal or Word Press. I have tried Drupal on and off over the years and never liked it. But I do realize its power. Drupal has a very nice CRM called CivicCRM that also interests me. This 'module' is now available for Word Press but perhaps not so feature rich. I do like how upgrading WordPress is pretty straight forward. And no one can deny the many plugins (good and bad ones). I was out of touch with Expression Engine after 1.7 and have recently looked over the 2.x. I thought to play around with the new Core for a bit. I see in this forum there are many former EE users due to their new licensing issues. I would say my skill is 90% design, 10% PHP. That said, I also have pondered using a PHP framework like CI, YII, etc to build exactly what we need for the party. I am interested in ProcessWire and will try out the demo more extensively this weekend. Some of the areas that I need to explore: 1) How does it handle massive traffic. During an election year or after TV coverage on CNN, we have the potential to get a huge spike in traffic. So caching, etc will be vital. 2) I need to weigh whether to run a separate CRM app like SugarCRM or to build CRM like functions in ProcessWire. No doubt the custom fields will help in this. CRM will mostly be used to track donations, helps us better target members with ad campaigns/communications. CRM will also need to track 'no-members', such as the media. 3) The majority of the site will be static pages like About, Contact, Articles. The multi-site function may be helpful to run our state party websites. For polls, we can probably use Survey Monkey. 4) I might use MailChimp for deployment. But for smaller campaign, a built-in newsletter module would be handy. 5) We are running a 3rd-party hosted forum now. I don't think ProcessWire has a built-in forum. You are using IP Board here? I've used EE forum and vBulletin in the past. Having one sign-in for site and forum would be very good. Are there plans to roll a forum into this CMS or one available by 3rd-party? I've never been a fan of one DB for site and one for forum. Even if they integrate, there can always be problems. Anyone using Vanilla and PW? 6) One reason for using WordPress would be the BuddyPress plugin. I like the idea of users having a Facebook-like profile. Add in Buddypress and it all seems to integrate nicely. 7) Our donation form (hosted by WePay) can be added with an include/JS easily enough. I have to ponder a store plugin/module as well. Might want to sell other party items. Thanks for any input. p.s. If any of you live in Connecticut, please contact me directly. Carlos Camacho Connecticut Justice Party Acting Chairman http://justicepartyct.org
    1 point
  23. Soma! Dude... I love this, I was just pondering the other day if this would be possible, and now, done and done. So easy and fun to test ALL the admin themes now. Thanks!
    1 point
  24. I have already done the cooking and the shopping, so I am going to play with it.
    1 point
  25. Greetings, Yes, this is exactly it. How liberating. For years, I've been quietly thinking along these lines. ProcessWire allows us to really open up the whole idea of pages, fields, categories... Not just fractals, but everything in nature. Has anyone here read "On Growth and Form" by D'Arcy Thompson? Thanks, Matthew
    1 point
  26. Those were the times where I could remember all admin themes out of my head Great theme btw.
    1 point
  27. Hey, I already provided the code previously http://processwire.com/talk/topic/2506-running-a-daily-newspaper-website-with-process-wire/#entry23926, with a hint to http://simplehtmldom.sourceforge.net/ which makes parsing the files and the html tags a breeze.
    1 point
  28. There are a couple of things to bear in mind with this - some of them are the reason why I've not yet released it as a module. Their API was a bit basic, so I've not gone the API route at all with the module - it actually initializes the forum software itself and calls on classes and functions where required (so it doesn't load everything, but there is obviously some overhead like if you bootstrapped ProcessWire). This isn't a downside from a functionality point of view as that's how other apps from Invision Power work to some degree so I'm not doing anything the system isn't designed to do (one of the first things in the module is that it declares IN_IPB = false; for example to tell the forum classes not to load everything unnecessarily). The potential problem for me is that if they release a version 4 of the software or even a minor version, many of the classes and functions could change, so I need to think about supporting the module. It's reasonably advanced and I'm actually doing some work on it with another site to make it easier to roll out, but just integrating things like the member bar at the very top of the forums here into a PW site has all kinds of styling and Javascript issues that I'm hoping to get around so installation is just of a case of copying and pasting some snippets of code into templates. The bottom line though is that there is going to be some work on the part of the developer working on your ProcessWire project (you in this case) in terms of implementing things in the PW templates, so I will probably release it as a paid module so I can handle support. Plus I'm being a bit selfish in that it took me a hell of a long time to build as their code didn't make it straightforward No price estimate yet, but it wouldn't be extortionate. As a quick feature list: Member bar template for inclusion in your PW templates - member bar functionality carries across seamlessly between forums and CMS "Latest topics" function can pull from a news forum or any forum you choose. Caches for X minutes so you're not overloading the server. Create Topic function can be tied to PW page creation so you can handle comments inside the forum software (alternative to PW's comments module). Delete function will be called if the page is deleted. Add/Edit/Delete reply functions as well (so you can comment on a page that has a topic linked to it) Login/Registration (planned functionality coming soon) I know it doesn't sound like a lot, but you have access to all of the member's forum information as well, so you can really tailor the experience for them without having to create a user account in PW for them - I do have some experimental code that will do that as well though
    1 point
  29. 1 point
  30. Hmmmm??? Sounds like it is going from one note and then down 12 semitones. You do the sound once then copy it and overlap it with a gentle cross fade (you can hear it coming in.) Then you chop it in half and swap the halves over and join it back up again and voila, you have your loop. Because you are being strict about the starting and ending on the same note (this is playing fifths I think), then looping is relatively easily. We used to do this sort of thing on quarter inch tape running at 30 inches per second for high quality. To get the loop working we would run it down the corridor on mic stands across little tape reels. If you were confident about starting tape machines at the same time you could run it through several and therefore get the playback at several points, dub the result onto a new loop and start again. The famous doctor who theme used rather a lot of this, I believe. Joss
    1 point
  31. Hello Ryan, Yes, ServInt is on my short list. I am thinking of a managed VPS because the traffic isn't great during none-election years. And during the peak times, we can pay for the greater VPS resources. >Drupal and WordPress = Republicans and Democrats Nice!!! Well, our new party is central so is ProcessWire a middle road? ;-) SuperCache sounds good. Especially when our candidate goes into the TV debates. I don't want to look foolish for a crashing site. lol Need to read more on CDN. I heard of it, but I don't know what it is. Like Amazon services? >ProcessWire will integrate easily with SalesForce, at least with regard to submitting form data into it. Anyone already doing this that you know of? Good tip on state parties and MailChimp. In my opinion, the currently available forum software (especially the one we're using IP.Board) is so good that I wouldn't even consider a CMS forum add-on from EE or the like. IP.Board provides lots of API connections that can be used with ProcessWire. Pete (our administrator) has has written modules that connect IP.Board with ProcessWire. They are not released, but are in use on his site and will eventually be in use here as well. The only reason they aren't already is just that there isn't a lot of crossover between what happens in the forums and rest of the site here, so we're finishing the site redesign before doing it, but will get done. Perhaps Pete could reply to explain a little more about what's possible between IP.Board and ProcessWire. > I was sure this was something tea party related, until I saw the nice table on this page that clarified it all. Might be nice to see that >table, or some variation of it, right on the homepage. I would bet that it would decrease the bounce rate significantly. Good tip. The previous 'template' looked like it was made in 1988! I simply used a stock template from Nation Builder to get the site a little more modern. I didn't want to put any further work into the site as I really want to move them away from Nation Builder. A good deal of the content is missing or old as the various party committees work on re-writing them. For sure, we are NOTHING like the Tea Party people. Might consider us Progressives... more centralist party. Cheers! Carlos Camacho Connecticut Justice Party Acting Chairman http://justicepartyct.org
    1 point
  32. function invert_bool($val){ if($val != true) return !false; if($val != false) return !true; } From http://us.thedailywtf.com/Comments/Avoiding_The_Dreaded_Exclamation_Point.aspx
    1 point
  33. This doesn't not already exist. But it seems like a good idea for a module.
    1 point
  34. To be honest it's not like other systems where there are massive changes - everything from 2.2 will work in 2.3 so it's up to you. Upgrading is just overwriting the /wire folder too so no hassle.
    1 point
  35. Thanks all there was no attachment. I realized the articles at that path while they are live, contained some asp templatized code bits (the bad news). The good news is you all have been a great help already. The article title was wrapped in html span tags, should be accessible to a script. Maybe today I can find the non-templatized archive. The forum works great on mobile by the way
    1 point
  36. Hey I just went through the general boards and answered one of the two that hadn't a reply .... I was leaving the rest to you, since you have so much time on your hands ....
    1 point
  37. I used to post a link on my website to give my new client sites a poke. Work well. Or even in this forum.
    1 point
  38. I think that's mine - great!
    1 point
  39. Greetings, I've spent a lot of time (really, a lot) on the whole subject of front-end editing. It's something that users really want, but I agree with Ryan that we need to make sure it works in the whole scheme of site development. I think it's good to make a distinction between two separate but somewhat similar practices: Front-end editing In-place editing The difference, I like to say, is the idea of "literal" content control. The one that causes trouble is "in-place editing," where clients want to have a window right there on the page in the exact spot where the material appears. They want to create and edit content in that "literal" space. This has many problems. "Front-end editing" is more feasible -- with good development practices. The user can link to an editing function for the page. But they are taken to a proper interface for editing or creating content that takes into account that content cannot always be placed so directly. The interface to edit and create content is not literal. Seen this way, it's up to us as developers to explain to clients what each of these methods is, and why even though one seems prettier it's actually not as good for their sites. It's a few extra steps, but if we design an interface that is easy to understand, users have no problem with the extra steps. Thanks, Matthew
    1 point
  40. I was thinking of a way of creating custom admin pages without having to create a process module or having to use the $wire object. I came up with a process that is actually very simple (although I think it would be better to create a module for having this functionality). Here is how: (This will work with the default admin theme, but should also work with other themes) Go to your /site/templates-admin/default.php (if you don't have it, copy the /wire/templates-admin/ directory to /site/) and change this line <?php echo $content?> to this <?php if($page->template===$templates->admin){echo $content;}else{include($config->paths->templates.$page->template->name.".inc");}?> Then, go to the /site/templates/ folder and create a file named "custom.php" with this content <?php include($config->paths->adminTemplates."default.php"); Our setup is ready Now, to create a custom page in the admin: First, create the new page as child of /Admin/ and point to custom.php as the template file. To do this, when creating the template for the page, go to "ADVANCED" and write "custom" as the "Alternate Template Filename". Then, instead of creating a TEMPLATE.php file, as you normaly would, create a TEMPLATE.inc file. You can use all the API variables as you would in a normal template. Disclaimer: This is a proof of concept, and has still lot's of place for improvement. edit: changed from this if($page->process) to this if($page->template === $templates->admin)
    1 point
  41. I think this is definitely a great idea for a module. But it's also true that it kind of goes against the whole markup agnosticism, and is pretty limited when you consider the broad range of inputs possible with Inputfields. In the context of ProcessWire, it's only a partial input solution. Most importantly, front-end editing goes against content portability and is thus not a best practice. We should be abstracting content away from design, not tightly coupling content into it. I think many using a front-end solution would try to design and fit their content for the space they are typing in. Then the content is a mess when the site goes mobile, responsive or gets redesigned, etc. Promoting content portability is an important job of a CMS, and front-end editing is not good for content portability. That being said, it's great eye candy and there are plenty of cases where I think the benefits of it would outweigh the negatives too. As a core solution, I think front-end editing is a bad idea. But as a modular option for those that want it and understand the tradeoffs, I think it's a great idea. I can think of cases I would use it myself too.
    1 point
  42. Hi, This is a complete server configuration block for NGiNX communicating with php-fpm. There are a few things that will require customisation: server_name root access_log and error_log fastcgi_pass - socket or TCP specification configuration blocks relating to 40x and 50x error handling Note the use of fastcgi_param HTTP_MOD_REWRITE On; which quiets an installer error about requiring mod_rewrite. You might also want to copy htaccess.txt to .htaccess in the ProcessWire top-level directory. server { listen 80 default_server; server_name localhost localhost.localdomain; index index.php index.html; root /var/www/html; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log notice; default_type application/x-php; ### SECURITY - Protect crucial files location ~ /\. { deny all; } location ~ /(COPYRIGHT|LICENSE|README|htaccess)\.txt { deny all; } location ~ ^/site(-[^/]+)?/assets/(.*\.php|backups|cache|config|install|logs|sessions) { deny all; } location ~ ^/site(-[^/]+)?/install { deny all; } location ~ ^/(site(-[^/]+)?|wire)/(config(-dev)?|index\.config)\.php { deny all; } location ~ ^/((site(-[^/]+)?|wire)/modules|wire/core)/.*\.(inc|module|php|tpl) { deny all; } location ~ ^/(site(-[^/]+)?|wire)/templates(-admin)?/.*\.(inc|html?|php|tpl) { deny all; } ### GLOBAL REWRITE location / { try_files $uri $uri/ /index.php?it=$uri&$args; } # pass the PHP scripts to FastCGI server on local socket # location ~ .+\.php((/|\?).*)?$ { fastcgi_pass unix:/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTP_MOD_REWRITE On; include fastcgi_params; } # redirect server error pages to the static page /40x.html # error_page 404 /404.html; location = /40x.html { root /usr/share/nginx/html; } # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } } In the php-fpm configuration you need to specify unix socket or TCP connection parameters and possibly the chdir setting. These are distribution-dependent values and you will need to determine the correct values for your scenario. My configuration is as follows: ; The address on which to accept FastCGI requests. ; Valid syntaxes are: ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on ; a specific port; ; 'port' - to listen on a TCP socket to all addresses on a ; specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. ;listen = 127.0.0.1:9000 listen = /run/php-fpm/php-fpm.sock ; Set permissions for unix socket, if one is used. In Linux, read/write ; permissions must be set in order to allow connections from a web server. Many ; BSD-derived systems allow connections regardless of permissions. ; Default Values: user and group are set as the running user ; mode is set to 0666 listen.owner = nginx listen.group = nginx listen.mode = 0660 ; Chdir to this directory at the start. This value must be an absolute path. ; Default Value: current directory or / when chroot chdir = /var/www/html Please note that I researched these configurations and the preceeding security configuration from original documentation. I did not rely on howtos available on the Internet. Each has been carefully implemented and undergone significant testing before going into production. Regards, Neil Darlow
    1 point
  43. I would love to see some more attention directed towards templates on the homepage - not just fields. This type of functionality is what I searched for when looking for alternatives to Wordpress and Drupal (although they call it Custom Post Types and Content Types instead of templates)
    1 point
  44. All of the markup and classes can be specified from the $options to MarkupPagerNav's render() method. Originally I had the Blog profile using Zurb Foundation and so had it outputting in Foundation-specific markup/classes for pagination. Doing the same thing with Bootstrap is certainly possible and should be relatively simple. Take a look in /site/templates/blog.inc and find the renderPosts() function. At the bottom of that function is this line: if($posts->getLimit() < $posts->getTotal()) $out .= $posts->renderPager(); You'd want to change it to specify an $options array to the renderPager() function, like this: $options = array( 'listMarkup' => "<ul class='MarkupPagerNav'>{out}</ul>", 'itemMarkup' => "<li class='{class}'>{out}</li>", 'linkMarkup' => "<a href='{url}'><span>{out}</span></a>", 'currentItemClass' => 'MarkupPagerNavOn' ); if($posts->getLimit() < $posts->getTotal()) $out .= $posts->renderPager($options); Change the markup and class names as you see fit. There are many other things you can specify in this options array (I've just included a few examples above). For a full list of options you can specify, see the $options array present near the top of this file: /wire/modules/Markup/MarkupPagerNav/MarkupPagerNav.module
    1 point
  45. I've done this before and used the method SiNNuT mentioned. Made the navigation with something like this: for($n = ord('A'); $n <= ord('Z'); $n++) { $letter = chr($n); echo "<a href='{$page->url}$letter/'>$letter</a> "; } Then pulled the items matching the letter from the URL segment like this (just like SiNNuT): $letter = strtoupper(substr($input->urlSegment1, 0, 1)); if($letter >= 'A' && $letter <= 'Z') { $items = $page->children("title^=$letter"); echo "<h2>Letter: $letter</h2>"; if(count($items)) echo $items->render(); else echo "<p>No items found</p>"; }
    1 point
  46. Strange as the url http://localhost:888...re/news/?page=2 suggest that page numbers aren't enabled on template thus the GET version of it. If it's enabled it should be /page2 ... Edit: I'd guess you already have read the pager documentation ?
    1 point
  47. Use your title field for the term, and another field for the definition. For the parent of all these terms, set the default sort to be by 'title' on it's children tab. Then you'd code it something like this (below). I'll use a <dl> rather than a <ul> since a <dl> would be more semantically correct here. <?php function listDefinitions(PageArray $children) { $out = ''; $lastLetter = ''; foreach($children as $p) { $letter = strtoupper(substr($p->title, 0, 1)); if($letter != $lastLetter) { if($out) $out .= "</dl>"; $out .= "<h3>$letter</h3><dl>"; $lastLetter = $letter; } $out .= "<dt>{$p->title}</dt><dd>{$p->definition}</dd>"; } if($out) $out .= "</dl>"; return $out; } echo listDefinitions($page->children);
    1 point
×
×
  • Create New...