Chatter of the day

Started on the old forum in September 2009 · view the original in the archive · old links redirect here

27 replies · 1,237 views · started 17 years ago · 1 min read

TL;DR · summary of 27 replies
  • $sql=mysql_fetch_array(mysql_query(""SELECT uid, avatar FROM ibwf_users ORDER BY RAND() LIMIT 1"")); should be used to fetch user profile photos.
  • The extra sql for changing the photo every 24 hours needs to be added in ibwf_settings with name= pod and value = 1.
  • $sid = $_GET["sid"]; should be placed above the code that uses sid for session handling.

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

3 participants
Leviathan73 Senior · 260 posts #1

Hello to everyone, why do not you see the photo and profile of users?

echo "<small>Random Gallery Pics</small><br/>";
$sql=mysql_fetch_array(mysql_query("SELECT uid, itemurl FROM ibwf_users  ORDER BY RAND() LIMIT 1"));
$nick = getnick_uid($sql[0]);
echo "<small><img src=\"$sql[1]\" width=\"100\" height=\"100\" alt=\"$sql[0]\"/><a href=\"index.php?action=viewuser&who=$sql[0]&sid=$sid\">$nick</a></small><br/><br/><br/>";
something else Fellow · 2,296 posts #2

what does right click copy image address say?

probably: $sql=mysql_fetch_array(mysql_query("SELECT uid, itemurl FROM ibwf_users ORDER BY RAND() LIMIT 1"));

is wrong

sure its not avatar instead of itemurl ?

Leviathan73 Senior · 260 posts #3

and what is the right function so that you can see the photo and profile of users?

something else Fellow · 2,296 posts #4

I dont know what your sql is but most peoples sites its:

$sql=mysql_fetch_array(mysql_query("SELECT uid, avatar FROM ibwf_users ORDER BY RAND() LIMIT 1"));

but you have also put its a random gallery pic and that sql is from ibwf_users not gallery?

Leviathan73 Senior · 260 posts #5

is Lavalair! All photos in the folder pics_original, but there are also other photos that do not centered with the profile. If the address is in the folder pics_original you see all the photos, but I wish you could see only the profile photos of users who have..

something else Fellow · 2,296 posts #6

it should be ok as u had it above just replace the line i put above 🙂

something else Fellow · 2,296 posts #8
echo "<small>Random Gallery Pics</small><br/>";
$sql=mysql_fetch_array(mysql_query("SELECT uid, avatar FROM ibwf_users ORDER BY RAND() LIMIT 1"));
$nick = getnick_uid($sql[0]);
echo "<small><img src=\"$sql[1]\" width=\"100\" height=\"100\" alt=\"$sql[0]\"/><a href=\"index.php?action=viewuser&who=$sql[0]&sid=$sid\">$nick</a></small><br/><br/><br/>";
Leviathan73 Senior · 260 posts #9

I did copy paste, but the picture is loaded, you can not see: (

something else Fellow · 2,296 posts #10

Small error:

echo "<small>Random Gallery Pics</small><br/>";
$sql=mysql_fetch_array(mysql_query("SELECT id, avatar FROM ibwf_users ORDER BY RAND() LIMIT 1"));
$nick = getnick_uid($sql[0]);
echo "<small><img src=\"$sql[1]\" width=\"100\" height=\"100\" alt=\"$sql[0]\"/><a href=\"index.php?action=viewuser&who=$sql[0]&sid=$sid\">$nick</a></small><br/><br/><br/>";
Leviathan73 Senior · 260 posts #11

lol thanks you see:). Now when you click the nick says you are not logged in or your session has expired! you should see the profile..

Leviathan73 Senior · 260 posts #12

Sorry, the pictures change every page load. How do you change them every 24 hours?

something else Fellow · 2,296 posts #13

you need extra sql for that maybe put it in ibwf_settings 😛

Leviathan73 Senior · 260 posts #14

and give me extra sql, please???? and how it fits in ibwf_settings?? 😛

kuklux Newbie · 8 posts #15

i think youre using old lava gallery script that dont use sql...

something else Fellow · 2,296 posts #16

Sql

INSERT INTO `ibwf_settings` ( `id` , `name` , `value` )
VALUES (
NULL , 'pod', '1'
);

script

$pod = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='pod'"));
echo "<small>Random Gallery Pics</small><br/>";
$sql=mysql_fetch_array(mysql_query("SELECT id, avatar FROM ibwf_users WHERE id='".$pod[0]."'"));
$nick = getnick_uid($sql[0]);
echo "<small><img src=\"$sql[1]\" width=\"100\" height=\"100\" alt=\"$sql[0]\"/><a href=\"index.php?action=viewuser&who=$sql[0]&sid=$sid\">$nick</a></small><br/><br/><br/>";

then u will have to update pod in ibwf_settings when you want to adjust the user id 🙂

Leviathan73 Senior · 260 posts #17

This SQL where to put? here?

CREATE TABLE `ibwf_settings` (
  `id` int(10) NOT NULL auto_increment,
  `name` varchar(30) NOT NULL default '',
  `value` text NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;--
-- Dumping data for table `ibwf_settings`

and how?

something else Fellow · 2,296 posts #18

run this in your database:

[COLOR=#000000][COLOR=#0000BB]INSERT INTO [/COLOR][COLOR=#007700]`[/COLOR][COLOR=#0000BB]ibwf_settings[/COLOR][COLOR=#007700]` ( `[/COLOR][COLOR=#0000BB]id[/COLOR][COLOR=#007700]` , `[/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]` , `[/COLOR][COLOR=#0000BB]value[/COLOR][COLOR=#007700]` )
[/COLOR][COLOR=#0000BB]VALUES [/COLOR][COLOR=#007700](
[/COLOR][COLOR=#0000BB]NULL [/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'pod'[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'1'
[/COLOR][COLOR=#007700]); 
Leviathan73 Senior · 260 posts #19

I am in my database, I must add a new row, or what?

something else Fellow · 2,296 posts #20

yeah add a new row in ibwf_settings name= pod and value = 1

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