Leaderboard
Popular Content
Showing content with the highest reputation on 05/14/2014 in all areas
-
Previously I posted about Textareas. The next field coming in ProFields is called Multiplier. This field lets you take almost any existing single-value Fieldtype, and use it as a multi-value Fieldtype. Single value Fieldtypes are those that store one piece of information at a time, for example: Text, Textarea, Integer, Float, Email, URL, etc. Any of these, and more can be multiplied with Multiplier. Here's a short video introduction to Multiplier. Like with the previous screencast, I recommend upping the quality to 720p and viewing full screen. This one also includes narration, though we're in allergy season here so my voice is a little rough. The next fields I have to tell you about in a few days are: Table, PageTable and AutoLinks.20 points
-
FieldtypeSelectFile & InputfieldSelectFile Inputfield Select File is an Inputfield & Fieldtype to select a single file or folder and stores the name and / or use the selected file as page template. The last option enables the editor to use multiple views for a page, depending on the selected template. Settings The folder containing the files and/or folders.A relative path relative to the /site/templates/ folder. Hide file extensions Hide files Hide folders Natural Sort (Select options)Sort files and folders in natural ordering (PHP >= 5.4.0) Change Page Template Just before the Page::loaded event the selected file is set as template file for the page. This setting can only be applied once per a page and folders are exluded from the select inputfield. Note that a page with no associated template file will render with the selected file. When to use ? Let editors select a file and base your own logic upon this. With the change page template setting you're able to use the selected file as template file. This could reduce the amount of normal templates needed and let editors choose how the page get rendered. There are plenty of use cases for this Inputfield. In the examples I call the field selected_file. // let the editor choose a CSS file $config->styles->append($config->urls->templates . "styles/" . $page->selected_file); /** * advanced usage example * * You need multiple ways to render your markup. Let the site editor choose which * file the page need to render. * */ $tpl = new TemplateFile($config->paths->templates . "includes/" . $page->selected_file); $tpl->set('current', $page); $markup = $tpl->render(); (It could be a real good companion with InputfieldSelector) Download at GitHub Modules directory11 points
-
Well I don't have the recording mode done yet, but thanks to Nico we now have the ability to migrate content from a Wordpress site into PW. Firstly, this module has been renamed - now it is simply: "Migrator" https://github.com/adrianbj/ProcessMigrator so please uninstall your old one and install this new version. The module now supports 3rd party plugin modules for migrating content from other sources. The first one is: MigratorWordpress: https://github.com/NicoKnoll/MigratorWordpress Here's what it looks like in action. Not much action in that screenshot I know, but you can see how MigratorWordpress adds in a new data source option (a WordPress xml export file). There are instructions on exporting in the MigratorWordpress readme. For those of you who still have access to a WordPress site, simply run WP's built in exporter, then import the resulting xml file into Migrator. At the moment the Wordpress site needs to still be live because any embedded images are installed to PW from their full existing URL. Also if you have ideas for other plugins, please feel free to start coding If there is interest I'll write a guide defining what is required for the module to be recognized by Migrator and also about the JSON schema that is required. So please test out and let us know how things go.9 points
-
You've been tripped by scopes. Twice. Other guys have given you the solution to both problems above but you're going around in circles. I'll try once more. The first problem was using $pages inside a function. That and many other variables are not visible in a function due to scoping (see the post diogo linked to in the very first response to your question). You fixed this first scoping issue by replacing $pages with wire('pages'). But when you assign the results of the find() function to a variable $selects inside your function, you're inside another scope - a scope that is not visible outside your function. Returning the value of $selects returns only, well, the value. It does not expose a variable called $selects to be usable outside the scope of your function. So you'll need to either use the returned value straight away (see diogo's foreach example) or assign it to a variable. This is actually exactly what owzim proposed earlier on. If you take a closer look at his code you'll see the foreach is not inside the function but outside. Maybe you got confused by the same variable name. Something like this should work (with minimal changes to what you originally had): function selector() { $selects = wire("pages")->find("template=child-template, limit=2, sort=company"); return $selects; } $selects = selector(); include("./myinclude/browse.inc"); // browse.inc holds html for display Personally I would avoid using the same variable name twice to avoid confusing myself. Here's an example combination of what has been said earlier in this thread by others: function selector($tpl) { return wire("pages")->find("template=$tpl, limit=2, sort=company"); } $selects = selector("child-template"); include("./myinclude/browse.inc"); // browse.inc holds html for display Functions are useful and I really hope you're able to wrap your head around them (and scopes and variables) eventually. Reading a book explaining the very basics of PHP programming might be beneficial.7 points
-
There is one (http://community.invisionpower.com/files/file/6253-mentions/), though I don't know if there is a more recent or better one. I think it would be cool, what do you think? This would require users to use it. I often times see users mentioning other users by their real name, I sometimes don't know who they are talking to/about =) Edit: replaced wrong link6 points
-
Similar only in the multi-value aspect. Repeaters are creating a new page for each item, and that page can have any fields. That's incredibly powerful, but also consumes a lot of resources. That's why we don't recommend repeaters in large quantities or other large scale usages. Multipliers on the other hand multiply an existing Fieldtype like Text, Textarea, Integer, Email, etc. (including those that don't yet exist), without any overhead or additional resources. They are incredibly scalable. Like all the ProFields, Multipliers are a tool that enhances things you can already do [with repeaters] by doing them more efficiently and in a more focused way. They are especially desirable those using PW for large scale projects. They may also be preferable from the admin UI aspect in that they don't have to be as flexible as repeaters, so they can stay more focused on the UI side as well. Language text fields (FieldtypeTextLanguage and FieldtypeTextareaLanguage) are multi-property fields. Multiplier can only multiply single-property fields at present (though most Fieldtypes are single-property Fieldtypes). On the core side, Multiplier can multiply: Text, Textarea, Integer, Float, Email, Datetime, Selector and URL. It can also multiply 3rd-party Fieldtypes as well (so long as they are single-property). However, it is technically possible to multiply multi-property Fieldtypes as well, so I am planning to add support for multi-property Fieldtypes in one of the next versions of Multiplier. This would enable you to multiply Fieldtypes like TextLanguage, TextareaLanguage, and MapMarker (and other 3rd party multi-property Fieldtypes). Since there are a whole lot more single-property Fieldtypes, Multiplier is focused on those for this first version.6 points
-
Really? Either I don't quite understand what you're after here or you've got some kind of blackout . See https://github.com/apeisa/UserGroups/issues/20 to refresh your memory. Page::isPublic() was made hookable by Ryan about the same time too and it's in 2.4 stable. I wish I had time to polish the package but it doesn't look too promising any time soon. Everything works but there are some smaller things missing that would make the implementation more complete. Hopefully someday.6 points
-
Hey, I finally had the chance to use PW for a german shop. And let me tell you setting up an online shop under german law is the worst. For example there are different taxes for different products (7% on book and stuff 19% on everything else). And you have to apply this tax even on shipping costs (like shipping costs tax for books 7% ...). And you need to have checkbox you have to check that you "read and understood the "general business terms". And your bux button has to say "buy" not "complete checkout". It has to be "buy" (or something similar). So I had to do some core hacking of the shop module. but it works now. Take a look: www.oliver-mark.com/shop/ -- Nico5 points
-
5 points
-
If the gallery is private (I.e. requires a password to sign in) then Google will never find the images anyway will it?4 points
-
I think I am missing single git pull here3 points
-
Check the .gitignore file in the root of your project, because the default ProcessWire one includes "site" - so everything in there is ignored.3 points
-
Please re-read the posts... The function is the actual PageArray... Look at Diogo's example how useful a function can be. Why not ? You can get variables inside the function if wished, again look at Diogo's example. You have to use wire('pages'), wire('page'), wire('config'), etc. etc. inside functions because of variable scope.3 points
-
2 points
-
2 points
-
For the mac talk part — just solved two things that I had in linux and was annoying me not to have them in the mac: not being able to define the default apps for all extensions in one place, and that the + green button wouldn't really maximize the windows http://www.rubicode.com/Software/RCDefaultApp/ http://www.blazingtools.com/right_zoom_mac.html2 points
-
I am desire to build on-line menu for my restaurant Roderigo Kitchen with reward coupon. Maryla and Jeffrey handle express order as they come in so you do not need to worry that. I see this textarillos and multipliers maybe good for on-line menu? Maryla also ask can it store price and photo to customer after order of daily special? Also Roderigo meat boat special this week only. Like Japanese bento boxo but all meat no veg and in special boat customer can take home and use in tub or use to drunk margarita. Can profielders help to show customer this kind special in on-line express menu? Thanking you, Roderigo Sosa2 points
-
If you use svg, make sure the text is NOT converted to outlines, or the image will be a massive size. Best way is probably to embed the font with the subsetting preference "Only Glyphs Used" from saving panel in Illustrator.2 points
-
2 points
-
There hasn't been much progress since then (that I'm aware of), but the module is already in production use on some of our sites. It's a lot more stable than the version numbers indicate2 points
-
Lots of people have been asking for a way for ProcessWire to support sending of email, outside of just using PHP's mail() function. I haven't really wanted to expand the scope of ProcessWire that deep into email sending, but I have been wanting to setup a way so that people could override how emails are sent, with modules. For people that are interested in making other ways of sending email in ProcessWire, I've setup a new module base class called WireMail, and a new function called wireMail(). The wireMail() function will use whatever WireMail module is installed. If none is installed, then it will use PW's default WireMail implementation (based on PHP's default mail function). The wireMail() function replaces all instances of PHP's mail() function in ProcessWire's source. It works in a similar way as PHP's mail() except that supports a few different usages. Standard usage would be this: // to, from, subject, body wireMail('user@domain.com', 'ryan@runs.pw', 'Mail Subject', 'Mail Body'); Another usage would be to give it no arguments, and it'll return whatever WireMail module is installed for you to use yourself. If no WireMail module is installed, then it returns ProcessWire's WireMail. $mail = wireMail(); $mail->to('user@hi.com')->from('ryan@runs.pw'); // all calls can be chained $mail->subject('Mail Subject'); $mail->body('Mail Body'); $mail->bodyHTML('<html><body><h1>Mail Body</h1></body></html>'); $mail->send(); Since all of this stuff is only on the PW 2.4 dev branch at present, I'm posting this primarily for people that are interested in creating WireMail modules. For instance, I know that both Teppo and Horst (and perhaps others?) have put together such modules and ideas, so this is all aimed at coming up with a way for those ideas to be easily integrated into PW by way of modules. To make your own WireMail module, you simply create a module that extends WireMail and provide your own implementation for the send() method. Of course, you can go further than that, but that's all that is technically necessary. I've attached an example module called WireMailTest that demonstrates a WireMail module. When installed, it is used rather than PW's WireMail. This WireMailTest module includes lots of comments for you in the code of it, and you may find it helpful to use it as your starting point. WireMailTest.module For you guys developing modules, please throw any questions my way and I'm happy to help. Likewise, let me know if you think I'm missing anything important in the base interface that the modules are based upon and we can update it.1 point
-
I did it again http://soma.urlich.ch/posts/custom-js-in-processwire-admin/1 point
-
http://quilljs.com/ It's all about the API, just like PW1 point
-
PW has very flexible UA management. Most of the sites can get the exact needs fulfilled after little clicking. But when you need to scale it in horizontal way: ie. adding ten different news sections, each with same templates but managed by different group of people, PW doesn't make it too easy (since UA is tied to templates). Also roles&permissions&template access is a combination, that at least we cannot leave to our clients (it's way too complicated for your average editor) - it means that UA management have to be done by us. This is fine on small scale, but some of our sites are pretty heavy on UA: biggest site has over 800 user groups and many times we do have something like 50 000 users importet (these sites are not build on pw today, but hopefully they will be). So we need to have simpler UA that our clients understands and can use on daily basis. That will also mean less granular control, but easier to manage. Lucky for us, PW has hook system in place, that is flexible enough to allow hooking to UA also. Few months ago I started building module to add two features for PW: -user groups (user can belong to more than one group) -page based permissions based on groups (so you can say: this page and it's children can be edited by groups A + B and viewed by groups A + B + C I first thought that I should release this as a paid module, but after showing this current early version to Nik and Teppo (I knew they had similar needs) and when they showed interest in development I wanted to make this a community project (this is gonna be thousand times better than just me building it alone). So lot's of progress is coming and of course everyone is invited to collaborate. Be it ideas, comments, testing, use cases etc.1 point
-
Oops. Sorry Diogo - I used wire("page->parent") - my mistake (hope I can say that the last time)1 point
-
@Martijn Also thanks (and like) to you Your hint was correct, but I missed the second place to change it to Name ... my bad1 point
-
Just A guess... The user template doesn't have a title and PageAutocomplete uses title to find the pages.1 point
-
1 point
-
YEAH BUDDY, that's the problem. I can't beleive it's ALWAYS something so simple. lol. So just to test it, I deleted the contents of .gitignore and ran git status Just as I thought, it shows everything properly. (I'm still a git newb.) So now that THAT'S working, what paths should I ignore? i'm sure the /cache/ folders. What else?1 point
-
Tried my best as a novice https://github.com/ryancramerdesign/MarkupLoadGCal/pull/41 point
-
1 point
-
If I would live in California it would also be a no-brainer for me, but in Europe we pay the double unfortunately...1 point
-
This forum needs a way to spread the love to the person who really deserves it - in this case, Nico! Maybe this would help a little: https://processwire.com/talk/topic/6373-mention-system-for-the-forums/1 point
-
Another vote here for: 1. ProcessWire merchandise. Mugs, t-shirts. 2. A mechanism for selling modules through the PW site. Devot-ee seems to have built a very successful model on this for ExpressionEngine.1 point
-
Hi. We're looking for a developer that can create a module/plugin to power an Auctions website via Processwire for a client. It should support the basic functionality of an Auctions site like this: http://www.lauritz.com/en/auctions/?FLId=2&FCId=5 Some of the core features it must have: * Creation of multiple auctions holding multiple items; * Support for simple bidding and Proxy Bidding (Automatic outbidding); * Support for reserve price and "Buy it now"; * Bidding History; * User Registration and Login auction bidding; * E-mail alerts for users on outbidding, end of auction, etc; It must be complete until the 30th of April 2014. Please PM me if you are interested and I can fill you with more details. NM1 point
-
Ryan, have you thought about making the store something that module authors can publish their commercial modules at? You then take 10% or so. This would make it the goto-store for commercial modules, and authors would not have to come up with custom solutions selling their modules.1 point
-
I've never known git lie to me. I've known me mess things up and not realise it for a while. I think Craig has probably identified the culprit in his answer but failing that another possible mess up would be working out of a directory you think is symlinked from your git repo but isn't (been there, done that.) If that's the case you still have all your changed code - just diff them with the files in git and pull over the changes and commit.1 point
-
Not like it is now. But it's still a valid exercise, change only a little bit and the function can become very useful function selector($tpl) { return wire("pages")->find("template=$tpl, limit=2, sort=company"); }1 point
-
Are you assigning the return of the function to something? $results = selector(); foreach($results as $result) { echo "{$result->title} <br>"; }1 point
-
You can't use the API variables inside functions because of function scope. Use wire() instead $selects = wire('pages')->find("template=child-template, limit=2, sort=company"); Here's an explanation: https://processwire.com/talk/topic/5133-wire-function/?p=494591 point
-
Depending on just how corrupted things are, this should remove the field from all templates and then delete the field: $field_name = "myfieldname"; foreach($templates as $template){ foreach($template->fieldgroup as $field){ if($field->name == $field_name){ $template->fieldgroup->remove($field); $template->fieldgroup->save(); break 2; } } } $fields->delete($field); The first chunk of code is stolen from Soma. I just added the bit at the end to delete the actual field as well.1 point
-
Have you enabled debug mode or looked at the logs? You should get more information to debug on than "Internal Server Error".1 point
-
About those web site text editors and real life situations: Many clients ask me for an editor that keeps the formatting of the text they copy and paste. Examples of this are texts clients already have from their own products, catalogs, brochures, manuals, etc. etc. Many times the layout and formatting gets lost when pasting this text inside CKeditor, Tinymce and those little brothers and layout and formatting gets lost. Things like bullets, tabs, line spacing, columns, etc. etc. Then they have to re-edit everything all over again until it looks the same and lose a lot of time. Any solution for this ?1 point
-
argh, never mind! i just switched my user role back to german/default and all is good. i guess the files don't show up for the default language, but will still be used … hi, i tried to use this language pack for the default language, but i can't get it to work. if i create a new language and upload the zip-file or the json-files everything works as expected. but i want my primary language to be german and the second language english. when i upload the file(s) in the default language, the language files are gone after saving the page and it defaults to english. is this a known problem? i'm using the latest dev-branch of processwire. thanks!1 point
-
This looks great, Ryan. Processwire's modularity is, perhaps, its greatest asset. After working in Joomla and Wordpress for years, it's great to have a CMS that is dead-simple when you need it to be, but scales up easily for more complex sites. Keeping the core as clean as possible also makes it easy for people to get in the door, then add functionality as needed. I also find the current module licensing model to be an excellent compromise. Great work! Now, when can I give you my money?1 point
-
All the WP sites I did in the past (way too many of them, now I switched entirely to PW, I even redid whole clients simple "brochure" websites pro-bono to save me the hassle) have been ok, but there's always something with the API that doesn't work quite right (future dates in queries, good luck!), maintenance issues, compatibility issues (loading 10 versions of jquery and the like). Some things might work right when developping, but often I need to change the plugins code to improve them, which is a problem. Then when new versions of everything comes out, it's a mess. WP sites don't seem to grow very well either, so as complexity increases, it all falls apart. Speed issues are also a big thing and really hard to optimize to get good load times. All that time waiting for the admin to do stuff is wasted time in billable hours (I charge a minimum of 30 mins for maintenance, most things take less than 15 mins to do, the process is usually much faster in PW I've found so far). Also take into account that when you do full-custom work like I do (I'm a designer AND a programmer), WP always comes with either too many or not enough features. That's time I need to just do configuration to get rid of the unneeded parts, which sometimes isn't really straightforward. I also do a lot of multilingual things, WP can do it with plugins, but the workflow is kinda weird and involves a lot of support calls from clients. Some of the features don't work so well either. So far what I've launched with PW is trouble free. It does everything much better and faster. I can say with big relief that WP's custom post types are a thing of the past. I was able to implement different relatively "complex" things (well, would be in WP) like 100% custom event systems, payment/donation systems, etc (hopefully will be able to package some of them nicely to reuse later and share in modules) in next to no time. Now I'm happier, clients are happier, work is faster, everybody wins.1 point
-
I've heard quite a bit about it in the last couple of months, but tried it out myself just yesterday. It's great. I think I'm gonna switch to vagrant instead of my local env. If you're using your local env. for all projects you might as well just use one vagrant box for all projects. You'd still have the advantage of not messing up your local env. with crazy configurations. It'd be interesting to know if those issues are windows only. To all who are using vagrant currently: What are your workflows regarding mysql dumps? I tend to config a pre commit hook in my projects which dumps the database of the current PW install before committing. Since the db is in the vagrant box, are there any issues getting a dump of a db from it? I haven't tried it out myself yet, I think it should be possible to just connect to the vagrant mysql server instead of the local one and dump the db from there.1 point
-
Would it much work to build it as a universal module? Maybe with a config file to match the database table fields? So everybody can use it independent of use case. Just an idea. Maybe to much work to do it.1 point
-
This is significantly more scalable and resource friendly than repeaters. It's directly connected to a single DB table without any other overhead.1 point
-
best profile for your site is the crssp profile install the default profile and study it well. then you can make your site grow from there adding structure and functionality1 point