- Postagens: 58
- Obrigados Recebidos: 0
integrar jcomments no sobipro
- renanap
-
Autor do Tópico
- Offline
- JCB! Junior
-
utilizei a seguinte estrategia:
1. Open file /components/com_sobipro/usr/templates/default/entry/details.xsl Abra o arquivo / components / com_sobipro / usr / templates / default / entry / details.xsl
2. 2. Find code (at the begin of file):: Encontre o código (no começo do arquivo) ::
Code: (xml) Código: (xml)
<div style="clear:both;"></div> <div style="clear:both;"> </ div> and add: e adicione:
Code: (xml) Código: (xml)
<xsl:variable name="EntryId"> name="EntryId"> <xsl:variable <xsl:value-of select="entry/@id" /> <xsl:value-of select="entry/@id" /> </xsl:variable> </ Xsl: variable> <xsl:variable name="EntryName"> name="EntryName"> <xsl:variable <xsl:value-of select="entry/name" /> <xsl:value-of select="entry/name" /> </xsl:variable> </ Xsl: variable> <xsl:value-of select="php:function( 'TplFunctions::JComments' , $EntryId, $EntryName )" disable-output-escaping="yes" /> <xsl:value-of'TplFunctions::JComments' select="php:function(, $EntryId, $EntryName )" disable-output-escaping="yes" />
3. 3. Open file /components/com_sobipro/usr/templates/default/template.php Abra o arquivo / components / com_sobipro / usr / templates / default / template.php
4. 4. Find code: Encontre o código:
Code: (php) Código: (php)
public static function Cfg( $key, $def = null, $section = 'general' ) Cfg public static function ($ key, $ def = null, $ = seção "geral") { { return Sobi::Cfg( $key, $def, $section ); voltar Sobi :: Cfg ($ key, $ def, $ secção); } } and add after: e adicione depois:
Code: (php) Código: (php)
public static function JComments( $id, $title ) public static JComments função ($ id, $ titulo) { { $result = ''; $ Result =''; $comments = JPATH_SITE.'/components/com_jcomments/jcomments.php'; $ Comentários JPATH_SITE = '/ componentes / com_jcomments / jcomments.php ".; if (is_file($comments)) { if (is_file ($ comentários)) { require_once($comments); require_once ($ comentários); $result = JComments::show($id, 'com_sobipro', $title); $ Resultado = JComments :: Show ($ id, "com_sobipro ', $ titulo); } } return $result; return $ resultado; } }
po
Please Entrar ou Registrar to join the conversation.
- renanap
-
Autor do Tópico
- Offline
- JCB! Junior
-
- Postagens: 58
- Obrigados Recebidos: 0
para entenderem melhor as instruções de alteração do arquivo entre neste link: http://www.joomlatune.com/forum/index.php?topic=1788.0
aguardo uma resposta
Please Entrar ou Registrar to join the conversation.
- renanap
-
Autor do Tópico
- Offline
- JCB! Junior
-
- Postagens: 58
- Obrigados Recebidos: 0
- Uriel
-
- Offline
- JCB! Legend
-
abraço
Please Entrar ou Registrar to join the conversation.
- RW
-
- Offline
- JCB! Estagiário
-
Olá amigo, tenho a solução!renanap escreveu: olá boa tarde estou tentando integrar o comp jcomments em sobipro
utilizei a seguinte estrategia:
1. Open file /components/com_sobipro/usr/templates/default/entry/details.xsl Abra o arquivo / components / com_sobipro / usr / templates / default / entry / details.xsl
2. 2. Find code (at the begin of file):: Encontre o código (no começo do arquivo) ::
Code: (xml) Código: (xml)
<div style="clear:both;"></div> <div style="clear:both;"> </ div> and add: e adicione:
Code: (xml) Código: (xml)
<xsl:variable name="EntryId"> name="EntryId"> <xsl:variable <xsl:value-of select="entry/@id" /> <xsl:value-of select="entry/@id" /> </xsl:variable> </ Xsl: variable> <xsl:variable name="EntryName"> name="EntryName"> <xsl:variable <xsl:value-of select="entry/name" /> <xsl:value-of select="entry/name" /> </xsl:variable> </ Xsl: variable> <xsl:value-of select="php:function( 'TplFunctions::JComments' , $EntryId, $EntryName )" disable-output-escaping="yes" /> <xsl:value-of'TplFunctions::JComments' select="php:function(, $EntryId, $EntryName )" disable-output-escaping="yes" />
3. 3. Open file /components/com_sobipro/usr/templates/default/template.php Abra o arquivo / components / com_sobipro / usr / templates / default / template.php
4. 4. Find code: Encontre o código:
Code: (php) Código: (php)
public static function Cfg( $key, $def = null, $section = 'general' ) Cfg public static function ($ key, $ def = null, $ = seção "geral") { { return Sobi::Cfg( $key, $def, $section ); voltar Sobi :: Cfg ($ key, $ def, $ secção); } } and add after: e adicione depois:
Code: (php) Código: (php)
public static function JComments( $id, $title ) public static JComments função ($ id, $ titulo) { { $result = ''; $ Result =''; $comments = JPATH_SITE.'/components/com_jcomments/jcomments.php'; $ Comentários JPATH_SITE = '/ componentes / com_jcomments / jcomments.php ".; if (is_file($comments)) { if (is_file ($ comentários)) { require_once($comments); require_once ($ comentários); $result = JComments::show($id, 'com_sobipro', $title); $ Resultado = JComments :: Show ($ id, "com_sobipro ', $ titulo); } } return $result; return $ resultado; } }
po
só copiar o meu código e esquece o esse seu aí.
____________________________________________________________
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl=" www.w3.org/1999/XSL/Transform " xmlns:php=" php.net/xsl ">
<xsl:output method="xml" doctype-system=" www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd " encoding="UTF-8" />
<xsl:include href="../common/topmenu.xsl" />
<xsl:include href="../common/manage.xsl" />
<xsl:include href="../common/alphamenu.xsl" />
<xsl:template match="/entry_details">
<div class="SPDetails">
<div>
<xsl:apply-templates select="menu" />
<xsl:apply-templates select="alphaMenu" />
</div>
<div style="clear:both;"></div>
<xsl:call-template name="manage" />
<xsl:for-each select="entry/fields/*">
<div>
<xsl:attribute name="class">
<xsl:value-of select="@css_class" />
</xsl:attribute>
<xsl:if test="count(data/*) or string-length(data)">
<xsl:if test="label/@show = 1">
<strong><xsl:value-of select="label" /><xsl:text>: </xsl:text></strong>
</xsl:if>
</xsl:if>
<xsl:choose>
<xsl:when test="count(data/*)">
<xsl:copy-of select="data/*"/>
</xsl:when>
<xsl:otherwise>
<xsl:if test="string-length(data)">
<xsl:value-of select="data" disable-output-escaping="yes" />
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="count(data/*) or string-length(data)">
<xsl:if test="string-length(@suffix)">
<xsl:text> </xsl:text>
<xsl:value-of select="@suffix"/>
</xsl:if>
</xsl:if>
</div>
</xsl:for-each>
<xsl:if test="count(entry/categories)">
<div class="spEntryCats">
<xsl:value-of select="php:function( 'SobiPro::Txt' , 'Located in:' )" /><xsl:text> </xsl:text>
<xsl:for-each select="entry/categories/category">
<a>
<xsl:attribute name="href">
<xsl:value-of select="@url" />
</xsl:attribute>
<xsl:value-of select="." />
</a>
<xsl:if test="position() != last()">
<xsl:text> | </xsl:text>
</xsl:if>
</xsl:for-each>
</div>
</xsl:if>
</div>
<div style="clear:both;"></div>
<div class="SPDetailEntry">
<h5 class="SPTitle">
<xsl:variable name="EntryId">
<xsl:value-of select="entry/@id" />
</xsl:variable>
<xsl:variable name="EntryName">
<xsl:value-of select="entry/name" />
</xsl:variable>
<xsl:value-of select="php:function( 'TplFunctions::JComments' , $EntryId, $EntryName )" disable-output-escaping="yes" /></h5>
</div>
</xsl:template>
</xsl:stylesheet>
_________________________________________________________________
Veja o código agora:
mudei a posição do:
<div class="SPDetailEntry">
<h5 class="SPTitle">
<xsl:variable name="EntryId">
<xsl:value-of select="entry/@id" />
</xsl:variable>
<xsl:variable name="EntryName">
<xsl:value-of select="entry/name" />
</xsl:variable>
<xsl:value-of select="php:function( 'TplFunctions::JComments' , $EntryId, $EntryName )" disable-output-escaping="yes" /></h5>
Isso ficou abaixo da div clear both. e mudei tbm o h1 pra h5 pq tinha ficando muito grande a fonte. só isso

Abs.
Please Entrar ou Registrar to join the conversation.