linking from categories to categories...

Discussion in 'PHP' started by miko67, Jan 8, 2007.

  1. #1
    I have two directory scripts
    They have identical category sets

    I want to dynamically show a link from each category and sub-category in directory A to each identical category and sub-category in directory B

    I suppose I would want to have some php code that reads the relevant URL currently showing like: "http:/ /Example-Directory-A.com/ 112/ fantastic_category"
    and then shows a link somewhere on the page to a "Similar Category" that exchanges
    "http:/ /Example-Directory-A.com/ 112/ fantastic_category" with
    "http:/ /Example-Directory-B.com/ 112/ fantastic_category"

    Anyone here who can "whip up" a little php sentence to show this?

    I'm currently working in both Site-Sift and phpld2, so if you are familiar with either one by all means use one of them as necessary

    I have been testing a little, but can't seem to get the hang of it... assistance will be greatly appreciated.

    /miko67
     
    miko67, Jan 8, 2007 IP
  2. Tim_Myth

    Tim_Myth Peon

    Messages:
    741
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The link in pld2 it should be something like <a href="http://Example-Site-Sift-Directory/{$current_path}">See this Category in my Site Sift directory</a>. The variable may also be simply {$path}. Try those and see.
     
    Tim_Myth, Jan 9, 2007 IP
  3. miko67

    miko67 Well-Known Member

    Messages:
    769
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Thx for the pointer.

    of course I'm all about the site-sift directory right now... gotta work through it this next weekend.

    Any more words of wisdom will be appreciated. I'll make sure to present the new functionality when done.

    /miko67
     
    miko67, Jan 10, 2007 IP
  4. Tim_Myth

    Tim_Myth Peon

    Messages:
    741
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Tim_Myth, Jan 11, 2007 IP
  5. EvilivE

    EvilivE Peon

    Messages:
    23
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You can create a user account in mysql that will allow a query to be executed from a different domain besides the default localhost. This would allow your two sites to get results from each other.
     
    EvilivE, Jan 11, 2007 IP