Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Make mods appear in certain Sobipro categories and sections

Make mods appear in certain Sobipro categories and sections

Hello,

I would like to make certain modules appear only in certain Sobipro sections and a few specific categories.

Is this possible ?

Thanx in advance

sydawn
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: Make mods appear in certain Sobipro categories and sections

Noone able to help ? sad

sydawn
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: Make mods appear in certain Sobipro categories and sections

Hi Sydawn,

yep, can help. I did some investigation a month ago for someone else using SOBIPro, and got some working code out of it.

Try this to test for the different page types:

Code:

if ($option == "com_sobipro") try {

$ob = SPFactory::object( SPRequest::sid() );
$type = $ob->oType;
/* now test for different types. You can test for "entry",
  "section" or "category". */
if ($type == "entry") return 121;

}
catch ( SPException $x ) {}

You can also test for particular id numbers of entries or categories, like this (try this instead of the one above):

Code:

if ($option == "com_sobipro") try {

$ob = SPFactory::object( SPRequest::sid() );
$sid = (int)JRequest::getVar('sid');
$type = $ob->oType;
/* now test for different types. You can test for "entry",
  "section" or "category". */

// test for entry #55, and if found use module 121:
if ($type == "entry" and $sid == 55) return 121;

// test for category #3, and if found use module 122:
if ($tyle == "category" and $sid == 3) return 122;

}
catch ( SPException $x ) {}

Hope that helps - please let me know how you get on.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Re: Make mods appear in certain Sobipro categories and sections

Hello
I'm able to help you as i just did the same thing in my code

also i was able to make a new futuer in sobipro which is you can have free or paid cat under the same section with time package check this gadol.org.il (hebrew)

sameh
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Make mods appear in certain Sobipro categories and sections

What if I want to string many querries together in the same metamod - like:

// test for category #3, and if found use module 122:
if ($tyle == "category" and $sid == 3) return 122;

// test for category #8, and if found use module 115:
if ($tyle == "category" and $sid == 8) return 115;

When I put in  more than one it does not work.

Thanks

burnsai
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Make mods appear in certain Sobipro categories and sections

Never mind.  Got it!

burnsai
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Make mods appear in certain Sobipro categories and sections

Hello again,

It seems that the above isnt working anymore. Is there any update so the above ?

index.php?option=com_sobipro&pid=51&sid=52&Itemid=293

Thats the type of URLs it`s generating, and as before I want it to appear for certain sections / categories only ( so I assume the important part is com_sobipro&pid=51&sid=52)

Any updates please?

MEDIACUBED
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Make mods appear in certain Sobipro categories and sections

Hi Mediacubed,

to get the new version to work I'm going to have to have a copy of it for testing purposes... I'll PM you my e-mail address for you to send it to me.

Just in case this helps though, please ensure you're using my code in the 3rd post in this thread, and not the code posted by burnsai which has some typos in it.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5910
Total Posts Today:
1
User Info:
 
Total Users:
10152
Newest User:
kasautiizindagiikay
Members Online:
0
Guests Online:
316

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked