Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    February 13th, 2005
    Posts
    69
    Put RSS contents on my website. How?
    Hi,

    I just install successfully DySE script for BettyMills store. Now I want to customize it so it will be different with other sites using the same scripts.

    I want to put RSS content on my site. Can somebody tell me how to do it? Is it possible? What tools are required to do this?

    THanks,
    Sjarief.

    P.S. I used to use CaRP tools for this purpose, but it's an PHP script. I've no idea on how to do this using cgi/perl script.

  2. #2
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    In your DySE template, you need to use a Server-Side-Include (SSI) statement to include output from PHP scripts, such as:

    <!--#include virtual="/carp.php"-->

    You need to create the /carp.php file to call CaRP. Here's the reply from GeckoTribe.com about how to do this:

    You'd need to make a PHP document that called CaRP and then do an include like what you entered above to include that PHP document. The reason for this is that including CaRP itself won't do anything. You need to include a document with at least these minimal contents:

    <?php
    require_once '/CLIENTS/PATH/TO/carp/carp.php';
    CarpCacheShow('URL OF FEED');
    ?>

    ...so that the function CarpCacheShow is called. Most likely, you'll want some configuration code between the two lines too.
    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  3. #3
    Member
    Join Date
    February 13th, 2005
    Posts
    69
    Seems like a good solution. Thanks, I will try to implement it.

    Regards,
    Sjarief

  4. #4
    Newbie
    Join Date
    July 25th, 2005
    Posts
    6
    That was a helpful post, thanks.
    But I have a question..
    I tried to use that code with carp.. and it worked great.. the newsfeeds came up and everything. But I tried to add the last part... k={item.name+} and it didn't work. The k won't actually be replaced in the php file.
    <!--#include virtual="/myscript.php?k={item.name+}"-->

    So I actually have:
    <!--#include virtual="/bettyphp.php?k={item.name+}"-->
    Then I have my bettyphp.php file in the right place and everything. The display even comes up fine. But I want to replace a certain part of a url with the item.name. So I put k where I wanted the item.name to be.. but nothing happened. In the url, there was just k, not the item.name.
    So I was wondering how to fix that if I could. Should I put quotes around the k?
    And.. there is more than one k in the bettphp.php file. So would it just replace the first k or all the k's? Because right now it doesn't seem to be replacing any of the k's.
    Thanks,
    Gavin

  5. #5
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    When DySE view.pl sees the following in your template:

    <!--#include virtual="/bettyphp.php?k={item.name+}"-->

    the {item.name+} is replaced by the name of the current item. For example, if the current product is a calendar nameed "Cats 2006 Mini Boxed Calendar", then view.pl processes the SSI as:

    <!--#include virtual="/bettyphp.php?k=Cats+2006+Mini+Boxed+Calendar"-->

    So, your bettyphp.php script will be called with the k parameter set to: Cats+2006+Mini+Boxed+Calendar (+ is the standard way of passing spaces in URL's).

    In your bettyphp.php, access the k parameter as you normally would access any parameter in any php script. Use the PHP variable $_GET['k'] (this is preferred variable name) or $HTTP_GET_VARS['k'] (older deprecated variable name). If you're using PHP version less than 4.2.0 (or your hosting compay has set the PHP configuration variable register_globals on) then you can access PHP variable $k

    Note that you are not limited to naming the parameter k; use whatever your php script requires or whatever you've programmed it to use.

    To see the SSI working, edit your items.html template and add the following test SSI after <BODY> tag:

    <!--#include virtual="http://?k={item.name+}"-->

    Use "http://" as the domain name since it is an invalid domain name and it will cause an error thus demonstrating how the SSI works. View any item's webpage and you'll see something like the following error where you added the above SSI:

    [http://?k=Cats+2006+Mini+Boxed+Calendar: error: 500 Can't connect to :80 (Bad hostname '')]

    You can see that view.pl has substituted in the name of the item where {item.name+} appeared in the URL.

    Remove the test SSI so the error doesn't show up to your users.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Can i put my website name in coupons corner?
    By Dhana in forum Introduce Yourself
    Replies: 2
    Last Post: February 9th, 2008, 10:23 AM
  2. Ethical to put RSS feeds on your website?
    By johnnyWebAffiliate in forum Midnight Cafe'
    Replies: 19
    Last Post: September 19th, 2006, 07:06 AM
  3. Received without contents!
    By SandraR in forum Midnight Cafe'
    Replies: 5
    Last Post: July 9th, 2004, 01:42 PM
  4. No contents in FTP access folders???
    By SSanf in forum ShareASale - SAS
    Replies: 0
    Last Post: May 29th, 2004, 08:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •