Loading...
 
Features / Usability

Features / Usability


adding collapsable function to existing modules

posts: 24

I like the way the main menu module collapses when you click the title. What can I do to add this kind of functionality to other existing modules???
I am using version 1.8.5
thank you for your help!

OC

posts: 4594 Japan

If I recall correctly, you'll have to upgrade to Tiki 1.9.0 to get that feature for all modules. Somebody could probably let us know for sure, but in the meantime to check if it's in your Tiki, look at your Admin/Features page (/tiki-admin.php?page=features), down near the bottom in the User Features section. If there's an item "Users can Shade Modules," you can activate it. If it's not there, you'll have to upgrade first.

-- Gary

posts: 953

Hi Gary, thanks for the info.
I've tried, but it seems to work only on some styles. For me (Tiki 1.9.0), it worked on tikineat, but not on moreneat, simple, damian, redmetal.
There must be something added to the tpl's, I guess...
Cheers,
I tried with "module decides", and "always" set to the option.

posts: 4594 Japan

> Hi Gary, thanks for the info.
> I've tried, but it seems to work only on some styles. For me (Tiki 1.9.0), it worked on tikineat, but not on moreneat, simple, damian, redmetal.
> There must be something added to the tpl's, I guess...

Yeah, I had a quick look at the templates; damian and simple have their own module.tpl files, which do contain code for collapsing the modules, but the code is not the same as what's in the default module.tpl. If you want to experiment, you could temporarily delete or rename the module.tpl file in a theme where module-flipping isn't working (if that theme has its own module.tpl file) to force it to use the default file, and see if the collapsing starts working. Of course other aspects of the theme's modules could change too, maybe not in a good way, but at least you'd know where the collapse hang-up lies. (Moreneat doesn't have it's own module.tpl file, so I don't know what could be happening there, and I don't have Redmetal around to check right now.)

-- Gary

posts: 953

Thanks, Gary
Moreneat is working (confirmed - it had to be some issue with cache in my installation, etc., )
Good to know this trick to avoid template-specific tpl, etc.
Cheers, Xavi

posts: 24

I just upgraded to 1.9 and I LOVE this feature! I would like to flip the module by clicking on its name rather than the small icon as the icon interferes with the graphic style of the site, any idea on how to hack this?!

Thank you again!

OC

> > Hi Gary, thanks for the info.
> > I've tried, but it seems to work only on some styles. For me (Tiki 1.9.0), it worked on tikineat, but not on moreneat, simple, damian, redmetal.
> > There must be something added to the tpl's, I guess...
>
> Yeah, I had a quick look at the templates; damian and simple have their own module.tpl files, which do contain code for collapsing the modules, but the code is not the same as what's in the default module.tpl. If you want to experiment, you could temporarily delete or rename the module.tpl file in a theme where module-flipping isn't working (if that theme has its own module.tpl file) to force it to use the default file, and see if the collapsing starts working. Of course other aspects of the theme's modules could change too, maybe not in a good way, but at least you'd know where the collapse hang-up lies. (Moreneat doesn't have it's own module.tpl file, so I don't know what could be happening there, and I don't have Redmetal around to check right now.)
>
> — Gary

posts: 24

I just ansered my own question:
If you want similar behavior to old user menu flip (single click on name area) look at module.tpl and
where on line 32

Image

make

Image


and if you want to get rid of the icons:
find starting on line 35

Image
text

and delete that section.


> I just upgraded to 1.9 and I LOVE this feature! I would like to flip the module by clicking on its name rather than the small icon as the icon interferes with the graphic style of the site, any idea on how to hack this?!
>
> Thank you again!
>
> OC
>
> > > Hi Gary, thanks for the info.
> > > I've tried, but it seems to work only on some styles. For me (Tiki 1.9.0), it worked on tikineat, but not on moreneat, simple, damian, redmetal.
> > > There must be something added to the tpl's, I guess...
> >
> > Yeah, I had a quick look at the templates; damian and simple have their own module.tpl files, which do contain code for collapsing the modules, but the code is not the same as what's in the default module.tpl. If you want to experiment, you could temporarily delete or rename the module.tpl file in a theme where module-flipping isn't working (if that theme has its own module.tpl file) to force it to use the default file, and see if the collapsing starts working. Of course other aspects of the theme's modules could change too, maybe not in a good way, but at least you'd know where the collapse hang-up lies. (Moreneat doesn't have it's own module.tpl file, so I don't know what could be happening there, and I don't have Redmetal around to check right now.)
> >
> > — Gary

posts: 24

That last post the code did not render...
once again... though it doesnt look like this will render properly in theis forum:P
I just ansered my own question:
If you want similar behavior to old user menu flip (single click on name area) look at module.tpl and
where on line 32

 

make

 


and if you want to get rid of the icons:
find starting on line 35

    
      

and delete that section.


posts: 24

> I like the way the main menu module collapses when you click the title. What can I do to add this kind of functionality to other existing modules???
> I am using version 1.8.5
> thank you for your help!
>
> OC
>