Only registered users can see links on this board! Get registered or login to the forums!
which is just a site for me and my friends to communicate the local poker games that are going on, where they are, who is playing, and to track user, and the players that are on a win lose streak, etc.
So I started searching around for a profile module. I found one, and implemented it which you can see at
Only registered users can see links on this board! Get registered or login to the forums!
or
Only registered users can see links on this board! Get registered or login to the forums!
I think there is something wrong with the code, I am not sure. Maybe its my phpnuke version. I can't seem tp figure it out.
My question is, does somoeone know what is going on? Is it the code? Is it my version? Is it something that I did?
THe source can be downloaded here:
Only registered users can see links on this board! Get registered or login to the forums!
Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Sat Sep 25, 2004 5:50 pm
That indicates that a table is either missing or the query being used to access the table has column names/count that are not the same as what is in the table. Review your table installation instructions.
#
# Table structure for table `nuke_tri_proconfig`
#
CREATE TABLE `nuke_tri_proconfig` (
`uploadpath` varchar(255) NOT NULL default '',
`imgwidth` varchar(55) NOT NULL default '',
`proimgpath` varchar(255) NOT NULL default '0',
`tou` longtext NOT NULL,
`moduletitle` varchar(255) NOT NULL default '',
`ranktou` longtext NOT NULL,
`text1` varchar(255) NOT NULL default '',
`text2` varchar(255) NOT NULL default '',
`header1` varchar(255) NOT NULL default '',
`header2` varchar(255) NOT NULL default '',
`header1list` varchar(255) NOT NULL default '',
`header2list` varchar(255) NOT NULL default '',
`rblock` varchar(4) NOT NULL default '0',
`ranks` varchar(4) NOT NULL default '0',
`subperm` varchar(4) NOT NULL default '0',
`valsub` varchar(4) NOT NULL default '0',
`subdate` varchar(4) NOT NULL default '0',
`catimgs` varchar(4) NOT NULL default '0'
) TYPE=MyISAM;
#
# Dumping data for table `nuke_tri_proconfig`
#
INSERT INTO `nuke_tri_proconfig` VALUES ('/home/username/public_html/images/profiles', '240', 'images/profiles', 'Fill in all fields with Accurate information. Include a copyright free picture of the specimen you are creating the profile for. Note: (If there is no picture included, the submission will not be added to the database.) DO NOT copy and paste information already listed on other sites as that is not acceptable at this site. All submissions will be verified and authorized by Admin before you will see it listed in the database. Your Submission may be edited by admin staff. If you do not agree to these Terms Do not press the submit button below.', 'Profiles Module', 'Select a\r\nrank from 1-5 (you are rating the animal not the actual quality of information\r\nor picture). Fill in the comments box (your experience with such animal). Do <b>NOT</b>\r\nuse profanity or slander as this is NOT accepted at this site. If you do not \r\nagree to this do <b>NOT</b> press submit. If you do post with inappropriate use\r\nof words you will be in severe risk of being banned from this site.', '#FFFFFF', '#FFFFFF', '#8CA0B4', '#B0C0D0', '#E3EAF0', '#F0F3F7', '1', '1', '1', '1', '1', '1');
Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Sat Sep 25, 2004 8:08 pm
Code:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/homenet/public_html/blocks/block-profileofthemoment.php on line 61
Look at line 61 of that block. That will tell you the table it is trying to access that is not working.
Joined: Aug 28, 2003 Posts: 6373 Location: Vsetin, Czech Republic
Posted:
Sun Sep 26, 2004 5:53 am
Double check in phpmyadmin that the table nuke_tri_profiles exists if it does then it looks, as Raven pointed out, the $id cannot be found or nothing has been selected.
I think the profiles code just doesn't work, the guy who wrote it his site is gone, there are the same issues going on on other sites. There is a lot of need for a profiles module if anyone is interested in doing it.
Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Sun Sep 26, 2004 10:27 pm
I just d/l it and installed it and it works just fine on my site. I would drop the tables and re-add them. Then, I would ensure that ALL files got ftp'd correctly.
Got it to work... mostly. The profile of the moment still isn't working as it should.
If you take a look at
Only registered users can see links on this board! Get registered or login to the forums!
you can see the profile of the moment scrolling on the right, when you mouse over it freezes and you can click. There is my test one now, and thats all, it takes you to the profile as it should, and it displays the picture as it should but why are all the SQL errors there?
Also where is the Text formatting for this module? It must be getting it from the style.css sheet for the theme. I don't want to change themes, but can I change it just for this module so you can read what it says? Thanks everyone, and Raven you are a god. =)
Joined: Aug 28, 2003 Posts: 6373 Location: Vsetin, Czech Republic
Posted:
Mon Sep 27, 2004 11:31 pm
Quote:
Warning: mysql_query(): Access denied for user: 'homenet@localhost' (Using password: NO) in /home/homenet/public_html/blocks/block-latestprofiles.php on line 71
This would seem to indicate that no database password variable has been picked up but I am at a loss as to explain why as the rest of the block seems to function correctly. It might be worth hecking the code for the block to see where it is trying to pull the password from - if indeed it is.
Quote:
Warning: mysql_query(): A link to the server could not be established in /home/homenet/public_html/blocks/block-latestprofiles.php on line 71
No password was available so it couldnt connect to the database.
You could check the block code for references to css to determine if it is using this or not.
Only registered users can see links on this board! Get registered or login to the forums!
*/
/* */
/* 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. */
/************************************************************************/
/* Block to fit perfectly in the center of the site, remember that not all
blocks looks good on Center, just try and see yourself what fits your needs */
if (eregi("block-profileofthemoment.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
Only registered users can see links on this board! Get registered or login to the forums!
*/
/* */
/* 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. */
/************************************************************************/
global $text1, $text2, $header1, $header2, $header1list, $header2list, $prefix, $db, $dbi, $sitename;
if (eregi("block-latestprofiles.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
#########################################################
# Config Variables #
#########################################################
$sql = "SELECT * FROM ".$prefix."_tri_proconfig";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$text1 = $row[text1]; //Color of text in first header column
$text2 = $row[text2]; //Color of text in the second header column
$header1 = $row[header1]; //Color of the first header column.
$header2 = $row[header2]; // Color of the second header column.
$header1list = $row[header1list]; // Color of the first scrolling column.
$header2list = $row[header2list]; //Color of the second scrolling column
$content .= "</tr></table>";
}
$res = mysql_query("select * from ".$prefix."_tri_profiles where id");
$cnt=mysql_num_rows($res);
$content .= "<center>There is a total of $cnt entries in our database.</center>";
$content .= "<br><b><center> <a href=\"modules.php?name=Profiles\">View Profiles Section</a></b> </center>";
Joined: May 02, 2003 Posts: 1396 Location: Puerto Rico
Posted:
Tue Sep 28, 2004 7:20 am
Code:
<?php
/************************************************************************/
/* PHP-NUKE: TRI-Development - Profile Database System */
/* =========================== */
/* */
/* Copyright (c) 2003 by Shawn (Volitan) */
/* http://www.reefersinn.ath.cx/development/ */
/* */
/* 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. */
/************************************************************************/
/* Block to fit perfectly in the center of the site, remember that not all
blocks looks good on Center, just try and see yourself what fits your needs */
if (eregi("block-profileofthemoment.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
Joined: May 02, 2003 Posts: 1396 Location: Puerto Rico
Posted:
Tue Sep 28, 2004 7:28 am
Code:
<?php
/************************************************************************/
/* PHP-NUKE: TRI-Development - Profile Database System */
/* =========================== */
/* */
/* Copyright (c) 2003 by Shawn (Volitan) */
/* http://www.reefersinn.ath.cx/development/ */
/* */
/* 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. */
/************************************************************************/
global $text1, $text2, $header1, $header2, $header1list, $header2list, $prefix, $db, $sitename;
if (eregi("block-latestprofiles.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
#########################################################
# Config Variables #
#########################################################
$sql = "SELECT * FROM ".$prefix."_tri_proconfig";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$text1 = $row[text1]; //Color of text in first header column
$text2 = $row[text2]; //Color of text in the second header column
$header1 = $row[header1]; //Color of the first header column.
$header2 = $row[header2]; // Color of the second header column.
$header1list = $row[header1list]; // Color of the first scrolling column.
$header2list = $row[header2list]; //Color of the second scrolling column
$content .= "</tr></table>";
}
$res = $db->sql_query("select * from ".$prefix."_tri_profiles where id='$id'");
$cnt=$db->sql_numrows($res);
$content .= "<center>There is a total of $cnt entries in our database.</center>";
$content .= "<br><b><center> <a href=\"modules.php?name=Profiles\">View Profiles Section</a></b> </center>";
Too bad the author of this mod can't seem to get a stable site somewhere because the module itself is decent enough for a first effort and we really need a profile mod for Php-nuke.
It seems to work fine on my beta site, but the pictures display very very badly - instead of maintaining their aspect ratio, they distort. I posted a message about that on the author's site - when it was up 2 weeks ago, but never got any response. Does anyone else see this happening?
I am using TRIAD Profile with Nuke 7.2
Thanks
Wolf
Only registered users can see links on this board! Get registered or login to the forums!
Joined: Mar 06, 2004 Posts: 1156 Location: Sanbornton, NH USA
Posted:
Thu Sep 30, 2004 5:50 pm
Well, you'd be best off by making sure all of your images are preformatted to be 188 pixels (width) by 140 pixels (height) per the settings in the file
I would definately change these to be easier to read. I would highly suggest finding your style sheet colors of your theme (/themes/THEMENAME/style/style.css) and open it up and see what your normal block colors are and change the nuke_tri_proconfig colors to match those. In other words, leave the #FFFFFF colors alone (white) and change the #8CA0B4, #B0C0D0, #E3EAF0, #F0F3F7 colors to match your theme. You can play with them until you get them the way you like.
Unfortunately, to be used as a real profile system, users upload their OWN pictures. Telling a user who may have no idea how to resize an image that they HAVE to have an image exactly a certain dimension is impossible. Telling them that their image can not be greater than a certain dimension is fine, but the profile program has to automatically keep the ratios correct.
Joined: Mar 06, 2004 Posts: 1156 Location: Sanbornton, NH USA
Posted:
Thu Sep 30, 2004 6:18 pm
True, but if you tell users that pictures should be that size, they will at least know. It should be no big deal to provide a forum subject message telling users to open up Paint, or any picture editing software and to crop pictures to be that size.
I mean, of all of the things users do, this isn't exactly rocket science. I would think getting the picture out of their camera into their computer is more technical than cropping it.
If not, the administrator also always has the option to open and crop user pictures. (Now that the he/she knows that the dimensions are preset by the application to 188x140.)
Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Thu Sep 30, 2004 6:27 pm
Or they can use an excellent FREE product like Irfanview and resize it proportionately and much more - I've used it for years and it just keeps getting better
Last edited by Raven on Thu Sep 30, 2004 11:12 pm; edited 1 time in total
We are techno folk...trust me on this one. A profiler has to maintain aspect ratios on graphics the same way all the photo gallery programs do.
As for an administrator to do that... OY... I'm talking about a community of over 5,000 users...what a nightmare. I'm looking at a profiler similar, (but simpler) to what is used by places like Match.com, etc. How hard can it be to build in maintaining the aspect ratio of graphics? There are plenty of gallery programs written in Php that do that. (Of course I am not a coder...chuckle)
There is one more error I thinhk in the profiles. The block that scrolls the profiles at the bottom returns the total number of enteries in the Database. I think there is an error cause it shows 0.
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