Author Topic: Insert module in Sobi2 Component  (Read 18801 times)

0 Members and 1 Guest are viewing this topic.

Offline Greg Hunt

  • Quality & Testing
  • Sobi Hero
  • *
  • Posts: 1069
  • Reviews:

    What is it?

Insert module in Sobi2 Component
« on: 16. July 2009, 21:09:03 »
This is just a quick addition to the code to allow you to insert a module into the Sobi2 Component.  I even put my hacks where they are supposed to go for a change.  :)

This adds a new command to Sobi2 called Sobi2InsertMod($position, $style) it works pretty much everywhere (I tested the Template files and embedded in the code).

Instructions:
Unzip and Copy the attached file to your /components/com_sobi2/includes/inc directory or insert the function if you have any custom functions defined.

Usage is
<?php echo Sobi2InsertMod($position$style?>
Where:
$position is the Position name defined in your modules
$style is the required style # (defaults to -2 if not defined)

Hope you find it useful.
Greg
Country: Canada Canada |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile


Offline kenmcd

Re: Insert module in Sobi2 Component
« Reply #1 on: 16. July 2009, 21:20:07 »
 
Very useful.  Pinned.

Needed this exact thing right now for project I am thinking about.

Thanks!

50 SOBI2 Joomla Web Sites - Free! Publication Available
A showcase of 50 SOBI2 websites with screenshots and descriptions of add-ons used.
Direct download (22MB): 50-SOBI2-Joomla-Web-Sites.2008-11-10.CHM.zip
Country: United States United States |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile Joomla Docs

Do you want continued ongoing development, new features and active support?
Please write a review or just vote for SOBI on JED.

Offline Greg Hunt

  • Quality & Testing
  • Sobi Hero
  • *
  • Posts: 1069
  • Reviews:

    What is it?

Re: Insert module in Sobi2 Component
« Reply #2 on: 16. July 2009, 21:41:29 »
Hope it helps.  I can't take much credit for the code since it's pretty much just extracted from the Load Position Plugin but I thought it would be a nice addition.

Greg
Country: Canada Canada |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile

Offline jiesot

Re: Insert module in Sobi2 Component
« Reply #3 on: 12. August 2009, 09:32:30 »
Hi
I'm new to SOBI. with this solution can I make posible that the user sends an entry to any adress by email? Maybe using something like addthis module?
thanks


Country: Mexico Mexico |  OS: Windows Vista/Server 2008 Windows Vista/Server 2008 |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile

Offline Greg Hunt

  • Quality & Testing
  • Sobi Hero
  • *
  • Posts: 1069
  • Reviews:

    What is it?

Re: Insert module in Sobi2 Component
« Reply #4 on: 12. August 2009, 14:43:16 »
All this addition does is provide a method to insert content into a page.  It doesn't interact with Sobi2 in any way.

Greg
Country: Canada Canada |  OS: Windows Vista/Server 2008 Windows Vista/Server 2008 |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile

Offline victune

Re: Insert module in Sobi2 Component
« Reply #5 on: 02. January 2010, 15:26:49 »
Hi,

It's working very good, but I wonder if it's possible to load dynamic module position.
I believe it's possible because it's PHP, but unfortunately I'm not so good in PHP  :'(.

What I want to do is to load a module position depend on title of the entry.

I tried to do that:

<?php echo Sobi2InsertMod(<?php echo $mySobi->title; ?>) ?>

What is the right way to write it?

Thanks.


Country: Korea, Republic of Korea, Republic of |  OS: Linux (Ubuntu 9.04 Jaunty) Linux (Ubuntu 9.04 Jaunty) |  Browser: Firefox 3.0.16 Firefox 3.0.16 | View Profile דייט קפה היכרויות

Offline Greg Hunt

  • Quality & Testing
  • Sobi Hero
  • *
  • Posts: 1069
  • Reviews:

    What is it?

Re: Insert module in Sobi2 Component
« Reply #6 on: 02. January 2010, 21:17:18 »
if you had a module position with the title of the entry the code would be...

Code: [Select]
<?php Sobi2InsertMod($mySobi->title); ?>
Greg
Country: Canada Canada |  OS: Windows Vista/Server 2008 Windows Vista/Server 2008 |  Browser: Firefox 3.5.6 Firefox 3.5.6 | View Profile

Offline victune

Re: Insert module in Sobi2 Component
« Reply #7 on: 03. January 2010, 04:28:37 »
Thank you!   :)
It's working great.
Country: Korea, Republic of Korea, Republic of |  OS: Linux (Ubuntu 9.04 Jaunty) Linux (Ubuntu 9.04 Jaunty) |  Browser: Firefox 3.0.16 Firefox 3.0.16 | View Profile דייט קפה היכרויות

Offline Greg Hunt

  • Quality & Testing
  • Sobi Hero
  • *
  • Posts: 1069
  • Reviews:

    What is it?

Re: Insert module in Sobi2 Component
« Reply #8 on: 03. January 2010, 05:00:11 »
Glad to hear!  I guess it can interact with Sobi2 to a limited extent.

Greg
Country: Canada Canada |  OS: Windows Vista/Server 2008 Windows Vista/Server 2008 |  Browser: Firefox 3.5.6 Firefox 3.5.6 | View Profile

Offline cchbg

Re: Insert module in Sobi2 Component
« Reply #9 on: 04. January 2010, 10:49:31 »
This seems to be what I´m looking for - hopefully!
One question though: Is it possible to create a module in Joomla and somehow "call for it" to be shown in i.e. position Left on Sobi2-pages only.

Any advice? Thanks a lot!
Country: Sweden Sweden |  OS: Windows Vista/Server 2008 Windows Vista/Server 2008 |  Browser: MS Internet Explorer 7.0 MS Internet Explorer 7.0 | View Profile

Tags: