Gallery On Profiles!

Started on the old forum in January 2008 · view the original in the archive · old links redirect here

33 replies · 3,065 views · started 18 years ago · 1 min read

TL;DR · summary of 33 replies
  • - The code to display a user's gallery on their profile was not working as expected.
  • - A fix was suggested by adding an amp after the & in the SQL query, changing $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM fun_gallery WHERE uid='".$who."'")); to $countpics =...
  • - The issue was resolved with the addition of addonline(getuid_sid($sid), "Viewing Users Profile", "index.php?action=viewuser&who=$who"); in the viewuser profile code.
  • - The forum participants recommended checking if there were any issues related to file permissions or database configurations.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

9 participants
MEENU Newbie · 2 posts #22

add amp after & it should be lyk this

$countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM fun_gallery WHERE uid='".$who."'")); echo "<a href="gallery.php?action=viewuser&who=$who&sid=$sid">Gallery ($countpics[0])</a> ";

metulj Super moderator Principal · 1,726 posts #23

,,,spiderWAP not spiderman...

lol.. new spiderman External image (may be gone) External image (may be gone)

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

learner Lead · 587 posts #27

bro file is same the same script as funmobile gallery script and it was workin fine until i shifted my host now pics dont show and even browsers not showing:(

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

rukiya Lead · 569 posts #29

bro file is same the same script as funmobile gallery script and it was workin fine until i shifted my host now pics dont show and even browsers not showing:(

<img src/> tag will work only when it gets file in it.post the codes in [code ]...... here to get a solution or keep satisfied that you have now and script works fine if its modified for php_register_globals_off

khan1 Developer · 101 posts #31

i have added the code in index.php

CODE

/////////////////////////////////viewuser profile

else if($action=="viewuser") { addonline(getuid_sid($sid),"Viewing Users Profile","index.php?action=viewuser&who=$who"); echo "<head>"; echo "<title>View Profile</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">"; echo "</head>"; echo "<body>"; echo " "; $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM fun_gallery WHERE uid='".$who."'")); echo "<a href="gallery.php?action=viewuser&who=$who&sid=$sid">Gallery ($countpics[0])</a> "; $lastloc=$_GET["lstloc"]; if($lastloc=="cht"){ $rid= $_GET["rid"]; $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; } if($who==""||$who==0) { $mnick = $_POST["mnick"]; $who = getuid_nick($mnick); } $whonick = getnick_uid($who); if($whonick!="")

i am getting this error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/..../public_html/......./web/index.php on line 2628 Gallery ()

khan1 Developer · 101 posts #32

i was getting error because there was no sql table for ibwf_gallery got it from here now i will have to add gallery.php i will let u know , if i get any errors

CODE

CREATE TABLE ibwf_gallery( id int( 100 ) NOT NULL AUTO_INCREMENT , uid int( 100 ) NOT NULL , sex varchar( 255 ) NOT NULL , itemurl varchar( 255 ) NOT NULL , PRIMARY KEY ( id ) , UNIQUE KEY name ( itemurl ) ) ENGINE = MYISAM DEFAULT CHARSET = latin1;

khan1 Developer · 101 posts #33

i have this xhtml lavalair script where i dont have gallery.php but have folder such as pics and in it there's index.php with action==pics so i just changed the action to gallery and renamed it to gallery.php and copied it to web folder also changed sql table to ibwf_gallery am i doing anywhere wrong till now i got no errors now what i have to change

sweetangel Lead · 885 posts #34

to access each user gallery from each user profile, add this to profiles:

$countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM fun_gallery WHERE uid='".$who."'"));
   echo "<a href=\"gallery.php?action=viewuser&who=$who&sid=$sid\">Gallery ($countpics[0])</a>
";

if you using other type databases like with ibwf_ prefix, then fun_gallery change to with your prefix (ex. ibwf_gallery).

Thats all, other part of your question i didn't understood what you want to do.

this code work correct at my script External image (may be gone) External image (may be gone)

if like my post click:

External image (may be gone)

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close