Elxis CMS Forum

Extensions => Modules => Topic started by: gsot on September 28, 2009, 15:05:08

Title: Html slider
Post by: gsot on September 28, 2009, 15:05:08
I have built a module slider with content in html code.

What is the type of param in the xml installation file for html text? If i use simpe text type, the field stays blank.  ???

Code: [Select]
<params>
<param name="moduleclass_sfx" type="text" dir="ltr" default="" label="AX_SM_MCSL" description="AX_SM_MCSD" />
<param name="width" type="text" default="" label="Width" description="Type the width of the slider in px" />
<param name="height" type="text" default="" label="Height" description="Type the height of the slider in px" />
<param name="text1" type="TEXT(!!)" default="" label="text1" description="Type desirable content in html" />
</params>
Title: Re: Html slider
Post by: ks-net on September 28, 2009, 15:29:11
i think that you should use textarea

a textarea you want... aren't  you?
Title: Re: Html slider
Post by: gsot on September 29, 2009, 10:36:45
I think textarea does quite the same as text. What I need is to define a parameter which will take html code as input and store it. Working with text param I can have pure text stored, but when I enter html tags, the param value becomes null.

I have here an example of two slides. The first one diplays a video and the second one an image. I just want to define those contents through elxis by entering the html code.

Code: [Select]
<div id="slider">
<ul>

<li>
<object width="425px" height="360px" >
<param name="allowFullScreen" value="true"/>
<param name="wmode" value="transparent"/>
<param name="movie" value="http://mediaservices.myspace.com/services/media/embed.asp/m=5385825,t=1,mt=video,searchID=,primarycolor=,secondarycolor="/>
<embed src="http://mediaservices.myspace.com/services/media/embed.aspx/m=5385825,t=1,mt=video,searchID=,primarycolor=,secondarycolor=" width="425" height="360" allowFullScreen="true" type="application/x-shockwave-flash" wmode="transparent"/>
                   </object>
</li>
<li>
<a href="http://templatica.com/preview/30"><img src="01.jpg" alt="Css Template Preview" /></a>
</li>
</ul>
</div>

Code: [Select]
<div id="slider">
<ul>
<li>
<?php echo $text1?>
</li>
            <li>
<?php echo $text2?>
</li>
           
</ul>
</div>
Title: Re: Html slider
Post by: ks-net on September 29, 2009, 13:09:07
why to put the all object in a textarea?

why not to break it up ...

why not adding a  param for movie url
one for width
one for height
on for wmode... etc ?

the object must be inside your module.php file and wait for the params that the user will fill in module config page..

do you expect the user to fill up your text area with html code?

Title: Re: Html slider
Post by: gsot on September 29, 2009, 14:34:14
Thanks for the immidiate answers!

I got the meaning of your point here, but it was my fault as the example I gave was misleading. In case I want to slideshow some formatted text with images, that would work only with one standard format (standard position of the image and links, unformatted text etc.) I am trying to make it more dynamic and this is what I am figuring out now.

If I have no alternative, I will end up with building a standard format and let the user just change images or videos.