Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/13/2013 in all areas

  1. Hi Mark and welcome to ProcessWire! Firstly, if you're referring to the features that start at about 1 minute into this video then I'm afraid not, not yet at least. It is on the roadmap for Winter 2013/2014 but ryan would have to weigh in on this topic as I'm not sure what his thoughts are on the subject - I know it has come up a few times on the forums though which is why it's on the roadmap. After watching that video and having worked with workflows once before, that is an excellent implementation of what can be a complex feature. I can see how it could also be used in ProcessWire on any field you could add to a template (not necessarily how to code it though ) and even with workflows spanning multiple templates or just specific templates with lots of fields and different approvals required. It might be nice, though not sure how useful this would be, to have multi-step workflows where an editor can see the fields they need to see and at the next stage the approver sees some other fields that we don't want to concern the editor with but which need filling out before a page goes public. This was a requirement of a CMS used in government that I had to get to grips with a decade ago, certainly, so it's something I know that larger organisations potentially require. In the meantime if you let us know the workflow steps you would like to implement it might be possible to do something simpler with a module, depending on the complexity of your requirements. Quite often, explaining what you are trying to achieve will result in some code appearing in these forums I guess another good question whilst we're on this subject is: does the workflow system in Concrete5 Enterprise do everything you need it to do or is there anything you would change? I'm guessing you've either tried it out or watched the video I linked to so it would be interesting to get more feedback from people who've used workflows to see if that particular implementation looks like a good direction to go in.
    2 points
  2. Hello ProcessWire community At first I like to thank and congratulate Ryan for this wonderful work and I wished that I knew Ryan a long time ago And by the way you look awesome in the overview video Ryan And now a little bet about me: My name is Faisal Halwan from Saudi Arabia. I work in web development over 14 years now, and have dealt with various content management systems and PHP scripts in general. I was always dreamed of a flexible content management system for use in almost anything or what is now called CMF or allow me to say ProcessWire Thank you Ryan, you make my dream came true Yet I couldn't find any result in for any Arabic article talking about ProcessWire I will do my best to present ProcessWire and provide support in Arabic as soon as possible. Thank you and keep up the good work
    2 points
  3. Since you guys asked for it, I'll take a stab at a case study on the development process. Most of the development was done in about a week and a half. I started with the basic profile, but it ended up being something somewhat similar to the Blog profile in terms of how it's structured. Below I'll cover some details on the biggest parts of the project, which included data conversion, the template structure, the front-end development and anything else I can think of. Data Conversion from WordPress to ProcessWire One of the larger parts of the project was converting all of the data over from WordPress to ProcessWire. I wrote a conversion script so that we could re-import as many times as needed since new stories get added to cmscritic.com almost daily. In order to get the data out of WordPress, I queried the WordPress database directly (my local copy of it anyway) to extract what we needed from the tables wp_posts for the blog posts and pages, and then wp_terms, wp_term_relationships, and wp_term_taxonomy for the topics and tags. WordPress stores its TinyMCE text in a state that is something in between text and HTML, with the most obvious thing being that there are no <p> tags present in the wp_posts database. Rather than trying to figure out the full methodology behind that, I just included WP's wp-formatting.php file and ran the wpautop() function on the body text before inserting into ProcessWire. I know a lot of people have bad things to say about WordPress's architecture, but I must admit that the fact that I can just include a single file from WordPress's core without worrying about any other dependencies was a nice situation, at least in this case. In order to keep track of the WordPress pages imported into ProcessWire through repeat imports, I kept a "wpid" field in ProcessWire. That just held the WordPress post ID from the wp_posts table. That way, when importing, I could very easily tell if we needed to create a new page or modify an existing one. Another factor that had to be considered during import was that the site used a lot of "Hana code", which looked like [hana-code-insert name="something" /]. I solved this by making our own version of the Hanna code module, which was posted earlier this week. Here's an abbreviated look at how to import posts from WordPress to ProcessWire: $wpdb = new PDO("mysql:dbname=wp_cmscritic;host=localhost", "root", "root", array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'")); $posts = wire('pages')->get('/posts/'); $sql = " SELECT * FROM wp_posts WHERE post_type='post' AND post_status='publish' ORDER BY post_date "; $query = $wpdb->prepare($sql); $query->execute(); while($row = $query->fetch(PDO::FETCH_ASSOC)) { $post = $posts->child("wpid=$row[ID]"); // do we already have this post? if(!$post->id) { // create a new post $post = new Page(); $post->template = 'post'; $post->parent = $posts; echo "Creating new post...\n"; } $post->of(false); $post->name = wire('sanitizer')->pageName($row['post_name']); $post->title = $row['post_title']; $post->date = $row['post_date']; $post->summary = $row['post_excerpt']; $post->wpid = $row['ID']; // assign the bodycopy after adding <p> tags // the wpautop() function is from WordPress /wp-includes/wp-formatting.php $post->body = wpautop($row['post_content']); $post->save(); echo "Saved post: $post->path\n"; } What I've left out here is the importing of images, topics, tags, and setting the correct authors for each post. If anyone is interested, I'll be happy to go more in depth on that, but didn't want to overwhelm this message with code. Template File Structure This site makes use of the $config->prependTemplateFile to automatically include the file _init.php before rendering a template file, and $config->appendTemplateFile to automatically include the file _main.php after. So the /site/config.php has this: $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; You may recognize this as being the same setup from the Skyscrapers profile. The _init.php includes files containing functions we want to be available to all of our templates, and set default values for the regions we populate: /site/templates/_init.php /** * Include function and hook definition files * */ require_once("./includes/render.php"); require_once("./includes/hooks.php"); /** * Initialize variables populated by templates that get output in _main.php * */ $browserTitle = $page->get('browser_title|title'); $body = "<h1>" . $page->get('headline|title') . "</h1>" . $page->body; $side = ''; $renderMain = true; // whether to include the _main.php file The includes/render.php file that is included above includes several functions for generating markup of navigation and post summaries, or any other shared markup generation functions. Examples are renderPost(), renderNav(), renderTags(). This is similar to the blog.inc file from the Blog profile except that I'm letting these functions generate and return their own markup rather than splitting them into separate view files. I personally find this easier to maintain even if it's not as MVC. The includes/hooks.php sets up any hooks I want to be present for all of my templates. I could have also done this with an autoload module, but found this to just be a little simpler since my hooks were only needed on the front-end. The main hook of interest is one that makes all posts look like they live off the root "/" level rather than "/posts/" (where they actually live). This was in order to keep consistency with the URLs as they were in WordPress, so that the new site would have all the same URL as the old site, without the need for 301 redirects. /site/templates/includes/hooks.php /** * This hook modifies the default behavior of the Page::path function (and thereby Page::url) * * The primary purpose is to redefine blog posts to be accessed at a URL off the root level * rather than under /posts/ (where they actually live). * */ wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'post') { // ensure that pages with template 'post' live off the root rather than '/posts/' $event->replace = true; $event->return = "/$page->name/"; } }); Our /site/templates/_main.php contains the entire markup for the overall template used site wide, from <html> to </html>. It outputs those variables we defined in _init.php in the right places. For example, $body gets output in the <div id='bodycopy'>, $side gets output in the right <aside>, and $browserTitle gets output in the <title> tag. /site/templates/_main.php <?php if($renderMain): ?> <html> <head> <title><?=$browserTitle?></title> </head> <body> <div id='masthead'> // ... </div> <div id='content'> <div id='bodycopy'><?=$body?></div> <aside id='sidebar'><?=$side?></aside> </div> <footer> // ... </footer> </body> </html> <?php endif; ?> We use the rest of the site's template files to simply populate those $body, $side and $browserTitle variables with the contents of the page. As an example, this is an abbreviated version of the /site/templates/post.php template: /site/templates/post.php // functions from /site/templates/includes/render.php $meta = renderMeta($page); $tags = renderTags($page); $authorBox = renderAuthor($page->createdUser); $comments = renderComments($page); $body = " <article class='post post-full'> <header> <h1>$page->title</h1> $meta </header> $page->body $tags $authorBox $comments </article> "; if(count($page->related)) { $side = "<h4>Related Stories</h4>" . renderNav($page->related); } What might also be of interest is the homepage template, as it handles the other part of routing of post URLs since they are living off the root rather than in /posts/. That means the homepage is what is triggering the render of each post: /site/templates/home.php if(strlen($input->urlSegment2)) { // we only accept 1 URL segment here, so 404 if there are any more throw new Wire404Exception(); } else if(strlen($input->urlSegment1)) { // render the blog post named in urlSegment1 $name = $sanitizer->pageName($input->urlSegment1); $post = $pages->get("/posts/")->child("name=$name"); if($post->id) echo $post->render(); else throw new Wire404Exception(); // tell _main.php not to include itself after this $renderMain = false; } else { // regular homepage output $limit = 7; // number of posts to render per page $posts = $pages->find("parent=/posts/, limit=$limit, sort=-date"); $body = renderPosts($posts); } The rest of the site's template files were handled in the same way. Though most were a little simpler than this. Several were simply blank, since the default values populated in _init.php were all that some needed. Front-end development using Foundation 4 The front-end was developed with the Foundation 4 CSS framework. I started with the Foundation blog template and then tweaked the markup and css till I had something that I thought was workable. Then Mike and I sent the _main.php template file back and forth a few times, tweaking and changing it further. There was no formal design process here. It was kind of a photoshop tennis (but in markup and CSS) where we collaborated on it equally, but all under Mike's direction. After a day or two of collaboration, I think we both felt like we had something that was very good for the reader, even if it didn't originate from a design in Photoshop or some other tool like that. I think it helps a lot that Foundation provides a great starting point and lends itself well to fine tuning it the way you want it. I also felt that the mobile-first methodology worked particularly well here. Comments System using Disqus We converted the comments system over to Disqus while the site was still running WordPress. This was done for a few reasons: Disqus comments provide one of the best experiences for the user, in my opinion. They also are platform agnostic, in that we could convert the whole site from WP to PW and not have to change a thing about the comments… no data conversion or importing necessary. Lastly, ProcessWire's built-in comments system is not quite as powerful as WordPress's yet, so I wanted cmscritic.com to get an upgrade in that area rather than anything else, and Disqus is definitely an upgrade from WP's comments. In order to ensure that Disqus could recognize the relations of comment threads to posts, we again made use of that $page->wpid variable that keeps the original WordPress ID, and also relates to the ID used by the Disqus comments. This is only for posts that originated in WordPress, as new posts use a ProcessWire-specific ID.
    1 point
  4. News from 3D Printer world: a 3D printed small rocket engine ! Used tech in the 3D printer http://en.wikipedia.org/wiki/Direct_metal_laser_sintering Used material in the 3D printer cobalt-chromium Advantages Cheaper and faster than traditional ways of constructing small rocket engines. Total cost of this one: 6800 dollar. Videos of testing the 3D printed rocket engine that will launch a 1,33 Kg miniature-satellite into space. http://www.space.com/23097-students-test-fire-3d-printed-rocket-engine-video.html
    1 point
  5. This module is obsolete - please use the Console Panel in Tracy: https://adrianbj.github.io/TracyDebugger/#/debug-bar?id=console Ok, this is really not very fancy, but I think it will come in quite handy - for me at least It provides an admin page where you can test code without the need to edit template files. It runs from a new item under Setup called "Code Tester" Simply enter your code, including an opening <?php and click "Run Code". Page will refresh with the code block still in editor, and with an iframe containing the results of your code below. In some cases the output may not be relevant if your code is manipulating pages etc via the API, rather than outputting content to a page. Then you can easily make code changes and run again. Github: https://github.com/adrianbj/ProcessCodeTester Installation Install as normal, then move the included file "code_tester.php" to your site's templates folder. Depending on your sites template structure, you may want to edit this file. I have set it up using the head.inc and foot.inc approach that is used in PW's default profile. There are detailed instructions in the file to make it easy to modify as needed if you prefer using a single main.inc or other approach. Install the ACE Text Editor module if you want syntax highlighting. That's It! How it works Nothing very high tech - when the module installs it creates a new template: code_tester and a new unpublished page: Code Tester. When you click "Run Code" it creates/updates this file: /site/assets/files/ID_of_Code_Tester_page/code_tester_code.php and writes your code to the file. This file is included from the code_tester.php file and the code is run and the output processed. Note that I am using ob_start(); include; $out = ob_get_clean(); so that this will work take the approach of populating variables that are output within a main/shared markup file like main.inc If you want to use a variable other than $out in your test code, you will need to edit the code_tester.php file accordingly. Things you can do It may not be immediately obvious as to some of the things that work with this, so here are some examples: echo 'test'; $out .= 'test'; //list page titles matching the selector foreach($pages->find(selector) as $p) $out .= "<li>$p->title</li>"; //populate the results frame with the page returned by the selector. You must use $getpage as the variable! $getpage = $pages->get(selector); // bulk delete pages matching the selector foreach($pages->find(selector) as $p) $p->delete(); So really it is more than a code tester - it can also be used as a way to test selectors and return the resulting page and also as a way of running admin maintenance scripts. Hopefully you guys might find it useful. Please let me know if you have any thoughts for improvements.
    1 point
  6. Hi everyone! Just ran across PW yesterday while searching for a better way to implement a project I'm currently working on. I am very impressed and very excited about what can be done so easily in PW. Having said that, being a total newbie to PW and having little luck searching around the forums, I was wondering if there was a way to implement multi-step Workflows like concrete5 Enterprise? Thanks!!
    1 point
  7. I think the admin page tree would benefit from a state saving feature. In jsTree for example you can on state saving which uses cookies to save a hash with open nodes. If there's already a option somehwere I missed, I'm sorry. Else do you think we can implement this feature?
    1 point
  8. EDIT: is OBSOLETE because could be done by Module http://processwire.com/talk/topic/4758-release-pagetree-add-new-childs-reverse/ ----------------------------------------------------------------------------------------------- When a site display an overview of the latest posts, news, images, etc. the newest entries should be on top of the list. We can achieve that by using an automated setting for the sortfield e.g. when the page was created = "-created". This way we are not able to manually move a single page in the tree. But there are needs for people to do that and it is asked for this multiple times here in the forums. E.g. if you display image thumbs and the last five entries don't harmonize well together, you want to move 1-3 pages down or up - but in generally you are very happy with the sortorder -created. Using a workaround like creating a sticky field and check that is very ugly IMO. It isn't reflected in the AdminPageTree and therefor not very intuitive and not very straight forward. While I have found a solution to achieve this "-sort" with importing pages via API, it would be nice to also have it with manually created pages. Viewing the source the situation seems to be that there is a real chance to allow it: sort must be enabled for using reverse sorting direction (sort and -sort) the sort field in Mysql-DB is of type signed integer, maybe negative values could be allowed to achieve that or maybe the startvalue could be between 0 and max?
    1 point
  9. What I meant was people seemed to be trying to fix a front-end issue with a back-end solution that wouldn't solve it with the original poster's code Didn't mean your reply, rather earlier ones.
    1 point
  10. @horst thanks very much, that explains things perfectly! I recently set up a client site on an entry level hosting plan, and after moving the site from my dev server to the new account the frontend would alyways time out with an error 500. After some back and forth with support it turns out it was maxing out the script limit with that initial call. Now, with set_time_limit in the image loops, everything seems to be working fine so far! Thank you, again, very useful tip! cheers Phil
    1 point
  11. ?? Yes, if the first call in a page (template) to display all images by a smaller size than the original sizes, all smaller images must be created first. And if you have e.g. 50 images and every image to resize take 1 second you will run into a timeout after 30 seconds per default. If you want to avoid that you can use the set_time_limit($n) in the loop like I have explained in previous post. Thats one approach to not run into a script-timeout. Once the images are created the complete script will run within a second or less. But there is no drawback to use set_time_limit($n)! Soma has shown another approach, to hook into ajax-upload and do all resizes then. This way all images are allready created / cached before a page is called first time. But if you once change the dimension for the output, you have the same situation as described in the first post: all images are uploaded fine but you have to create 50+ images on the fly. (I suggest to use set_time_limit($n) in the foreach loop ) To limit max-dimensions in field-settings may be a solution in some cases, but not if you e.g. need 300px and 3000px in a site. I'm very interested in a way to do a automated scan for all needed sizes. Here are some lines of code that may be in templates and call images. (to simplify it and to focus on the most common usage, I disregard image-calls from / to other pages / templates): $imgs = $page->images; foreach($imgs as $img) { $img = $img->width < $img->height ? $img->height(600) : $img->width(600); echo "<img src='$img->url' style='width:33%;height:auto' alt='$img->description' />"; } // ... $options = array( 'upscaling' => false, 'cropping' => false, 'sharpening' => 'medium', 'quality' => 84, ); foreach($page->images as $image) { echo "\t<li><a href='{$image->size(800,800,$options)->url}'><img src='$image->width(200)->url' width='$image->width' height='$image->height' alt='$image->description' /></a></li>\n"; } // ... $imgs = $page->images; $options = array('quality'=>75,'sharpening'=>'soft','upscaling'=>true,'cropping'=>true); foreach($imgs as $img) { $options = $img->width < $img->height ? array_merge($options,array('cropping'=>'north')) : $options; // people portraits or landscape ? $img = $img->width(600,$options); echo "<img src='$img->url' style='width:33%;height:auto' alt='$img->description' />"; } And once again - if you have successfully scanned and collected all wanted sizes, this only would work if you never change the dimensions in template after the first images are uploaded to the site. Also I think this is very close to what soma allready has posted and what the OP uses with success. He only has to input the sizes manually into the module. And I think you allready guess what's my suggestion when you want to play save? Yes: call set_time_limit($n) in the loop!
    1 point
  12. I think with the module you mention, you can save a default action after saving a page. Perhaps my module is more usefull in this senario as an alternate action like "Save and Restore Page List". For now, my client is happy with the solution at hand, they mainly add news and blog items, multiples at a time in the same place, so it makes sense.
    1 point
  13. back from vacations and tested the new version (it says 2.3.5). Looks very good. Still found some things... In the login screen hover over the arrow shows the field-name In the setup/templates view hover over the page number symbol: the popup is misaligned In the top navigation under setup the 'Fields' is not translatable Color schemes: warm and modern are nice. Futura looks very good, but the red buttons look wrong. Martijn already mentioned this. Classic is also nice, but the gradients .... hmm better not. Translations: how far is the work with translatable strings gone? Seems, there are still some missing strings. regards Manfred
    1 point
  14. I really love rsnapshot: http://www.rsnapshot.org/ It is still command line and uses rsync, but handles all the incremental backup setup for you. Just setup and call from cron!
    1 point
  15. On a completely other topic I was looking at rsync for webserver backup and as I was new to it the initial intro read was exciting as it looked like such a robust technology. So I'm very interested to see you use rsync over FTP SFTP etc and I've seen only good comments so far re arRsync (rsync for command line weaklings). Off to go have a play, thanks for the tip Ryan!
    1 point
  16. Hi there The search API is the API. It's all the same thing, so only one thing to learn. URL Segments are just a way of passing some additional things to the page so you can fine tune what you're displaying. If you had a page called "Articles" with a template "articles-home", what you might do is turn on URL segments and then do something like this, where urlSegment1 is what thing you want to filter by in terms of a and urlSegment2 is what you're matching against <?php if ($input->urlSegment1 == "author") { // Assumes there is a specific field in your article template called "author" and you would match by their name from a URL like www.yoursite.com/articles/author/ted-danson/ $articles = $pages->find("template=article, author.name=$input->urlSegment2"); // As you can see we matched urlSegment1 against the fictitious URL above and the above $articles variable will hold all the IDs for articles by the matched author, urlSegment2 /articles/ is a real page, /author/ is urlSegment1 and /ted-danson/ is urlSegment2 } elseif ($input->urlSegment1 == "category") { // Now imagine our URL is www.yoursite.com/articles/category/autobiographies $articles = $pages->find("template=article, category.name=$input->urlSegment2"); } elseif ($urlSegment1) { // If someone is still passing an URL segment and it's not one we recognise and have dealt with above, it would be best to throw an error. People could be typing in all sorts of rubbish otherwise like www.yoursite.com/articles/bunnies/ninja/ throw new Wire404Exception(); } else { // So in this very last one we've not got any URL segments at all, so we probably just want to list the last ten articles with no search parameters applied $articles = $pages->find("template=article, sort=-created"); // This lists all articles in reverse date order // You can also add ", limit=10" stragith after the word "created" in the selector above, or any of the ones above to just return a certain number of results and then look into pagination elsewhere on the site and forums to implement that rather than display potentially thousands of results on a page } // And now you have your $articles you can do something like this (I've assumed you've added a field to the article template called "date": foreach ($articles as $article) { echo "<h2>$article->title</h2> <p>Written: $article->date</p> <p>$article->summary;</p> <p><a href='$article->url'>Read More</a></p>"; } Now the only reason I could see for you matching articles on a specific date was if you were maybe reading articles on a busy site and at the end of a specific article you wanted to see a list of other articles on that date. Even so I can't think why you might want to do that, but here's some code that might help - remember you've now just read an article and at the bottom of the page we want to list other articles on that date: <?php // We're getting articles on the same DAY (the exact time as the current article would be a little pointless as you're down to matching the second in that case) // We'll assume that the date the article is saved in ProcessWire is the date you want to use to find other articles posted on the same day, however it could easily be your own date field - for the purpose of the example below this just means I'm matching against the "created" field in the database $startOfDay = date('j F Y', $page->created); // Since this will be a horrible timestamp to the SECOND that the article was published, we're turning it into something that reads like this: "12 September 2012" $startOfDay = strtotime($startOfDay); // Then we're turning that from a human readable string back to a timestamp, except now it is 0:00am on that day - the start of the day! $endOfDay = date('j F Y', $page->created) . " +1 day"; // Now we're doing the same again, but you can tag " +1 day" on the end of the string... $endOfDay = strtotime($endOfDay); ... and strtotime() is clever enough to add a full day onto the date $articles = $pages->find("template=article, created>$startOfDay, created<$endOfDay"); // Easy huh? Not if you don't know some of the above date functions obviously, but it's well worth looking on PHP.net as everything before the line directly above involves just some pure PHP to manipulate the date and is well worth spending a little time learning. Let us know if you need any more examples. The search functionality just uses the same functionality above from what I remember except it sends the search query to a specific search page and then matches the string the person entered against various fields like "body" and "summary". It's all the same sort of code behind the scenes. This is also the reason you won't see a generic example - they just don't make sense as everything uses selectors to find results (plus real-world examples are easier to understand for the most part): http://processwire.com/api/selectors/
    1 point
  17. My solution, which works nicely: I put the following code on the top of my template. (example for French as default, German and English) $date_lang = array(); switch ($user->language->name) { case 'en': setlocale(LC_ALL, 'en_GB'); $date_lang[0] = "%A %B %eth %Y at %I:%M %p"; $date_lang[1] = "%B %eth %Y"; $date_lang[2] = "%I:%M %p"; $date_lang[3] = "%A"; break; case 'fr': setlocale(LC_ALL, 'fr_FR'); $date_lang[0] = "%A %e %B %Y à %kh%M"; $date_lang[1] = "%e %B %Y"; $date_lang[2] = "%kh%M"; $date_lang[3] = "%A"; break; case 'de': setlocale(LC_ALL, 'de_DE'); $date_lang[0] = "%A, den %e. %B %Y um %k.%Mh"; $date_lang[1] = "%e. %B %Y"; $date_lang[2] = "%k.%Mh"; $date_lang[3] = "%A"; break; default: setlocale(LC_ALL, 'fr_FR'); $date_lang[0] = "%A %e %B %Y à %kh%M"; $date_lang[1] = "%e %B %Y"; $date_lang[2] = "%kh%M"; $date_lang[3] = "%A"; } Then I created a page field, where I store a date unformatted (go to setup->fields->mydatefield->details-> date output format ->"None"). getUnformatted() is only needed, if the date is stored formatted. Finally I can insert the date like echo strftime($date_lang[0], $mydatefield); /* output(de): Freitag, den 11. Oktober 2013 um 12.52h * output(fr): Vendredi 11 octobre 2013 à 12h46 * output(en): Friday October 11th 2013 at 12:46 pm */ echo strftime($date_lang[1], $mydatefield); /* output(de): 11. Oktober 2013 * output(fr): 11 octobre 2013 * output(en): October 11th 2013 */ echo strftime($date_lang[2], $mydatefield); /* output(de): 12.52h * output(fr): 12h52 * output(en): 12:52 pm */ echo strftime($date_lang[3], $mydatefield()); /* output(de): Freitag * output(fr): Vendredi * output(en): Friday */ Maybe you have to check out which string in setlocale is working on your Server. Try different: setlocale(LC_ALL, array('fi_FI.UTF-8','fi_FI@euro','fi_FI','finnish')); //put out the first supported string echo setlocale(LC_ALL, 0);
    1 point
  18. Hi, everyone! I would be glad to become a part of this lovely community! Greetings from Lithuania! Here is my problem. I am translating ProcessWire to Lithuanian language and I need TinyMCE to have the ability to be translated too. In my admin panel there is a guideline "If your language isn't there, ask us to add it. We will if TinyMCE has it: http://www.tinymce.com/i18n", so I am asking, maybe you could add LT language to the list of possible in the next release? Best regards, Jim.
    1 point
  19. Hi Manol, not sure if this would help, but last time i had to add a hook to FB, i used something like this, in the form-builder.inc file: $forms->addHookBefore('FormBuilderProcessor::saveForm', null, 'hookCampaignMonitor'); function hookCampaignMonitor(HookEvent $event) { $form = $event->object->getInputfieldsForm(); // make sure it's the form you want if ($form->name != 'product-inquiry') return; // grab the data $email = $form->get('email_address')->attr('value'); $first = $form->get('name_first')->attr('value'); $last = $form->get('name_last')->attr('value'); $subscribe = $form->get('subscribe'); $name = $first . ' ' . $last; // check to see if they subscribed if($subscribe->attr('checked')) { $cmurl = 'http://www.example.com/?some-var=' . urlencode($email) . '&cm-name=' . urlencode($name); // post the data $http = new WireHttp(); $http->post($cmurl); } }
    1 point
  20. GNU/Linux system with i3wm tiling window manager dmenu - quicklaunch Geany or Sublime Text - IDE ZIM - notes, calendar, ... Inkscape - vector graphic editor Gimp - bitmap graphic editor Gcolor2 - color picker FEH - quick screenshots (binded on PrintScreen key) VokoScreen - capture videos FileZilla - ftp client Meld - diff and merge tool SQuirreL SQL or terminal - DB manager BitTorrent Sync - sharing data http://nerdi.net/ nice list of web tools ....
    1 point
  21. Fresh install on PHP 5.4.16 (not sure about the exact Apache 2/MySQL 5 versions, let me know if those would be important). Worked like a charm. Had to explicitly set the RewriteBase to "/", but that's always been necessary on this server. The dev version identifies itself als ProcessWire 2.3.5, is that even the right one? (Downloaded the zip from the dev tree on GitHub.)
    1 point
  22. for shure: // mysqli will be depricated, so use PDO if you start with it $sql = "awesome query"; // $database variable is available in your templates. $database is the PDO way. $query = $database->prepare($sql); $query->execute(); Oké, stupid me: Welcome to ProcessWire greentea
    1 point
  23. Top graph is posts made per month, bottom is cumulative over the same time period. Nice! It's not gone vertical on the cumulative posts, but that's fine as I'm still many pages of unread posts behind where I'd like to be
    1 point
  24. put this into one of your templates and you can see the admin url and login: echo '<a href="'.$pages->get(2)->url.'">this way to the admin</a>'; found here: http://processwire.com/talk/topic/4491-unable-to-log-into-processwire-website/?p=44323
    1 point
  25. Czech Localization Pack. Current version: 0.9.8 (93 files) + README.txt Changelog: Added multiple strings (Font-Awesome and new admin theme features from git dev, ...). Updated multiple strings and cleaning (Markup, Home, autojoin, ...). Czech Localization Pack for external modules. Current version: 0.3 (17 files) + README.txt Added: new default theme support from git dev templates-admin (complete for testing - may change soon) /site/templates-admin/default.php /site/templates-admin/shortcuts.inc Updated: FieldtypeCropImage (complete) FormBuilder InputfieldCKEditor (complete) TextformatterVideoEmbed (complete) pw_czech_098.zip pw_czech_modules_03.zip
    1 point
  26. 1 point
×
×
  • Create New...