Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    General discussion    Topic: Jcomments with a wrapper?
Pages: [1]   Go Down
  Print  
Author Topic: Jcomments with a wrapper?  (Read 2187 times)
0 Members and 1 Guest are viewing this topic.
candrid
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« on: July 30, 2010, 03:07:58 »

Hi all.

I have a wrapper that I use to call a flash document thats driven by XML.  This document that is called by a wrapper in my site because articles do not support XML calling flash documents, is also hosted in my domain. So what I would like to do is be able to embed the Jcomment submit "part" at the bottom of this HTML document that is able to call the XML driven, flash object...

Phew..  does that make sense?

Is there another solution?
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: July 30, 2010, 12:26:17 »

In my mind you could override default wrapper's view via Joomla template and insert code that will call JComments from overrided view.

1. Copy file /components/com_wrapper/views/wrapper/tmpl/default.php to /templates/your joomla's template/html/com_wrapper/wrapper/default.php

2. Edit copied default.php and insert before line:
Code: (php)
</div>
next code:
Code: (php)
<?php
$commentsPath 
JPATH_SITE.DS.'components'.DS.'com_jcomments'.DS.'jcomments.php';
if (
is_file($commentsPath))  {
require_once($commentsPath);
$menus = &JSite::getMenu();
$menu $menus->getActive();
echo JComments::showComments($menu->id'com_wrapper'$menu->name);
}
?>

You'll also needed to have JComments plugin to build correct links to comments posted in the wrapper.  But at this moment I've no idea how it could be implemented (I'm not familiar with wrapper because I've never used it and don't know how its links looks like).
Logged

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

Karma: 0
Offline Offline

Posts: 3


« Reply #2 on: July 30, 2010, 23:07:34 »

Hmm.

I just wish there were a way to put this outstanding application on the static html page.

Thanks.
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #3 on: July 31, 2010, 13:41:58 »

The JComments is Joomla extension and couldn't work on static pages but I've described a way to integrate com_wrapper with JComments so your site visitors will be available to comment static page shown inside wrapper.
Logged

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

Karma: -3
Offline Offline

Posts: 13


« Reply #4 on: September 26, 2010, 17:00:45 »

The JComments is Joomla extension and couldn't work on static pages but I've described a way to integrate com_wrapper with JComments so your site visitors will be available to comment static page shown inside wrapper.

I have put my static html/php page in a wrapper as you described above (works great)  but when I post a comment in the backend it hasn't got a Content Item Title so the comment is posted in every wrapper. Can I fill in a variable in the wrapper code to send a Content Item Title?

something like;

Code:
<?php
$commentsPath 
JPATH_SITE.DS.'components'.DS.'com_jcomments'.DS.'jcomments.php';
if (
is_file($commentsPath))  { require_once($commentsPath);
$menus = &JSite::getMenu();
$menu $menus->getActive();
echo 
JComments::showComments($menu->id'com_wrapper'$menu->name);}

$variableforContentItemTitle=$variable


?>

Logged
BBC
Full Member
***

Karma: 4
Offline Offline

Posts: 197



« Reply #5 on: September 26, 2010, 17:18:26 »

Can you write url of website ?
Just to see how it looks regarding design. Maybe there is another aproach.
Logged
markie
Newbie
*

Karma: -3
Offline Offline

Posts: 13


« Reply #6 on: September 26, 2010, 21:12:03 »

Can you write url of website ?
Just to see how it looks regarding design. Maybe there is another aproach.

Sorry it's a testserver on my laptop so it's not online  Embarrassed
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #7 on: September 27, 2010, 15:01:15 »

but when I post a comment in the backend it hasn't got a Content Item Title
You need to create special plugin for JComments (see examples in /components/com_jcomments/plugins and documentation here: http://www.joomlatune.com/jcomments-developers-manual.html#jcomments_plugin).
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    General discussion    Topic: Jcomments with a wrapper?
 
Jump to: