collapse

Author Topic: Help needed  (Read 1348 times)

0 Members and 1 Guest are viewing this topic.

Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows Vista/Server 2008Windows Vista/Server 2008
  • Browser:
  • MS Internet Explorer 8.0MS Internet Explorer 8.0
    • View Profile
Re: Help needed
« Reply #15 on: July 17, 2009, 09:23:46 AM »
The file you have uploaded as a .txt file is a bunch of variable definitions, so this does not help as I have no clue what these variables are even used for anyways.  You need to find the variable which defines the LINK for the users profile, or even better the actual link and variable.

Just to be sure, you want a link on the chat page that when clicked takes you to that users profile?  This link will list more than 1 user right??  Like all users who are chatting right??  If so, you'll need to get all user ids of all members chatting.  Also, will the links be posted on the main chat page?? 

Please zip up all files associated with your CHAT software (Source and Templates) and upload in here, as it would be difficult to help you otherwise.  Please also tell me where the files are relative to your SMF Root Directory (this is important).  Once I'm done editing your files, will zip them back up and post in here for ya, k?

Thanks :)
« Last Edit: July 17, 2009, 11:44:04 PM by SoLoGHoST »

Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows Vista/Server 2008Windows Vista/Server 2008
  • Browser:
  • MS Internet Explorer 8.0MS Internet Explorer 8.0
    • View Profile
Re: Help needed
« Reply #16 on: July 18, 2009, 11:11:16 AM »
Let me know if this helps any, so if you want to get info about a user and the php page is not a part of SMF, you'll need to require the SSI.php file and call a function or 2...
If your php file is located in your SMF Root Directory where the SSI.php file is located this will work:
Code: [Select]
<?php 
require("SSI.php"); 
global 
$user_info$context;
if (!
$context['user']['is_guest']) {
// Get username from id...
ssi_fetchMember($user_info['id']);
} else {
// Do code for guest...
// if you want them to be able to log in...
ssi_login();
}
?>
otherwise, just change "SSI.php" to the path where SSI.php is located relative to this file location on your server.

Hopefully this is what you want, ssi_fetchMember() function will echo the username with a link to that users profile all in one.  Can also take an array of user ids.

EDIT:  Just a thought, The color of PHP Coding does not look right with that gray background, really puts a strain on the eyes...

Solomon
« Last Edit: July 18, 2009, 12:02:23 PM by SoLoGHoST »

Offline Shortie

  • Administrator
  • Authority
  • *
  • Posts: 5710
  • The Ultimate Boss
  • OS:
  • Windows 7/Server 2008 R2Windows 7/Server 2008 R2
  • Browser:
  • Firefox 3.5.1Firefox 3.5.1
    • View Profile
    • Graphics Mayhem
Re: Help needed
« Reply #17 on: July 18, 2009, 12:31:59 PM »
cool

What we are after is returning the id_member as well

e.g. the the bit on the end of the profile URL

e.g.  action=profile;u=?????

Cheers Shortie

Thank You, "Guest" For Reading My Post.


Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows Vista/Server 2008Windows Vista/Server 2008
  • Browser:
  • MS Internet Explorer 8.0MS Internet Explorer 8.0
    • View Profile
Re: Help needed
« Reply #18 on: July 18, 2009, 01:22:27 PM »
$user_info['id'] = the bit on the end of action=profile;u=?????

You can define a global $scripturl in here if you also need the actual boardurl up to index.php

for example
Code: [Select]
<?php 
require("SSI.php"); 
global 
$user_info$context$scripturl;
if (!
$context['user']['is_guest']) {
             
// gets just the users id
             
$id $user_info['id'];
             
// gets the entire link: e.g. (for Admin would output) http://acs.graphicsmayhem.com/index.php?action=profile;u=1
             
$ahrefLink $scripturl '?action=profile;u=' $id;
// Get username as a link to their profile automatically, from id...
ssi_fetchMember($user_info['id']);
} else {
// Do code for guest...
// if you want them to be able to log in...
ssi_login();
}
?>


Offline Shortie

  • Administrator
  • Authority
  • *
  • Posts: 5710
  • The Ultimate Boss
  • OS:
  • Windows 7/Server 2008 R2Windows 7/Server 2008 R2
  • Browser:
  • Firefox 3.5.1Firefox 3.5.1
    • View Profile
    • Graphics Mayhem
Re: Help needed
« Reply #19 on: July 18, 2009, 02:39:52 PM »
cool

just waiting for confirmation of the paths

Thank You, "Guest" For Reading My Post.


 


* Search



* Latest Activity.

A GM Wallpaper by NerdBoy
[Yesterday at 07:31:24 AM]


Next Topic Page 1.2 by NerdBoy
[December 15, 2010, 06:28:37 PM]


Windows 8 Wallpaper Concepts by NerdBoy
[December 14, 2010, 09:31:08 PM]


Who can make me a custom mod? by VintageJetBoats
[December 13, 2010, 10:35:47 AM]


December 2010 Uptop Logo Contest by NerdBoy
[December 12, 2010, 07:01:48 PM]


Icon request by NerdBoy
[December 10, 2010, 06:39:27 PM]


Ultimate Weather by NerdBoy
[December 10, 2010, 12:22:41 PM]


General Wallpapers by NerdBoy
[December 10, 2010, 12:17:18 PM]


Logo request by NerdBoy
[December 09, 2010, 08:26:51 AM]


Nerdboy's Birthday by NerdBoy
[December 07, 2010, 06:02:44 AM]


Happy Birthday Shortie by MJCSD
[December 05, 2010, 08:48:02 PM]