1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Making links look like the rest of the website links?

Discussion in 'Co-op Advertising Network' started by eduardomaio, Dec 3, 2004.

  1. #1
    I have a few link classes (some white, some black, depends on the area of the website). How can I make them look like the rest of the links in that section instead of that blue ugly thing?
     
    eduardomaio, Dec 3, 2004 IP
  2. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think if you are displaying the text ads, there would be no problem with you changing formatting... just as long as the ads are visible and there, but the text based banners cannot be changed. Correct me if I'm wrong.

    EDIT: Sorry, you asked how. Parse the ad variable before you echo it. Look for the first greater than sign > and then insert class="someclass" just before it.
     
    exam, Dec 3, 2004 IP
  3. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #3
    Couldn't you use a <span> tag?
     
    digitalpoint, Dec 3, 2004 IP
  4. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #4
    or even a <div> tag right?
     
    exam, Dec 3, 2004 IP
  5. eduardomaio

    eduardomaio Peon

    Messages:
    450
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I used <font>, <span>, i'm even using <div> and nothing...

    EDIT:
    Now I look stupid... Instead of a class I assigned an ID. It's done :D
     
    eduardomaio, Dec 3, 2004 IP
  6. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I don't think those suggestions are enough, are they?
    When I view the source I see hard-coded settings, like
    style="width:468px; height:60px;
    style="width:466px; height:58px;
    Code (markup):
    Forcing the pixel size throws off my pages.

    Is there any way to modify or strip all of that out ?
     
    cyanide, Dec 3, 2004 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #7
    Use text link type ads instead of banner ads (on the setup instructions that generates the PHP code).
     
    digitalpoint, Dec 3, 2004 IP
  8. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #8
    ohhh,... hmmm
    I could 've sworn I did that... will try again, thanks !
     
    cyanide, Dec 3, 2004 IP
  9. eduardomaio

    eduardomaio Peon

    Messages:
    450
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Also, for those who are interested i've set this type of ID in a <span>

    CSS
    
    #coop a:link, #coop a:visited {color:#FFFFFF; text-decoration:underline;}
    #coop a:hover, #coop a:visited:hover {color:#000000; text-decoration:underline;}
    Code (markup):
    HTML
    
    <span id="coop">YOUR COOP CODE HERE</span>
    Code (markup):
     
    eduardomaio, Dec 5, 2004 IP
  10. Extranet Guy

    Extranet Guy Well-Known Member

    Messages:
    99
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    138
    #10
    sorry for the ignorance, but where (which file, where in code) do you put the span or div to change the link format?
     
    Extranet Guy, Dec 22, 2004 IP
  11. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #11
    You wrap it around the Coop output code that you place on your HTML pages
     
    SEbasic, Dec 22, 2004 IP
  12. Extranet Guy

    Extranet Guy Well-Known Member

    Messages:
    99
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    138
    #12
    Sorry but I'm not a real developer (just play one on tv). Here's the footer file I'm using and my novice attempt at placing the formatting (which doesn't work). Suggestions?

    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo '<span class="dp">'. $ad_network[0] ." &nbsp;|&nbsp; " . $ad_network[1] ." &nbsp;|&nbsp; " . $ad_network[2] ." &nbsp;|&nbsp; " . $ad_network[3] ." &nbsp;|&nbsp; " . $ad_network[4]. '</span>' ;
    ?>
     
    Extranet Guy, Dec 22, 2004 IP
  13. kyle422

    kyle422 Peon

    Messages:
    290
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Here is how I did it, using passthru.php

    PHP Code:
    <?php

    if (!function_exists('file_get_contents')) {
    function file_get_contents($url) {
    $handle = fopen($url, 'r');
    $string = fread($handle, 4096000);
    fclose($handle);
    return $string;
    }
    }

    include ('ad_network.php');
    echo preg_replace ("/</body>/i", '<DIV align="center" class="style?">' . $ad_network[0]. ' ' . $ad_network[1]. ' ' . $ad_network[2] . ' ' . $ad_network[3] . ' ' . $ad_network[4] . '</div></body>', file_get_contents(str_replace ('../', '', $_REQUEST['file'])));
    ?>


    You have to use CSS to do it this way. Make "style ?" (css "style ?") a color you want your links to be. Make sure to add an an a after "style ?" in your css. My css is below.

    Code:

    .style30 a {font-size: x-small; color: #B3D3E6; font-family: Geneva, Arial, Helvetica, sans-serif; }
     
    kyle422, Dec 22, 2004 IP
  14. Extranet Guy

    Extranet Guy Well-Known Member

    Messages:
    99
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    138
    #14
    thanks for the very detailed post. unfortunately, my pages are in php and I think you're solution only works on html pages.......can anyone provide a similar explanation on how I put the formatting in the footer of a php page (my code is in post above), instead of in passthru.php? Or if there are other solutions, I'm game....
     
    Extranet Guy, Dec 22, 2004 IP