I have realized that all nicknames created that start with a number (and don't contain any letters) are not able to be viewed as a profile page.
For example user with nick 1234 would have the page: mysite.com/1234.
But the user 1234john would work...
When you go to this profile it says it's not available for view...?
Please help!
616
Taking Dolphin and Making Profitable Websites Since 2009 :) |
Hello!
U should cancel this check in inc/admin.inc.php, function getID:
if ( is_numeric($str) ) { $iID = (int)db_value( "SELECT `ID` FROM `Profiles` WHERE `ID` = $str" );
leave there only
$str = process_db_input($str); $iID = (int)db_value( "SELECT `ID` FROM `Profiles` WHERE `NickName` = '$str'" );
Regard
|
This seemed to work great, thanks!!! Taking Dolphin and Making Profitable Websites Since 2009 :) |
LeonidS,
I spoke too quickly, I've already found at least two issues that arise from commenting out that code:
1. When you click to "Greet" someone it opens the popup window but then makes it so you must type in their nickname and press send.
2. When trying to view a profile in this way http://mysite.com/profile.php?ID=358441 it says the profile is not available.
Any insight on this?
Thanks.
Taking Dolphin and Making Profitable Websites Since 2009 :) |
what is it you are trying to do here ?... |
I have realized that all nicknames created that start with a number (and don't contain any letters) are not able to be viewed as a profile page.
For example user with nick 1234 would have the page: mysite.com/1234.
But the user 1234john would work...
When you go to this profile it says it's not available for view...?
Please help!
616
Trying to solve this is what we're trying to do... perhaps I need to clarify:
When a user has a nickname that is all numbers you cannot view their profile page. i.e mysite.com/12345
It give an error like "profile not available" or something. LeonidS' suggestion worked, but then I found the two issues that I listed above.
Taking Dolphin and Making Profitable Websites Since 2009 :) |
Mine already looks like this: RewriteRule ^([A-Za-z0-9_-]+)$ /profile.php?ID=$1 [QSA,L]
The only difference is the "/" before profile.php. I pasted your code and I still get "Profile not available for view"
Interesting... ?
Taking Dolphin and Making Profitable Websites Since 2009 :) |
Silly rabbit! You're using Dolphin 7! It works by default in Dolphin 7. He is using Dolphin 6.1, which suffers from this issue. BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
wow after ten posts i just realized it's about d6v
Poor Prolaznik.
u sure it works by default ?.. :)
Yes. Have you tried the boonex.us web site?
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
shi....T im out good night |
Hello micliz!
Then need to change this old code:
if ( is_numeric($str) ) { $iID = (int)db_value( "SELECT `ID` FROM `Profiles` WHERE `ID` = $str" ); } else { $str = process_db_input($str); $iID = (int)db_value( "SELECT `ID` FROM `Profiles` WHERE `NickName` = '$str'" ); }
to this one:
$str = process_db_input($str); $iID = (int)db_value( "SELECT `ID` FROM `Profiles` WHERE `NickName` = '$str'" );
if ($iID == 0)
$iID = (int)db_value( "SELECT `ID` FROM `Profiles` WHERE `ID` = $str" );
It's simplest solution but in will use more referring to DB.
Regard
|
Thanks LeonidS!
That seems to work now, and the two issues from before are solved as well.
Thanks for the collaborative effort gents, appreciated!
Taking Dolphin and Making Profitable Websites Since 2009 :) |
However, I just got this db error emailed to me. Not sure what it means but It looks related to the MySQL we just changed..
Database error in "Site Name" Query: SELECT `ID` FROM `Profiles` WHERE `ID` = Mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Found error in file /home/mysite/public_html/inc/admin.inc.php at line 781.
Called db_value function with erroneous argument #0 Debug backtrace: Array ( [1] => Array ( [file] => /home/mysite/public_html/inc/db.inc.php [line] => 104 [function] => db_res [args] => Array ( [0] => SELECT `ID` FROM `Profiles` WHERE `ID` = [1] => 1 ) ) [2] => Array ( [file] => /home/mysite/public_html/inc/db.inc.php [line] => 120 [function] => db_arr [args] => Array ( [0] => SELECT `ID` FROM `Profiles` WHERE `ID` = [1] => 1 ) ) [3] => Array ( [file] => /home/mysite/public_html/inc/admin.inc.php [line] => 781 [function] => db_value [args] => Array ( [0] => SELECT `ID` FROM `Profiles` WHERE `ID` = ) ) [4] => Array ( [file] => /home/mysite/public_html/profile.php [line] => 33 [function] => getID [args] => Array ( [0] => ) ) ) Called script: /profile.php Request parameters: Array ( [username] => peruana26 ) -- Auto-report system
Update, I've been getting a lot of db errors similar to this one. Especially when you go to a username that doesn't exist... I've had to take out the code suggested by LeonidS.
LeonidS, could you paste the entire code fix with a little from before and after the fix to make sure I had it right? Thnx.
Taking Dolphin and Making Profitable Websites Since 2009 :) |