Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/06/2013 in all areas

  1. I would go ahead and create your new translation and post it as a follow-up reply to the existing one. If there's no response from the original authors (like pulling updates into the existing one) then we could just make your new version the current version linked by the directory. We don't usually break the API with new releases, though did have to in the 2.0 to 2.1 release. It may also happen in the 2.4 to 2.5 release when we switch to namespaces. There isn't any end-date to support of past versions. If some security issue turns up, It'll go into all current versions that we offer as downloads. For past versions that don't have active development branches, we would provide a file replacement or patch. To date, there have not been any security issues, so it's never been up to test. But it's always good to have a plan. We are very shy about changes that break things, so would version the API if behavior of some core functions changed from version to version. This is one reason why I think PW is a good/safe long term solution. The problem that I've run into with WordPress and Drupal is that I can't leave old versions of them running because the site is only as secure as it is up-to-date. Old version of WordPress/Drupal = insecure (not to mention the plugins). An installation of one of these products becomes a permanent relationship with the client as you have to continually keep it up-to-date, in the same way you have to keep filling up your car with gas or it stops running. This is not the case with ProcessWire. I still have 7+ year old versions of ProcessWire (aka Dictator CMS and PW1) running sites perfectly fine. I could upgrade them, but there isn't really any need to unless the client needs some new feature present in a newer version of ProcessWire. Being able to install a software and trust that it's going to keep running on it's own for a decade or more, without my intervention, is worth a lot.
    5 points
  2. Module: MarkupCSScompress 0.8.5 (beta) convert $config->styles array to a single gzipped & cached CSS file and give <link rel="stylesheet" src="/processwire/styles.min.css/"> tag back. I love using the $config->styles array on the front-end. One disadvantage is, I like it that much that I end up with a multitude of styles with their corresponding links. To much requests for the browser if you asked me. So my thought was: I wish I could combine all styles, compress the css and serve 1 link back to the browser. But I don't like struggling to find CSS selectors in a compressed file. So I add the setting: Caching & concatenating disabled for superusers. For caching I used Ryan's beautiful MarkupCache module. Cons: Doesn't work with external CSS files ( All CSS files have to exist in processwire )How to use: ( important ) Put the MarkupCSScompress.php into the template folder. Place <?php echo $modules->get('MarkupCSScompress')->render(); ?> in the head where normally the CSS <link> would be. Install this module. Totally open for changes & improvements. download from github view on github modules on PW Todo: Change al relative urls to absolute urls in the CSS cache files. ( done ) Check PW version compatibility
    2 points
  3. CSS frameworks are way too bloated in my opinion. I guess they might be useful if you have a huge site with lots of content. I like to keep things as simple as possible. Here's my "framework": Grids sizes: /* 1 8.333333333333333% 2 16.66666666666667% 3 25% 4 33.33333333333334% 5 41.66666666666667% 6 50% 7 58.33333333333334% 8 66.66666666666667% 9 75% 10 83.33333333333333% 11 91.66666666666667% */ Box-sizing, for layout elements especially, allows you to add margin/padding/border without having to worry about changing width to fit margin/padding/border – best thing since ... ProcessWire. * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } Layout elements, for example: #content { float: left; width: 66.66666666666667%; } #sidebar { float: left; width: 33.33333333333334%; } I also use normalize and boilerplates cross browser normalizing stylesheet.
    2 points
  4. Guide to installing ProcessWire on the OpenShift PaaS. Create an account at http://www.openshift.com.'>http://www.openshift.com. Next, select Create Application at the top of the screen and PHP 5.3. Once that is done, add a MySQL 5.1 cartridge to the PHP application. You'll get the following info from creating the PHP app and MySQL cartridge. Setup local Git repository Clone the application's Git repository to your local machine with following command. git clone ssh://51d12b59500446e0df000118@processwire-example.rhcloud.com/~/git/processwire.git/ Fetch the ProcessWire source and code and add them to the php on the local repository with these commands cd processwire git clone https://github.com/ryancramerdesign/ProcessWire'>https://github.com/ryancramerdesign/ProcessWire mv ProcessWire/* php/ mv php/htaccess.txt php/.htaccess rm -rf ProcessWire Push to the Openshift server Commit and push to the Openshift server with following commands: git add . git commit -m 'Setup ProcessWire' git push Complete the ProcessWire setup Acesss and complete the ProcessWire setup at your application's URL: http://processwire-example.rhcloud.com Use the IP address for the MySQL DB, in this case, 127.7.170.2 instead of the environment variable, $OPENSHIFT_MYSQL_DB_HOST
    1 point
  5. By default, the "Forgot Password" module is not turned on in v2.1. My thought was that lack of such a function is technically more secure (on any site or CMS). Why? Because having such a function active means your password is only as secure as your email (*though see note at end of this message). So I thought we'd start things out as secure as possible and let people adjust it according to their own need. But I'm rethinking that decision, and may change it to be 'on' by default. If you don't already have that "Forgot Password" module installed, it is relatively easy to reset your password with the API. Lets say that you lost the password for your account named 'admin' and you wanted to reset it. Paste this code into any one of your templates (like /site/templates/home.php in the default profile, for example): <?php $admin = $users->get('admin'); $admin->setOutputFormatting(false); $admin->pass = 'yo12345'; // put in your new password $admin->save(); …or if it's easier for you to copy/paste everything on one line, here's the same thing as above on one line: <?php $users->get("admin")->setOutputFormatting(false)->set('pass', 'yo12345')->save(); Replace "yo12345" with the new password you want and save the template. Then view a page using that template (like the homepage, in our example). The password for that account has now been reset, and now you are ready to login. Don't forgot to now remove that snippet of code from the template! Otherwise your password will get reset every time the page is viewed. Once logged in, here's how to install the Forgot Password capability: 1. Click to the "Modules" tab. 2. Scroll down to the "Process" modules. 3. Click "Install" for the "Forgot Password" module. That's all there is to it. You will now see a "Forgot Password" link on your login page. *ProcessWire's "Forgot Password" function is actually a little more secure than what you see in most other CMSs. Not only do you have to have the confidential link in the email, but the link expires in a matter of minutes, and PW will only accept password changes from the browser session that initiated the request. So an attacker would have to initiate the password change request and have access to your email at the same time, making it a lot harder for a man-in-the-middle snooping on your email.
    1 point
  6. Hi all, I've finally managed to set up my website where I intend to post ProcessWire tutorials. The site (lessons) is very much WIP. I have tried to make the site as responsive as possible. I have only tested in Chrome and FF. I'd rather write more lessons than test in IE to be honest so I won't pursue that... I will try to post regularly but can't make any promises as to the frequency . I intend to randomly post some pre-planned lessons. I will update this forum post everytime I post something new. If you have questions, pointers, etc about any lesson, or a request for a specific lesson, please post them here. This way, other forum members can assist in answering the questions . Thanks. /k ==================================================================== Edit: 28 August 2014 - Fist Tutorial is up (OK, it's Blog Module documentation ) Creating a Blog in ProcessWire (Blog Module how to) - 28 August 2014 [99% done] Next: 'All you ever wanted to know about ProcessWire Modules [and other cool things]' - COMING very SOON
    1 point
  7. Thanks for the help, everyone! I re-uploaded the site without using a fresh install from @Macrura's directions, then used the admin password reset snippet from here and it worked.
    1 point
  8. Hi guys! I got some questions! How can I be added to a project? For example the french translation of the core seems outdated(not sure if these guys are still around), so I would like to contribute and create a github for it. On the same subject, how do I translate a project and share it "the correct way" with the community? I don't know either where to find those translations. When a release breaks the API, how much time the old version will be supported(security fixes)? And I wonder if this CMS would fitt for my bigger projects: Is this "safe" to use this CMS for websites needing to last 4+ years, without having to do an extreme rework of the site to continue using it(e.g: major version breaks "all the things", must recode half of your code and pray for other modules to be stable before your version becomes unsupported *cough*drupal*cough*)? I understand the needed to evolve, but I prefer it in a way less radical(like using deprecation or any way making it less painful). Last thing: I'm impressed by this friendly community, it really makes me want to use this CMS! (oh and by the way: "The IP.Chat room limit has been reached. You will not be able to join the chat room until some users first leave.", I think it would be nicer to use the freenode webchat instead ) thank's for your time!
    1 point
  9. oh wow it's a complete new world for me then, 7+ years with the other CMS I used is just impossible without constant updates and/or many code rewrite. I guess I can now stop being paranoiac and understand that I can let an older version run without being hacked ^^. I guess this is a benefit of PW being a "little" (active) community compared to the big CMS wich are targeted all the time. Well then, this is exactly the CMS I need for all my project , I wish having found it before! The more I learn about it, the more I like it. Thank's for your answer, it's nice that you are very active in your forum . I would like to "mark solved" the topic with the two answer I got but I guess I can't, thank's to both of you!
    1 point
  10. Speaking of inline mode, I also prefer to use it in the admin, but you can't use custom styles with it For instance, I want all the images inside the editor to have a max-width of 200px so they work as thumbnails. With regular mode i would define a css file from the field settings, but, as I told, this is not possible in inline mode. So, how to overcome this limitation? In the admin theme .InputfieldCKEditorInline img{ max-width:200px; } Not the perfect solution, but it works.
    1 point
  11. I don't think it's an error, LanguageLocalizedUrl was build far in the future.
    1 point
  12. Ok I see now the problem is that for every description slideUp there's a callback call to relayout. When it's enough to call it once after all have completed. I'll fix this. Thanks for finding it.
    1 point
  13. I'll change that "leave the existing contents as-is, but feel free to add to it."
    1 point
  14. I'm sure there's more and other ways but look here http://processwire.com/talk/topic/3429-how-to-set-text-linecharacter-limits-in-templates/
    1 point
  15. Hi! It's me again. $('.section:not("#index") h3').bind('click', function(){ var parent = $(this).parent('.cat'); if( parent.find('.descr:visible').length > 0 ) { parent.find('.descr').slideUp( animated ? speed : 0, function(){ $container.isotope('reLayout'); }); } else { parent.find('.descr').slideDown( animated ? speed : 0, function(){ $container.isotope('reLayout'); }); } }); There is no need to callback reLayout on slide. $('.section:not("#index") h3').bind('click', function(){ var parent = $(this).parent('.cat'); if( parent.find('.descr:visible').length > 0 ) { parent.find('.descr').slideUp( animated ? speed : 0 ); } else { parent.find('.descr').slideDown( animated ? speed : 0 ); } $container.isotope('reLayout'); }); This little change insanely increase speed.
    1 point
  16. Makes sense to me. The only thing is that PW core doesn't come with an Inputfield that does this, so it would be an external 3rd party dependency... something I'd like to avoid. So what I'll probably do is make the Inputfield type configurable so that you could tell it to use some future code-editing Inputfield instead of InputfieldTextarea.
    1 point
  17. I have the same behave when uploading from local with PHP 5.3.12 to online shared host with PHP 5.2.12 But I use the 'forgot your password?' link once and then everything works fine. I can use the Password recovery with the account name or the email-address. PHP 5.3.12 -> 5.2.12 MySQL 5.5.13 -> 5.1.66
    1 point
  18. @Alicia, have you considered just moving the whole site to the server (not installing PW)? That's how i always do it and never have a problem... 3 easy steps: 1.) upload the site files 2.) create the database (cPanel makes this easy) & import your sql file 3.) enter the new database connection settings in the site/config.php
    1 point
  19. Hi all, I want to present a preview of my new Portfolio. Actually I'm unsure with some points and the images aren't the final ones and other pieces aren't finished too. But the look is ready and maybe it would be good to get some feedback from the critics here ;-) The site actually runs on PW 2.3 stable, the used modules are: ImagesManager ImageMinSize Thumbnails FieldtypeTextUnique Minify I have disabled direct access via .htaccess to portfolio-images that resides in the files folder. Thumbnails and images related to infos and news can be accessed directly, all others have to use a proxy page I have build as PW-template. With the ImagesManager I initially have created my six categories (albums) and manage all uploads. Via a hook into ImagesManager on upload I'm able to rename the original images and create 3 variations (600px, 900px, 1200px). Also I stripp all Exif and IPTC data from them but populate them with the minimal needed IPTC data. That way I never have custom related infos in the images, neither in filename nor in metadata. I use serverside mobiledetection and also JS to detect viewport dimensions. This should be used to serve images that fit best to devices and viewport dimensions. But it isn't ready now. The layout / design is done from HTML5 boilerplate. There are no frameworks or thatlike used / needed. But there is heavy use of Javascript (jQuery-Libs: Swipe, Stapel, Flexslider), but the site also runs completly in noscript mode. Also the single-image-view in NoScriptMode lets you loop through the gallery and displays the content scrolled down to the image if needed. (That's one of the advantages of old veterans that have build html-pages during browser war 1995/98 ) All critic, suggestions etc is welcome: http://pw4.nogajski.de/
    1 point
  20. Not sure what's about the cache thing? Do you have cache on templates? Well it's a naive way, but if you don't go to thousands or ten thousands of tags and articles, you should be fine. I have pretty large sites with lots of things happening like this and I don't even need caching because it's so fast. You can always create a custom SQL query, and join the tables you need. Creating a module isn't complicated or lot of work at all! It same as you code in the front-end and you already know how to do it. Here's a module done in 2 minutes and half the code is yours from above: <?php class TagsHelperAuthor extends WireData implements Module{ public static function getModuleInfo(){ return array( 'title' => 'TagsHelperAuthor', 'version' => 1, 'singular' => true, 'autoload' => true ); } public function init(){ $this->pages->addHookAfter("save",$this,"hookPageSave"); } public function hookPageSave(HookEvent $event){ // get current page saved $page = $event->argumentsByName("page"); if($page->template == "article"){ // save tags to page field on author page or any page $authorPage = wire("pages")->get("template=author, name=Authorname"); $authorPage->tags->removeAll(); // remove all tags first $authorTags = new PageArray(); $allTags = wire("pages")->find('template=tag'); foreach ($allTags as $tag) { if(wire("pages")->count("template=article, tags=$tag")) { $authorPage->tags->add($tag); } } $authorPage->save("tags"); // save only the field of the author page } } } Not tested but should give you a hint. Edit: The idea is on every Article save, you update the authors "tags" field and add/save them there. You would just have to adapt it as I don't know your structure exactly. (Changed the $pages to wire("pages") because it's in a function.)
    1 point
  21. 1) Are your sure that the value 'portugal' is sent over get? So your URL is xxx?mysearchlocation=portugal 2) Some corrections to the code: // Do we have a get variable? if ($input->get->mysearchlocation) { // Sanitize it $mySearchLocation = $sanitizer->selectorValue($input->get->mysearchlocation); // This is not valid => $input->whitelist($test, $country); // Add it to the whitelist... with the same name as the get var! $input->whitelist('mysearchlocation', $mySearchLocation); // Do your search and render the pager.. i name the variable $resorts instead of $country $resorts = $pages->find("template=hotel, hotel_country=$mySearchLocation, limit=3"); $pagination = $resorts->renderPager(); foreach ($resorts as $resort) { // ... } } See also $input->whitelist() in the docs: http://processwire.com/api/variables/input/
    1 point
  22. Try contacting those who made current version via related forum thread, http://processwire.com/talk/topic/926-french-fr-fr/. If they're no longer around, you could always release your own version anyway. Translations can be found from modules directory, see http://modules.processwire.com/categories/language-pack/. If there's an outdated version there, you'd have to either find the original author or ask Ryan for help with this. I'm afraid that this is really a question to Ryan, but as a partial answer: so far I can't remember hearing of any security issues with PW, so there's not much data to base this on, but I would expect all affected (and still available via GitHub etc.) versions to be fixed if one was actually found. If not by Ryan himself, then definitely by someone else around here. We're rebuilding some sites with PW that were originally built almost a decade ago.. so I would definitely answer "yes" here. In our case 4-5 year lifespan is very common and I honestly wouldn't have even considered PW if I thought that was a problem. Minor versions (as in 2.1, 2.2, 2.3) tend to be pretty big updates for PW, though I don't think any of them has really broken anything big time -- I've updated sites successfully from 2.1 => 2.2 => 2.3 without having to rewrite any code at all. Ryan has definitely made these updates pretty painless, trust me (just take a look at this thread, where version 2.4 compatibility with 3rd party modules was discussed.) On the other hand I would still recommend taking the approach of only updating sites between those if there's a need for it. It would be nice to always have all your client sites (especially if you're hosting those yourself, like we are) at the same (and latest) version, but honestly speaking that's not always meaningful. If there's something in the next minor version you really need, then by all means update. There have been proper update instructions for these jumps that you really should read first, though switching from 2.2 to 2.3 pretty much only meant replacing core files with new ones and so on. Updating from 2.0/2.1 to 2.2 was a bit more complex, I believe, as 2.2 introduced whole language support system - we probably won't get that kind of stuff all the time.. Keep in mind that PW is nothing like WP, where unattended site becomes a black hole of security issues in a few months. As I mentioned before, I haven't heard of a single, fatal security flaw so far and I've been around for a while. Oh but we do: http://processwire.com/talk/topic/1109-processwire-irc-channel/ No problem - and welcome to the forum!
    1 point
  23. I work locally using MAMP Pro (OS X). The 'problem' for me has been getting a development version in front of a client. I can't use port-forwarding and DynDNS at all and I'm a command line & GIT noob. But I recently discovered Pagekite which lets you tunnel your localhost to a publicly available URL. With a bit of tweaking on the MAMP Pro side of things I can serve a locally running site to a client for, not only review, but for them to add content. Example. The last bit of the process is uploading the site files and moving the database when going live. If anyone is interested in more details of my setup let me know.
    1 point
  24. Actually $modules->get("MarkupBox") will install the module if it's not
    1 point
  25. You're very close actually . This is how it works: if($modules->isInstalled("MarkupBox")) { // do something }
    1 point
  26. On your fourth question, you can easily implement PayPal's basic standard payment buttons/form into your page's template file, just like you would in any other basic html/php page. If you need something more complex, apeisa's shopping cart module could serve as a basis if you are familiar with php coding, but the payment integration would have to be custom coded. An example would be what my company and I did (except with Authorize.net) on http://www.harkenslandscapesupply.com/ The beauty of ProcessWire is that it makes custom programming relatively quite easy. So if you have an intermediate knowledge of php and look at the API docs you can accomplish pretty much anything and have fun doing it
    1 point
  27. It was a off-topic of me to bring it up in the first place but I was thinking of some kind of anonymous tag or category, I just wanted the member pages of the group to be able to find each other. I've put that on hold and am doing it in a non-reciprocal way with each page having a Multiple Page Reference Field it can use to list pages it should link to. If I want that to be a reciprocal arrangement I imagine some code hooked to page saving could notice that A points to B and then make B point to A. The use/case for anonymous group is: Group some pages, p1, p2 Group some other pages, p6, p7, p8 Render page p8, and it can show links to the other pages in its group, p6 and p7. Likewise the pages in the other group link to each other. The groups should work without a lot of fuss over what they are called. I suppose it could be done like tags but they don't need titles so having pages for them seems like overkill. The idea about hooking additional behavior onto the way I'm doing it now seems more appealing in terms of administration etc.
    1 point
  28. Yo dude, where do you find all that time to set all that up (plus the tutos) ? Amazing. We'll actually I am jealous I don't have that time my self that I would love to spend on pw. Ryan, I think it is time to make kongondo a tutorial pw ambassador !
    1 point
  29. Now it works fine except for a page array on the home page in the default language, but not the secondary one. In the clean install, clicking on the "page 2" link produces a URL with two slashes between the address and the last segment (the page 2 segment). Likewise, when it is typed into the address bar. I changed the "should URLS end with a slash?" setting, cleared caches, and tried different names for the languages on the home page (blank, or an entry like "en" and "de" for each). No change. Something to note is that , in the secondary language the two slashes appear but it doesn't seem to interfere with the pagination. In my dev install when I click on the "page 2" link on the home page the URL becomes "page2" only . It removes the root URL. I have a feeling that might have something to do with my settings because I tweaked alot before I moved to the clean install in order to check this and have been using it since. Similarly, when I click the "page 2" link from within the secondary language, it works fine on this install also.
    1 point
  30. /** * Admin template just loads the admin application controller, * and admin is just an application built on top of ProcessWire. * * This demonstrates how you can use ProcessWire as a front-end to another application. * * Leave this file as-is, do not remove. * */ require($config->paths->adminTemplates . 'controller.php'); This is in site/templates/admin.php Do not remove, doesn't mean you can add code there. It's a easy way to add admin only auto hooks without creating a autoload module.
    1 point
  31. Hi lucas - welcome! Yes. Users are in fact pages with a template "User" assigned. You can add custom fields there just as on other templates Users can belong to multiple roles I think you need to be more specific here. In Pw, relationships between pages (Users) are done with the Page field type. Take a look at: http://modules.processwire.com/modules/shopping-cart/, don't know if this module helps. Maybe as a starting point Everything is possible, maybe with some custom coding. But the good news is, that in Pw coding is fun! Cheers
    1 point
  32. Ok, gotcha. All fixed, my selector finding the label value wasn't specific enough. Pushed the changes.
    1 point
  33. needs to sholud have.type hintings, debuger and code.completion two
    1 point
  34. Did you use Profile Exporter? Because I thought it was once it won't export or create session folder. Also it doesn't export users. So to transfer a site I always use simple DB->DB dumb and files over FTP and done, and I recommend not use Profile exporter. Profile exporter is more for creating profiles to install with a new install, originally built explicit for upgrade from 2.1 to 2.2.
    1 point
  35. Thanks! The first request I did was to http://mywebsite.com/sitemap.xml and that redirects to http://mywebsite.com/en/sitemap.xml/ "/en/" is the site's default language.
    1 point
  36. The value returned by $page->url() will reflect the URL of that page in whatever the user's language is. Because the LanguageSupportPageNames module sets the language based on URL, it doesn't matter what your user's language setting is. It only matters what URL they are at. But you can get the page's URL in any language by passing the language to the localUrl() function: $url = $page->localUrl($language); Also make sure you are running the 2.3.0 dev branch because this is a module in development, and the version in the dev branch is much newer. You may want to use LanguageSupportPageNames for production use until 2.3.1.
    1 point
×
×
  • Create New...