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.

 

incompatibility of recipes from Joomla Joomla 1.5 to 1.7

incompatibility of recipes from Joomla Joomla 1.5 to 1.7

Good afternoon.  recipes that worked for joomla 1.5 jomsocial 2.2.4 now will not work with joomla 1.7 jomsocial 2.2.4 / what could be the problem?

sample  recipes (this code puts the module, depending on category)

events

$ categoryid = "";
if (($ option == "com_community") and ($ view == "events")) {
$ categoryid = JRequest:: getInt ("categoryid", 0);
$ eventid = JRequest:: getInt ("eventid", 0);
   if ($ eventid> 0) {
     $ query = "select catid from #__community_events where id =". $ eventid;
     $ db-> setQuery ($ query);
     $ categoryid = $ db-> loadResult ();
   }}
if ($ categoryid == 1) return 104;

groups

$ categoryid = "";
if (($ option == "com_community") and (($ view == "groups") | | ($ view == "videos") | | ($ view == "photos"))) {
   $ categoryid = JRequest:: getInt ('categoryid', 0);
   if ($ categoryid == 0
        and ($ groupid = JRequest:: getInt ("groupid", 0)) i = 0
     ) {
     $ query = "select categoryid from #__community_groups where id =". $ groupid;
     $ db-> setQuery ($ query);
     $ categoryid = $ db-> loadResult ();
   }
}
if ($ categoryid == 3) return 104;

videos

$ catid = "";
if (($ option == "com_community") and ($ view == "videos")) {
   $ catid = JRequest:: getInt ("catid", 0);
   $ videoid = JRequest:: getInt ("videoid", 0);
   if ($ catid == 0 and $ videoid! = 0) {
     $ query = "select category_id from #__community_videos where id =". $ videoid;
     $ db-> setQuery ($ query);
     $ catid = $ db-> loadResult ();
   }
}
if ($ catid == 2) return 62; / /



advise where and what to fix. can cause a syntax?

Aslan
Beginner Modder
ranks
useravatar
Offline
14 Posts
User info in posts
Administrator has disabled public posting

Re: incompatibility of recipes from Joomla Joomla 1.5 to 1.7

Hi,

I guess JomSocial has gone through some big internal changes in the latest version... I'll need to install the new version and take a look at it. Sorry, this will take a few days.

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
3329 Posts
User info in posts
Administrator has disabled public posting

Re: incompatibility of recipes from Joomla Joomla 1.5 to 1.7

the solution is simple. for joomla 1.7 you need to change the prefix table instead of jos))

    $Query = "select category_id from #__community_videos where id =". $Videoid;

Aslan
Beginner Modder
ranks
useravatar
Offline
14 Posts
User info in posts
Administrator has disabled public posting

Re: incompatibility of recipes from Joomla Joomla 1.5 to 1.7

Yes, that's true.

In fact, the right way to do this is to call the tables this way:

#_ _community_videos  EXCEPT REMOVE THE SPACE. Then Joomla automatically puts in the correct database prefix.

The @£$%^&* problem in this forum is that if you put #_ _ without the space into a post, then it converts it to jos_ when saving the post. This is SUCH a pain.

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
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1689
Total Polls:
6
Total Posts:
5941
Posts this week:
1
User Info:
 
Total Users:
5348
Newest User:
towner4218
Members Online:
0
Guests Online:
144

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