Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Make mods appear in certain Sobipro...
Make mods appear in certain Sobipro categories and sections
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
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)
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
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?
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
- Index
- » MetaMod
- » MetaMod General Support
- » Make mods appear in certain Sobipro...
Board Info
- Board Stats:
- Total Topics:
- 1699
- Total Polls:
- 6
- Total Posts:
- 5965
- Posts this week:
- 4
- User Info:
- Total Users:
- 8011
- Newest User:
- ignac84502
- Members Online:
- 0
- Guests Online:
- 298
- 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