Products |  | Demo |  | Forum |  | Login |  | Register |

Welcome, Guest. Please login or register. Did you miss your activation email? Login with username, password and session length | October 25, 2010, 14:54:26 Advanced search »»

JoomlaTune Support Forum JComments component Integration with third-party extensions Topic: Quick fix for JComments and Seyret integration

Pages: [1] Go Down |

| Print |

| Author | Topic: Quick fix for JComments and Seyret integration (Read 846 times)
0 Members and 1 Guest are viewing this topic.

smart Administrator Hero Member Karma: 93 Offline
Gender:
Posts: 2094

| Quick fix for JComments and Seyret integration « on: April 16, 2010, 01:52:43 » |

With some reasons in Seyret where are two calls of method getseyretcomments and it cause 2 calls of JComments::showComments. But JComments doesn't allow more than one call per page and second call returns nothing. I've made simple modification to fixing this problem.
Open file /components/com_seyret/includes/seyret_gadgets.php and replace code:
Code: (php)

            $comments = JComments::showComments( $id, 'com_seyret', '' );

with:
Code: (php)

            static $jcommentsCache = array();
            if (!isset($jcommentsCache[$id])) {
            	$jcommentsCache[$id] = JComments::showComments( $id, 'com_seyret', '' );
            }
            $comments = $jcommentsCache[$id];

« Last Edit: April 16, 2010, 01:57:01 by smart » | Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory

Pages: [1] Go Up |

| Print |

JoomlaTune Support Forum JComments component Integration with third-party extensions Topic: Quick fix for JComments and Seyret integration

« previous next »

Jump to:
Loading...