Input for content_image tag

Talk about new features for CMSMS and modules.
Post Reply
User avatar
thomahawk
Power Poster
Power Poster
Posts: 293
Joined: Fri Jul 25, 2008 10:13 am
Location: Zug, Switzerland

Input for content_image tag

Post by thomahawk »

I found the idea of the content_image tag to be very good. It places a dropdown menu right on the first page of page edit and it allows to use a specific image folder. Unlike page_image which has to be looked up under page edit "options" and which only shows images from the upload/images folder.

Unfortunately on most of my projects I can not use content_image, simply because the tag also generates the whole img src html tag around the images url. I mostly use such top page image embedded in a css tag, so content_image is useless in that occasion.

Of course content_image has an option "urlonly" and I expected it to make it deliver the url only, but I could not try it, because as soon as I include urlonly in {content_image dir='x' block='x' urlonly} I only get an error page. Also the description of the tag option suggests it only gets the tag rid of things like "width", "id" etc...

So what I suggest is, to add an option that really makes it produce a pure url, like page_image does. Or make urlonly do that. And if it really does not, like I experienced, make urlonly work.

Greetings
Thomas
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: Input for content_image tag

Post by paulbaker »

thomahawk wrote:but I could not try it, because as soon as I include urlonly in {content_image dir='x' block='x' urlonly} I only get an error page.
Try

Code: Select all

{content_image dir='x' block='x' urlonly='1'}
which works for me (in 1.11.3)
User avatar
thomahawk
Power Poster
Power Poster
Posts: 293
Joined: Fri Jul 25, 2008 10:13 am
Location: Zug, Switzerland

Re: Input for content_image tag

Post by thomahawk »

Paul, thank you. You are right, this solves both problems.

So I suggest it is just the help page for this tag, which needs some improvement. urlonly='1' is not mentioned there, it just says "urlonly". Also the description could be more clear by include "url, without "img src" tag and options like "width", "title" etc.".

Thank you again,
Thomas
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Input for content_image tag

Post by Rolf »

I will look into this

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Input for content_image tag

Post by Rolf »

Fixed in SVN
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: Input for content_image tag

Post by rotezecke »

I'd like to see a "browse" option instead of the dropdown to a single directory. my images directory is broken up into many subdirectories. I realise that {content block='image'} would offer microTiny to achieve this, but the simplicity gets lost with this approach.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Input for content_image tag

Post by velden »

install GBFilePicker module and put this (example) in your page template:

Code: Select all

{content_module block="filepicker_block_1" module="GBFilePicker" assign="fpimage" label="Grote foto bovenaan" mode="browser" media_type="image" dir="images"}
Note: GBFilePicker has some options that could/should be set in Extensions menu.

EDIT: the assign parameter in this example assigns the output to smarty variable $fpimage. That can be used in other modules or just in template: {$fpimage}.
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: Input for content_image tag

Post by rotezecke »

Thanks a lot. Will try that module (never heard of till now). and thanks to google translate i also now understand "Grote foto bovenaan".
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Input for content_image tag

Post by velden »

rotezecke wrote:Thanks a lot. Will try that module (never heard of till now). and thanks to google translate i also now understand "Grote foto bovenaan".
You'll probably gonna love this module. You can also use it in ListIt2. Editors like it a lot because they actually see a thumb of the image in stead of a file name.
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: Input for content_image tag

Post by rotezecke »

nearly perfect.
the JS popup does not show current directory (to browse) on Firefox 23 but works on older FF and Chrome (didnt try others yet). i suppose this is a FF issue.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Input for content_image tag

Post by velden »

Here it works fine on Firefox 23 (Windows)

GBFilePicker 1.3.3
CMSMS 1.11.7
gbfilepicker_ff23.jpg
Post Reply

Return to “Feature ideas”