You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 46 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Avatarlist.php [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Wyldeman
Nuke Cadet
Nuke Cadet


Joined: Dec 22, 2007
Posts: 2


PostPosted: Sat Dec 22, 2007 12:44 pm Reply with quoteBack to top

Trying to get an avatar i get this message. I cant get an av. i have uploaded the av to the /var/www/Platinum/html/modules/Forums/images/avatars
Quote:
Catchable fatal error: Object of class Directory could not be converted to string in /var/www/Platinum/html/modules/Your_Account/public/avatarlist.php on line 63


Code:
<?php

/*********************************************************************************/
/* CNB Your Account: An Advanced User Management System for phpnuke           */
/* ============================================                               */
/*                                                                            */
/* Copyright (c) 2004 by Comunidade PHP Nuke Brasil                           */
/* http://dev.phpnuke.org.br & http://www.phpnuke.org.br                      */
/*                                                                            */
/* Contact author: escudero@phpnuke.org.br                                    */
/* International Support Forum: http://ravenphpscripts.com/forum76.html       */
/*                                                                            */
/* 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.             */
/*                                                                            */
/*********************************************************************************/
/* CNB Your Account is the official successor of NSN Your Account by Bob Marion   */
/*********************************************************************************/
/* PHP-Nuke Platinum: Expect to be impressed                          COPYRIGHT */
/*                                                                              */
/* Copyright (c) 2004 - 2006 by http://www.techgfx.com                          */
/*     Techgfx - Graeme Allan                               (goose@techgfx.com) */
/*                                                                              */
/* Copyright (c) 2004 - 2006 by http://www.conrads-berlin.de                    */
/*     MrFluffy - Axel Conrads                         (axel@conrads-berlin.de) */
/*                                                                              */
/* Refer to TechGFX.com for detailed information on PHP-Nuke Platinum           */
/*                                                                              */
/* TechGFX: Your dreams, our imagination                                        */
/*********************************************************************************/

if (!stristr($_SERVER['SCRIPT_NAME'], "modules.php")) {
    header("Location: ../../../index.php");
    die ();
}
if (!defined('CNBYA')) { echo "CNBYA protection"; exit; }

    include("header.php");
    $avatarcatname = ereg_replace ("_", "&nbsp;", $avatarcategory);
    title($avatarcategory." "._YA_AVATARGALL);
    Opentable();
    nav();
    CloseTable();
    echo "<br>";
    Opentable();
    echo "<center><font class=\"title\"><b>"._AVAILABLEAVATARS." "._YA_ONCAT." ".$avatarcatname."</b></font><br><br>";
    echo "<b>"._YA_TOSELCTAVAT."</b><br><br></center>";
    Opentable2();
    echo "<center>";
   
    //avatarfix by menelaos dot hetnet dot nl
    $resultbc = $db->sql_query("SELECT * FROM ".$prefix."_bbconfig");
    while($rowbc = $db->sql_fetchrow($resultbc))
    {   $board_config[$rowbc[config_name]] = $rowbc[config_value];
    }
    $direktori = $board_config['avatar_gallery_path'];
    $d = dir("$direktori/$avatarcategory");
   
    $temcount = 1;
    while (false !== ($entry = $d->read())) {
        if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $entry) ) {
            if( $entry != '.' && $entry != '..' && !is_file($d . '/' . $entry) && !is_link($d . '/' . $entry) ) {
                $patterns[0] = "/\.gif/";
                $patterns[1] = "/\.png/";
                $patterns[2] = "/\.jpg/";
                $patterns[3] = "/\.jpeg/";
                $patterns[4] = "/-/";
                $patterns[5] = "/_/";
                $replacements[5] = "";
                $replacements[4] = "&nbsp;";
                $replacements[3] = "";
                $replacements[2] = "";
                $replacements[1] = "";
                $replacements[0] = "";
                ksort($patterns);
                ksort($replacements);
                $entryname =  preg_replace($patterns, $replacements, $entry);
                $a=1;
               
                //avatarfix by menelaos dot hetnet dot nl
                echo "<a href=\"modules.php?name=$module_name&op=avatarsave&category=$avatarcategory&avatar=$entry\"><img src=\"$direktori/$avatarcategory/$entry\" border=\"0\" alt=\"$entryname\" title=\"$entryname\" hspace=\"10\" vspace=\"10\"></a>";
            }
            if ($temcount == 10) {
                echo "<br>";
                $temcount -= 10;
            }
            $temcount ++;
        }
    }
    echo "</center>";
    CloseTable2();
    echo "<center><br>"._GOBACK."<br></center>";
    $d->close();
    CloseTable();
    include("footer.php");

?>


Thank you for the help in advance.
The Wyldeman
Find all posts by WyldemanView user's profileSend private message
gnaunited
Corporal
Corporal


Joined: Jun 22, 2003
Posts: 66

Location: Northglenn, Colorado

PostPosted: Sat Jun 07, 2008 10:16 pm Reply with quoteBack to top

This is a PHP5 problem and I didn't have this problem last time I installed this.

File modules/Your_Account/public/avatarlist.php

Replace (line 52):
Code:
if( $entry != '.' && $entry != '..' && !is_file($d . '/' . $entry) && !is_link($d . '/' . $entry) ) {


With
Code:
if( $entry != '.' && $entry != '..' && !is_file($d->dir . '/' . $entry) && !is_link($d->dir . '/' . $entry) ) {
Find all posts by gnaunitedView user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.284 Seconds - 258 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::