Jump to content

Extending image field


nikola

Recommended Posts

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

  • 2 months later...

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

  • 2 months later...

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;
	       }
  • Like 1
Link to comment
Share on other sites

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

  • 5 months later...
  • 1 year later...

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

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.
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...