Leaderboard
Popular Content
Showing content with the highest reputation on 07/02/2013 in all areas
-
7 points
-
5 points
-
The modules directory on modules.processwire.com also has a PW compatible version info added. Since this is an official directory, I urge every modules developer to update their modules with that info (and first test your module in 2.2 2.3 etc.) Since there's a new option added for each PW version, this has to be done by the module developer. There's people browsing this directory and don't know that this info is not up to date for most modules and think it's not compatible with 2.3! Thanks for your time! Soma3 points
-
Well... I am 95% sure all my modules work in 2.3 (if they work in 2.2). My suggestion would be to have option to say the minimun version required. Then as a optional information there could be mention that "This module is confirmed and tested to work in 2.2, 2.3 and 2.4". And maybe anyone with their own user account can update if they have tested and it works (or doesn't). In short: I think current "Hey, lets update every module each time new minor version of PW is released" is broken and we should have better solution. It assumes that modules usually do break on minor version updates, but the reality is otherwise.2 points
-
2 points
-
2 points
-
The term "selector" is the string you define to search, like in CSS or jQuery .someclass{} or $('.someclass') and not the result or the method "find()". I've read in some threads and now here (kongondo) (other than nesting the first selector inside the first foreach) and it can be confusing. Ok, find is your friend! Approaching it this way, with finding all pages with the repeaters, then loop all is all correct and required in this case, but seems like not so efficient to loop all repeaters just to find the not checked ones? Why not just use the wonderful search functions to get the repeaters not checked and then loop them? $pa = $pages->find("template=basic-page, slides.count>0"); foreach ($pa as $p) { foreach($p->slides->find('disable_slides=0') as $r) { echo "<p>$r->title</p>"; } }2 points
-
There was a request that I add an official thread for this module, so here it is. MarkupTwitterFeed generates a feed of your tweets that you can output on your site. When you view the processwire.com homepage and see the latest tweets in the footer, this module is where they are coming from. This module was recently updated to support Twitter's new API which requires oAuth authentication. modules.processwire.com page GitHub project page Usage instructions2 points
-
2 points
-
Video embed for YouTube and Vimeo ProcessWire Textformatter module that enables translation of YouTube or Vimeo URLs to full embed codes, resulting in a viewable video in textarea fields you apply it to. How to install Download or clone from GitHub: https://github.com/r...atterVideoEmbed Copy the TextformatterVideoEmbed.module file to your /site/modules/ directory (or place it in /site/modules/TextformatterVideoEmbed/). Click check for new modules in ProcessWire Admin Modules screen. Click install for the module labeled: "Video embed for YouTube/Vimeo". How to use Edit your body field in Setup > Fields (or whatever field(s) you will be placing videos in). On the details tab, find the Text Formatters field and select "Video embed for YouTube/Vimeo". Save. Edit a page using the field you edited and paste in YouTube and/or Vimeo video URLs each on their own paragraph. Example How it might look in your editor (like TinyMCE): Here are two videos about ProcessWire https://www.youtube.com/watch?v=Wl4XiYadV_k https://www.youtube.com/watch?v=XKnG7sikE-U And here is a great video I watched earlier this week: http://vimeo.com/18280328 How it works This module uses YouTube and Vimeo oEmbed services to generate the embed codes populated in your content. After these services are queried the first time, the embed code is cached so that it doesn't need to be pulled again. The advantage of using the oEmbed services is that you get a video formatted at the proper width, height and proportion. You can also set a max width and max height (in the module config) and expect a proportional video. Configuration/Customization You may want to update the max width and max height settings on the module's configuration screen. You should make these consistent with what is supported by your site design. If you change these max width / max height settings you may also want to check the box to clear cache, so that YouTube/Vimeo oembed services will generate new embed codes for you. Using with Markdown, Textile or other LML I mostly assume you are using this with TinyMCE. But there's no reason why you can't also use this with something like Markdown or Textile. This text formatter is looking for a YouTube or Vimeo video URL surrounded by paragraph tags. As a result, if you are using Markdown or Textile (or something else like it) you want that text formatter to run before this one. That ensures that the expected paragraph tags will be present when TextformatterVideoEmbed runs. You can control the order that text formatters are run in by drag/drop sorting in the field editor. Thanks to Pete for tuning me into these oEmbed services provided by YouTube and Vimeo a long time ago in another thread.1 point
-
This module tracks changes, additions, removals etc. of public (as in "not under admin") pages of your site. Like it's name says, it doesn't attempt to be a version control system or anything like that - just a log of what's happened. At the moment it's still a work in progress and will most likely be a victim of many ruthless this-won't-work-let's-try-that-instead cycles, but I believe I've nailed basic functionality well enough to post it here.. so, once again, I'll be happy to hear any comments you folks can provide https://modules.processwire.com/modules/process-changelog/ https://github.com/teppokoivula/ProcessChangelog How does it work? Exactly like it's (sort of) predecessor, Process Changelog actually consists of two modules: Process Changelog and Process Changelog Hooks. Hooks module exists only to serve main module by hooking into various functions within Pages class, collecting data of performed operations, refining it and keeping up a log of events in it's own custom database table (process_changelog.) Visible part is managed by Process Changelog, which provides users a (relatively) pretty view of the contents of said log table. How do you use it? When installed this module adds new page called Changelog under Admin > Setup which provides you with a table view of collected data and basic filtering tools See attached screenshots to get a general idea about what that page should look like after a while. For detailed installation instructions etc. see README.md.1 point
-
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_HOST1 point
-
If you take it now. You'll get two stock free images and a T-Shirt for free!1 point
-
Ok, gotcha. All fixed, my selector finding the label value wasn't specific enough. Pushed the changes.1 point
-
1 point
-
Im not sure you can import images to pagearray just saying.1 point
-
You could use my ImagesManager module which is made for use cases like a photo portfolio. Every image is created as a page and each gallery would be a category. It would be a childs play to setup pagination and searching. Plus you can have as much meta data added as you like and all is searchable same as with using pages.1 point
-
You don't even have to do the first step that 3fingers referred. Knowing that the default class is "MarkupPagerNavOn" you could simply: $('.MarkupPagerNavOn').attr('disabled', true); or even simply replace all the content of that element (the link) by only the number: $('.MarkupPagerNavOn').each(function(){ $this = $(this); $this.html($this.children('a').text()); });1 point
-
No no, not TinyMCE. Here's the SS from the modules page: In the 'Code' box, there's no syntax highlighting for the code that is in the textarea. I'm just suggesting that the code in the textarea has syntax highlighting as you type to help prevent users from making an error when writing their code in that box.1 point
-
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
-
Mr Ryan, Do you have any plans to add some syntax highlighting for the code editor area? Great module, but I think a highlighter would be the cherry on top Something like CodeMirror would be awesome. Cheers.1 point
-
Lol kongondo, of course it works! Don't worry it happend a lot for myself. Since then I just try to double check and test throughout first before posting and you'll get better at time goes on.1 point
-
1 point
-
Edit: Didn't read code properly..of course Soma's code works! . I had similar code earlier i.e., checking for checkbox state in the first find() but was not checking again in the inner foreach (as per my code above). Hence, I was getting and outputting results if at least one repeater on the page was unchecked even if others were checked.1 point
-
1 point
-
Maybe the example just isn't a very good one, as you don't know ahead if the repeater have any unchecked checkbox. $pa = $pages->find("template=basic-page, slides.count>0, slides.disable_slides=0"); foreach ($pa as $p) { foreach($p->slides->find('disable_slides=0') as $r) { echo "<p>$r->title</p>"; } } Should also work, not to loop pages that have no repeater that meet the criteria for nothing.1 point
-
$pages->find('created<=yesterday')->first()->parent() or shorter: $pages->get('created<=yesterday')->parent() Edit: but these will return only the parent of one of the pages created in that time, not all of them.1 point
-
1 point
-
A string or something like FieldtypeText probably isn't the best example to consider when talking about overall Fieldtype design. The Fieldtype architecture is built around being able to support complex data types that might translate to a DB schema with numerous fields within the table. FieldtypeText is the absolute simplest case scenario for a Fieldtype. With the HTML5 example, I'm only talking about definition. I want people to be able to define their fields in a manner that bears some consistency with how they might define their fields in HTML5. Having an 'anything goes' text field that we later check boxes for what we want just doesn't fit the way I'd like users to define fields. I think that's fine for specific details like "max length" or the like, but not for something defining a type like Email or URL. Such an approach would mean we'd likely need to have yet another level of plugins below type, for type validation. This method would be supported by the current architecture if someone wanted to take the approach (it's not far off from how Textformatter plugins work), but I think it would ultimately be a less desirable approach for the core fields. It's important to consider that ProcessWire has two different input levels that have distinct needs: interactive and API. Inputfields aren't involved with API-level usage of ProcessWire, only interactive usage. API-level usage of ProcessWire is another type of input being provided to the system, but one that is certainly different than interactive. This level is more about protecting the type and preventing corruption. As a result, Fieldtypes typically sanitize and Inputfields validate. But if your Fieldtype benefits from some kind of API-level validation, you always have that option. The architecture of Fieldtypes and Inputfields has a whole lot more to do with being scalable to complex data types and needs, and flexible enough to handle diverse situations. For instance, if you wanted to have a FieldtypeAnyText with separate validators, it would be easy to implement under the current architecture. Luckily this is exactly what a MySQL unique index does. It would have to be a Fieldtype-level setting rather than an Inputfield-level setting, since the Fieldtype controls the schema.1 point
-
This works as with your example, there's nothing wrong with it except that you need to add include=all: search and return all repeaters "slides" pages (internally have template "repeater_slides") with disable_slide not checked $slides = $pages->find("template=repeater_slides, disable_slide=0, include=all"); And it returns a PageArray So you can loop them out or whatever. foreach($slides as $slide) echo $slide->title; If you want to only get the repeaters from the page you're on this is almost same: $slides = $page->slides->find("disable_slide=0");1 point
-
There are no selectors in your example, right? Just objects with properties and plain PHP. And the problem lies within the operators you're using (if you've tried literally those): "=0" and "=1" are assignments not comparisons and the results are what I'd expect them to be. Should be "==0" and "==1" naturally.1 point
-
Greetings, Soma! I didn't know this was possible... Thanks for pointing this out. Just another example of how, with ProcessWire, you just need to ask the question to get a (great) answer. Thanks, Matthew1 point
-
Hi gtoirog, from this page ( http://processwire.com/api/modules/markup-pager-nav/ ) you can see all the custom options connected to the Pagination in PW. The one you are looking for is "currentItemClass" that determines the css class for the current/active/on button list item. From the documentation : <?php echo $results->renderPager(array( 'currrentItemClass' => "active" // "active" is just the class name I choose. )); From there, in your css you could style it however you want. Since css, by now, hasn't a common solution to disable a link yet, you should disable it via Jquery. Something like this might work as expected : $('.active').attr('disabled', true); Give it a try1 point
-
I'd love to be added there but honestly I'm not a "PW Developer" per se...you could add me, and I will be glad to be useful to other italian people who wants to get closer to PW In the next 2 weeks or so I'm going to go live with my new portfolio built with PW, and then you can add it to the showcase... In the next months I'm planning to build a big corporate site too.1 point
-
I'm basically a programmer with some design skills.Jumped on the PW bandwagon recently. You can do a lot with relatively few concepts. You just have to use those PW parts to good advantage. My first shot at something in PW tends to have some workarounds in it by the time I get all the functionality I want. Then I look at those issues more closely and dig around in the forums and find that I missed some subtlety and was making extra work for myself. One thing that helps me is to just think "node" whenever the Processwire "Page" is discussed. They really are anything you want to them to be, or at least they function as a handle for connecting PW's powerful API to data you bring in. Very practical. The cheatsheets and other references behind the API link up top are a great help.1 point
-
Have file permissions by any chance changed -- ie. does whatever user your web server is running as have write access there etc.? That would probably be the most common reason for something like this. If you're not sure which user that would be and your site is running on Linux, "ps aux | grep apache" (or echo shell_exec("whoami") in any PHP file) will give you good idea. .. oh, and of course there's always the possibility that there simply haven't been any errors ..1 point
-
If it works for you, well, and if there are no severe strains on your server and if you've thought this through, then, yes....But, as has been said before, repeaters were designed for something else and not to categorise content...Most people here will categorise content using methods stated above...it is good practice.. I'm sure you've seen this:1 point
-
Hi Ara, I think you'll find (as I did) Processwire really simple to use and understand. Of couse that it always depends on what you are trying to achieve, but I've started using PW with a fairly complex site and, with the help of the great and helpful people of this forum, I'm loving it and feel confident that I'll be using it for every project that needs content management in the future. Definitely I've found it easier and with fewer restrictions out of the box than other CMS's I've used (including Expression Engine).1 point
-
I'm sure you already know this, but still: Location can't be reliably identified based on IP alone. Even if you use a very large list of IP's connected to location data that some sites distribute, you'd still have to take into account various proxy services, possible human error etc. Essentially this kind of feature is OK for offering extra value for some users, but it's definitely not a good idea to rely on it alone to provide any security-related features. Just saying. But to get to your questions.. If you're going to have a lot of IP ranges (and you'll probably have if your list is even half comprehensive) this might be a very good idea. As a matter of fact, since you mentioned it here, I've started thinking that perhaps I should include something similar to the original module itself.. can't give an ETA for that yet though, and it might not even be of benefit in your case This is a tricky question. First of all, I'd suggest looking into Markup Cache -- it'll allow you to cache parts of your page, even if whole pages can't be easily cached. That's probably the easiest method here. Other option would be caching two versions, like you've pointed above, but as far as I know that's not really an option available out-of-the-box. Template Cache allows you to cache URL segments, so you might be able to work around this problem using that for an example. Could get very complicated very fast though. With commercial Pro Cache module you can bypass the cache when certain cookie is set.. though it might be difficult to set that cookie if pages keep getting served from cache. That could be an option if you're relying on some pages not being cached, ie. users always entering via root page which won't be cached at all. Doesn't sound like a good idea, but I don't really know your whole setup, requirements and plan here either, just throwing in ideas Edit: as a matter of fact, you could probably also use modified Page Render IP Restriction to set $session->PageRenderNoCache and that way skip Template Cache for either local or non-local users, even without relying on Pro Cache module. Page Render IP Restriction runs before Template Cache can work it's magic, so this should be possible. Obvious downside here would be that part of your audience won't benefit from caching at all.1 point
-
I understand the convenience, but I don't think having separate core downloads for PW depending on language (or other factors) is sustainable from a version or security standpoint, so would rather avoid that by always having the core download be directly from our GitHub. But having clear additional download links for language pack, docs, etc., to accompany the main download link would be great. Longer term, we'll have an automated download function that can bundle modules and language packages automatically at runtime.1 point
-
Hah, Soma! That is because most people probably don't notice your subtle changes/fixes after wrong-but-really-quick posts1 point
-
I gave this a try on an install I'm currently working on and instead of being told "the request appears to be forged" I just get a blank white page... weird. My server is running LiteSpeed if that makes a difference. I'd love some help on this as the site has been made live but no one is able to edit it... grrr. UPDATE: I quickly enable debug and grabbed the output, its as follows... Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/niagara/public_html/wire/core/Session.php on line 265 UPDATE 2: Call off the Calvary! I had trailing whitespace in a module I made... I'll admit defeat and leave this here for anyone else who might make this mistake.1 point
-
I've been quite busy last few months (and still am), but I managed to squeeze new admin theme called Futura Remixed (successor to my Futura theme). So let's get started: complete rewrite of the theme complete new graphics, includin PageList tree icons etc. full multi-language support (except "You are logged in as", "Latest updates" and "Newest added" title (could be done by implementing those in language packs I suppose) complete new TinyMCE theme with Fugue icons (that was pain in the ass) integrated CodeMagic TinyMCE plugin that uses CodeMirror to highlight the code and HTML beautifier to beautify the code (unlike plain TinyMCE HTML editor) AdminBar theme How to install: Unpack FuturaRemixed.zip to your /site/ directory Replace /wire/modules/Inputfield/InputfieldTinyMCE directory with InputfieldTinyMCE directory contained in the attached InputfieldTinyMCE.zip file Extract AdminBar.zip to your /site/modules/AdminBar directory (if you use it) I've tested the theme thourougly but errors may still show up. So if you find them, please let me know, so I can fix them. When I get time, I'll update this theme with colors from original Futura theme so you could choose between them. Let's look at the screenshots: Enjoy the theme as much I've enjoyed making it. AdminBar.zip FuturaRemixed.zip InputfieldTinyMCE.zip1 point
-
For text fields, yes color=0 will also work. [Edit: Maybe not the best one]. Thanks apeisa! I got another one also possible: $pages->find("color=''");1 point