Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
Iceburg
Hangin' Around



Joined: Sep 25, 2004
Posts: 25
Location: Colorado

PostPosted: Sat Sep 25, 2004 3:37 pm Reply with quote

I have [ Only registered users can see links on this board! Get registered or login! ] 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! ] or [ Only registered users can see links on this board! Get registered or login! ]

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! ]
 
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat Sep 25, 2004 5:50 pm Reply with quote

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.
 
View user's profile Send private message
Iceburg







PostPosted: Sat Sep 25, 2004 7:51 pm Reply with quote

Here is the SQL install instructions, from the code writer.

Could it be for a different version?


# phpMyAdmin SQL Dump (TRID PROFILES DATABASE 4.0 BETA)
# version 2.5.5
# [ Only registered users can see links on this board! Get registered or login! ]
#
# Host: localhost
# Generation Time: Jan 10, 2004 at 04:49 PM
# Server version: 4.0.17
# PHP Version: 5.0.0b2
#
# Database : `developtest`
#

# --------------------------------------------------------

#
# Table structure for table `nuke_tri_category`
#

CREATE TABLE `nuke_tri_category` (
`id` bigint(99) NOT NULL auto_increment,
`parent` varchar(255) NOT NULL default '0',
`species` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

#
# Dumping data for table `nuke_tri_category`
#


# --------------------------------------------------------

#
# Table structure for table `nuke_tri_fieldconfig`
#

CREATE TABLE `nuke_tri_fieldconfig` (
`f1` varchar(255) NOT NULL default '',
`f2` varchar(255) NOT NULL default '',
`f3` varchar(255) NOT NULL default '',
`f4` varchar(255) NOT NULL default '',
`f5` varchar(255) NOT NULL default '',
`f6` varchar(255) NOT NULL default '',
`f7` varchar(255) NOT NULL default '',
`f8` varchar(255) NOT NULL default '',
`f9` varchar(255) NOT NULL default '',
`f10` varchar(255) NOT NULL default '',
`f11` varchar(255) NOT NULL default '',
`f12` varchar(255) NOT NULL default '',
`df13` varchar(255) NOT NULL default '',
`f14` varchar(255) NOT NULL default '',
`f15` varchar(255) NOT NULL default ''
) TYPE=MyISAM;

#
# Dumping data for table `nuke_tri_fieldconfig`
#

INSERT INTO `nuke_tri_fieldconfig` VALUES ('Common Name:', 'Scientific Name:', 'off', 'off', 'off', 'off', 'off', 'off', 'off', 'off', 'off', 'off', 'Description:', 'Submitted By:', 'Photo Credit:');

# --------------------------------------------------------

#
# 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');

# --------------------------------------------------------

#
# Table structure for table `nuke_tri_profiles`
#

CREATE TABLE `nuke_tri_profiles` (
`id` bigint(99) NOT NULL auto_increment,
`common` varchar(255) NOT NULL default '',
`description` longtext NOT NULL,
`scientific` varchar(255) NOT NULL default '',
`category` varchar(255) NOT NULL default '0',
`origin` varchar(255) default NULL,
`size` varchar(255) default NULL,
`temp` varchar(255) default NULL,
`sg` varchar(255) default NULL,
`diet` varchar(255) default NULL,
`ph` varchar(255) default NULL,
`hardy` varchar(255) default NULL,
`skill` varchar(255) default NULL,
`usersubmit` varchar(25) default 'NA',
`mintank` varchar(255) default NULL,
`reefsafe` varchar(255) default NULL,
`pictureby` varchar(255) NOT NULL default '',
`date` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

#
# Dumping data for table `nuke_tri_profiles`
#


# --------------------------------------------------------

#
# Table structure for table `nuke_tri_profilestemp`
#

CREATE TABLE `nuke_tri_profilestemp` (
`id` bigint(99) NOT NULL auto_increment,
`common` varchar(25) NOT NULL default '',
`description` longtext NOT NULL,
`scientific` varchar(25) NOT NULL default '',
`category` varchar(255) NOT NULL default '0',
`origin` varchar(25) default NULL,
`size` varchar(25) default NULL,
`temp` varchar(25) default NULL,
`sg` varchar(25) default NULL,
`diet` varchar(25) default NULL,
`ph` varchar(25) default NULL,
`hardy` varchar(50) default NULL,
`skill` varchar(50) default NULL,
`usersubmit` varchar(25) default 'NA',
`mintank` varchar(50) default NULL,
`reefsafe` varchar(50) default NULL,
`pictureby` varchar(25) NOT NULL default '',
`date` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=19 ;

#
# Dumping data for table `nuke_tri_profilestemp`
#


# --------------------------------------------------------

#
# Table structure for table `nuke_tri_proview`
#

CREATE TABLE `nuke_tri_proview` (
`id` varchar(25) NOT NULL default '',
`username` varchar(25) NOT NULL default '',
`rank` varchar(25) NOT NULL default '',
`comment` longtext NOT NULL,
`date` text NOT NULL,
`delkey` bigint(255) NOT NULL auto_increment,
PRIMARY KEY (`delkey`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

#
# Dumping data for table `nuke_tri_proview`
#
 
Raven







PostPosted: Sat Sep 25, 2004 8:08 pm Reply with quote

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.
 
Nukeum66
Life Cycles Becoming CPU Cycles



Joined: Jul 30, 2003
Posts: 551
Location: Neurotic, State, USA

PostPosted: Sat Sep 25, 2004 8:19 pm Reply with quote

Here is the block in viewable text [ Only registered users can see links on this board! Get registered or login! ]

_________________
Scott Johnson MIS Ubuntu/Linux 11.10 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Sat Sep 25, 2004 10:01 pm Reply with quote

This table is not being accessed correctly
$result = mysql_query("SELECT * FROM ".$prefix."_tri_profiles WHERE id=$id",$dbi);

As to why, I can't tell. Possibly the table doesn't exist or the $id can't be found so there is nothing to select.
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sun Sep 26, 2004 5:53 am Reply with quote

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.
 
View user's profile Send private message Send e-mail
Iceburg







PostPosted: Sun Sep 26, 2004 10:06 pm Reply with quote

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.
 
Raven







PostPosted: Sun Sep 26, 2004 10:27 pm Reply with quote

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.
 
Iceburg







PostPosted: Mon Sep 27, 2004 9:58 pm Reply with quote

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! ] 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. =)

-Nick
RavensScripts
 
Guardian2003







PostPosted: Mon Sep 27, 2004 11:31 pm Reply with quote

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.
 
Iceburg







PostPosted: Tue Sep 28, 2004 12:07 am Reply with quote

Here is the module code, I guess I am not seeing it.

Quote:
<?php
/************************************************************************/
/* PHP-NUKE: TRI-Development - Profile Database System */
/* =========================== */
/* */
/* Copyright (c) 2003 by Shawn (Volitan) */
/* [ Only registered users can see links on this board! Get registered or login! ] */
/* */
/* 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();
}

global $prefix, $scientific, $common, $dbi, $id, $db;
#########################################################
# Config Variables #
#########################################################
$sql = "SELECT * FROM ".$prefix."_tri_proconfig";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$ranks = $row[ranks]; //Show Ranks and Comments
$base_dir = $row[uploadpath]; //Path to upload directory
#########################################################
# Field Config Variables #
#########################################################
$sql1 = "SELECT * FROM ".$prefix."_tri_fieldconfig";
$result1 = $db->sql_query($sql1);
$row = $db->sql_fetchrow($result1);
$f1 = $row[f1]; //Field.
$f2 = $row[f2]; //Field.
$off = off;


$content = "<div align=\"center\">";
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_tri_profiles"));
if ($numrows > 1) {
$sql = "SELECT id FROM ".$prefix."_tri_profiles";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$id = $row[id];
$id_array .= "$id-";
}
$r_topic = explode("-",$id_array);
mt_srand((double)microtime()*1000000);
$numrows = $numrows-1;
$id = mt_rand(0, $numrows);
$id = $r_topic[$id];
} else {
$id = 1;
}
$result = mysql_query("SELECT * FROM ".$prefix."_tri_profiles WHERE id=$id",$dbi);

$myrow = mysql_fetch_array($result);

$content .= "<center>";
$content .= "<table style=\"table-layout:fixed\" border=\"0\" width=\"400\" height=\"160\">";
$content .= "<tr>";
$content .= "<td height=\"1\">";
$jpg = $id.".jpg";
$image = "$base_dir/$jpg";
if (file_exists($image)) {
$content .= "<a href=\"modules.php?name=Profiles&id=$id\"><img border=\"0\" src=\"images/profiles/$id.jpg\" width=\"188\" height=\"140\"></a></td>";
} else {$content .= "<center><br><br><b>•No Image</b></center>";}

$content .= "<td valign=\"top\" height=\"1\">";
$content .= "<p align=\"left\">";
if ($f1 == $off){echo "";
} else {
$content .="<b>$f1 </b><a href=\"modules.php?name=Profiles&id=$id\">$myrow[common]</a>";}
$content .="<br>";
if ($f2 == $off){echo "";
} else {
$content .="<b>$f2 </b>$myrow[scientific]";}

$content .="</p>";
$content .= "<p align=\"left\"><font face=\"Verdana\" size=\"2\">";
$content .= substr($myrow['description'], 0, 250);
$content .= " <a href=\"modules.php?name=Profiles&id=$id\"><b> More...</a></b></font></td>";
$content .= "</tr>";
$content .= "</table>";
$content .= "</center>";
$content .= "</div>";
$content .= "<div align=\"center\">";
$content .= "<center>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"420\">";
$content .= "<tr>";
if ($ranks == 1){
$content .= "<td width=\"100%\">";
$content .= "<p align=\"center\"><a href=\"modules.php?name=Profiles&rpid=$id\"><img border=\"0\" src=\"images/profiles/ratebutton.gif\"></a>";
$content .= "</td>";
} else {$content .= "";}
$content .= "</tr>";
$content .= "</table>";
$content .= "</center>";
$content .= "</div>";
?>


and here is the one that is working.

[quote]
Quote:

<?php
/************************************************************************/
/* PHP-NUKE: TRI-Development - Profile Database System */
/* =========================== */
/* */
/* Copyright (c) 2003 by Shawn (Volitan) */
/* [ Only registered users can see links on this board! Get registered or login! ] */
/* */
/* 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

#########################################################
# Field Config Variables #
#########################################################
$sql1 = "SELECT * FROM ".$prefix."_tri_fieldconfig";
$result1 = $db->sql_query($sql1);
$row = $db->sql_fetchrow($result1);
$f1 = $row[f1]; //Field.
$f2 = $row[f2]; //Field.
$off = off;
#########################################################

$content .= "<A name= \"scrollingCode\"></A>";
$content .= "<table width=\"100%\" align=\"center\" cellpadding=\"1\">";

if ($f1 == $off){echo "";
} else {
$content .= "<td width=\"50%\" bgcolor=\"$header1\">&nbsp;&nbsp; <font color=\"$text1\"><b>$f1 </b></font></td>";}
if ($f2 == $off){echo "";
} else {
$content .= "<td width=\"50%\" bgcolor=\"$header2\">&nbsp; <font color=\"$text2\"><b>$f2 </b></font></td>";}
$content .= "</table>";
$content .="<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"200\" scrollamount= \"2\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>";

$result1 = sql_query("SELECT id, common, scientific FROM ".$prefix."_tri_profiles ORDER BY id DESC LIMIT 20", $dbi);
$content .= "<br>";
while(list($id, $common, $scientific) = sql_fetch_row($result1, $dbi)) {

$content .= "<table width=\"100%\" align=\"center\" cellpadding=\"3\"><tr>";


if ($f1 == $off){echo "";
} else {
$content .= "<td width=\"50%\" bgcolor=\"$header1list\"><b><a href='modules.php?name=Profiles&id=$id'>$common</a></td>";}

if ($f2 == $off){echo "";
} else {
$content .= "<td width=\"50%\" bgcolor=\"$header2list\">&nbsp; $scientific</td>";}

$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>";

?>
 
Iceburg







PostPosted: Tue Sep 28, 2004 12:08 am Reply with quote

Also, any idea how to change the style of the profile without changing the style of the whole page?

-Iceburg
 
chatserv
Member Emeritus



Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Tue Sep 28, 2004 7:20 am Reply with quote

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();
}

global $prefix, $scientific, $common, $id, $db;
#########################################################
# Config Variables #
#########################################################
$sql = "SELECT * FROM ".$prefix."_tri_proconfig";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$ranks = $row[ranks]; //Show Ranks and Comments
$base_dir = $row[uploadpath]; //Path to upload directory
#########################################################
# Field Config Variables #
#########################################################
$sql1 = "SELECT * FROM ".$prefix."_tri_fieldconfig";
$result1 = $db->sql_query($sql1);
$row = $db->sql_fetchrow($result1);
$f1 = $row[f1]; //Field.
$f2 = $row[f2]; //Field.
$off = off;


$content = "<div align=\"center\">";
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_tri_profiles"));
if ($numrows > 1) {
$sql = "SELECT id FROM ".$prefix."_tri_profiles";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$id = $row[id];
$id_array .= "$id-";
}
$r_topic = explode("-",$id_array);
mt_srand((double)microtime()*1000000);
$numrows = $numrows-1;
$id = mt_rand(0, $numrows);
$id = $r_topic[$id];
} else {
$id = 1;
}
$result = $db->sql_query("SELECT * FROM ".$prefix."_tri_profiles WHERE id='$id'");

$myrow = $db->sql_fetchrow($result);

$content .= "<center>";
$content .= "<table style=\"table-layout:fixed\" border=\"0\" width=\"400\" height=\"160\">";
$content .= "<tr>";
$content .= "<td height=\"1\">";
$jpg = $id.".jpg";
$image = "$base_dir/$jpg";
if (file_exists($image)) {
$content .= "<a href=\"modules.php?name=Profiles&id=$id\"><img border=\"0\" src=\"images/profiles/$id.jpg\" width=\"188\" height=\"140\"></a></td>";
} else {$content .= "<center><br><br><b>•No Image</b></center>";}

$content .= "<td valign=\"top\" height=\"1\">";
$content .= "<p align=\"left\">";
if ($f1 == $off){echo "";
} else {
$content .="<b>$f1 </b><a href=\"modules.php?name=Profiles&id=$id\">$myrow[common]</a>";}
$content .="<br>";
if ($f2 == $off){echo "";
} else {
$content .="<b>$f2 </b>$myrow[scientific]";}

$content .="</p>";
$content .= "<p align=\"left\"><font face=\"Verdana\" size=\"2\">";
$content .= substr($myrow['description'], 0, 250);
$content .= " <a href=\"modules.php?name=Profiles&id=$id\"><b> More...</a></b></font></td>";
$content .= "</tr>";
$content .= "</table>";
$content .= "</center>";
$content .= "</div>";
$content .= "<div align=\"center\">";
$content .= "<center>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"420\">";
$content .= "<tr>";
if ($ranks == 1){
$content .= "<td width=\"100%\">";
$content .= "<p align=\"center\"><a href=\"modules.php?name=Profiles&rpid=$id\"><img border=\"0\" src=\"images/profiles/ratebutton.gif\"></a>";
$content .= "</td>";
} else {$content .= "";}
$content .= "</tr>";
$content .= "</table>";
$content .= "</center>";
$content .= "</div>";
?>
 
View user's profile Send private message Visit poster's website
chatserv







PostPosted: Tue Sep 28, 2004 7:28 am Reply with quote

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

#########################################################
# Field Config Variables #
#########################################################
$sql1 = "SELECT * FROM ".$prefix."_tri_fieldconfig";
$result1 = $db->sql_query($sql1);
$row = $db->sql_fetchrow($result1);
$f1 = $row[f1]; //Field.
$f2 = $row[f2]; //Field.
$off = off;
#########################################################

$content .= "<A name= \"scrollingCode\"></A>";
$content .= "<table width=\"100%\" align=\"center\" cellpadding=\"1\">";

if ($f1 == $off){echo "";
} else {
$content .= "<td width=\"50%\" bgcolor=\"$header1\">&nbsp;&nbsp; <font color=\"$text1\"><b>$f1 </b></font></td>";}
if ($f2 == $off){echo "";
} else {
$content .= "<td width=\"50%\" bgcolor=\"$header2\">&nbsp; <font color=\"$text2\"><b>$f2 </b></font></td>";}
$content .= "</table>";
$content .="<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"200\" scrollamount= \"2\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>";

$result1 = $db->sql_query("SELECT id, common, scientific FROM ".$prefix."_tri_profiles ORDER BY id DESC LIMIT 20");
$content .= "<br>";
while(list($id, $common, $scientific) = $db->sql_fetchrow($result1)) {

$content .= "<table width=\"100%\" align=\"center\" cellpadding=\"3\"><tr>";


if ($f1 == $off){echo "";
} else {
$content .= "<td width=\"50%\" bgcolor=\"$header1list\"><b><a href='modules.php?name=Profiles&id=$id'>$common</a></td>";}

if ($f2 == $off){echo "";
} else {
$content .= "<td width=\"50%\" bgcolor=\"$header2list\">&nbsp; $scientific</td>";}

$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>";

?>
 
Iceburg







PostPosted: Tue Sep 28, 2004 5:06 pm Reply with quote

Chat serv, thats awesome! Thanks so much!
 
alphawolf
New Member
New Member



Joined: Sep 30, 2004
Posts: 4

PostPosted: Thu Sep 30, 2004 4:45 pm Reply with quote

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
http://www.alphaone-tech.com
 
View user's profile Send private message
Iceburg







PostPosted: Thu Sep 30, 2004 4:49 pm Reply with quote

The pictures distort and I have some issues with the background colors, do you by chance know how to change them?
 
64bitguy
The Mouse Is Extension Of Arm



Joined: Mar 06, 2004
Posts: 1164

PostPosted: Thu Sep 30, 2004 5:50 pm Reply with quote

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
Code:
src=\"images/profiles/$id.jpg\" width=\"188\" height=\"140\"></a></td>"


If they are all this size by default, they will all look great.

Next, the colors are going to be in your database in the nuke_tri_proconfig table notice the code inserted in the MySQL section.

Code:
#FFFFFF', '#FFFFFF', '#8CA0B4', '#B0C0D0', '#E3EAF0', '#F0F3F7'


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.

Hope that helps!

_________________
Steph Benoit
100% Section 508 and W3C HTML5 and CSS Compliant (Truly) Code, because I love compliance. 
View user's profile Send private message
alphawolf







PostPosted: Thu Sep 30, 2004 5:58 pm Reply with quote

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.
 
64bitguy







PostPosted: Thu Sep 30, 2004 6:18 pm Reply with quote

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.)
 
Raven







PostPosted: Thu Sep 30, 2004 6:27 pm Reply with quote

Or they can use an excellent FREE product like Irfanview and resize it proportionately and much more Smile - I've used it for years and it just keeps getting better Wink


Last edited by Raven on Thu Sep 30, 2004 11:12 pm; edited 1 time in total 
alphawolf







PostPosted: Thu Sep 30, 2004 11:06 pm Reply with quote

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)

Peace

Wolf
 
Raven







PostPosted: Thu Sep 30, 2004 11:14 pm Reply with quote

Search Google for 'php resampling image' and you will find the code to do what you are asking.
 
Iceburg







PostPosted: Fri Oct 01, 2004 10:50 pm Reply with quote

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.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©