Leaderboard
Popular Content
Showing content with the highest reputation on 10/16/2012 in all areas
-
A few days ago some of us discussed the philosophy behind the action links in the contao/pw-tree (http://processwire.c...-love-pws-tree/). Sometimes i found it useful in contao to have a shortlink to publish/unpublish a page. So i came up with the idea to make a module for this task. I wouldn't call me a programmer so i take the code from ryan's pageprocessclone (http://modules.proce...ess-page-clone/) an nico's pageprocessdelete (http://modules.proce...ss-page-delete/) as a starting point. thank you for your great work. Both modules adding a link to the page list. ProcessPageHidden adding a "hidden" link to the list and changes the status of a page to hidden/unhidden. https://github.com/g...ocessPageHidden ProcessPagePublish adding a "publish" link to the list and changes the status of a page to publish/unpublish. https://github.com/g...cessPagePublish Maybe someone would find it useful too and there are not so much bugs in the code.3 points
-
Just expanding a little on one aspect of diogo's post in case some newer folks don't yet know how to get to the User template or how to expand the fields shown in the user's profile. To add new fields to the User template... Navigate to the templates page Click open the "Filters" Click open "Show System Templates" and click "Yes" You should now be able to edit the User template. Once you have added your fields to the template & want them to appear in the user's profile page... Navigate to the Modules page Find the "User Profile" module and click it open Choose all the applicable fields from the list and save the settings.3 points
-
Heavily influenced by Ryan's Login Notifier, the Session Login Alarm module can log access attempts and optionally send emails to users when their accounts are accessed (successfully or unsuccessfully.) This can give users some indication of unexpected activity on their accounts.2 points
-
Hi everyone! I've been lurking for a few months. I discovered ProcessWire when a Google search on the "vim" editor led me to Ryan's personal site. Good thing I wasn't searching for "emacs", I might have never found PW! I'm an artist, musician, and baker. Recently I've gotten into web design and computer programming. I work at a large bakery company where I somehow became the in-house data-wrangler. We have a combination of two proprietary database systems and an ungodly array of MS Office documents. I'm hoping to start grabbing whatever I can from the databases--XML, CSV--and put it onto a simple intranet for spec management. I made a site for my grad school program using SquareSpace. It was a good way to start, but it's whetted my appetite for a system with more control and no mysterious, magically-created markup. I really like the way PW feels--powerful, modular, extensible, with an elegant simplicity that's rare in the PHP CMS world! Also the documentation is great, as are all the helpful people on the forum! I saw the "Skyscrapers" site profile available for download a few months ago. Any plans on releasing it again? I'd love to see the template files. I have some ideas for cross-referencing my art/music in a similar manner. Ryan--your site profile says you were involved in the tracker/demoscene back in the day. Any recordings you can share? Dunno if you're in touch with electronic music these days, ReNoise is a brilliant modern tracker.2 points
-
Edit: welcome! First off, create a template tourdates and a template tourdate. Setup appropriate family construction in the template under "family" so that the tourdate template is only addable under the tourdates template. Then you create a datetime field called tour_date_start. Add the field to the tourdate template. Setup a page called /tours/ with the tourdates template. Make sure you setup the field correcty under the details tab. Create an couple of pages (basicly dates) under /tours/. Create a file called tourdates.php and loop the content as following: foreach ($page->children as $tourdate) { echo $tourdate->title; // this is the title echo $tourdate->tour_date_start; // this is your date } If you want to show them at another page, i.e. the homepage you can do the following: $getTourDates = $pages->get("/tours/")->children(); // Get the parent and loop through these use the above example. If you want to sort them by date turn on autojoin at the field page in the admin - it's under advanced. Then you can sort them by tour_date_start like: $getTourDates = $pages->get("/tours/")->children(sort=tour_date_start); // Get the parent and loop through these sorted use the above example.2 points
-
As my first post here on the forums, I'd like to put my vote behind this editor. Redactor has been a favourite for a while and the devs really seem committed to making a sleek, fast and beautiful tool.2 points
-
I've been working on a site recently that is in WordPress, and have wasted several hours on not noticing that the previous dev had used a mad-crazy image based menu system (should have inspected the CSS more closely). Since I'm not used to WordPress, I was trying to sift through the many (and, in a lot of cases for this site, unnecessary) plugins to find the fault. So okay, it was partially my fault for not noticing that, but just the whole rest of the experience has drawn a line in the sand - everything is so difficult and time-consuming to achieve that I think even if I knew it inside out it would still be long-winded So, no more WP clients for me, thanks all the same, even if there are big bucks on the table it's not worth my sanity any more and is too draining. I'd much rather roll out/update PW sites and enjoy myself rather than tear my hair out over the many and varied caveats of working with WordPress. Call me lazy, but I think it's more about using the right tool for the right job.1 point
-
Looks like there are a few other CMS's (including perch) using Redactor WYSIWYG editor. I'm jealous seeing the other kids playing with a toy that I want and don't have. This came up before in another topic, and it sounds like there are possibly some licensing issues. Thought I'd start a topic specifically to discuss this—incase there is any possibility of adding it to Processwire. I don't have enough knowledge about the licensing, or the skills to turn this into a module—but I make a great cheerleader! Wait... that didn't sound right.1 point
-
Candy CMS is using and distributed with Redactor, they use a GPLv2 licence (not that I understand that stuff very well).1 point
-
I got a response from the Redactor people. The response was: That's basically what I thought. They say they "allow" it, but the problem is the GNU license doesn't. He didn't say anything to indicate an understanding of the GNU license. The liability falls on to the developer that's integrating with GNU software. I'm continuing the email conversation with more questions to get more clarification. But so far it seems to me like we'd have to build this as a commercial module in order to keep control over the distribution. That's fine, but would just mean that TinyMCE would have to continue as the default wysiwyg editor in ProcessWire, with an option to replace it with a commercial module.1 point
-
It seems this url works for at least march 2013: https://api.twitter.com/1/statuses/user_timeline.json?screen_name=apeisa But I didn't read enough to know what happens then...1 point
-
If I understand the question correctly, you indicated "new ProcessWire sites" in which case you should check out the Site Profile Exporter to create your own starting profile to use instead of the included Basic Profile.1 point
-
Glancing through the code associated with the datetime field i guess when you don't explicitely set an output format it falls back to: const defaultDateOutputFormat = 'Y-m-d'; // FieldtypeDatetime.module On the db level FieldtypeDatetime is a MySQL datetime type. getUnformatted seems to give you the wakeupvalue. /** * Convert value from timestamp to Y-m-d H:i:s date string * */ public function ___sleepValue(Page $page, Field $field, $value) { return date('Y-m-d H:i:s', $this->_sanitizeValue($value)); } /** * Convert value from Y-m-d H:i:s string to timestamp * */ public function ___wakeupValue(Page $page, Field $field, $value) { return strtotime($value); }1 point
-
Datefield seems to use date function to format dates: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.module#L109 Date doesn't support setlocale: http://php.net/manual/en/function.date.php1 point
-
It would, but totoff wants to format $page->closing differently depending on the template he uses it on, or at least that how i interpret his question. If this is not the case, then of course you could just set the desired output format in the field settings and just do 'echo $page->closing'1 point
-
@SiNNuT, if it is already formatted as you suspect, perhaps this would do: <?php echo $page->closing; ?>1 point
-
PHP's date expects a Unix timestamp. $page->closing most likely returns a formatted date that is set in the fields output formate setting. Try: <?php echo date("Y-m-d", $page->getUnformatted("closing")); ?> The created and updated system values return unix timestamps by default i think, so this is why they work in your example.1 point
-
I don't think there are modules for those, but for user profiles you can do by adding fields to the "user" template (see the blog profile); For private messages you would need a page fieldType for choosing receiver and a text field, then, you could have a message center for each user with $msgsForMe = $pages->find("template=privateMsg, receiver=$user"); Settings is easy, a simple page with everything you need as fields (see the homepage of the blogprofile); email notifications... well, that depends of what you want to notify, of course, but I can imagine that you would have to make a module that hooks on the page saving (in the case of notifications for private messages, for sure), and to mess around with mail() or something more robust. But overall, everything is possible depending on the time you want to dedicate to it1 point
-
Personally, I have to say I'm quite surprised as to how many votes everyone is getting, but we've got lots of time. Something worth pointing out is that some people are voting multiple times using different accounts (they might vote once with facebook, once with linkedin, once with twitter and once with google+) and it will make the votes look padded but when I do the final tally, those 4 votes will only count for 1. You can see who votes and the duplicates by clicking on the number beside the thumbs up. So regardless of what the numbers really look like, there will be some corrections. This is one of the reasons I am using list.ly is it makes people log in to vote. I think everyone will find it fair in the long run.1 point
-
Hi Ryan - issue solved. There were 2 files I had to update with the image path. Thanks for your patience. Aaron1 point
-
Thanks Ryan. I guess that's true, but these kinds of awards do shine on your CMS even if it's only a nomination. So a couple of more votes will let others know ProcessWire is a CMS to consider in their toolbelt. That's why I'm bringing in the family .1 point
-
Thanks spoetnik! I removed that line it worked great! I used IIS7 rewrite module. It's very easy, just import .htaccess file and it will create rules for you. Here is the walk-through http://www.iis.net/learn/extensions/url-rewrite-module/importing-apache-modrewrite-rules Non-profit charity wants to have their website and they already bought windows hosting package before come to me and I want to use ProcessWire because I really like the clean admin interface.1 point
-
These are the libraries recommended by twitter. Apparently there is also a zend service that it's not there. Seems pretty simple to implement. At least I used the service for youtube, and it was: $twitter = new Zend_Service_Twitter(array( 'username' => 'johndoe', 'accessToken' => $token )); $response = $twitter->status->userTimeline();1 point
-
I had a look at soundcloud sharing options, and they don't look very smart... Still, I think your best option would be using the wordpress option that looks like this: [soundcloud url=http://api.soundclou...racks/59046167" iframe="true" /] You have two options. One that represents more work to the editor but less processing work, one simpler to the editor but more complex in PHP. For both options, create a text field "song", and add it to the template. For the first option, teach the editor to get the wordpress sharing option in soundcloud, extract the number of the song [soundcloud url=http://api.soundcloud.com/tracks/59046167" iframe="true" /] and put it on the "song" field. The code on the template would be this: $song = $page->song; echo "<iframe width='100% height='166' scrolling='no' frameborder='no' src='http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F{$song}}&show_artwork=true'></iframe>"; Second option, is a little bit easier to the editor because he doesn't have to look for the number on the wordpress code. Only copying it. [soundcloud url= iframe="true" /] Your code would have to be more complex, and a bit slower in terms of processing: $src = $page->song; preg_match( '/([0-9]+)/', $src, $matches); //extracting the numbers part of the url with a regular expression $song = $matches[1]; // and putting it on a variable echo "<iframe width='100%' height='166' scrolling='no' frameborder='no' src='http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F{$song}&show_artwork=true'></iframe>"; edit: corrected some typos by WinnieB's suggestion1 point
-
Thanks for all the great feedback. Much more enthusiasm than I expected! Yes. The FormBuilder adds a new $forms API variable to your installation from which you can grab forms, results, etc. However, they aren't initially as comprehensive as something like the $pages API var. It initially creates the page in Setup, but you can move the page to be wherever you want it in the admin. This is exactly what I did for a client this week, I dragged /processwire/setup/form-builder/ to /processwire/form-builder/, so that it shows up as a "Forms" nav item in their top admin nav. There are a few reasons, but I worry that taking donations might give a one-man project impression and discourage others from getting involved. We will probably be able to take donations once ProcessWire is incorporated as its own company/organization, and donations would then go specifically towards predefined operating costs and marketing, rather than some individuals wallet. Basically I want to make sure we've got the right structure in place.1 point
-
$class = $child === $page->rootParent ? " class='on'" : ''; is a short way of writing if($child === $page->rootParent) { $class = " class='on'"; } else { $class = ''; } $page->rootParent gets the ancestor that is closer to the root (a direct children of the homepage). If you change the homepage variable to a something different from the root, they will never match. For this to work you have to replace $page->rootParent for this page's ancestor that is closer to /en/. Put something like this after the first lines: foreach($page->parents as $v) { if($children->has($v)) { $newRootParent = $v; } } Then replace $page->rootParent by $newRootParent. I'm not on my computer, and I can't test this right now, so, no guarantees here1 point
-
One more thing: I understand that the following line adds the "on" class to the menu item if the current page matches that item, however I don't understand how that works. $class = $child === $page->rootParent ? " class='on'" : ''; Could you please explain it to me? This is because I've changed pages level like this: $homepage = $pages->get("/en/"); and now the on states aren't working... Thanks1 point
-
I think this is what you want $homepage = $pages->get("/"); $children = $homepage->children->find("visibility_in_top_menu=1");1 point
-
When importing images to pages, make sure the page exists first. So if you are creating a new page, save it in your API code ($page->save()) before adding the image to it. Otherwise, PW won't know where to put the image(s) since the /site/assets/files/* directories are based on the page ID. If you are adding an image to a single-image field, you can just set the value of it to the URL, i.e. $page->image = 'http://www.something.com/some-image.png'; If you are adding an image to a mult-image field, you can add() it: $page->images->add('http://www.something.com/some-image.png'); Either of the above makes PW copy the image to it's assets and create the proper object. And then don't forget to: $page->save();1 point