Results 1 to 11 of 11

Thread: Masking links

  1. #1
    Join Date
    Aug 2007
    Posts
    63

    Post Masking links

    Is there a way to add affiliate links to my directory so that they appear to be another link?

    For example, I want to list
    http://www.gemplers.com to my directory but my affiliate link with them
    looks like
    http://www.gemplers.com?affiliate_id=thegrapeguru

    I'd like it not to appear to users of the site like the second url....

    Can this be done?
    I'd also like to use this to add links to some amazon books in my directory which is only about grape growing and winemaking.
    Thanks,
    Michel

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Currently in detail.html you should have something close to

    <label for="url">Url</label>
    <span class="text"><a href="<%$url%>" name="link_<%$link_id%>"><%$url%></a></span>

    Change it to

    <label for="url">Url</label>
    <span class="text"><a href="<%$url%>" name="link_<%$link_id%>"><%$title%></a></span>

    This will use the name of the URL as the text displayed instead of the URL

  3. #3
    Join Date
    Jul 2006
    Location
    Paris, France
    Posts
    108

    Default

    Quote Originally Posted by Bruceper View Post
    Change it to

    <label for="url">Url</label>
    <span class="text"><a href="<%$url%>" name="link_<%$link_id%>"><%$title%></a></span>

    This will use the name of the URL as the text displayed instead of the URL
    I suppose Vitis doesn't want to modify all the URL links, but just to replace the URLs of the affiliated sites by a "normal" URL instead of it's affiliate ID.
    So, only a developer could do that. If you have many affiliated links, you could create a second field (urla, with the same format as the existing url field) in the database, and use the same "process" as the meta tags in the header : if there is only one URL in the first field, you display this URL. If there are two URLs (one in the field url, and another in the field urla), you display the second one, and redirect the visitor to the first one. With a "if" and a "else", it could be easy for an expert

    In the templates, we find :

    PHP Code:
    <%if $header%>
    <%
    $header%>
    <%else%>
    <%include 
    file="header.html"
              
    title=" $page_title"
              
    meta_keywords="$meta_keywords"
              
    meta_description="$meta_description"
    %>
    <%/if%> 
    But you have to "prepare" the apparition of <%$header%>, it's not magic but only developers can do that.
    For example, we can read in lib/category.class.php the following lines :

    PHP Code:
        // method to get html header of category
        // -------------------------------------

        
    function GetHeader($cat) {
          global 
    $dbConn$cat;
          
    $header $dbConn->Lookup("header"$this->table_name"category_id = '$cat'");
          if (
    $header) {
            
    $tpl = new Template;
            
    $tpl->assign('cat'$cat);
            
    $header $tpl->fetch('var:' $header);
          }
          return 
    $header;
        } 
    You could be inspired by these lines to create a function making the substitution of <%$url%> by <%$urla%>.

    Anybody knows how to make such a trick ?

  4. #4
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Why go through so much trouble when the solution I posted simply removes the URL from the page view and shows the title instead?

    Of course the URL is still there and may show up in a mouseover or in the menubar of many broswers, but most users do not notice that.

  5. #5
    Join Date
    Aug 2007
    Posts
    63

    Default

    Well Mickey is right with what I'm trying to accomplish. I also don't want anyone to mouseover and see the affiliate link, but if they see it once they're at the site, I guess it's ok by then, especially if it's a pay per click link...

    I was hoping someone could post a solution here that I could try out at least, and see what the mouseover would display. Thanks for the ideas Mickey. I will forward that post to a programmer and see if it inspires him to find a solution. If I get one, I'll post it here.

    Too bad Indexu doesn't have built in xml feed capability. I had the choice to purchase a powerful pay per click script (extreme corporate), but it is basically all ppc and xml feed results and doesn't give me much control over my search results. Too bad no script does combine the features of indexU with Corporate. Hyperseek used to have all of this but then they for some reason disabled their spider, so it has only two of the three things I need and costs $500...or a whopping $2500 I think to disable their always on xml feed that I don't want.

    Talk to ya's later, and thanks again to you too "grape grower"....
    M

  6. #6
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    or just add a mouseover and set it to the title. then use a mouseout and set it to nothing. You will need a "clean" title escaped for quotemarks.

    without looking at the source code or using the ALT-left click, no one will ever know. because sooner or later the affiliate info has to show up in the url in order for you to get credit.


    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  7. #7
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Inside your <head> in the file header.html place the code below

    <script language="JavaScript">
    <!--

    function text(txt) {
    window.status = txt;
    }
    // -->
    </script>

    Then you can use the following to display your links

    <a onmouseover='text("<%$title%>"); return true'href="<%$url%>" name="link_<%$link_id%>"><%$title%></a>

    That can be used on detail_link.html and anywhere else a link will be displayed.

    What that does is ONLY show the title of the URL, the user will not see the URL until AFTER they have clicked. Tested and working.

    Don't try to complicate matters when a simple script like this will do. If Javascript is disabled this will not work. However most people don't even know what javascript is, nevermind how to turn it off. And if they did turn it off they'd be calling tech support because most of the sites they go to won't be working for them.

  8. #8
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    I add an onmouseout and use the following"

    <a href="<%$url%>" onmouseover="window.status=' <%$title%>'; return true;" onmouseout="window.status=' ';return true;"><%$title%></a>

    for any one link, a onmouseover will fail if the $title has quotes which are not properly dealt with.


    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  9. #9
    Join Date
    Aug 2007
    Posts
    63

    Default

    About the ALT-Left Click....
    On my google ads there is no url displayed on a mouse-over, and I obviously don't want to click on my own google ads and get disqualified, so can I use ALT-Left click to see what the url is of those google ads? without it counting as a left click?
    Thanks,
    M
    As soon as everything's idiot-proof, God creates better idiots...
    Michel White
    http://www.vitisearch.com

  10. #10
    Join Date
    Aug 2007
    Posts
    63

    Default

    Can I also use this somehow to show an image on a page and have a different image appear when it's moused over?
    I want to show a .gif entitled "Click here for support" and then show an alligator image if someone mouses over it....or better yet only if they click on it....
    Thanx.
    As soon as everything's idiot-proof, God creates better idiots...
    Michel White
    http://www.vitisearch.com

  11. #11
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    You are WAY overthinking this. Most users do not know how to defeat a mouseover, most of them don't even know how to read an address bar nor do they care.

    Experienced users are going to do whatever they want to do and you're not going to stop them. Don't worry about them as they typically aren't your audience anyways and probably aren't the ones you will be making money from either.

    Yes javascript can be made to display an image on mouseover. Google is your friend
    javascript image mouseover - Google Search

Similar Threads

  1. Masking url?
    By cheetahtraffic in forum v5.x
    Replies: 2
    Last Post: 03-10-2007, 09:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •