News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Gamer IDs

Started by KiLLuMiNaTi-7-, October 18, 2010, 07:50:53 PM

Previous topic - Next topic

IDunc

Quote from: Masterd on January 29, 2011, 08:40:48 AM
Add this to the Ultimate Profile's template.

', !isset($context['disabled_fields']['gamer_xbgt']) && !empty($context['member']['gamer_xbgt']['link']) ? '<li>' . $context['member']['gamer_xbgt']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['gamer_psn']) && !empty($context['member']['gamer_psn']['link']) ? '<li>' . $context['member']['gamer_psn']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['gamer_steam']) && !empty($context['member']['gamer_steam']['link']) ? '<li>' . $context['member']['gamer_steam']['link'] . '</li>' : '', '


Where in UltimateProfile.template.php do I add this?

And how do I move the icons so they appear next to my Custom Profile Fields?

Right now it's like this:


And I want it like this:


khamseen

#41
Quote from: Jorge D. Fuentes on June 25, 2011, 07:39:20 PM
This is all well and good, but what if other mods are looking specifically for this line:
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!

I'm already running into other mods that are not quite working, failing to install, possibly because of that.

Still, I will try what you say... but what I'd really like to do is properly place that line in the correct location so that I don't have this problem.

I can't really go with your 2nd solution, as I just won't remember what got installed in what order.  I'm already confused as to what is installed already (I've got maybe 10 or so mods so it's not a terribly large amount, but the proxy blocker was one of the earlier add-ons, along with aeva and http-BL).

I have a post in the admin section of all our forums with a sticky post simply called "Package Install Order", when I install something, I add it to the list, pretty straight forward and to be honest it's a good idea to do it. Some packaged install like the gamer ID and proxy one where they will add something under something else, which other packages will also then do, so if you don't uninstall them in the reverse order of how you installed them, they wont be able to find what they are looking for to revert, because it's been moved by other packages adding their info. I run an average of 25 packages on my forums and I wouldn't be without the list, it's the only way I can install and uninstall them all without any faults.

If you uninstall the proxy blocker you will have that line in your modsettings file again... Then you'll see where it should be if you want to re add it.

EDIT: I've just opened up the install file from the proxy blocker I attached to my last post and noticed I'd left an 'engine' where it should have been 'position', which is why it replaced the line instead of adding after it. My apologies, it was late last night and my brain wasn't working properly. I've reattached the file with the correct syntax, if you uninstall proxy then reinstall this version it will leave the line in place, I've tried and tested it a couple of times.

However, it's worth noting that when it comes to uninstalling you'll still require to do the uninstall in the reverse order of the install, it's just simple fact that because of how the packages install (by referencing a single point and adding after it) they move things when they install, which means things installed before them can't find what they need when you try to uninstall them.
"In hope we find despair and in despair we find truth." - Myself

Dramber

Great mod, my users love it. Thanks for sharing!

IDunc

This is where my Test Failed is in Sources/Load.php


Attached is my Load.php. Please help!


IDunc

The icons refuse to show in my postbit, even though there was no error in my display.template.php for my theme. The only Test Failed I had is the one described above, which I manually edited. This may be the problem, but is said to find mem.birthdate something something, and I did, but there were two of them. So I added the ui thing before each one and the code from Gamer ID after each one. Did I do something wrong? Attached is my new Load.php


khamseen

Quote from: IDunc on June 29, 2011, 01:04:03 AM
The icons refuse to show in my postbit, even though there was no error in my display.template.php for my theme. The only Test Failed I had is the one described above, which I manually edited. This may be the problem, but is said to find mem.birthdate something something, and I did, but there were two of them. So I added the ui thing before each one and the code from Gamer ID after each one. Did I do something wrong? Attached is my new Load.php

Your Load.php is missing an entire section for the Gamer ID plugin...

Code (find) Select
$profile['location'],
Code (add after) Select

'gamer_xbgt' => $profile['gamer_xbgt'] != '' && !isset($context['disabled_fields']['gamer_xbgt']) && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => $profile['gamer_xbgt'],
'link' => '<a href="' . $scripturl . '?action=gamercard;area=xbgt;u=' . $profile['id_member'] . '" title="' . $txt['gamer_xbgt'] . ' - ' . $profile['gamer_xbgt'] . '" onclick="return reqWin(this.href, 480, 420);"><img src="' . $settings['default_images_url'] . '/gamericons/xboxlive.png" alt="' . $txt['gamer_xbgt'] . ' - ' . $profile['gamer_xbgt'] . '" /></a>',
'link_name' => $txt['gamer_xbgt']. ': <a href="' . $scripturl . '?action=gamercard;area=xbgt;u=' . $profile['id_member'] . '" title="' . $txt['gamer_xbgt'] . ' - ' . $profile['gamer_xbgt'] . '" onclick="return reqWin(this.href, 480, 420);">' . $profile['gamer_xbgt'] . '</a>',
) : array('name' => '', 'link' => '', 'link_name' => ''),
'gamer_psn' => $profile['gamer_psn'] != '' && !isset($context['disabled_fields']['gamer_psn']) && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => $profile['gamer_psn'],
'link' => '<a href="' . $scripturl . '?action=gamercard;area=psn;u=' . $profile['id_member'] . '" title="' . $txt['gamer_psn'] . ' - ' . $profile['gamer_psn'] . '" onclick="return reqWin(this.href, 620, 300);"><img src="' . $settings['default_images_url'] . '/gamericons/psn.png" alt="' . $txt['gamer_psn'] . ' - ' . $profile['gamer_psn'] . '" /></a>',
'link_name' => $txt['gamer_psn']. ': <a href="' . $scripturl . '?action=gamercard;area=psn;u=' . $profile['id_member'] . '" title="' . $txt['gamer_psn'] . ' - ' . $profile['gamer_psn'] . '" onclick="return reqWin(this.href, 620, 300);">' . $profile['gamer_psn'] . '</a>',
) : array('name' => '', 'link' => '', 'link_name' => ''),
'gamer_steam' => $profile['gamer_steam'] != '' && !isset($context['disabled_fields']['gamer_steam']) && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => $profile['gamer_steam'],
'link' => '<a href="' . $scripturl . '?action=gamercard;area=steam;u=' . $profile['id_member'] . '" title="' . $txt['gamer_steam'] . ' - ' . $profile['gamer_steam'] . '" onclick="return reqWin(this.href, 520, 270);"><img src="' . $settings['default_images_url'] . '/gamericons/steam.png" alt="' . $txt['gamer_steam'] . ' - ' . $profile['gamer_steam'] . '" /></a>',
'link_name' => $txt['gamer_steam']. ': <a href="' . $scripturl . '?action=gamercard;area=steam;u=' . $profile['id_member'] . '" title="' . $txt['gamer_steam'] . ' - ' . $profile['gamer_steam'] . '" onclick="return reqWin(this.href, 520, 270);">' . $profile['gamer_steam'] . '</a>',
) : array('name' => '', 'link' => '', 'link_name' => ''),
"In hope we find despair and in despair we find truth." - Myself

IDunc

I added that code and it still didn't work. I didn't get any other test failed's when installing. Maybe I am missing something in Display.template. Can you check it out for me please?


khamseen

Quote from: IDunc on June 29, 2011, 11:19:29 AM
I added that code and it still didn't work. I didn't get any other test failed's when installing. Maybe I am missing something in Display.template. Can you check it out for me please?

Your display.template file has all the additions for Gamer ID plugin so it's not what's causing them not to show. What theme are you using? If not the default, did you ensure you added it to the theme you're using?
"In hope we find despair and in despair we find truth." - Myself

IDunc

I am using My Cart (http://www.logooff.net/index.php?page=mycart). The display.template didn't fail for it. What do I have to add?


khamseen

Since that's a pay to use theme, I can't help you I'm afraid because I can't see what files it has or how they are coded. For any template files it has (display.template, profile.template etc) you'll have to change them the same way you would change the default themes template files.
"In hope we find despair and in despair we find truth." - Myself

IDunc

Okay I'll go through and parse whichever files are effected in the default theme and parse them for my theme. I also added the gamericons folder to my theme's images, and added Gamercard.php (something like that) to my theme's folder. Is that what I should do?


khamseen

Quote from: IDunc on June 29, 2011, 12:21:45 PM
Okay I'll go through and parse whichever files are effected in the default theme and parse them for my theme. I also added the gamericons folder to my theme's images, and added Gamercard.php (something like that) to my theme's folder. Is that what I should do?

You don't need to add the gamercard files (php or images) to each theme, they will be taken from the default path, just the template edits need to be done on each theme so it knows how to display them.
"In hope we find despair and in despair we find truth." - Myself

IDunc

But my theme uses most of the default's template files. Could it be because of this:

I had to make a manual edit to Load.php. I had to:

Find:
mem.openid_uri, mem.birthdate,

Add after:
mem.gamer_xbgt, mem.gamer_psn, mem.gamer_steam,

That's where I got the test failed in Load.php, because there was no mem.openid_uri in front of mem.birthdate. So I added mem.openid_uri in front, then added the Gamer ID codes after. But there were two mem.birthdate's, so I did the same for both... Should I have done this?


khamseen

Nope, you didn't need to add mem.openid_uri... The mem.gamer_xbgt, mem.gamer_psn, mem.gamer_steam is what the gamer id plugin needs.

What php files are in your themes directory?
"In hope we find despair and in despair we find truth." - Myself

IDunc

Does adding the uri thing make a big impact? Should I remove it?

And here are the files in my theme:
-BoardIndex.template.php
-Display.template.php
-index.php
-index.template.php
-MessageIndex.template.php
-Settings.template.php
-Themes.template.php


khamseen

Well you shouldn't declare things that aren't being used, so probably best to remove it just to avoid any problems. As for your theme, the display.template file from your theme folder will need the same additions as the default theme display.template. None of the other ones listed get modified by the plugin.
"In hope we find despair and in despair we find truth." - Myself

IDunc

There was no fail in the display.template, but I'll check it and report back. And I'll delete the uri things I added.


khamseen

Quote from: IDunc on June 29, 2011, 01:18:41 PM
There was no fail in the display.template, but I'll check it and report back. And I'll delete the uri things I added.

Ok no problem. :)
"In hope we find despair and in despair we find truth." - Myself

IDunc

Okay Display.template.php looks fine to me. It is attached.


khamseen

That looks like it should.
"In hope we find despair and in despair we find truth." - Myself

Advertisement: