Jump to content
Sign in to follow this  
Marghoob Suleman

module installation - hook

Recommended Posts

Hi All,

How are you doing? I've a question related to hook.

Is there any option to install module in one hook only. More details: Like when we install advertise module "Adverts and Callouts v1.0" it shows in left and right column. but I want to install that in left column only.

PS: I know I can remove right column block from modules>position.

Thanks and Regards,
Marghoob Suleman

Share this post


Link to post
Share on other sites

The right thing is to remove right column block from modules>position ...
Or remove the hook code from related php file. ;-)
No other way, I suppose

Share this post


Link to post
Share on other sites

@Marghoob Suleman
Look into, for example, /modules/blockuserinfo/blockuserinfo.php and find "leftColumn" and "LeftColumn" pharses.
So it's look like this module can be only in left column (hook). Even if you move this module in modules>position to another hook - module disapear but not show into other hook then leftColumn.
But remeber someone can avoid this by including in his tpl file:

{include file=$modules_dir./blockmodulename/blockmodulename.tpl}


in this case we can put anywhere your module even if you protect module to use only with some hook.

Share this post


Link to post
Share on other sites
@Marghoob Suleman
Look into, for example, /modules/blockuserinfo/blockuserinfo.php and find "leftColumn" and "LeftColumn" pharses.
So it's look like this module can be only in left column (hook). Even if you move this module in modules>position to another hook - module disapear but not show into other hook then leftColumn.
But remeber someone can avoid this by including in his tpl file:
{include file=$modules_dir./blockmodulename/blockmodulename.tpl}


in this case we can put anywhere your module even if you protect module to use only with some hook.



Well, that could be usedful but thatz not a good idea. I am looking for solution where i can choose where to install.

thanks to both of you.

Share this post


Link to post
Share on other sites

{include file=$modules_dir./blockmodulename/blockmodulename.tpl}


in this case we can put anywhere your module even if you protect module to use only with some hook.



That will be so nice if it work with all modules but it doesn't
(it won't work with modules that have a special functions)

Now if what you want is to have all the modules to hook to the left and right you have to create the hook inside the php file of the module in order to switch them around.

Also if when install a module you want it in the column that you want you have to change the install hook at the php inside the module.

Share this post


Link to post
Share on other sites
That will be so nice if it work with all modules but it doesn't
(it won't work with modules that have a special functions)

Any examples?

Share this post


Link to post
Share on other sites
New Products Module, Specials module

New Products Module - works with my code, I just made test. Specials module - I'll try later, now I have to go but I think it will work too.

Share this post


Link to post
Share on other sites

well yes it works but the hook have to be for it or you only going to get a blank block you have to go to your BO and change the hook is not like just copy the code and there it is!! if the module do not have the hook for it it wont show. like I say Only the ones with special functions have that problem

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More