2

我正在使用这个评级系统:http: //www.chrishardy.co.uk/asp/scripts/accessible-star-ratings/

问题是,现在一切都已设置好并可以使用,我不能给任何星星。

查看此页面以了解我的意思:http ://bit.ly/HQgxQq

我希望你能帮忙:)

4

1 回答 1

0

我收到了这个错误:

POST http://klasse.aabc.dk/rating/rpc.asp?rating=5&url=/ve-aspnet/akemver1/test.asp 404 (Not Found) 

我假设您尚未上传“rpc.asp”文件。您必须上传所有文件才能使一切正常工作。请检查您是否已将“rpc.asp”上传到与其余文件相同的目录中。

我发现 /rating 是错误的......我能够得到:

http://klasse.aabc.dk/ve-aspnet/akemver1/rating/rpc.asp?rating=4&url=/ve-aspnet/akemver1/test.asp

不要抛出 404 错误。这意味着您的虚拟路径是错误的?

我建议你这样做:

  1. 解压 .zip

  2. 更新“common.asp”的第 30 行

    ...
    Const NEAREST_HALF = false
    Const RATING_DIR = "ve-aspnet/akemver1/rating" 'This is line 30, you must edit it.
    
    '--- Database connection string ----------------------------------------------
    dim sConnectionString
    '-----------------------------------------------------------------------------
    ...
    
  3. 编辑 rating.css 并使其看起来像这样:

    .starlight {
        color: #e00;
    }
    #star-rating ul {
        list-style: none;
        margin: 3px;
        padding: 0px;
        width: 150px;
        height: 30px;
        position: relative;
        background: url(/ve-aspnet/akemver1/rating/rating.gif) top left repeat-x;
    }
    #star-rating li {
        padding: 0px;
        margin: 0px;
        /*\*/
        float: left;
        /* */
    }
    #star-rating li.current-rating {
        background: url(/ve-aspnet/akemver1/rating/rating.gif) left bottom;
        position: absolute;
        height: 30px;
        display: block;
        text-indent: -9000px;
        z-index: 1;
    }
    #star-rating li a {
        display: block;
        width: 30px;
        height: 30px;
        text-decoration: none;
        text-indent: -9000px;
        z-index: 20;
        position: absolute;
        padding: 0px;
        background-image: none;
    }
    #star-rating li a:hover {
        background: url(ve-aspnet/akemver1/rating/rating.gif) left center;
        z-index: 1;
        left: 0px;
    }
    #star-rating a.star-1 {
        left: 0px;
    }
    #star-rating a.star-1:hover {
        width: 30px;
    }
    #star-rating a.star-2 {
        left: 30px;
    }
    #star-rating a.star-2:hover {
        width: 60px;
    }
    #star-rating a.star-3 {
        left: 60px;
    }
    #star-rating a.star-3:hover {
        width: 90px;
    }
    #star-rating a.star-4 {
        left: 90px;
    }
    #star-rating a.star-4:hover {
        width: 120px;
    }
    #star-rating a.star-5 {
        left: 120px;
    }
    #star-rating a.star-5:hover {
        width: 150px;
    }
    
  4. 将整个 .zip(当然是编辑过的!)上传到 /ve-aspnet/akemver1/rating

  5. 让您的 test.asp 包含以下代码:

    <html>
    <head>
    <script type="text/javascript" src="/ve-aspnet/akemver1/rating/rating.js"></script>
    <link type="text/css" rel="stylesheet" href="/ve-aspnet/akemver1/rating/rating.css" />
    </head>
    <body>
    <h3>This is a test...</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam imperdiet varius magna, non molestie libero porttitor a. Fusce vel lorem at nisl egestas placerat eget non mauris. Fusce consequat tortor id nunc blandit id pretium libero egestas. Mauris egestas, nulla sed consequat congue, enim nibh ullamcorper nisl, id aliquam lectus urna ac nibh. Nunc in dolor justo, eu lacinia dolor. Donec velit augue, facilisis at interdum vel, sagittis id urna. Maecenas blandit mollis augue, sit amet ultrices mauris aliquam vitae. Nullam eu magna urna. Sed bibendum nunc ut nunc molestie ullamcorper. Vivamus ut erat ultrices elit tincidunt viverra id sed ligula. In in lorem arcu. Pellentesque varius mi egestas est vehicula vitae posuere arcu pharetra. Phasellus sodales ullamcorper bibendum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum consequat justo eu arcu pharetra porttitor. Etiam condimentum lacus a dui blandit cursus eu in lorem.</p>
    <!--#include virtual="/ve-aspnet/akemver1/rating/rating.asp"-->
    </body>
    </html>
    
  6. 将 test.asp 上传到“/ve-aspnet/akemver1”

  7. 它应该工作:D

编辑: 再三考虑,您可以将 .zip 的全部内容放入“/rating”

于 2012-04-20T04:24:51.410 回答