 | |  | | | General Discussion General use discussion forum for PhotoPost products. |
June 10th, 2008, 07:30 PM
|
#1 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
| drop down user list
Just noticed this in the uploadphoto.php file.
I removed the comment block, but it doesn't work..
//if you have a low number of users you can use this drop down list box, otherwise you have to input the name manually
//$useroptions = "<select name=\"upuser\"><option selected=\"userid\" value=\"{$User['userid']}\">{$User['username']}</option>";
//$useroptions .= useropts();
//$useroptions .= "</select>";
|
| |
June 11th, 2008, 07:06 AM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
You would need to actually comment out the other useroptions lines in uploadphoto.php to see a difference. Code: Content visible to verified customers only.
Last edited by Chuck S; June 12th, 2008 at 12:24 PM.
|
| |
June 11th, 2008, 09:29 AM
|
#3 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
I thought about that after I posted the post. It is an interesting little gem undiscovered by most admins. Thanks!
|
| |
June 11th, 2008, 09:30 AM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
Not a problem glad to help.
|
| |
June 12th, 2008, 09:21 AM
|
#5 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
On anything I choose, I get error user not found..
|
| |
June 12th, 2008, 09:23 AM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
Please post a url and a test login
|
| |
June 12th, 2008, 10:14 AM
|
#7 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
Cannot PM you the details.. Quote: |
Chuck S has chosen not to receive private messages or may not be allowed to receive private messages. Therefore you may not send your message to him/her.
|
Last edited by skidpics; June 12th, 2008 at 11:38 AM.
|
| |
June 12th, 2008, 11:40 AM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
It is fine to post a url here and a test user login non admin. You can do that or email support. That is correct I do not use the PM system here.
|
| |
June 12th, 2008, 11:42 AM
|
#9 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
Last edited by Chuck S; June 12th, 2008 at 12:20 PM.
|
| |
June 12th, 2008, 12:27 PM
|
#11 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
I made a slight change to the code in post 2 as this is way old code reapply and see if that helps.
|
| |
June 12th, 2008, 11:33 PM
|
#12 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
| Quote:
Originally Posted by Chuck S | User is admin now. applying the code right now also..
..
Code modification did not work.
what was changed?
|
| |
June 13th, 2008, 08:24 AM
|
#13 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
Basically upuser is a username variable not userid that old legacy code passes upuser as the userid not username so I simply changed the code to username
Try this Code: Content visible to verified customers only.
change to this Code: Content visible to verified customers only.
|
| |
June 13th, 2008, 08:27 AM
|
#14 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
Then in your integration file photopost.php make sure the useropts function is this Code: Content visible to verified customers only.
Last edited by Chuck S; June 13th, 2008 at 10:09 AM.
|
| |
June 13th, 2008, 09:27 AM
|
#15 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
With the change in photopost.php, I am getting this error:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/vande11/public_html/skidpics/forums/photopost.php on line 78
|
| |
June 13th, 2008, 10:09 AM
|
#16 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
Wow that function is archaic. Reapply the code edit above in photopost.php
|
| |
June 13th, 2008, 10:13 AM
|
#17 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
same error. perhaps I should just leave it as is.. since the coding is so old?
actually, the userid is not changed to upuser in the code you posted ?
|
| |
June 13th, 2008, 10:32 AM
|
#18 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
yea, I replaced userid with upuser and that didn't work either.
|
| |
June 13th, 2008, 10:40 AM
|
#19 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
The edit in uploadphoto.php should remain as posted in post 13. My last post explained to update the user options function in post 14 as thats where I made the change to that query drop down user list |
| |
June 13th, 2008, 10:48 AM
|
#20 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
I applied the below to uploadphoto.php: Quote:
if ( $Globals['vbversion'] == "fusion" || $Globals['vbversion'] == "threads" || $Globals['vbversion'] == "threads7" )
{
$useroptions = "<select name=\"upuser\"><option selected=\"userid\" value=\"{$User['login']}\">{$User['username']}</option>";
$useroptions .= useropts();
$useroptions .= "</select>";
}
else
{
$useroptions = "<select name=\"upuser\"><option selected=\"userid\" value=\"{$User['username']}\">{$User['username']}</option>";
$useroptions .= useropts();
$useroptions .= "</select>";
}
| and this to photopost.php: Quote:
function useropts() {
global $Globals, $db_link;
$useropts = "";
$queryv = ppmysql_query("SELECT userid,username FROM {$Globals['pp_db_prefix']}users ORDER BY name",$db_link);
while ( list( $userid, $username ) = mysql_fetch_row($queryv) ) {
$useropts .= "<option value=\"$username\">$username</option>";
}
return( $useropts );
}
| still getting:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/vande11/public_html/skidpics/forums/photopost.php on line 78
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 09:56 PM. | |