PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Wed Mar 10, 2004 8:37 am Reply with quote Back to top

I have a new member and he is using the tilde (~) in his name. Your site info block does not seem to display his name. Anything I can do?

Image
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Mar 10, 2004 1:48 pm Reply with quote Back to top

It works when I try it on mine ??
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Wed Mar 10, 2004 4:32 pm Reply with quote Back to top

Have you updated the block recently? The one I use is from Oct 2003.

If not this could it be something else?
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Mar 10, 2004 4:34 pm Reply with quote Back to top

Whatever is out there is the latest. But, nothing I might have changed should have affected that although changes in nuke might have.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Wed Mar 10, 2004 4:39 pm Reply with quote Back to top

Well, it could be anything then. Thanks for the help. It's not that big of a deal to me really.
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Mar 10, 2004 4:43 pm Reply with quote Back to top

Just download the latest and apply it to see if it clears up.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Wed Mar 10, 2004 4:47 pm Reply with quote Back to top

no change
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Mar 10, 2004 4:50 pm Reply with quote Back to top

Try to register that name at my site. You will have to use an emil address that isn't your regular account.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Wed Mar 10, 2004 4:57 pm Reply with quote Back to top

Registration Error!


ERROR: Invalid Nickname

~|DSOM|Killa_ClowNz~ is the name
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Mar 10, 2004 5:54 pm Reply with quote Back to top

Which is exactly what should have happened when he tried to enter it in yours. How did it get entered?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Wed Mar 10, 2004 6:01 pm Reply with quote Back to top

Well, we made a change to the your account module a while back to allow more characters in names.

Code:
if ((!$username) || ($username=="") || (ereg("[^a-zA-Z0-9_ \.-\[\]]",$username))) $stop = "<center>"._ERRORINVNICK."</center><br>";


I don't see how he is able to use the tilde though.
View user's profile Send private message Visit poster's website AIM Address ICQ Number
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Thu Mar 11, 2004 4:52 am Reply with quote Back to top

Someone else just created a new account using normal characters and it is doing the same thing. Now I am lost.
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Thu Mar 11, 2004 5:02 am Reply with quote Back to top

I have to ask the infamous question at this point: What have you changed recently?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Thu Mar 11, 2004 8:19 am Reply with quote Back to top

Coppermine is it.

I have added a googletap for it but it's not working.

Other than that I can't think of anything.
View user's profile Send private message Visit poster's website AIM Address ICQ Number
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Thu Mar 11, 2004 7:16 pm Reply with quote Back to top

I found it!

I am using the random photo block for coppermine and when it is active I get that problem!
View user's profile Send private message Visit poster's website AIM Address ICQ Number
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Tue Mar 16, 2004 11:31 am Reply with quote Back to top

It seems like the random photo block and your site info block don't get along. Are you interested in trouble shooting this with me?
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Mar 16, 2004 11:36 am Reply with quote Back to top

In a word, no Laughing (no time) - However, I can point you in the right direction. Chances are that both blocks are using the same variable name somewhere. When you find it/them, just rename all occurences.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Tue Mar 16, 2004 11:41 am Reply with quote Back to top

lol

Thanks, will look in that direction.
View user's profile Send private message Visit poster's website AIM Address ICQ Number
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Fri Mar 19, 2004 7:20 pm Reply with quote Back to top

No luck so far. Will textpad search two files for matches?

Since I stink at php I am afraid I am missing a variable somewhere. Neutral
View user's profile Send private message Visit poster's website AIM Address ICQ Number
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Fri Mar 19, 2004 7:50 pm Reply with quote Back to top

$10 bucks to fix this?

I can't take it anymore!

Code:
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.2.2a for CMS                                   //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2003  Grégory DEMAR <gdemar@wanadoo.fr>               //
// http://www.chezgreg.net/coppermine/                                      //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team                                        //
// (http://coppermine.sf.net/team/)                                          //
// see /docs/credits.html for details                                        //
// ------------------------------------------------------------------------- //
// New Port by GoldenTroll                                                  //
// http://coppermine.findhere.org/                                          //
// Based on coppermine 1.1d by Surf  http://www.surf4all.net/               //
// ------------------------------------------------------------------------- //
// 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.                                      //
// ------------------------------------------------------------------------- //
if (eregi("block-CPG-Random_pictures.php", $PHP_SELF)) {
    Header("Location: index.php");
    die();
}
define('NO_HEADER', true);
global $prefix, $db, $CONFIG, $Version_Num, $cpg_dir;
//global $ALBUM_SET;

$cpg_dir = "coppermine";

$cpg_block = false;
require("modules/".$cpg_dir."/include/load.inc.php");
$cpg_block = true;
//get_private_album_set();
$cpg_numberpic = $CONFIG['thumbcols']; //number of thumbs
$cpg_numberpic=1; //number of thumbs
$cpg_limit = $cpg_numberpic;
$content = '<p align="center">';
function truncate_string_randpic($str)
{
    $cpg_maxlength = 15; // maximum lengtht of name in block
    if (strlen($str) > $cpg_maxlength)
        return substr($str, 0, $cpg_maxlength) . " ...";
    else
        return $str;
}

// modified by DJMaze
$cpg_result = $db->sql_query("SELECT COUNT(*) FROM ".$cpg_prefix."pictures INNER JOIN ".$cpg_prefix."albums AS a ON (p.aid = a.aid AND ".VIS_GROUPS.") WHERE approved='YES' GROUP BY pid");
//$cpg_result = $db->sql_query("SELECT COUNT(*) from " . $cpg_prefix . "pictures WHERE approved = 'YES' $ALBUM_SET");

$nbEnr = $db->sql_fetchrow($cpg_result);
$cpg_pic_count = $nbEnr[0];
// mysql_free_result($cpg_result);
// if we have more than 1000 pictures, we limit the number of picture returned
// by the SELECT statement as ORDER BY RAND() is time consuming
if ($cpg_pic_count > 1000) {
    $cpg_result = $db->sql_query("SELECT COUNT(*) from " . $cpg_prefix . "pictures WHERE approved = 'YES'");
    $nbEnr = mysql_fetch_row($cpg_result);
    $cpg_total_count = $nbEnr[0];
    // mysql_free_result($cpg_result);
    $granularity = floor($cpg_total_count / 1000);
    $cor_gran = ceil($total_count / $pic_count);
    srand(time());
    for ($i = 1; $i <= $cor_gran; $i++) $cpg_random_num_set = rand(0, $granularity) . ', ';
    $cpg_random_num_set = substr($cpg_random_num_set, 0, -2);

    // modified by DJMaze
    $cpg_result = $db->sql_query("SELECT pid, filepath, filename, p.aid FROM ".$cpg_prefix."pictures AS p INNER JOIN ".$cpg_prefix."albums AS a ON (p.aid = a.aid AND ".VIS_GROUPS.") WHERE randpos IN ($cpg_random_num_set) AND approved='YES' GROUP BY pid ORDER BY RAND() DESC LIMIT $cpg_limit");
    //$cpg_result = $db->sql_query("SELECT pid, aid, filepath, filename FROM " . $cpg_prefix . "pictures WHERE  randpos IN ($cpg_random_num_set) AND approved = 'YES' $ALBUM_SET ORDER BY RAND() LIMIT $cpg_limit");
} else {
    // modified by DJMaze
    $cpg_result = $db->sql_query("SELECT pid, filepath, filename, p.aid FROM ".$cpg_prefix."pictures AS p INNER JOIN ".$cpg_prefix."albums AS a ON (p.aid = a.aid AND ".VIS_GROUPS.") WHERE approved='YES' GROUP BY pid ORDER BY RAND() DESC LIMIT $cpg_limit");
    //$cpg_result = $db->sql_query("SELECT pid, aid, filepath, filename FROM " . $cpg_prefix . "pictures WHERE approved = 'YES' $ALBUM_SET ORDER BY RAND() LIMIT $cpg_limit");
}
$cpg_rowset = array();
while ($cpg_row = $db->sql_fetchrow($cpg_result)) {
    if ($CONFIG['seo_alts'] == 0) {
   $cpg_thumb_title = $cpg_row['filename'];
    } else {
        if ($cpg_row['title'] != '') {
            $cpg_thumb_title = $cpg_row['title'];
        } else {
            $cpg_thumb_title = substr($cpg_row['filename'], 0, -4);
        }
    }
    stripslashes($cpg_thumb_title);
    $content .= '<a href="' . $CPG_M_URL . '&file=displayimage&pos=-' . $cpg_row["pid"] . '"><img src="' . $cpg_row["filepath"] . $CONFIG["thumb_pfx"] . $cpg_row["filename"] . '" border="0" alt="' . $thumb_title . '" title="' . $thumb_title . '"><br>' . truncate_string_randpic($thumb_title) . '</a><br>';
}
$content .= '<br /><a href="' . $CPG_M_URL . '">'.$lang_pagetitle_php["photogallery"].'</a></p>';

?>
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Fri Mar 19, 2004 8:19 pm Reply with quote Back to top

We have had company since Wednesday. I am not ignoring you Smile. I will look at this as soon as I can.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Fri Mar 19, 2004 8:33 pm Reply with quote Back to top

What!

I am the most important thing in your life! Wake up!

lol, I thought you were really serious about not having the time...ever.

Thanks man.
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Fri Mar 19, 2004 8:45 pm Reply with quote Back to top

My guess will be something in this file: require("modules/".$cpg_dir."/include/load.inc.php");

The author breaks a cardinal rule from FB's instructions on coding modules:
Quote:
but remember to not use reserved variables names like "name" and/or "file" ...

He is using $name as a variable. Let's start with that as that may be the source. In load.inc.php rename ALL $name to $xxxname and see if that fixes it. I always start with obvious potentials and work into harder stuff. Let me know.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Fri Mar 19, 2004 11:07 pm Reply with quote Back to top

I made those changes and no luck.

Here is the load.inc.php for your review.

Code:
<?php
//  PHPNuke                                        POSTNuke
if (!eregi("modules.php", $_SERVER['PHP_SELF']) && !defined("LOADED_AS_MODULE") &&
    !$cpg_block && !defined('INSTALL_PHP')) {
    die ("You can't access this file directly...");
}
//define('SILLY_SAFE_MODE', 1);

$CPG_VERSION = '1.2.2b';
if (!$cpg_block) require_once("mainfile.php");
if (!defined('IN_COPPERMINE')) define('IN_COPPERMINE', true);

if (!isset($cpg_name)) $cpg_name = $GLOBALS['name']; // postnuke

if (!isset($cpg_dir)) $cpg_dir = $cpg_name;
$CPG_M_DIR = "modules/" . $cpg_dir;
$CPG_URL = "modules.php?name=" . $cpg_dir;
$CPG_M_URL = $CPG_URL;
$CPG_PROFILE_URL = "profile-.html";

global $CONFIG, $CURRENT_ALBUM_DATA, $CPG_URL, $cookie;
// language variables not declared global else where
global $lang_user_admin_menu, $lang_gallery_admin_menu, $lang_cat_list,
       $lang_get_pic_data,    $lang_pagetitle_php,      $lang_charset,
       $lang_text_dir,        $lang_byte_units,         $lang_day_of_week,
       $lang_month,           $lang_yes,                $lang_no,
       $lang_back,            $lang_continue,           $lang_info,
       $lang_error,           $album_date_fmt,          $lastcom_date_fmt,
       $lastup_date_fmt,      $lasthit_date_fmt,        $comment_date_fmt,
       $lang_picinfo,         $lang_album_admin_menu;
global $template_tab_display, $template_user_list_info_box, $template_album_admin_menu; // index.php
global $template_img_navbar,  $template_display_picture,    $template_image_rating,
       $template_image_comments, $template_add_your_comment; // displayimage.php
global $template_cpg_die, $template_msg_box; // functions.inc.php
global $template_ecard;                      // displayecard.php
global $template_edit_one_pic;               // editDesc.inc.php
global $field_user_id, $field_user_pass, $field_user_name, $field_user_email;
global $first_install_M_DIR,$CPG_PROFILE_URL,$meta_link;

// load postnuke specific part
if (!isset($Version_Num)) {
    $CPG_URL = "modules.php?op=modload&name=" . $cpg_dir;
    $CPG_M_URL = $CPG_URL."&file=index";
    $CPG_PROFILE_URL = "user.php?op=userinfo&uname=";
    if (!defined('IN_POSTNUKE')) {
        require_once($CPG_M_DIR . "/include/postnuke.php");
    }
} else {
    if (!defined('LOGOUT_URL')) {
        define('LOGOUT_URL', "modules.php?name=Your_Account&op=logout");
        define('LOGIN_URL', "modules.php?name=Your_Account"); //&redirect=$cpg_name
        define('NEWUSER_URL', "modules.php?name=Your_Account&op=new_user");
        define('ADDUSER_URL', "admin.php?op=mod_users");
//        define('ADDUSER_URL', "modules.php?name=Your_Account&file=admin&op=addUser");
        define('USERPROF_URL', "modules.php?name=Your_Account&op=edituser");
    }
    $module_name = $cpg_name;
    $field_user_regdate = "user_regdate";
    $field_user_avatar = "user_avatar";
    // get_lang($module_name);
    // load phpnuke 5.5-6.0 specific part
    if ($Version_Num[0] < 6 || $Version_Num == "6.0") {
        global $dbi;
        if (!defined('IN_OLDNUKE')) {
            require_once($CPG_M_DIR . "/include/oldnuke.php");
        }
    }
    // load phpnuke 6.5+ specific part
    else {
        $field_user_id = "user_id";
        $field_user_name = "username";
        $field_user_pass = "user_password";
        $field_user_email = "user_email";
    }
}

if (!defined('INSTALL_PHP')) {
    // load required settings for this install
    $result = $db->sql_fetchrow($db->sql_query("SELECT prefix, dirname FROM cpg_installs WHERE dirname='$cpg_dir'"));
    if (!$result || $result[1] != $cpg_dir) {
        $error = "The coppermine module \"$cpg_dir\" isn't installed/upgraded yet. <br>Go to ";
        if (defined('IN_POSTNUKE')) $error .= "modules.php?op=modload&name=$cpg_dir&file=install to proceed.";
        else $error .= "modules.php?name=$cpg_dir&file=install to proceed.";
        die ($error);
    }
    $cpg_prefix = $result[0];

// $first_install_M_DIR gets the first installs module directory is used for language detection
// can be used for other file that are not required to be different between installs
$result = $db->sql_fetchrow($db->sql_query("SELECT dirname FROM cpg_installs WHERE  cpg_id=1"));
$first_install_M_DIR = "modules/" .$result[0];

    require($CPG_M_DIR . '/include/init.inc.php');

    if (!defined('NO_HEADER') && !defined('IN_POSTNUKE')) {
        // Set nice page title
        $pagetitle = "> ".$CONFIG['gallery_name'];
        $sql = "SELECT value FROM " . $cpg_prefix . "config WHERE name='nice_titles'";
        $value = $db->sql_fetchrow($db->sql_query($sql));
        if ($value[0]) {
            $breadcrumb = array();
            if (is_numeric($album) && $album > 0) {
                $result = db_query("SELECT aid AS id, title, category AS parent FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = ".$album);
                if (mysql_num_rows($result) > 0) {
                    $breadcrumb[] = mysql_fetch_array($result);
                    mysql_free_result($result);
                }
            }
            else if (is_numeric($cat) && $cat > 0) {
                if ($cat > FIRST_USER_CAT) {
                    $result = db_query("SELECT $field_user_name AS title FROM {$CONFIG['TABLE_USERS']} WHERE $field_user_id = " . ($cat - FIRST_USER_CAT));
                    if (mysql_num_rows($result) != 0) {
                        $row = mysql_fetch_array($result);
                        $row['id'] = $cat;
                        $row['parent'] = 1;
                        $breadcrumb[] = $row;
                        mysql_free_result($result);
                    }
                }
                else {
                    $result = db_query("SELECT cid as id, parent, catname AS title FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid='$cat'");
                    if (mysql_num_rows($result) > 0) {
                        $breadcrumb[] = mysql_fetch_array($result);
                        mysql_free_result($result);
                    }
                }
            }
            get_breadcrumb($breadcrumb);
            foreach($breadcrumb as $crumb) {
                $pagetitle .= " > ".$crumb['title'];
            }
            if (!is_numeric($album)) switch ($album) {
                case 'lastup':
                case 'lastcom':
                case 'topn':
                case 'toprated':
                case 'search':
                case 'random':
                    $pagetitle .= " > ".$lang_meta_album_names[$album];
                    break;
            }else {
            //sorted by code
            }
            if ($pagetitle == "") $pagetitle = "> ".$CONFIG['gallery_name'];
        }
        else $pagetitle = "> ".$CONFIG['gallery_name'];
    }
}
?>
View user's profile Send private message Visit poster's website AIM Address ICQ Number
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Sat Mar 20, 2004 7:34 am Reply with quote Back to top

Come to find out coppermine had so much trouble with user info blocks not working they had to make their own user block.

Too bad they didn't look at the way they made their block and module first.

I would change to their user info block if it didn't stink and yours wasn't the best user info block ever. Laughing
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

View next topic
View previous 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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum