Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Aiheen aloitti: Compton - helmikuu 08, 2007, 05:31:36 IP

Otsikko: Xbox Live Gamercard Integration
Kirjoitti: Compton - helmikuu 08, 2007, 05:31:36 IP
I would like a feature so that I can add a gamercard to the posting profile fo my members.  I searched the MOD database and came really close in the Custom Profile Field Mod (http://custom.simplemachines.org/mods/index.php?mod=319).  But it has a ":" that it puts in front of every field and that throws off the spacing that I am looking for.

This mod could be used to add another image of any kind to the post profile.  Anyway I really hope someone decides to do this MOD I would be really grateful.  To give you an idea of the image here is a copy of what I plan to implement.

Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: GC - helmikuu 10, 2007, 11:58:23 AP
I created an xbox live gamertag mod for SMF.
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: Compton - helmikuu 12, 2007, 10:30:51 IP
I am aware of that MOD but that is not what I am requesting here.  I have already got the gamertag MOD setup.  Thank you for your responce though.
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: Compton - helmikuu 21, 2007, 09:24:38 IP
I waited a week so I figured it was time for a bump.
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: Compton - helmikuu 24, 2007, 04:02:35 IP
Does anyone at least know how to do the mod I need in the custom profile mod?
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: jkrlvgn - helmikuu 24, 2007, 04:04:59 IP
Just find the ":" in the coding and then take it out..?
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: Compton - helmikuu 24, 2007, 04:07:30 IP
Lainaus käyttäjältä: jkrlvgn - helmikuu 24, 2007, 04:04:59 IP
Just find the ":" in the coding and then take it out..?

I am an extreme laymen.  What file would I look in?
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: jkrlvgn - helmikuu 24, 2007, 05:40:44 IP
I don't think it'll help much with the spacing, but you want to edit things in the CustomProfile.php in your Sources folder.  Just do a text search for:

: </b>

And replace it with:

</b>

Like I said, it might not help with your spacing issue...but...that'll take care of your nasty :'s.....
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: Compton - helmikuu 24, 2007, 07:18:23 IP
I implemented this and it did not work do you have any other suggestions?  (Thank for trying to help to begin with.)
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: jkrlvgn - helmikuu 24, 2007, 07:25:40 IP
.....didn't work as in it didn't take the ":" away, or it didn't do the spacing issue?  Anyway....pm me a link to your board, and I'll see what I can play with.


---edit---

...or, a screenshot of what you get, and tell me how you want it differently.....that would work....
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: Compton - helmikuu 24, 2007, 07:43:45 IP
Okay here is a screenshot.  I have the area circled.  I just want that ":" gone.



http://o7ah.net/sigs/problem.jpg

There is a link the the larger version
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: jkrlvgn - helmikuu 24, 2007, 08:02:50 IP
OH!!!

I thought you meant in the profile itself.  *LOL*  God, I'm such an idiot.

Hold on..I've got this....
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: Compton - helmikuu 24, 2007, 08:10:43 IP
Cool.  I really hope your right.  :)
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: jkrlvgn - helmikuu 24, 2007, 08:17:31 IP
Search for:
_name'] . ': '

Replace it with:

_name'] . ''

There's 4 instances of this....just checked on my board, and it's fine.

Lemme know if that works for you.

---Edit---

...it's in the same file, just so you know.
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: Compton - helmikuu 24, 2007, 08:31:07 IP
It worked perfectly.  Thank you tons!!!!!!!!!!!!!!
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: jkrlvgn - helmikuu 24, 2007, 08:32:29 IP
No problem!
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: aperseghin - maaliskuu 01, 2007, 04:14:01 IP
make it a mod.. i want it too...
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: modz - heinäkuu 09, 2007, 02:16:36 AP
Does anyone know how he added the gamercard part into the custom field?
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: modz - heinäkuu 09, 2007, 02:41:33 AP
hmm im going to try somthing if it works i'll post it here.. But if anyone has any suggestions PLEASE let me know..
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: modz - heinäkuu 09, 2007, 03:11:45 AP
Ok i got it to work.. What i did is installed the custom fields mod and then i had to add this..

LainaaMaybe useful for someone:
To add support for the Xbox Live Gamercards to a SMF open the Subs.php.
Look for:

Code:
         array(
            'tag' => 'white',
            'before' => '<span style="color: white;">',
            'after' => '</span>',
         ),and add

Code:
         array(
            'tag' => 'gamercard',
            'type' => 'unparsed_content',
            'content' => '<iframe src="http://gamercard.xbox.com/$1.card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>',
            'validate' => create_function('&$tag, &$data, $disabled', '$data = rawurlencode(trim($data));'),
         ),behind that.
This will add a BBC [gamercard]. To use it just write [gamercard]Gamertag[/gamercard] inside a post.
Used and tested with SMF 1.1 RC1
Have fun.
RealRauch



but the problem is this..



See the gamercard is sticking out into the post its self..

Now i could trim down the iframe

src="http://gamercard.xbox.com/$1.card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>',

but that doesnt resize the card.. It just cuts the image to whatever the size is set to.. So if i took it down to 80 for example.. it would only show a small part of the gamercard..

The problem here is some peoples gamertags are longer then mine. So it would cut part of there name there..


Any solutions anyone has?
Otsikko: Re: Xbox Live Gamercard Integration
Kirjoitti: ruckstande - syyskuu 02, 2007, 03:26:45 IP
I don't know anything about this stuff.  If I follow these instructions will I be able to have the Gamertag under my avatar?