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

For Joomla! 1.0 Coding related discussions.
obsessio
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Wed Oct 04, 2006 4:02 am

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

Postby obsessio » Mon Dec 17, 2007 9:43 pm

I'm using mod_peliconbar. When I enter the settings, it hasn't got "Module Class Suffix" options. How can I add it?

miga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Dec 25, 2006 3:08 pm

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

Postby miga » Wed Dec 19, 2007 12:54 am

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) ..

:)

obsessio
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Wed Oct 04, 2006 4:02 am

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

Postby obsessio » Wed Dec 19, 2007 1:13 am

Thanks for answer.

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

but something I missed.

miga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Dec 25, 2006 3:08 pm

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

Postby miga » Wed Dec 19, 2007 1:44 am

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 ?!? ???

obsessio
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Wed Oct 04, 2006 4:02 am

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

Postby obsessio » Wed Dec 19, 2007 1:56 am

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.
Last edited by obsessio on Wed Dec 19, 2007 2:01 am, edited 1 time in total.

miga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Dec 25, 2006 3:08 pm

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

Postby miga » Wed Dec 19, 2007 2:15 am

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

obsessio
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Wed Oct 04, 2006 4:02 am

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

Postby obsessio » Wed Dec 19, 2007 2:23 am

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"

giboo
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Nov 08, 2007 10:38 am

Re: How to add

Postby giboo » Wed Mar 05, 2008 9:27 am

Great,
it worked for me with mod_sectionnav module : simply with xml extra param, the suffix has been added to the moduleclass !
Many thanks.

User avatar
kaz101
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Fri Mar 28, 2008 6:20 am
Location: South Australia
Contact:

Re: How to add

Postby kaz101 » Mon Jun 08, 2009 6:55 am

Thanks that worked for me too!
"There is never a lack of money - only a lack of ideas" ~ Robert H Schuller.

vauxall
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Aug 13, 2009 8:17 am

Re: How to add

Postby vauxall » Fri Sep 18, 2009 1:46 am

Yeh works perfectly, thanks

aveeshkumar
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Jul 26, 2010 8:37 am

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

Postby aveeshkumar » Tue Aug 03, 2010 6:40 pm

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

Sintra
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Wed Jul 30, 2008 10:49 am

Re: How to add

Postby Sintra » Tue Apr 05, 2011 8:57 am

Exactly what I was looking for. Perfect! Thanks!


Return to “Joomla! 1.0 Coding”

Who is online

Users browsing this forum: No registered users and 2 guests