Previous Thread
Next Thread
Print Thread
Rate Thread
#249816 06/09/2003 7:08 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Mod Name / Version: ExtraInfo 1.3

Description: Shows the users Extra fields next to their posts, as well as an ICQ status indicator.

Working Under: UBB.Threads 6.2

Mod Status: Beta

Any pre-requisites: None

Author(s): Gardener

Date: 06/09/03

Credits: flyingcrow for coming up with the idea and pkassab for bullying me to update it =]

Files Altered: showflat.php, showthreaded.php, showflat.tmpl, showthreaded.tmpl, config.inc.php

New Files: None

Database Altered: No

Info/Instructions: This is just an update of the instructions to work with UBB.threads 6.2.3, no new functionality added. Please report any problems you might have and I'll try to fix them as soon as possible. I don't use this myself but I hope it works and that you might find it useful. If you have the MultipleSigs hack you will have to do some extra changes for it to work, please see the extra instructions at the end.

Changes in 1.3: Added the possibility to use the content of the fields directly in the templates, without the added description and br-tag.

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Attachments
83690-ExtraInfo-1_3.txt (0 Bytes, 89 downloads)

Last edited by Gardener; 06/14/2003 10:29 PM.
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thanks!

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Well, I've been promising this for ages and I finally managed to remember to get it done. I'm trying to tie up some loose ends now that the semester is over and I have some time to get some things done.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609

Sponsored Links
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Nice mod Gardener, went off with out a hitch

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Garedener, it would be cool if people could launch a message from the users Extra info under their avatar. What if we were to add the:
Code
 <a href="aim:goim?screenname=screenname&message=Are+you+there?">screenname</a>  
to this line (3 in my case):
Code
  $postrow[$i]['Extra3'] = ($userextra3) ? "{$config['extra3']}: {$userextra3}<br />" : ""; 
and have it so it picks up the name variable where it says screenname. Do you think this is possible?

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Sure it is. Just change the line into this:

Code
 <br />$postrow[$i]['Extra3'] = ($userextra3) ? "{$config['extra3']}: <a href=\"aim:goim?screenname={$userextra3}&message=Are+you+there?\">{$userextra3}</a><br />" : ""; <br />


Now that I think of it, the content of the extra fields should be readable in the template without the extra stuff, so that you can do these things in the template yourself. I did it like this since I didn't want an empty entry if there isn't anything in the field, but giving the option to use both ways would be quite nice. I think I'll update the instructions...

Last edited by Gardener; 06/14/2003 11:39 PM.
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Updated the instructions to add plain variables with only the content of the fields for those who want to customize the look of this in their template. See the first post of the thread for these instructions.

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Okay, I tried this and got
Code
Parse error: parse error, unexpected T_STRING in /home/vhfansco/public_html/boards/showflat.php on line 766<br />

Also if we can make it so we can use this image []http://www.vhfans.com/boards/images/aim-icon.gif[/] this will be a full AIM addon

Sponsored Links
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Sorry about that, I didn't check the code and missed some escape characters, my original post is updated.

Here is a version using the AIM icon as well:
Code
<br />$postrow[$i]['Extra3'] = ($userextra3) ? "{$config['extra3']}: <a href=\"aim:goim?screenname={$userextra3}&message=Are+you+there?\"><img src=\"{$config['images']}/aim-icon.gif\" alt=\"{$userextra3}\" title=\"{$userextra3}\" border=\"0\" /></a><br />" : "";<br />

This should work, provided that the aim icon is in your standard threads images directory.

If you don't want the initial description, use this instead:
Code
<br />$postrow[$i]['Extra3'] = ($userextra3) ? "<a href=\"aim:goim?screenname={$userextra3}&message=Are+you+there?\"><img src=\"{$config['images']}/aim-icon.gif\" alt=\"{$userextra3}\" title=\"{$userextra3}\" border=\"0\" /></a><br />" : "";<br />

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Excellent, works like a charm. Thanks for coming up with the AIM mod The link is in my sig if anywant wants to check it out. I just did a google search for aim icon and there are several to choose from.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
That's good to hear, looks good on your site as well!

I'm thinking of doing a mod to use all of the most popular messengers, shouldn't be too hard. I'm not sure if it would be best to have separate fields for each program, or just one field and let the user choose which one it is. There are pros and cons with both alternatives.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
[]Gardener said:
I'm thinking of doing a mod to use all of the most popular messengers, shouldn't be too hard. I'm not sure if it would be best to have separate fields for each program, or just one field and let the user choose which one it is. There are pros and cons with both alternatives. [/]

Which ever you choose, I am sure it would be popular - thanks for the code.


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Here is the code for Yahoo (yim) if anyone is interested, it will also show the online (smilie) indicator
Code
	 $postrow[$i]['Extra4'] = ($userextra4) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target={$userextra4}\"target=\"_blank\"><img src=\"{$config['images']}/yahoo-icon.gif\" alt=\"{$userextra4}\" title=\"{$userextra4}\" border=\"0\" /></a> <img SRC=\"http://opi.yahoo.com/online?u={$userextra4}&m=g&t=0\" BORDER=0 alt=\"\"><br />" : ""; 


Also I can't seem to get any output from $postrow5, even without a mod on it?

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Thanks for the code of Yahoo, I'll get these added in somehow, either in this mod or in a separate one with some more options.

[]Also I can't seem to get any output from $postrow5, even without a mod on it?[/]

Do you mean that you can't use $postrow[$i]['Extra5'] in your showflat template? It should work, I can't see anything wrong with it at least.

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Correct, for some reason when I assign it a name it still doesn't display under the icon. I suppose I could have missed something while installing the mod, I will have to double check []http://www.vhfans.com/boards/images/graemlins/headscratch.gif[/]

I wanted to also add one for MSN but I can't find code for it anywhere, other message boards that have a "msn" indicator takes them to their profile. I have a feeling there isn't anything available for it.

Also on a side note, I pulled the <br /> out from the end of $postrow 3 so I could have AIM and YIM on one row.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Do you have the field turned on in threads config file? If it isn't, it won't display.

Also, since you have several messengers, I'm wondering if you have seen any people who have entered more than one of them?

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Yes I have it set as Yahoo and it shows up in My Home as well. I personally am the only one who has put more than one in so far on my site.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I can take a look at the files for you if you want to see if I can find the problem. All extra fields show up at my test site, and from what I can see I haven't missed anything in the instructions.

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
I have no doubt that it's something I did to it Here's what my showflat.php looks like in this area
Code
         $postrow[$i]['ICQ'] = ($ICQ) ? "<img src=\"http://web.icq.com/whitepages/online?icq={$ICQ}&amp;img={$config['icq_indicator']}\" alt=\"{$ICQ}\" /><br />" : "";<br />         $postrow[$i]['Extra2'] = ($userextra2) ? "{$config['extra2']}: {$userextra2}<br />" : "";<br />	 $postrow[$i]['Extra3'] = ($userextra3) ? "<a href=\"aim:goim?screenname={$userextra3}&message=Are+you+there?\"><img src=\"{$config['images']}/aim-icon.gif\" alt=\"{$userextra3}\" title=\"{$userextra3}\" border=\"0\" /></a>" : "";<br />	 $postrow[$i]['Extra4'] = ($userextra4) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target={$userextra4}\"target=\"_blank\"><img src=\"{$config['images']}/yahoo-icon.gif\" alt=\"{$userextra4}\" title=\"{$userextra4}\" border=\"0\" /></a> <img SRC=\"http://opi.yahoo.com/online?u={$userextra4}&m=g&t=0\" BORDER=0 alt=\"\"><br />" : "";<br />	 $postrow[$i]['Extra5'] = ($userextra5) ? "{$config['extra5']}: {$userextra5}<br />" : "";


I originally had the YIM code in line 5, when it didn't appear I moved it to 4 and it showed up. It's not a big deal though Gardener, I am pretty sure I missed something somehwere and it's a field I personally don't need. You have already been very helpful.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
That line works perfectly at my site, so it must be something wrong in your template where you insert it. Can you paste the lines from there as well?

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Okay, it may have been all that paint thinner I was huffing when I installed the mod Here is what I had in my .tmpl files
Code
<td class="small"><br />{$postrow[$i]['ICQ']}<br />{$postrow[$i]['Extra2']}<br />{$postrow[$i]['Extra3']}<br />{$postrow[$i]['Extra4']}<br /><br />


Sorry, I didn't mean to waste your time like that it works great now. If I can dig up something for MSN I will gladly share it here, Thanks again.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Ooops. =] Glad you found it at last.

If you can find something for MSN that would be great.

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Here is what I got for MSN and there is zero functionality, all it will do is display the image and have the username in the alt= statement.
Code
	 $postrow[$i]['Extra5'] = ($userextra5) ? "<img src=\"{$config['images']}/msn-icon.gif\" alt=\"{$userextra5}\" title=\"{$userextra5}\" border=\"0\" /></a>" : "";

The way the mod over at ubbdev has it is they just add an alt= statement saying "so and so uses MSN [][email protected][/] and that's it IMO the best thing that can be done with this is to have it link to the users profile, do you have a quick and easy line of code for that?

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Try this:

$postrow[$i]['Extra5'] = ($userextra5) ? "<a href="{$config['phpurl']}/showprofile.php?User=$usernum&Number=$Number&Board=$Board&what=showflat&page=$page&view=$view&sb=$sb&o=$o&fpart=$fpart&vc=1"><img src="{$config['images']}/msn-icon.gif" alt="{$postrow[$i]['Extra5Plain']}" title="{$postrow[$i]['Extra5Plain']}" border="0" /></a>" : "";

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
That's it, thanks. Too bad there isn't any launch code for msn.


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:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
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-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)