• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: How to use author-selected images in a template?
PostPosted: Thu Aug 24, 2006 10:58 am 
Hi

Firstly, please accept my apologies if the answer to this question is well-known or seems obvious.  I'm new to CMSMS and I'm a bit stuck...

I'm aware that templates can include multiple content blocks, each with its own name, by using the {content} tag.  When an author creates or edits a page based on that template, they see separate editor areas ('slots'), one for each content block.  But, these content blocks are all for textual, HTML-like content.

* How can I specify a content block that's just for an image?

I want the author to be presented with a 'slot' which, instead of being an htmlarea or wysiwyg editor, is an image chooser.  Then, they can type in the name of their selected image for that 'slot' in the template, or even (as a luxury) browse the CMS's uploaded images to select one.

For templating reasons, this 'slot' needs to specify *just a path to an image* (e.g. for use in the 'src' attribute of an 'img' element) - not a piece of text or HTML.  Is there a tag for this purpose?  The {image} tag seems to be only for fixed images chosen at template-design time - or have I misunderstood it?

Similarly, is there I tag I can use for other non-textual assets that need to be specified by on a page-by-page basis by page authors, but handled specially by the template?  I'm thinking of multimedia files like SWFs, PDFs, MP3s or whatever?

Many thanks in advance for your help,

Richard :)


Top
  
 
 Post subject: Re: How to use author-selected images in a template?
PostPosted: Thu Aug 24, 2006 5:19 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 10237
Location: Arizona
I tried this using this in the template of course they will have to know the name of the image including the type eg,. .jpg or .gif unless you put it at the end then they will only be able to put that kind of image in it...

1.)*for images only' oneline='true'}">

for resticting it to a certain type and just the name of the image like 'header' which like I said will have to have a .jpg on the end of it...

2.)*for images only' oneline='true'}.jpg">

This *for images only shows up as *for Images Only: with a small box here.

In the box they need to put...
in line
1.) book.gif/.jpg
in line
2.) book 

This may be able to handle additional types of input such as mp3s * not tested *, I've tested the image part, it works.

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get the parameters it takes
Right click and view source is a great way to see what you have to work with
Check ver. CMSMS, PHP, server OS, in System Information page
Default content, read it here, http://multiintech.com/defaultcontent/
People are Wonderful Business is Great Life is Terrific
Image


Top
 Profile  
 
 Post subject: Re: How to use author-selected images in a template?
PostPosted: Fri Aug 25, 2006 1:30 pm 
Thanks Mark, that's a really good suggestion.  It should suffice as a workaround until "proper" image-type content blocks are available.

Cheers!  :)


Top
  
 
 Post subject: Re: How to use author-selected images in a template?
PostPosted: Sat Oct 21, 2006 7:10 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Fri Jul 28, 2006 9:25 am
Posts: 267
Hi there,

I had no idea how to do this either, so I just created a new {content} block called {content block="Image for top of page" }, so the website owner could add a different image at the top of each new page.

This works fine, except that the physical size of the block for {content block="Image for top of page" } is huge.

Question 1 : is there any way to alter the SIZE of the block which appears?

I set up a third block to show the new NAME of the page as well, and also ended up with a huge block on the edit screen {content block="Page name to right of image" }.

Question 2 : is there a better way to do this, or is what I've done ok?

My only concern is that the website owner will be presented with 3 huge text blocks - and yes, I am giving them a written manual with lots of snapshots to make it easy, I just thought aesthetically it would be nice to make the 'input' screen a bit 'tidier'.

Cheers
WebGirl

_________________
Download CMSMS Themes http://themes.cmsmadesimple.org/Full_Themes.html |  Simple! Tables to CSS: http://themes.cmsmadesimple.org/tables.html | How to use a template : http://themes.cmsmadesimple.org/using_t ... lates.html | Smarty tags : http://www.smarty.net/manual/en/ | http://www.phpfreaks.com/smartymanual.php | http://www.phpfreaks.com/manuals/mysql/mysqlmanual.php


Top
 Profile  
 
 Post subject: Re: How to use author-selected images in a template?
PostPosted: Mon Oct 23, 2006 10:44 pm 
Offline
Forum Members
Forum Members

Joined: Tue Sep 12, 2006 4:23 am
Posts: 40
About the additional content areas, I read elsewhere on the forum where you can do this

{content block="thirdblocktitle" oneline="true" wysiwyg="false"}



'oneline' means don't show a whole Content Block on the screen, just one line to fill in.

wysiwyg 'false' means no need to show the FCKeditor - you can do all your styling in the stylesheet and template.


Top
 Profile  
 
 Post subject: Re: How to use author-selected images in a template? GREAT SOLUTION!
PostPosted: Mon Oct 23, 2006 11:26 pm 
Offline
Forum Members
Forum Members

Joined: Tue Sep 12, 2006 4:23 am
Posts: 40
Mark - I just used your suggestion in a piece of javascript, and it worked!  fantastic, mate!

Quote:
2.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: dinmix


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner