Page 1 of 1

How to add "Module Class Suffix" to a module?

Posted: Mon Dec 17, 2007 9:43 pm
by obsessio
I'm using mod_peliconbar. When I enter the settings, it hasn't got "Module Class Suffix" options. How can I add it?

Re: How to add "Module Class Suffix" to a module?

Posted: Wed Dec 19, 2007 12:54 am
by miga
hi ..
well,  you can`t ...
the problem is, the coder didn`t include any tags that you can apply the style to them ..
in other words, if you want to change the style, you have to do manually, or to edit the code (which will display it the way your style is) ..

:)

Re: How to add "Module Class Suffix" to a module?

Posted: Wed Dec 19, 2007 1:13 am
by obsessio
Thanks for answer.

I know that, I ll make it manually.
I added tags, I also added code for databese.

but something I missed.

Re: How to add "Module Class Suffix" to a module?

Posted: Wed Dec 19, 2007 1:44 am
by miga
hi ..
if you want it to appear in the module setting page, then you have to edit the XML file of the module ..
open the XML file and add this between the params

Code: Select all

<param name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="A suffix to be applied to the css class of the module (table.moduletable), this allows individual module styling" /> 
Is that what you want ?!? ???

Re: How to add "Module Class Suffix" to a module?

Posted: Wed Dec 19, 2007 1:56 am
by obsessio
Yes I did it.

I also added;

I added to component XML;
     
CREATE TABLE `#__peliconbar` (
`moduleclass_sfx` TEXT NOT NULL,
PRIMARY KEY (`id`)
)
but module class suffix doesn^t shown in module options page.

Re: How to add "Module Class Suffix" to a module?

Posted: Wed Dec 19, 2007 2:15 am
by miga
HI

well can you try what i told you ?
in the XML file add the following between params

Code: Select all

<param name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="A suffix to be applied to the css class of the module (table.moduletable), this allows individual module styling" /> 
then in the PHP file add the following :

Code: Select all

$moduleclass_sfx 	= $params->get( 'moduleclass_sfx', 	'' );

now the value is returned from the database and stored in the $moduleclass_sfx ... so you can use it in the script ...

You dont have to add any quieries in the XML.. they won`t run !?!!!!!!

just do exactly what i told you, and it will work the way you want

Re: How to add "Module Class Suffix" to a module?

Posted: Wed Dec 19, 2007 2:23 am
by obsessio
I forgot to say I also did that.

I added

$moduleclass_sfx  = $params->get('moduleclass_sfx'  , '0' );

but I'm trying to yours. without "0"

Re: How to add

Posted: Wed Mar 05, 2008 9:27 am
by giboo
Great,
it worked for me with mod_sectionnav module : simply with xml extra param, the suffix has been added to the moduleclass !
Many thanks.

Re: How to add

Posted: Mon Jun 08, 2009 6:55 am
by kaz101
Thanks that worked for me too!

Re: How to add

Posted: Fri Sep 18, 2009 1:46 am
by vauxall
Yeh works perfectly, thanks

Re: How to add suffix to moduletable if module does not supp

Posted: Tue Aug 03, 2010 6:40 pm
by aveeshkumar
Thanks the tip works - just change the XML file (towards the bottom) and the PHP code (at or near the top)

Joomla 1.5.20 - thanks

Re: How to add

Posted: Tue Apr 05, 2011 8:57 am
by Sintra
Exactly what I was looking for. Perfect! Thanks!