Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Mosets Reviews Plugin

  • Dehaw
  • Dehaw
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 1
18 years 10 months ago #5376 by Dehaw
Mosets Reviews Plugin was created by Dehaw
I found a bug with the sql statement within the reviews plugin today, it currently reads:

[code:1]$database->setQuery( "SELECT r.*, l.* FROM #__mt_reviews AS r, #__mt_links AS l "
. "WHERE r.link_id = l.link_id AND l.link_published='1' AND l.link_approved='1' AND r.rev_approved='1' AND r.user_id='".$user->id."'"
. "ORDER BY r.rev_date DESC"«»);[/code:1]

It should read:

[code:1]$database->setQuery( "SELECT r.*, l.* FROM #__mt_reviews AS r, #__mt_links AS l "
. "WHERE r.link_id = l.link_id AND l.link_published='1' AND l.link_approved='1' AND r.rev_approved='1' AND l.user_id='".$user->id."'"
. "ORDER BY r.rev_date DESC"«»);[/code:1]

I changed:

[code:1]r.user_id='".$user->id."[/code:1]

With:

[code:1]l.user_id='".$user->id."[/code:1]

and now it shows the correct reviews that relates to that users links.

I hope this helps someone.

Please Log in or Create an account to join the conversation.

  • gotMoxie
  • gotMoxie
  • OFFLINE
  • Posts: 12
  • Thanks: 0
  • Karma: 5
18 years 10 months ago #5414 by gotMoxie
Replied by gotMoxie on topic Re:Mosets Reviews Plugin
By changing that 'r.user_id' to 'l.user_id' you are now pulling the Links that the profiled user Owns with hrefs to the reviews of their Link.

The plug-in was written to pull the Reviews that the profiled user has written (about other people's Links).

Does that make sense?

I'm not sure I see the use in the revision that you made as the My Links plug-in already pulls the profiled user's Links.

I guess with the change you made the plug-in could be called "Reviews of My Links".

If that is what you are after, I'm glad it works for you. But the original code works the way I had envisioned the plug-in.

Sam Lewis
Moxie Media, LLC

Sam Lewis
Moxie Media, LLC

CB3PD

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum