Hello & Welcome to our community. Is this your first visit? Register

Results 1 to 11 of 11
  1. #1
    Crawl Me Maybe Crawl's Avatar

    Rank
    Alpha Male
    Join Date
    Aug 2009
    Location
    Behind You
    Posts
    2,134

    [Help] PHP (Removing Error)

    I've been trying to remove the powered by from Aardvark, but cannot seem to remove it. I have found where it is, but when I remove it, it just makes the whole page white. How do I remove this without receiving an error.

    PHP Code:
        if ($this->filename == 'wrapper') {
          
    $powered_by_check strpos($skin'{$powered_by}') ? 0;
      
          if (
    $powered_by_check) {
            
    $return $skin;
          }

        } 
    Full page:

    PHP Code:
    <?php
    //===========================================================================\\
    // Aardvark Topsites PHP 5.2                                                 \\
    // Copyright (c) 2000-2009 Jeremy Scheff.  All rights reserved.              \\
    //---------------------------------------------------------------------------\\
    // http://www.aardvarktopsitesphp.com/                http://www.avatic.com/ \\
    //---------------------------------------------------------------------------\\
    // This program is free software; you can redistribute it and/or modify it   \\
    // under the terms of the GNU General Public License as published by the     \\
    // Free Software Foundation; either version 2 of the License, or (at your    \\
    // option) any later version.                                                \\
    //                                                                           \\
    // This program is distributed in the hope that it will be useful, but       \\
    // WITHOUT ANY WARRANTY; without even the implied warranty of                \\
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General \\
    // Public License for more details.                                          \\
    //===========================================================================\\

    if (!defined('ATSPHP')) {
      die(
    "This file cannot be accessed directly.");
    }

    class 
    skin {
      var 
    $filename;

      function 
    skin($filename) {
        
    $this->filename $filename;
      }

      function 
    make() {
        global 
    $CONF$TMPL;

        
    $file "{$CONF['skins_path']}/{$TMPL['skin_name']}/{$this->filename}.html";
        
    $fh_skin fopen($file'r');
        
    $skin = @fread($fh_skinfilesize($file));
        
    fclose($fh_skin);

        
    $parse 1;

        if (
    $this->filename == 'wrapper') {
          
    $powered_by_check strpos($skin'{$powered_by}') ? 0;
      
          if (
    $powered_by_check) {
            
    $return $skin;
          }

        }
        elseif (
    $this->filename == 'admin' || $this->filename == 'ssi_top' || $this->filename == 'ssi_members') {
          
    $return $skin;
        }
        else {
          
    $return "<!-- Begin {$this->filename}.html -->\n{$skin}<!-- End {$this->filename}.html -->\n\n";
        }

        if (
    $parse) {
          return 
    $this->parse($return);
        }
        else {
          return 
    $return;
        }
      }

      function 
    send_email($email) {
        global 
    $CONF$TMPL;

        
    $file "{$CONF['skins_path']}/{$TMPL['skin_name']}/{$this->filename}.html";
        
    $fh_skin fopen($file"r");
        
    $skin = @fread($fh_skinfilesize($file));
        
    fclose($fh_skin);

        
    $skin_array explode("\n"$skin);

        
    $subject array_shift($skin_array);
        
    $subject str_replace('Subject: '''$subject);
        
    $body implode("\n"$skin_array);

        
    $subject $this->parse($subject);
        
    $body $this->parse($body);

        
    mail($email$subject$body"From: {$CONF['your_email']}\r\n");
      }
      
      function 
    parse($skin) {
        global 
    $LNG$TMPL$n$parse_time;

        
    $skin preg_replace_callback('/{\$lng->(.+?)}/i'create_function('$matches''global $LNG; return $LNG[$matches[1]];'), $skin);
        
    $skin preg_replace_callback('/{\$(.+?)}/i'create_function('$matches''global $TMPL; return $TMPL[$matches[1]];'), $skin);
        
    $skin preg_replace_callback('/{include \"(.+?)\"}/i'create_function('$matches''return file_get_contents($matches[1]);'), $skin);

        return 
    $skin;
      }

      function 
    callback($matches) {
        return 
    $matches[1];
      }
    }

    class 
    main_skin extends skin {
      function 
    main_skin($filename) {
        global 
    $CONF$DB$FORM$LNG$TIMER$TMPL;

        
    $this->filename $filename;

        
    // Number of members
        
    list($TMPL['num_members']) = $DB->fetch("SELECT COUNT(*) FROM {$CONF['sql_prefix']}_sites WHERE active = 1"__FILE____LINE__);

        
    // Build the multiple pages menu
        
    if ($TMPL['num_members'] > $CONF['num_list']) {
          
    $num $TMPL['num_members'];
          
    $done 0;
          
    $TMPL['multiple_pages_menu'] = "<select name=\"start\">\n";
          while (
    $num 0) {
            
    $start $done $CONF['num_list'] + 1;
            
    $end = ($done 1) * $CONF['num_list'];
            if (
    $end >= $TMPL['num_members']) { $end $TMPL['num_members']; }
            
    $FORM['start'] = isset($FORM['start']) ? $FORM['start'] : 1;

            if (
    $FORM['start'] == $start) {
              
    $TMPL['multiple_pages_menu'] .= "<option value=\"{$start}\" selected=\"selected\">{$start} - {$end}</option>\n";
            }
            else {
              
    $TMPL['multiple_pages_menu'] .= "<option value=\"{$start}\">{$start} - {$end}</option>\n";
            }

            
    $num $num $CONF['num_list'];
            
    $done++;
          }
          
    $TMPL['multiple_pages_menu'] .= '</select>';
        }
        else { 
    $TMPL['multiple_pages_menu'] = ''; }
      
        
    // Build the ranking method menu
        
    $ranking_method = isset($FORM['method']) ? $FORM['method'] : $CONF['ranking_method'];
        
    $TMPL['ranking_methods_menu'] = '<select name="method">'."\n";
        if (
    $ranking_method == 'pv') { $TMPL['ranking_methods_menu'] .= "<option value=\"pv\" selected=\"selected\">{$LNG['g_pv']}</option>\n"; }
        else { 
    $TMPL['ranking_methods_menu'] .= "<option value=\"pv\">{$LNG['g_pv']}</option>\n"; }
        if (
    $ranking_method == 'in') { $TMPL['ranking_methods_menu'] .= "<option value=\"in\" selected=\"selected\">{$LNG['g_in']}</option>\n"; }
        else { 
    $TMPL['ranking_methods_menu'] .= "<option value=\"in\">{$LNG['g_in']}</option>\n"; }
        if (
    $ranking_method == 'out') { $TMPL['ranking_methods_menu'] .= "<option value=\"out\" selected=\"selected\">{$LNG['g_out']}</option>\n"; }
        else { 
    $TMPL['ranking_methods_menu'] .= "<option value=\"out\">{$LNG['g_out']}</option>\n"; }
        
    $TMPL['ranking_methods_menu'] .= '</select>';
      
        
    // Build the categories menu and feed.php link
        
    $TMPL['feed'] = 'feed.php';
        
    $current_cat = isset($FORM['cat']) ? $FORM['cat'] : $LNG['main_all'];
        
    $TMPL['categories_menu'] = "<select name=\"cat\">\n";
        if (
    $current_cat == $LNG['main_all']) {
          
    $TMPL['categories_menu'] .= "<option value=\"\" selected=\"selected\">{$LNG['main_all']}</option>\n";
        }
        else {
          
    $TMPL['categories_menu'] .= "<option value=\"\">{$LNG['main_all']}</option>\n";
        }
        foreach (
    $CONF['categories'] as $cat => $skin) {
          if (
    $current_cat == $cat) {
            
    $TMPL['categories_menu'] .= "<option value=\"{$cat}\" selected=\"selected\">{$cat}</option>\n";
            
    $TMPL['feed'] .= "?cat={$cat}";
          }
          else {
            
    $TMPL['categories_menu'] .= "<option value=\"{$cat}\">{$cat}</option>\n";
          }
        }
        
    $TMPL['categories_menu'] .= '</select>';

        
    // Featured member
        
    if ($CONF['featured_member'] && $TMPL['num_members']) {
          
    $result $DB->select_limit("SELECT username, url, title, description, banner_url FROM {$CONF['sql_prefix']}_sites WHERE active = 1 ORDER BY RAND()"10__FILE____LINE__);
          
    $row $DB->fetch_array($result);
          
    $TMPL array_merge($TMPL$row);

          
    $TMPL['featured_member'] = base::do_skin('featured_member');
        }

        
    $TMPL['query'] = isset($TMPL['query']) ? $TMPL['query'] : '';

        
    // Please do not remove the link to http://www.aardvarktopsitesphp.com/.
        // This is a free script, all I ask for is a link back.
        
    $TMPL['powered_by'] = $LNG['main_powered'].' <a href="http://www.aardvarktopsitesphp.com/"><b>Aardvark Topsites PHP</b></a> '.$TMPL['version'];

        
    // If you want to remove these links, you can; however, I would appreciate
        // it if you left them there.
        // $TMPL['powered_by'] .= '';

        
    if (!isset($TMPL['content'])) { $TMPL['content'] = ''; }

        
    $TMPL['num_queries'] = $DB->num_queries;
        
    $TMPL['execution_time'] = $TIMER->get_time();
      }
    }
    ?>
    Thanks.


  2.  
  3. #2
    Red Octobers Makarov's Avatar

    Rank
    Gamma
    Join Date
    Apr 2010
    Location
    NW Chicago
    Posts
    3,677
    There's probably a few checkers that display a white page because you're simply taking their credits away..

    Sent from my DROID RAZR using Tapatalk 2

  4. #3
    Crawl Me Maybe Crawl's Avatar

    Rank
    Alpha Male
    Join Date
    Aug 2009
    Location
    Behind You
    Posts
    2,134

    Re: [Help] PHP (Removing Error)

    I remember removing it before, although I can't remember where.

  5. #4
    Programmer

    Rank
    Moderator
    Join Date
    May 2008
    Location
    United States
    Posts
    1,201

    Re: [Help] PHP (Removing Error)

    Try this.
    Replace:
    PHP Code:
    $powered_by_check strpos($skin'{$powered_by}') ? 0;
      
          if (
    $powered_by_check) {
            
    $return $skin;
          } 
    with:
    PHP Code:
    $return $skin
    I am who I am.
    I know what I know.
    I do what I do.
    Buy anything from Amazon.com?
    Buy from smile.amazon.com and 5% of your purchase goes to a charity of your choice.
    Perhaps Red Cross or Electronic Frontier Foundation?

    Quote Originally Posted by s-p-n
    but in some sense it makes more sense

  6. #5
    echo $funnyqoute; JaydenC's Avatar

    Rank
    True Member
    Join Date
    Feb 2012
    Location
    Regina
    Posts
    1,071

    Re: [Help] PHP (Removing Error)

    You have error reporting off, And there's an error.
    I am guessing



  7. #6
    Ultimate Member Exiled Hero's Avatar

    Rank
    Member
    Join Date
    Nov 2008
    Location
    Multiple Places
    Posts
    192

    Re: [Help] PHP (Removing Error)

    Replace:

    PHP Code:
        if ($this->filename == 'wrapper') {
          
    $powered_by_check strpos($skin'{$powered_by}') ? 0;
      
          if (
    $powered_by_check) {
            
    $return $skin;
          } 
    With:

    PHP Code:
        if ($this->filename == 'wrapper') {
            
    $return $skin
    Remove:

    PHP Code:
        $TMPL['powered_by'] = $LNG['main_powered'].' <a href="http://www.aardvarktopsitesphp.com/"><b>Aardvark Topsites PHP</b></a> '.$TMPL['version']; 
    .Paul: Got so god damn bored today I wanted to experiment.
    Fabian: LOL
    Fabian: When I'm bored I just chat with random people or something
    Fabian: But you code a fucking encryption ._.

  8. #7
    Web Developer Chris's Avatar

    Rank
    Developer
    Join Date
    Nov 2008
    Location
    index.html
    Posts
    1,124

    Re: [Help] PHP (Removing Error)

    Either way, you shouldn't be removing it. I'd love to see you spend months developing something just to see some kid remove the only proof that you made it. No, I'm not saying you're a kid, I'm only saying that it's not fun when someone does it to you.

  9. #8
    echo $funnyqoute; JaydenC's Avatar

    Rank
    True Member
    Join Date
    Feb 2012
    Location
    Regina
    Posts
    1,071

    Re: [Help] PHP (Removing Error)

    Quote Originally Posted by chrisdothtml View Post
    Either way, you shouldn't be removing it. I'd love to see you spend months developing something just to see some kid remove the only proof that you made it. No, I'm not saying you're a kid, I'm only saying that it's not fun when someone does it to you.
    What chris means is, Its a childish move to remove credits.
    Add this to the top of your global.php or whatever they use to output there classes
    PHP Code:
    error_reporting(E_ALL); 
    And post the error that comes up, I can almost garuntee this is your problem.



  10. #9
    Red Octobers Makarov's Avatar

    Rank
    Gamma
    Join Date
    Apr 2010
    Location
    NW Chicago
    Posts
    3,677
    Or better yet, <!-- {powered_by} -->

    Sent from my DROID RAZR using Tapatalk 2

  11. #10
    ॐ.̲̲N̲̲E̲̲T̲̲ ̲̲D̲̲e̲̲v̲̲ שเ๒єtгเ๒є's Avatar

    Rank
    Subscriber
    Join Date
    Mar 2012
    Location
    C:\inetpub\
    Posts
    859

    Re: [Help] PHP (Removing Error)

    Quote Originally Posted by Makarov View Post
    Or better yet, <!-- {powered_by} -->

    Sent from my DROID RAZR using Tapatalk 2
    is it absolutly okay to remove any credits from the direct view if u just put them in the html source?
    im absolutly not sure its okay, because only ppl who are looking in the source will find out. however, a credit can be very annoying as message on the screened website.
    Sincerely, שเ๒єtгเ๒є. (vibetribe)


  12. #11
    Programmer

    Rank
    Moderator
    Join Date
    May 2008
    Location
    United States
    Posts
    1,201

    Re: [Help] PHP (Removing Error)

    Quote Originally Posted by VibeTribe View Post
    is it absolutly okay to remove any credits from the direct view if u just put them in the html source?
    im absolutly not sure its okay, because only ppl who are looking in the source will find out. however, a credit can be very annoying as message on the screened website.
    While removing a copyright line is usually illegal, unless otherwise stated in the script or in the downloaded file or in the page you downloaded it on, removing a Powered By line should be fine. Many scripts that I have seen even provide instructions to remove the line.
    I am who I am.
    I know what I know.
    I do what I do.
    Buy anything from Amazon.com?
    Buy from smile.amazon.com and 5% of your purchase goes to a charity of your choice.
    Perhaps Red Cross or Electronic Frontier Foundation?

    Quote Originally Posted by s-p-n
    but in some sense it makes more sense

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HyperFilter
Sponsored by HyperFilter , secured by Incapsula , powered by LiteSpeed.
Mods by DBTech. All times are GMT +1. The time now is 11:26 AM.
Powered by vBulletin® Copyright , Jelsoft Enterprises Ltd.