User Profile

Collapse

Profile Sidebar

Collapse
tjtryutyu
tjtryutyu
Last Activity: Sep 22 '09, 08:00 AM
Joined: Nov 7 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thanks Acoder!

    IndexOf worked like a charm!
    BTW here is my new script:

    Code:
    function externalLinks() {
     if (!document.getElementsByTagName) return;
     var anchors = document.getElementsByTagName("a");
     for (var i=0; i<anchors.length; i++) {
       var anchor = anchors[i];
       if (anchor.getAttribute("href") && anchor.getAttribute("rel").indexOf("external")
    ...
    See more | Go to post

    Leave a comment:


  • External links in new window..wild card regexp

    I know very little javascript. Nonetheless, I found some example code that opens links into a new window if they contain "external" on the "rel attribute. For example:
    Code:
    <a href="http:example.com" rel="external">this link opens in a external window</a>
    I later hacked the code so it works it "nofollow" is added to the "rel" attribute like:
    Code:
    <a href="http:example.com"
    ...
    See more | Go to post

  • tjtryutyu
    replied to Protecting source code
    in PHP
    I had similar concerns as the original poster. Here is a partial solution:

    Create sourcefile.htm and targetfile.htm. Be sure to add
    Code:
    AddHandler application/x-httpd-php .htm .html
    to your .htaccess so PHP can be parsed inside htm files.

    Create this function inside a separate PHP file. For ease of explanation we will call our file myfunctions.php . Here is the function:
    Code:
    <?php
    //set global server
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...