hi Coder here! I need some coding help

Discussion in 'Programming' started by calvynlee, Feb 15, 2008.

  1. #1
    hi all coder, is me again,a coding noob.

    I have create a banner or link, the banner stated "created by URL LINK"

    This banner will be install in... lets said a theme, a wordpress theme that i create. and will be distribute at alot website.

    on the URL LINK, i wish to change it in future, as time goes by...
    How to I add in a caller, that able to change the link, once i change in my website. it may point to a page that i create, and once i change the link, all will follow

    I have made as below
    
    <div>Created by<a href="http://www.iCalvyn.com">iCalvyn.com</a>
    </div>
    Code (markup):
    I am having this banner on top of my current blog, have have a look if you no idea.
     
    calvynlee, Feb 15, 2008 IP
  2. adams95ta

    adams95ta Active Member

    Messages:
    359
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    78
    #2
    If I were you I'd make a subdomain like

    Created by<a href="http://go.icalvyn.com">iCalvyn.com</a>

    and have that sub domain redirect to where ever you want and you can change it in the future.
     
    adams95ta, Feb 15, 2008 IP
  3. calvynlee

    calvynlee Well-Known Member

    Messages:
    337
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    118
    #3
    sorry , may be there are some misunderstand on my post above.

    I mean the client site link will be change according to the server site.

    mean that u put this code in your website, and once i change my text and link, the text link in your website will change too.
     
    calvynlee, Feb 15, 2008 IP
  4. 00johnny

    00johnny Peon

    Messages:
    149
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    you want to set up some sort of a global variable or function. I'm not familiar with your software but typically it would go something like this

    ... html ...
    </div>
    <div id="someLink">
    <?php
    echo callMyMagicalLinkFunction();
    ?>
    </div>



    then later somewhere in your php code you define the function:

    function callMyMagicalLinkFunction() {
    return "<a href="blah">anchor</a>
    }
     
    00johnny, Feb 17, 2008 IP
  5. firman01

    firman01 Well-Known Member

    Messages:
    155
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    165
    #5
    probably i assume you are using php and you want to display your own website link without changing it over and over again with different domain?
    then you would use something like this:

    
    
    <div>Created by<a href="http://<?php echo $_SERVER['SERVER_NAME']; ?>"><?php echo $_SERVER['SERVER_NAME']; ?></a>
    </div>
    
    
    Code (markup):
     
    firman01, Feb 18, 2008 IP
  6. calvynlee

    calvynlee Well-Known Member

    Messages:
    337
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    118
    #6
    example:



    this code install in alot people website, and one days, I change my one name to robert, and i have another new website name iRobert.com so want to change all the link in other people website which have my code to


    without changing the code in their website
     
    calvynlee, Feb 18, 2008 IP
  7. firman01

    firman01 Well-Known Member

    Messages:
    155
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    165
    #7
    how you want to put the code in the 'other people website'? eg: is it via php include or ajax call?
     
    firman01, Feb 18, 2008 IP
  8. it career

    it career Notable Member

    Messages:
    3,562
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    270
    #8
    You can read the url from database, update database whenever you get new client.
     
    it career, Feb 20, 2008 IP
  9. XTreMe

    XTreMe Banned

    Messages:
    1,226
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #9
    as you are nooob thats why the simple way is to use iframe:D
     
    XTreMe, Feb 20, 2008 IP