Mackski Posted January 7, 2014 Share Posted January 7, 2014 I would like to know if it is possible and easy to extend FieldtypeImageExtra to have a Page field (instead of a common text field). This way, each image would have one or more pages associated with it. It would be like tags but the client can select a Page with the ACM Select component. I guess it's easier to do this with an 'image' template but I loose the sorting manually by looking at the imagee (well, my client does). What do you think? Was a solution found for this? I require pages to be assoicated with images also. Link to comment Share on other sites More sharing options...
Soma Posted January 7, 2014 Share Posted January 7, 2014 Short answer: No. You'd want to use pages or repeaters. Without repeateing I'll just link to Ryans post http://processwire.com/talk/topic/417-extending-image-field/?p=6982 So the answer is actually just 1 post before the question, which may the reason why Ryan didn't answer it because he just kinda answered it already. Link to comment Share on other sites More sharing options...
Mackski Posted January 8, 2014 Share Posted January 8, 2014 I've managed to modified the original module to include a InputfieldPageListSelect. Probably not good for large amounts of images due to the ajax calls. However for my purposes, a hero slider to link items, it works fine. In template: <a href="<?php echo $pages->get($img->link)->url?>"> FieldtypeImageExtra-PageListSelect.zip 3 Link to comment Share on other sites More sharing options...
Arklogic Posted March 11, 2014 Share Posted March 11, 2014 Hi, I've a multilingual site with a galery. I'm new to PW, I can't find any solution to translate image field description. Could someone help me? I can change input type from Text to TextLanguage field type, here I'm missing ImageLanguage field type. Link to comment Share on other sites More sharing options...
npostulart Posted May 12, 2014 Share Posted May 12, 2014 I tried to use the plugin to extend the image field with 2 new text-input-fields. Everything seems to work fine except the data didn't get saved. Are there any additions to do to use the plugin with 2.4? Link to comment Share on other sites More sharing options...
Mackski Posted May 13, 2014 Share Posted May 13, 2014 Check your schema in FieldTypeImageExtra.module? eg: public function getDatabaseSchema(Field $field) { $schema = parent::getDatabaseSchema($field); unset($schema['description']); $schema['data'] = 'varchar(255) NOT NULL'; $schema['title'] = "varchar(1024) NOT NULL"; $schema['description'] = "text NOT NULL"; $schema['link'] = 'int(11) NOT NULL'; $schema['keys']['title'] = 'FULLTEXT KEY title (title)'; $schema['keys']['description'] = 'FULLTEXT KEY description (description)'; return $schema; } 1 Link to comment Share on other sites More sharing options...
npostulart Posted May 13, 2014 Share Posted May 13, 2014 Oh, it was my fault, didn't know I had to change the schema. Another question for this. I use Markdown Extra and the ACE-Editor for the textareas, is it possible to use this on the description field? It would be nice if you could configure the description field as any other textarea field. Link to comment Share on other sites More sharing options...
justb3a Posted October 15, 2014 Share Posted October 15, 2014 Thank you for the snippets, I used them to build a little Module to handle multi-language Image Descriptions and further image informations. Have a look at the module FieldtypeImageExtra. 1 Link to comment Share on other sites More sharing options...
Tom. Posted May 15, 2016 Share Posted May 15, 2016 The field wasn't really designed for that particular use, so there currently aren't instructions on how to do that, but it's certainly possible (and probably not too difficult). But there isn't any easy answer to this question short of modifying the existing Fieldtype/Inputfield or creating a new one that extends it. I imagine that we'll have this built in eventually. Any news on this? Would love to see it implemented. Link to comment Share on other sites More sharing options...
adrian Posted May 15, 2016 Share Posted May 15, 2016 Any news on this? Would love to see it implemented. To quote Ryan's latest blog post: https://processwire.com/blog/posts/more-images-upgrades/ - note the bit about "custom meta data fields" But we'd definitely like to explore some more things like custom crop features, more custom meta data fields and image editing tools when we get into ProcessWire 3.1. 1 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