apeisa Posted April 5, 2013 Share Posted April 5, 2013 Fredi is friendly frontend editor for ProcessWire. Code and documentation: https://github.com/apeisa/Fredi Module page: http://modules.processwire.com/modules/fredi/ 26 Link to comment Share on other sites More sharing options...
Soma Posted April 5, 2013 Share Posted April 5, 2013 Wohoo apeisa hws a new baby! Great to have this! 1 Link to comment Share on other sites More sharing options...
apeisa Posted April 5, 2013 Author Share Posted April 5, 2013 Hahaa, thanks Soma It has little bugs with images/files and haven't even tested it with repeater yet, but other than that it seems to work nicely! This was superfun to code and actually took very little time and code so far. Link to comment Share on other sites More sharing options...
diogo Posted April 5, 2013 Share Posted April 5, 2013 Fredi is great Link to comment Share on other sites More sharing options...
Soma Posted April 5, 2013 Share Posted April 5, 2013 Let pw do its work and youll be fine. Just have to remember to echo it! Btw what about permissions? Link to comment Share on other sites More sharing options...
Marty Walker Posted April 5, 2013 Share Posted April 5, 2013 Alright! I can't wait to try this Antti. Quick question: will it let me work with your Thumbnails module too? Link to comment Share on other sites More sharing options...
apeisa Posted April 6, 2013 Author Share Posted April 6, 2013 Permissions should be fine. I check them on field level. Marty: feel free to try. I think it might work with thumbnails already. If not, it shouldn't be a big tweak. 1 Link to comment Share on other sites More sharing options...
apeisa Posted April 6, 2013 Author Share Posted April 6, 2013 Btw what about permissions? Oh, I had nice bug that showed edit links for everyone (and then login screen if user didn't have editing rights). Fixed now, show edit links are shown only for editors. Link to comment Share on other sites More sharing options...
apeisa Posted April 6, 2013 Author Share Posted April 6, 2013 Ok, just pushed nice little update. It should support pretty much all inputfields now (uses their native input processing). Only thing where I am having problems is ajaxfiles inside repeater (gives me response text: "page not saved (no changes)" after upload has been done). Repeaters without images works just fine. It should be pretty trivial to build some kind of JS-switch to "show / hide" edit buttons. There is also $fredi->enabled = false that you can set if you want to disable edit links for some reason. 1 Link to comment Share on other sites More sharing options...
Luis Posted April 6, 2013 Share Posted April 6, 2013 Uh nice, a lot of little cupcakes inside your code to pick and learn from. 1 Link to comment Share on other sites More sharing options...
Soma Posted April 6, 2013 Share Posted April 6, 2013 Apeisa i think you have to set some track changes when modifiying repeaters. Am on mobile so cant look. Link to comment Share on other sites More sharing options...
apeisa Posted April 6, 2013 Author Share Posted April 6, 2013 Thanks soma. That is what I have tried, not lucky yet. Link to comment Share on other sites More sharing options...
Soma Posted April 6, 2013 Share Posted April 6, 2013 Does it works with language fields? Because all I get is a "edit" text instead of the body and a edit link. Link to comment Share on other sites More sharing options...
apeisa Posted April 6, 2013 Author Share Posted April 6, 2013 Haven't tested yet. Does it work with others? You have loaded js? Link to comment Share on other sites More sharing options...
Soma Posted April 6, 2013 Share Posted April 6, 2013 Yes I have scripts. I get the link only with no text and if I click it just loads the homepage in the modal. <span onclick="TINY.box.show({iframe:'http://pwmultilang.ch?id=1001&fields=body&modal=1',boxid:'frediModal',width:750,height:450,fixed:true,maskid:'bluemask',maskopacity:40})" class="fredi fredi-body">edit</span> Link to comment Share on other sites More sharing options...
Soma Posted April 6, 2013 Share Posted April 6, 2013 I also just tested with a non language field and same issue as above. I don't know what is wrong. Link to comment Share on other sites More sharing options...
apeisa Posted April 6, 2013 Author Share Posted April 6, 2013 The url seems to be wrong. Do you have the process module installed? Does this selector work for you: wire('pages')->get("template=admin, name=fredi-field-edit"); Link to comment Share on other sites More sharing options...
Soma Posted April 6, 2013 Share Posted April 6, 2013 I just tried on a non language install, and got same issue. Thanks, yeah it seems the process module doesn't get installed at all. Although it says it installs it, it doesn't. I installed the proces module and now the edit link works and opens field, but the text still isn't shown/rendered on page... Link to comment Share on other sites More sharing options...
apeisa Posted April 6, 2013 Author Share Posted April 6, 2013 Multilang fields: it has few issues. It shows all languages right, but saves the "default" into "active" language. So if you are currently browsing with default lang, it discards all the changes for alternative languages. If you are browsing in alternative language, it saves default value into it. Link to comment Share on other sites More sharing options...
Soma Posted April 6, 2013 Share Posted April 6, 2013 I'm on a other install with no languages. Still doesn't output the body text when using echo $fredi->body. Just the edit link. Link to comment Share on other sites More sharing options...
apeisa Posted April 6, 2013 Author Share Posted April 6, 2013 I just tried on a non language install, and got same issue. Thanks, yeah it seems the process module doesn't get installed at all. Although it says it installs it, it doesn't. That is strange. It is listed as "installs" module, so PW should take care of it. Bug in core or something strange on my install method? I installed the proces module and now the edit link works and opens field, but the text still isn't shown/rendered on page... Which text is not shown and where? Editor doesn't load value when editing. I'm on a other install with no languages. Still doesn't output the body text when using echo $fredi->body. Just the edit link. Oh, it shouldn't $fredi->body outputs just the link, you render the content yourself with $page->body. This allows you to put the link wherever you like. Link to comment Share on other sites More sharing options...
Soma Posted April 6, 2013 Share Posted April 6, 2013 The body text isnt shown on the page just an edit link instead of the body text. Ah now I get iz. Think it wasnt too clear about from your example. Link to comment Share on other sites More sharing options...
Soma Posted April 6, 2013 Share Posted April 6, 2013 That is strange. It is listed as "installs" module, so PW should take care of it. Bug in core or something strange on my install method? Well, the process module doesn't have diabled install button so something is wrong.. ProcessFredi and FrediProcess are different modules, so it can't work 1 Link to comment Share on other sites More sharing options...
apeisa Posted April 6, 2013 Author Share Posted April 6, 2013 Well, the process module doesn't have diabled install button so something is wrong.. ProcessFredi and FrediProcess are different modules, so it can't work Oh boy Thanks for this. I have few tweaks coming, so will commit that fix with those. Ah now I get iz. Think it wasnt too clear about from your example. I added extra note for this case. Also will make better examples for official readme that is currently baking. Link to comment Share on other sites More sharing options...
apeisa Posted April 6, 2013 Author Share Posted April 6, 2013 Multilang fields should work now too and also fixed the problem with installation. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now