<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="150" height="36" id="movie_name">
<param name="movie" value="/play_stop.swf" />
<param name="FlashVars" value="myVariable=<?php echo $filname ;?>" />
<!-- here $filename is your MP3, MP4 url ex: http://example.com/user.mp3 -->
<param name="quality" value="high">
<param name="bgcolor" value="#FFFFFF">
<!-- [if IE]> -->
<object type="application/x-shockwave-flash" data="/play_stop.swf" width="150" height="36">
<param NAME="movie" value="/play_stop.swf">
<param name="FlashVars" value="myVariable=<?php echo $filname ;?>" />
<!-- <[endif] -->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/>
</a>
<!-- [if IE]> -->
</object>
</object>
Thursday, 18 April 2013
Friday, 1 March 2013
Change contact email template type text to html in magento
How do change contact email template type text to html
Go to app/code/core/Mage/Contacts/etc/config.xml
<email>
<contacts_email_email_template translate="label" module="contacts">
<label>Contact Form</label>
<file>contact_form.html</file>
<type>text</type>
</contacts_email_email_template>
</email>
Change to this
<email>
<contacts_email_email_template translate="label" module="contacts">
<label>Contact Form</label>
<file>contact_form.html</file>
<type>html</type>
</contacts_email_email_template>
</email>
Go to app/code/core/Mage/Contacts/etc/config.xml
<email>
<contacts_email_email_template translate="label" module="contacts">
<label>Contact Form</label>
<file>contact_form.html</file>
<type>text</type>
</contacts_email_email_template>
</email>
Change to this
<email>
<contacts_email_email_template translate="label" module="contacts">
<label>Contact Form</label>
<file>contact_form.html</file>
<type>html</type>
</contacts_email_email_template>
</email>
Monday, 25 February 2013
How to remove link in customer page in magento
First Add this function in /app/code/core/Mage/Customer/Block/Account/Navigation.php
public function removeLinkByName($name) {
unset($this->_links[$name]);
}Then Go to /app/design/frontend/default/your theme folder/layout and create local.xml
//Add this code in local.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<customer_account>
<reference name="customer_account_navigation">
<!-- To remove the item Account Dashboard you have to add this line of code -->
<action method="removeLinkByName"><name>account</name></action>
<!-- To remove the item Account Information you have to add this line of code -->
<action method="removeLinkByName"><name>account_edit</name></action>
<!-- To remove the item Address Book you have to add this line of code -->
<action method="removeLinkByName"><name>address_book</name></action>
<!-- To remove the item My Orders you have to add this line of code -->
<action method="removeLinkByName"><name>orders</name></action>
<!-- To remove the item Recurring Profiles you have to add this line of code -->
<action method="removeLinkByName"><name>recurring_profiles</name></action>
<!-- To remove the item Billing Agreements you have to add this line of code -->
<action method="removeLinkByName"><name>billing_agreements</name></action>
<!-- To remove the item My Downloadable Products you have to add this line of code -->
<action method="removeLinkByName"><name>downloadable_products</name></action>
<!-- To remove the item My Tags you have to add this line of code -->
<action method="removeLinkByName"><name>tags</name></action>
<!-- To remove the item My Product Reviews you have to add this line of code -->
<action method="removeLinkByName"><name>reviews</name></action>
<!-- To remove the item My Wishlist you have to add this line of code -->
<action method="removeLinkByName"><name>wishlist</name></action>
<!-- To remove the item Newsletter Subscriptions you have to add this line of code -->
<action method="removeLinkByName"><name>newsletter</name></action>
<!-- To remove the item My Application you have to add this line of code -->
<action method="removeLinkByName"><name>OAuth Customer Tokens</name></action>
</reference>
</customer_account>
</layout>
Wednesday, 13 February 2013
How to pull over Blog From one site to another site in wordpress
Please add this code when you want to
show blog
<?php
include_once(ABSPATH
. WPINC . '/feed.php');
include_once(ABSPATH
. WPINC . '/SimplePie.php');
$rss =
fetch_feed('/category/blog/feed/');
// Add your Url which you want to pull over blog
if (!is_wp_error( $rss ) ) :
$maxitems =
$rss->get_item_quantity(5);
$rss_items = $rss->get_items(0,
$maxitems);
endif;
?>
<?php
function
get_first_image_url($html)
{
if
(preg_match('/<img.+?src="(.+?)"/', $html, $matches))
{
return $matches[1];
}
}
?>
<?php
function shorten($string, $length)
{
$suffix = '…';
$short_desc =
trim(str_replace(array("r","n", "t"), '
', strip_tags($string)));
$desc = trim(substr($short_desc, 0,
$length));
$lastchar = substr($desc, -1, 1);
if ($lastchar == '.' ||
$lastchar == '!' || $lastchar == '?') $suffix='';
$desc .= $suffix;
return $desc;
}
?>
<ul class="rss-items"
id="wow-feed">
<?php
if ($maxitems == 0) echo
'<li>No items.</li>';
else
foreach ( $rss_items as $item )
: ?>
<li class="item">
<span class="rss-image">
<?php echo '<img
src="' .get_first_image_url($item->get_content()). '"/>';
?>
</span>
<span class="data">
<h5><a href='<?php
echo esc_url( $item->get_permalink() ); ?>' title='<?php
echo esc_html( $item->get_title() ); ?>'> <?php echo
esc_html( $item->get_title() ); ?></a></h5>
<span
class="date-image"> </span><small><?php
echo $item->get_date('F Y'); ?> </small>
<span
class="comment-image"> </span><small><?php
$comments =
$item->get_item_tags('http://purl.org/rss/1.0/modules/slash/',
'comments');?><?php $number = $comments[0]['data']; ?>
<?php if ($number ==
'1'){ echo $number." ". "Comment"; }
else {echo $number. " "."Comments";}?></small>
<p><?php echo
shorten($item-> get_description(),'150');?></p>
</span>
</li>
<?php endforeach; ?>
</ul>
Subscribe to:
Posts (Atom)