Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Mod Name / Version User List Add to Address Book 1.0
Description This hack adds a 'Add to Address book' on the user list
Working under UBB.threads 6.1
Any pre-requisites None
Author(s) dimopoulos
Credits ubbdev.com who taught me how to do things in php and ubb threads
Demo None.
Files Altered showmembers.php, /templates/default/showmembers.tmpl
Database Altered No
New Files None
Any other info Please report any problems you might have and I'll try to fix them as soon as possible. Sorry but I have tested this only in version 6.1.


INSTALL
STEP 1
Open the file showmembers.php

STEP 1.1 find this:

code:

$userrow[$i]['Posts'] = $Posts;
$userrow[$i]['ICQ'] = $ICQ;
$userrow[$i]['Reged'] = $Reged;



BELOW it, add this:

code:

// 20020929 Member List Add To Address Book 1.0 New Start
$encoded = rawurlencode($Username);
$userrow[$i]['AddToAddressbook'] = "<a href="{$config['phpurl']}/addaddress.php?Cat=$Cat&User=$encoded"><img src="{$config['images']}/addtobook.gif" alt="{$ubbt_lang['ADD_BOOK']}" border="0"></a>";
// 20020929 Member List Add To Address Book 1.0 New End





STEP 2
In your /templates/default/showmembers.tmpl file

STEP 2.1 find this:

code:

<td align="left" width="15%" nowrap="nowrap">
<a href="{$config['phpurl']}/showmembers.php?Cat=$Cat&sb=$sortuser&page=$page">
{$ubbt_lang['USERNAME_TEXT']} $UserS
</a>
</td>



BELOW it, add this (the comments are optional. I personally find them usefull but you can remove them if you wish):

code:

<!-- 20020929 Member List Add To Address Book 1.0 New Start -->
<td align="left" width="3%" nowrap="nowrap">
+ AB
</td>
<!-- 20020929 Member List Add To Address Book 1.0 New End -->




STEP 2.1 find this:

Find this:

code:

{$userrow[$i]['Username']}
</a>
</td>



BELOW it, add this (the comments are optional. I personally find them usefull but you can remove them if you wish):

code:

<!-- 20020929 Member List Add To Address Book 1.0 New Start -->
<td>
{$userrow[$i]['AddToAddressbook']}
</td>
<!-- 20020929 Member List Add To Address Book 1.0 New End -->



STEP 2.3 find this:

Find this:

code:

<td align="center" colspan="6" class="cleartable">
<font class="onbody">
{$ubbt_lang['PAGE_TEXT']}:



CHANGE it, to this (the comments are optional. I personally find them usefull but you can remove them if you wish):

code:

<!-- 20020929 Member List Add To Address Book 1.0 New Start -->
<td align="center" colspan="7" class="cleartable">
<!-- 20020929 Member List Add To Address Book 1.0 New End -->
<font class="onbody">
{$ubbt_lang['PAGE_TEXT']}:



That's it.

There is something that I don't like here. When you click the 'Add to Addressbook' link the user profile is shown. Since I did this very late at night I am too tired to find an alternative, say navigate again to the user list or show the address book. Any suggestions will be more than welcome.

Warm regards

Nikos
Attachments
57958-UserListAddtoAddressBook1_0.zip (0 Bytes, 14 downloads)


Nikos
Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,080
Joined: March 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,825
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 4338
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 16
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)