PDA

Zobacz pełną wersję : v-card sobi2



ttomekb
06-02-2010, 16:10
witam
możecie mi powiedzieć dlaczego po pisaniu takiego kodu do szablony v-card w sobi2 wynikiem jest to, że zmienia się tylko pozycja tego powiedzmy ogłoszenia które jest na samej górze, jakby poza szablonem...
a ja chciałbym aby to wyglądało tak: po lewej treść --- po prawej zdjęcie, czyli tabela 1 wiersz, 2 kolumny

kod z szablonu to:
<?php
/**
* @package: Standard Advanced 2 Template for SOBI2
* V-Card Template
* ================================================== =
* @author: Sigrid Suski, Sigsiu.NET
* Url: http://www.sigsiu.net
* ================================================== =
* @copyright Copyright (C) 2008-2009 Sigsiu.NET (http://www.sigsiu.net). All rights reserved.
* @license see http://www.gnu.org/licenses/lgpl.html GNU/LGPL.
* You can use, redistribute this file and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation.
*/
defined( '_SOBI2_' ) || ( trigger_error("Restricted access", E_USER_ERROR) && exit() );
function sobi2VCview($id, $style, $ico, $img, $title, $fieldsObjects, $fieldsFormatted, $plugins, $editButton = null, $deleteButton = null)
{
$mySobi = new sobi2( $id );
$config =& sobi2Config::getInstance();
$pluginsObjects =& $config->S2_plugins;
$catid = (int) sobi2Config::request($_REQUEST, 'catid', 0);
$link = sobi2Config::sef("index.php?option=com_sobi2&sobi2Task=sobi2Details&catid={$catid}&sobi2Id={$id}&Itemid={$config->sobi2Itemid}");
?>
<table <?php echo $style; ?>>
<tr>
<td valign="top">
<font color="#CCCCCC">----------------------------------------------------------------------------------------</font>
<?php echo $title; ?>
<?php echo HTML_SOBI::customFieldsData($fieldsFormatted);?><br><br>
<?php echo $editButton; ?>
<?php echo $deleteButton; ?>
</td>
<td bgcolor="#008000" width="100" valign="top">
<font color="#CCCCCC">--------------------</font>
<p align="right">
<?php echo $ico; ?>
<?php echo $img; ?>
<?php echo $plugins["gallery"]; ?>
</p>
</td>
</tr>
</table>

w czym problem??

neo_fox
06-02-2010, 16:48
w czym problem??

W tym że usunąłeś
<td <?php echo $style; ?>>

Pozdrawiam,
Radek

ttomekb
07-02-2010, 02:44
tzn ze powinno być tak:??

<?php
/**
* @package: Standard Advanced 2 Template for SOBI2
* V-Card Template
* ================================================== =
* @author: Sigrid Suski, Sigsiu.NET
* Url: http://www.sigsiu.net
* ================================================== =
* @copyright Copyright (C) 2008-2009 Sigsiu.NET (http://www.sigsiu.net). All rights reserved.
* @license see http://www.gnu.org/licenses/lgpl.html GNU/LGPL.
* You can use, redistribute this file and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation.
*/
defined( '_SOBI2_' ) || ( trigger_error("Restricted access", E_USER_ERROR) && exit() );
function sobi2VCview($id, $style, $ico, $img, $title, $fieldsObjects, $fieldsFormatted, $plugins, $editButton = null, $deleteButton = null)
{
$mySobi = new sobi2( $id );
$config =& sobi2Config::getInstance();
$pluginsObjects =& $config->S2_plugins;
$catid = (int) sobi2Config::request($_REQUEST, 'catid', 0);
$link = sobi2Config::sef("index.php?option=com_sobi2&sobi2 Task=sobi2Details&catid={$catid}&sobi2Id={$id}&Ite mid={$config->sobi2Itemid}");
?>
<table <td <?php echo $style; ?>>
<tr>
<td valign="top">
<font color="#CCCCCC">----------------------------------------------------------------------------------------</font>
<?php echo $title; ?>
<?php echo HTML_SOBI::customFieldsData($fieldsFormatted);?><b r><br>
<?php echo $editButton; ?>
<?php echo $deleteButton; ?>
</td>
<td bgcolor="#008000" width="100" valign="top">
<font color="#CCCCCC">--------------------</font>
<p align="right">
<?php echo $ico; ?>
<?php echo $img; ?>
<?php echo $plugins["gallery"]; ?>
</p>
</td>
</tr>
</table>

bo jeśli tak to nadal nie działa..

Jola
07-02-2010, 02:54
WItam,
zjadłeś zamknięcie funkcji function sobi2VCview(), na końcu wstaw:

<?php
}
?>:)

ttomekb
07-02-2010, 03:54
dodałem to co mówiłaś... niestety nadal nie wygląda to tak jak powinno... a właściwi w ogóle nie wyglada bo nawet nie pokazuje tych kresek na górze(---------------)
chce żeby było tak:
http://www.wgraj.net/img.php/51392.gif (http://www.wgraj.net/img.php?mode=full&file=51392)
czy u kogoś w ogóle ten kod działa lub wygląda choć podobnie do tego co na zdjęciu??

neo_fox
07-02-2010, 12:05
tzn ze powinno być tak:??
<table <td <?php echo $style; ?>>


ROTFL. To jest dobre :D

Jeśli już to tak:



<?php
/**
* @package: Standard Advanced 2 Template for SOBI2
* V-Card Template
* ================================================== =
* @author: Sigrid Suski, Sigsiu.NET
* Url: http://www.sigsiu.net
* ================================================== =
* @copyright Copyright (C) 2008-2009 Sigsiu.NET (http://www.sigsiu.net). All rights reserved.
* @license see http://www.gnu.org/licenses/lgpl.html GNU/LGPL.
* You can use, redistribute this file and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation.
*/
defined( '_SOBI2_' ) || ( trigger_error("Restricted access", E_USER_ERROR) && exit() );
function sobi2VCview($id, $style, $ico, $img, $title, $fieldsObjects, $fieldsFormatted, $plugins, $editButton = null, $deleteButton = null)
{
$mySobi = new sobi2( $id );
$config =& sobi2Config::getInstance();
$pluginsObjects =& $config->S2_plugins;
$catid = (int) sobi2Config::request($_REQUEST, 'catid', 0);
$link = sobi2Config::sef("index.php?option=com_sobi2&sobi2 Task=sobi2Details&catid={$catid}&sobi2Id={$id}&Ite mid={$config->sobi2Itemid}");
?>
<td <?php echo $style; ?>>
<table>
<tr>
<td valign="top">
<font color="#CCCCCC">----------------------------------------------------------------------------------------</font>
<?php echo $title; ?>
<?php echo HTML_SOBI::customFieldsData($fieldsFormatted);?><b r><br>
<?php echo $editButton; ?>
<?php echo $deleteButton; ?>
</td>
<td bgcolor="#008000" width="100" valign="top">
<font color="#CCCCCC">--------------------</font>
<p align="right">
<?php echo $ico; ?>
<?php echo $img; ?>
<?php echo $plugins["gallery"]; ?>
</p>
</td>
</tr>
</table>
<!-- here ends the template -->

<!-- Don't remove these lines! -->
</td><?php
}
?>

ttomekb
07-02-2010, 13:43
ok, mam
tak to powinno wyglądać żeby działało tak jak chciałem:

<?php
/**
* @version $Id: sobi2.vc.tmpl.php 4820 2009-01-05 11:46:25Z Radek Suski $
* @package: Sigsiu Online Business Index 2
* ================================================== =
* @author
* Name: Sigrid & Radek Suski, Sigsiu.NET
* Email: sobi @ sigsiu.net
* Url: http://www.sigsiu.net
* ================================================== =
* @copyright Copyright (C) 2006 - 2009 Sigsiu.NET (http://www.sigsiu.net).
* All rights reserved.
* @license see http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL.
* You can use, redistribute this file and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*/

/* Please do not remove this line */
defined('_SOBI2_')||(trigger_error("Restricted access", E_USER_ERROR) && exit());

/* ------------------------------------------------------------------------------
* This is the template for the V-Card View
* ------------------------------------------------------------------------------
*/
/* Don't remove this line! */
function sobi2VCview($id, $style, $ico, $img, $title, $fieldsObjects,
$fieldsFormatted, $plugins, $editButton = null, $deleteButton = null)
{
// For advanced templating comment in the next line if you need to access
// other sobi2 object proporties
// $mySobi = new sobi2( $id );
// $waySearchLink = HTML_SOBI::createWaySearchUrl( $id );
?>
<!-- here starts the template -->

<td <?php echo $style; ?>>
<font color="#CCCCCC">----------------------------------------------------------------------------------------</font>
<?php echo $editButton; ?>
<?php echo $deleteButton; ?>
<?php echo $ico; ?>
<?php echo $img; ?>

<?php echo $title; ?>
<?php echo HTML_SOBI::customFieldsData($fieldsFormatted);?>
<td>
<font color="#CCCCCC">--------------------</font>
<?php echo $plugins["gallery"]; ?>
</td>
<!-- here ends the template -->

<!-- Do not remove these lines! -->
</td><?php
}
?>

neo_fox
07-02-2010, 13:46
Nie będę się spierał ale moim zdaniem jeśli to działa to tylko przez przypadek ;-)

ttomekb
07-02-2010, 14:53
tak wlaściwie to nie wiem dlaczego tak mowisz bo to jest w 99% kod jaki posiada szablon ze strony sobi, jedyne co dodalem to:
<font color="#CCCCCC">
ale ok... to co w takim razie zmienić żeby działało zawsze i wszędzie??
wiem ze to co jest w tym kodzie nie jest zgodne ze standardami XHTML ale jak zmienić żeby było ok??

neo_fox
07-02-2010, 17:26
Dodałeś wewnątrz komórki tabeli "<td>" swoją własną komórkę i w ten sposób rozwaliłeś strukturę tabeli

ttomekb
08-02-2010, 12:55
Dodałeś wewnątrz komórki tabeli "<td>" swoją własną komórkę i w ten sposób rozwaliłeś strukturę tabeli
w takim razie mogę Pana neo_fox (http://forum.joomla.pl/member.php?2688-neo_fox) poprosić aby pokazał mi jak to zmienić??