You are here:  » marquee scroller


marquee scroller

Submitted by paullas on Thu, 2012-09-13 21:56 in

hi david

going off this thread http://www.pricetapestry.com/node/3804 is it possible to scroll merchants images using this WP version

thanks
paul

Submitted by support on Fri, 2012-09-14 06:57

Hi Paul,

Try adding a shortcode to do this. In pto.php look for the following code at line 550:

case "atoz":

...and REPLACE with:

case "marquee":
  global $pto_config_databaseTablePrefix;
  global $pto_config_merchantBaseHREF;
  global $pto_config_externalPath;
  global $pto_config_externalBaseHREF;
  $html .= "<marquee>";
  $sql = "SELECT DISTINCT(merchant) AS merchant FROM
    `".$pto_config_databaseTablePrefix."products` ORDER BY merchant";
  $wpdb->query($sql);
  foreach($wpdb->last_result as $row)
  {
    $href = get_bloginfo('url').$pto_config_merchantBaseHREF."/".pto_common_hyphenate($row->merchant);
    $html .= " <a href='".$href."'>";
    if (file_exists($pto_config_externalPath."logos/".$row->merchant))
    {
      $html .= "<img border='0' src='".$pto_config_externalBaseHREF."logos/".$row->merchant."' />";
    }
    else
    {
      $html .= $row->merchant;
    }
  }
  $html .= "</marquee>";
  break;
case "atoz":

Then in your page / post, use the shortcode:

[pto marquee="TRUE"]

Cheers,
David.
--
PriceTapestry.com