UBB.Dev
Posted By: Gardener Beta-[6.2] ExtraInfo 1.3 - 06/10/2003 2:08 AM
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.




Attached File
83690-ExtraInfo-1_3.txt  (89 downloads)
Posted By: JoshPet Re: Beta-[6.2] ExtraInfo 1.2 - 06/10/2003 2:12 AM
Thanks!
Posted By: Gardener Re: Beta-[6.2] ExtraInfo 1.2 - 06/10/2003 2:15 AM
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.
Posted By: JoshPet Re: Beta-[6.2] ExtraInfo 1.2 - 06/10/2003 3:08 AM
Posted By: AKD96 Re: Beta-[6.2] ExtraInfo 1.2 - 06/10/2003 3:52 AM
Posted By: ericgtr Re: Beta-[6.2] ExtraInfo 1.2 - 06/12/2003 11:36 PM
Nice mod Gardener, went off with out a hitch
Posted By: ericgtr Re: Beta-[6.2] ExtraInfo 1.2 - 06/15/2003 4:46 AM
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?
Posted By: Gardener Re: Beta-[6.2] ExtraInfo 1.2 - 06/15/2003 5:00 AM
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...
Posted By: Gardener Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 5:30 AM
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.
Posted By: ericgtr Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 6:31 AM
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
Posted By: Gardener Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 6:46 AM
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 />
Posted By: ericgtr Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 7:15 AM
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.
Posted By: Gardener Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 7:26 AM
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.
Posted By: Ian_W Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 11:04 AM
[]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.
Posted By: ericgtr Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 5:23 PM
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?
Posted By: Gardener Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 5:30 PM
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.
Posted By: ericgtr Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 5:42 PM
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.
Posted By: Gardener Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 6:04 PM
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?
Posted By: ericgtr Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 6:10 PM
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.
Posted By: Gardener Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 6:22 PM
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.
Posted By: ericgtr Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 6:36 PM
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.
Posted By: Gardener Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 6:39 PM
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?
Posted By: ericgtr Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 6:55 PM
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.
Posted By: Gardener Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 7:45 PM
Ooops. =] Glad you found it at last.

If you can find something for MSN that would be great.
Posted By: ericgtr Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 10:20 PM
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?
Posted By: Gardener Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 10:55 PM
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>" : "";
Posted By: ericgtr Re: Beta-[6.2] ExtraInfo 1.3 - 06/15/2003 11:21 PM
That's it, thanks. Too bad there isn't any launch code for msn.
© UBB.Developers