Forums

Top 10 posts problem. (5 posts)

  1. Mark (podz)
    Support Maven
    Posted 7 years ago #

    Plugin:
    http://weblogtoolscollection.com/archives/2005/03/14/top-10-plugin/

    What I think is the code in question:
    <li><a href=\"$siteurl"."index.php?p=".$post->ID."&amp;more=1&amp;c=1\" title=\"$text\"
    >$post_title</a>

    - From the main index, this plugin works fine.
    - If you click one of the top 10 posts, you go to it, and if you then click another, you go to that
    - BUT, if you are looking at an individual post (I'm using permalinks in the default structure provided) then the $siteurl seems to judged to be the permalink, so the top10 link is added to the permalink - so it fails.

    Any clues as to how I may fix this ?
    Thanks.

  2. Joshua Sigar
    Member
    Posted 7 years ago #

    Can you not replace $siteurl with something like
    <?php echo get_settings('home'); ?>

  3. Kafkaesqui
    Moderator
    Posted 7 years ago #

    It is what $siteurl is supposed to use, but I just tested this, and you're correct podz. There is something unusual going on with that global variable. Try alphaoide's suggestion:

    <li><a href=\"".get_settings('home')."/index.php?p=".$post->ID."&amp;more=1&amp;c=1\" title=\"$text\"
    >$post_title</a>

  4. Mark (podz)
    Support Maven
    Posted 7 years ago #

    Thanks, tried that and kept getting T STRING errors - I must have done something wrong.
    Cured the problem by going the simple route and replacing $siteurl with my actual url :)

    (Now for the next problem)

  5. Mark (podz)
    Support Maven
    Posted 7 years ago #

    Crossed with your post there Kaf :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.