Page 1 of 1

Text Align and Quotes around tags

Posted: Mon Aug 11, 2008 7:39 pm
by Shoushan
I have been trying center this one piece of text but I keep getting different parse errors. Please help. I have an <h4> tag and I want to center align. It have something to do with the "" and the ; but where and how. Somewhere in lines 5,6, & 7....right. I want to center Categories text. The quotes are confusing and I'm new to php can someone explain why I can't just take out the quotes around the "<h4>"

Code: Select all

<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); ?>
 
<?php
[color=#FF4000]echo $vendor_store_desc."";[/color]
[color=#FF4000]echo "<h4>" .$VM_LANG->_('PHPSHOP_CATEGORIES')."</h4>";[/color]
[color=#FF8000]echo $categories; ?>[/color]
<div class="vmRecent">
<?php echo $recent_products; ?>
</div>
<?php
// Show Featured Products
if( $this->get_cfg( 'showFeatured', 1 )) {
    /* featuredproducts(random, no_of_products,category_based) no_of_products 0 = all else numeric amount
    edit featuredproduct.tpl.php to edit layout */
    echo $ps_product->featuredProducts(true,10,false);
}
// Show Latest Products
if( $this->get_cfg( 'showlatest', 1 )) {
    /* latestproducts(random, no_of_products,month_based,category_based) no_of_products 0 = all else numeric amount
    edit latestproduct.tpl.php to edit layout */
    ps_product::latestProducts(true,10,false,false);
}
?>

Re: Text Align and Quotes around tags

Posted: Tue Aug 12, 2008 1:04 am
by susrisha
try this please


Code: Select all

 
# echo $vendor_store_desc."";
# echo "<h4><center> $VM_LANG->_('PHPSHOP_CATEGORIES') </center></h4>";
# echo $categories; ?>
 

Re: Text Align and Quotes around tags

Posted: Tue Aug 12, 2008 11:42 am
by Shoushan
That sort of works. It centers the text but the text doesn't say what it said before.

Before it says "Categories" When I put the <center> code in it says and centers
{PHPShop_Categories} from that line of code.

Am I trying to center the wrong line? The <h> tags effect that Categories text. Why wouldn't your <center> code just show and center Categories?

Re: Text Align and Quotes around tags

Posted: Sat Aug 23, 2008 7:00 am
by susrisha
it was showing so because it took 'PHPSHOP_CATEGORIES' as a constant and not as a variable..
Please try this code instead..This one should probably work..

Code: Select all

 
echo $vendor_store_desc."";
echo "<h4><center>";
echo  $VM_LANG->_('PHPSHOP_CATEGORIES') ;
echo "</center></h4>";
echo $categories; ?>