1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Hide?

Discussion in 'PHP & Perl' started by oldweb, Feb 2, 2015.

  1. oldweb

    oldweb Regular Member

    Joined:
    Dec 22, 2012
    Messages:
    448
    Likes Received:
    45
    I had a great little piece of "Php" code (not css) that I could put in any wordpress footer where the credits were required and if I did not include the credits the site would not function. This script would hide the required credits code but it still left it on the page so the page still functioned but it did not show the footer credits in the wordpess blog and they were hidden t search engines too. I lost the code, does anyone know it?
     
  2. bkiefer

    bkiefer Newbie

    Joined:
    Aug 15, 2014
    Messages:
    44
    Likes Received:
    16
    Do you mean Javascript? Or the backend checks for the credit code?
     
  3. oldweb

    oldweb Regular Member

    Joined:
    Dec 22, 2012
    Messages:
    448
    Likes Received:
    45
    hi, no not javascript but this was a Php script, just a small line of code, it might have been "php print" or something like that (I'm sorry I'm limited to my knowledge of Php) but it was able to completely hide a required script and the page would still run. Sometimes with a wordpress themes the author will force you to include their own links in the footer and if you delete it the page will just be blank or not run. With this line of code wrapped around that you could override it.
     
  4. Freeopkiller

    Freeopkiller Junior Member

    Joined:
    Dec 30, 2009
    Messages:
    117
    Likes Received:
    47
    Location:
    Montana
    I'll take a look at it. Which theme are you using ? You can pm if you like..
     
  5. oldweb

    oldweb Regular Member

    Joined:
    Dec 22, 2012
    Messages:
    448
    Likes Received:
    45
    Ok thanks, this theme here: http://www.templatelite.com/livedemo/?id=37

    The download link is at the top of that page.

    I updated to that version from an older one and that is when I noticed the link in the footer.

    edit: OK I think I found the code I wanted but it's not working with this, the page is blank:

    Here is what I have (the part "theme_credit;" is the required part )

    Code:
    <?php // Hide footer credits
    
    if(false) {    
        theme_credit();
             ?> 
    
    <?php } ?>
    
     
    Last edited: Feb 3, 2015
  6. Freeopkiller

    Freeopkiller Junior Member

    Joined:
    Dec 30, 2009
    Messages:
    117
    Likes Received:
    47
    Location:
    Montana
    Sorry olweb, I'm not familiar with the code your referring. As for nulling the template it's base64 and would require more time than I can invest in it.. Thought it may be a simple fix to try and help you out..
     
  7. oldweb

    oldweb Regular Member

    Joined:
    Dec 22, 2012
    Messages:
    448
    Likes Received:
    45
    it's OK, I might have to find a new theme.
     
  8. wizzart

    wizzart Newbie

    Joined:
    Mar 1, 2014
    Messages:
    15
    Likes Received:
    1
    PHP Lock It , very cheap.