Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#40 Skin block enhancement

closed-fixed
Joe Stewart
None
5
2002-05-30
2002-05-28
Will Dyson
No

When the skin block is displayed on a page that was
generated with a query string (such as an article
page), the links in the block to change skins are
incorrect. Example: article.php3?skin=basic generates
an error.

The attatched patch adds logic to
Block_render_skin.class to generate a correct query
string for the link and put that into a new template
parameter (URL). It also changes the basic and default
versions of skinblock.tpl to use "{URL}" instead of
"{PHP_SELF}?skin={SKIN}".

Now users can click on the skin changeing links from
article pages.

Discussion

  • Will Dyson
    Will Dyson
    2002-05-28

    patch to enhance skinblock

     
    Attachments
  • Joe Stewart
    Joe Stewart
    2002-05-30

    • assigned_to: nobody --> joestewart
    • status: open --> closed-fixed
     
  • Joe Stewart
    Joe Stewart
    2002-05-30

    Logged In: YES
    user_id=77269

    Thank you for the patch. Incorporated using the GLOBAL
    QUERY_STRING instead of the function submitted.

    This functionality has been applied to phpslash-ft cvs Thu
    May 30 16:00:15 2002 UTC.

     
  • Will Dyson
    Will Dyson
    2002-06-01

    Logged In: YES
    user_id=368834

    Hmm. I just looked at the function as applied to the tree,
    and it suffers from the problem that if a user switches
    skins several times while remaining on the same page, the
    querystring will continue to grow as "&skin=foo" is added to
    the end each time. Quite possible to end up with something
    like
    "http://mysite/article.php3?story_id=21&skin=default&skin=basic&skin=default&skin=foo".
    Perhaps this doesn't actually break anything, but it is
    (IMHO) very ugly. The function I supplied ensures that each
    query term is present only once in the query string.

     
  • Will Dyson
    Will Dyson
    2002-06-01

    Logged In: YES
    user_id=368834

    Joe,

    Ah, good. As long as it works. You should proabably remove
    the function I added to Block_render_skin.class, since it is
    not being used. And the extra template argument (URL) as well.