Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: TechnoDragon on February 11, 2006, 07:04:55 PM

Title: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on February 11, 2006, 07:04:55 PM
How to COMPLETELY integrate Skype and Ventrillo into SMF.

After may hours of work (and that's saying something as I have near zero knowledge of PHP) I have figured out how to not only show the Skype and Ventrilo icons in a user profile and posts, but I also have suceeded in showing them in the Memberlist.

This has only been tested and verified on RC2 and the Skype version was 2.0.79 or higher.

(these should be in your themes directory either the specific theme or the default theme)
In display.template.php:

Find:

', $message['member']['yim']['link'], '<br />';

and replace:

', $message['member']['yim']['link'], '<br />
', $message['member']['Skype']['link'], '
', $message['member']['Ventrilo']['link'], '<br />';

In index.template.php:

Find:

// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.

Replace:

// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">
</script>

In memberlist.template.php:

Find:

<td class="windowbg2">', $member['msn']['link'], '</td>

Replace:

<td class="windowbg2">', $member['msn']['link'], '</td>
<td class="windowbg2">', $member['Skype']['link'], '</td>
<td class="windowbg2">', $member['Ventrilo']['link'], '</td>

In profile.template.php:

Find:

<td>', $context['member']['yim']['link_text'], '</td>
</tr><tr>

Add after:

<td><b>Skype: </b></td>
<td>', $context['member']['Skype']['link_text'], '</td>
</tr><tr>
<td><b>Ventrilo: </b></td>
<td>', $context['member']['Ventrilo']['link_text'], '</td>
</tr><tr>

Find:

<td align="center">', $txt['MSN'], '</td>

Add after:

<td align="center">Skype</td>
<td align="center">Ventrilo</td>

Find:

<td align="center">', $buddy['msn']['link'], '</td>

Add after:

<td align="center">', $buddy['Skype']['link'], '</td>
<td align="center">', $buddy['Ventrilo']['link'], '</td>

Find:

<td><input type="text" name="YIM" maxlength="32" size="24" value="', $context['member']['yim']['name'], '" /></td>
</tr><tr>

Add after:

<td width="40%"><b>Skype Name: </b><div class="smalltext">Your Skype internet call name.</div></td>
<td><input type="text" name="Skype" size="24" value="', $context['member']['skype']['name'], '" /></td>
</tr><tr>
<td width="40%"><b>Ventrilo IP: </b><div class="smalltext">Your Ventrilo IP.</div></td>
<td><input type="text" name="Ventrilo" maxlength="65" size="24" value="', $context['member']['Ventrilo']['name'], '" /></td>
</tr><tr>

In the Sources directory:

In load.php:

Find:

mem.birthdate, mem.memberIP, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin,

Replace:

mem.birthdate, mem.memberIP, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.Skype, mem.Ventrilo, mem.posts, mem.lastLogin,

Find:

mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood,

Replace

mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.Skype, mem.Ventrilo, mem.posts, mem.lastLogin, mem.karmaGood,

Find:

'link' => '<a href="http://members.msn.com/' . $profile['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $profile['MSN'] . '" border="0" /></a>',

Add after:

'Skype' => $profile['Skype'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['Skype'],
'href' => 'callto://' . $profile['Skype'],
'link' => '<a href="callto://' . $profile['Skype'] . '"><img src="http://mystatus.skype.com/smallicon/' . $profile['Skype'] . '" alt="' . $profile['Skype'] . '" border="0" /></a>',
'link_text' => '<a href="callto://' . $profile['Skype'] . '">' . $profile['Skype'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'Ventrilo' => $profile['Ventrilo'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['Ventrilo'],
'href' => 'ventrilo://' . $profile['Ventrilo'],
'link' => '<a href="ventrilo://' . $profile['Ventrilo'] . '"><img border="0" src="' . $settings['images_url'] . '/Ventrilo.gif"></a>',
'link_text' => '<a href="ventrilo://' . $profile['Ventrilo'] . '">' . $profile['Ventrilo'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),

In memberlist.php:

Find:

'MSN' => array(
'label' => $txt['MSN'],
'width' => '25'
),

Add after:

'Skype' => array(
'label' => Skype,
'width' => '25'
),
'Ventrilo' => array(
'label' => Ventrilo,
'width' => '25'
),

Find:

'MSN' => array(
'down' => 'LENGTH(mem.MSN) > 0 DESC, ISNULL(mem.MSN) ASC, mem.MSN ASC',
'up' => 'LENGTH(mem.MSN) > 0 ASC, ISNULL(mem.MSN) DESC, mem.MSN DESC'
),

Add after:

'Skype' => array(
'down' => 'LENGTH(mem.Skype) > 0 DESC, ISNULL(mem.Skype) ASC, mem.Skype ASC',
'up' => 'LENGTH(mem.Skype) > 0 ASC, ISNULL(mem.Skype) DESC, mem.Skype DESC'
),

'Ventrilo' => array(
'down' => 'LENGTH(mem.Ventrilo) > 0 DESC, ISNULL(mem.Ventrilo) ASC, mem.Ventrilo ASC',
'up' => 'LENGTH(mem.Ventrilo) > 0 ASC, ISNULL(mem.Ventrilo) DESC, mem.Ventrilo DESC'
),

Find:
[code]
$fields += array(3 => 'MSN', 'AIM', 'ICQ', 'YIM');

Replace:

$fields += array(3 => 'MSN', 'AIM', 'ICQ', 'YIM', 'Skype', 'Ventrilo');

In profile.php:

Find:

'msn' => array('name' => empty($user_profile[$memID]['MSN']) ? '' : $user_profile[$memID]['MSN']),

Add after:

'skype' => array('name' => empty($user_profile[$memID]['Skype']) ? '' : $user_profile[$memID]['Skype']),
'Ventrilo' => array('name' => empty($user_profile[$memID]['Ventrilo']) ? '' : $user_profile[$memID]['Ventrilo']),

Find:

$profile_strings = array(
'websiteUrl', 'websiteTitle',
'AIM', 'YIM',

Replace:

$profile_strings = array(
'websiteUrl', 'websiteTitle',
'AIM', 'YIM', 'Skype', 'Ventrilo',

Find:

// Fix the spaces in messenger screennames...
$fix_spaces = array('MSN', 'AIM', 'YIM');

Replace:

// Fix the spaces in messenger screennames...
$fix_spaces = array('MSN', 'AIM', 'YIM', 'Skype', 'Ventrilo');

Find:

'msn' => array(
'name' => empty($_POST['msn']) ? '' : stripslashes($_POST['MSN'])
),

Add after:

'skype' => array(
'name' => empty($_POST['Skype']) ? '' : stripslashes($_POST['Skype'])
),
'Ventrilo' => array(
'name' => empty($_POST['Ventrilo']) ? '' : stripslashes($_POST['Ventrilo'])
),

Now for the faint hearted :)

You have to add two fields to your database using phpmyadmin or phpflashmyadmin.

in the table smf_members add two fields:

Skype as type tinytext
Ventrilo as type varchar with a size of 65.

Note the case has to be exact or it will not work.

the only error i have seen is that with the Skype field in the profile.  If you enter the skype name in the field and submit, the field clears, but the info is saved in the database and the icons show up everywhere they need to be...just that the profile field stays empty (anyone have any ideas that would fix this please tell me).

A special thanks to Oldiesman in helping me figure this out.  I also got some of the code for Skype from this post: http://www.simplemachines.org/community/index.php?topic=38550.0;topicseen

Skype provides it's own image now...for ventrilo:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.technodragon.net%2Fimages%2FVentrilo.gif&hash=e7d20756074ce3f07cb8f562ff89dfdee667a979)

[/code]
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on February 24, 2006, 11:07:21 PM
I would appreciate it if some one could help me out with two things on this...

1.  How can I make this into a mod? Believe i have that done...

2. What is the way to create the DB query to add the fields in the database so it does not have to be done manually (especially if this gets turned inot a mod). <---anyone please help me on this?
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: redlabour on February 27, 2006, 06:14:17 PM
Hmmm....can somebody code this as a PlugIn ?
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on February 27, 2006, 06:16:32 PM
I have been desperately trying to get help to do just that, but noone has yet offered.  I know it is a bit daunting when you look at it, trust me I know...I had to do it twice.  Once to install it, then again to do this tutorial.
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: redlabour on February 27, 2006, 06:21:09 PM
Hi,

i think in the Year 2006 it is absolutely unnecessary to lost Time on manually edit so much Code for a small Feature like Skype. Every great Boardsoftware has a Hook and Plugin System today to hold the original Code and Templates clean & secure.

I think a lot of People will thank you for your work but i am a little bit shocked.  ;)

I hope you do not misunderstand me - i mean this friendly but a little bit amused. ;)

Sorry for my poor english.
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on February 28, 2006, 12:32:35 AM
No, I understand, there is a much easier way to put the skype icon in...just do a search for skype and you'll find it...it is just that mine is long because I wanted it to actually be "in" the forum, just like MSN and ICQ...the other method you'll find does not.

If only I could find someone who'll help me build a mod package we'd be good to go...
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: redlabour on February 28, 2006, 02:05:32 AM
Ahhhh ... ok - thx ! ;)
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: Gary on February 28, 2006, 07:05:59 AM
Hmm...

/me  makes a mental note to put this into my forum
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: Kindred on February 28, 2006, 07:49:16 AM
suggestion:

Download and take a look at some other mod that modifies the database (like Globalopper's Member Map mod, or my Jack's Phat Calendar Pack, or any of a dozen others...)   and see how they do it in the install XML and the code to run the add-table...
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on February 28, 2006, 08:22:28 AM
I have done that...and I think I have the mod part finished...it is the DB query that I cannot figure out...

http://www.technodragon.net/files/skypeventrilo.zip

If someone could take a look and make sure...just need help with the db query I think now.
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: nokonium on February 28, 2006, 05:55:11 PM
I have it installed now I need to go and play

Thanks

Though when I checked the syntax I found a couple of errors

QuoteFind:
Code:
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.

Replace:

Code:
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">
</script>

Needs to end
Quote</script> ';

Quote
'link' => '<a href="http://members.msn.com/' . $profile['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $profile['MSN'] . '" border="0" /></a>',

should include the following line:
Quote) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),

before you <add after>

Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: JayBachatero on February 28, 2006, 06:11:59 PM
technodragon73 take a look at Package SDK, anyone? (http://www.simplemachines.org/community/index.php?topic=20319.0).  There is a file called addsettings.php it tells you how to add the queries.
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on February 28, 2006, 10:38:07 PM
Thank you so very much...that info was exactly what I needed (wish someone had pointed that out weeks ago).

I believe I have  a successful mod package now...since I do not know how to make it available as a mod here, here is the link to download it:

http://www.technodragon.net/files/skypeventrilo.zip

This is ONLY for RC2...modify earlier versions at your own risk.
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: Gary on March 01, 2006, 06:38:02 AM
Submit it to the mod site here;

http://mods.simplemachines.org/index.php?action=postmod;sa=new
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on March 01, 2006, 08:47:53 AM
Quote from: nokonium on February 28, 2006, 05:55:11 PM
I have it installed now I need to go and play

Thanks

Though when I checked the syntax I found a couple of errors

QuoteFind:
Code:
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.

Replace:

Code:
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">
</script>

Needs to end
Quote</script> ';



Quote
'link' => '<a href="http://members.msn.com/' . $profile['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $profile['MSN'] . '" border="0" /></a>',

should include the following line:
Quote) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),

before you <add after>


First part:
No, in the default theme there are two other lines below the echo statement (at least on mine there is) and the last line is escaped with ';
Second part:
I did not catch that...thank you...I fixed it and reuploaded the zip to my server.

I thank you for showing me the upload for packages...now if anyone could let me know if the mod works...it is my first after all...
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: Georges on March 04, 2006, 07:20:33 PM
Hi Technodragon73,

Thank you for this tutorial.
I used the manual way as I was interested in seeing which part of the screen display was linked to a specific php script.
All is going fine except the Skype name disappearing from the profile as you mentioned it.
Did you find the trick to correct this behavior?
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on March 04, 2006, 09:42:24 PM
Not at the moment, but it seems to be an issue that is on each machine locally...as now my profile at my forum shows the skype and ventrilo name peoperly like it should...
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: Georges on March 05, 2006, 10:49:08 AM
I install only the Skype icon and yes it shows properly.

1- Skype
BTW you need Skype 2.0 version and set properly the Tools-Privacy-Allow my status to be show on the web in order the icon can display your real status.
If you need a more explicit Skype icon in load.php
Find:
<img src="http://mystatus.skype.com/smallicon/'
Change:
<img src="http://mystatus.skype.com/smallclassic/'

I note too that reloading the MEMBERS do not refresh the page and the Skype icon does not change despite the Skype status of the member has effectively changed.

2- Profile
The problem with the Skype Name not showing in the profile is when the member will update his profile. If nothing is entered again into the Skype Name box then it will be blank in the Data Base.

May be something related to the $context['member']['Skype']['name'] variable not declared correctly?
I am in the process of modifying the Profile in order to get more personal information from the members as company, phone, fax, address etc... (it is a private forum) and the Skype Name issue should be solved before to go ahead with this small project.
I am newbie to PHP and SMF so I have to rely on help from the experts!

Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: Georges on March 05, 2006, 11:27:07 AM
Hi Technodragon73,

It seems I have found the profile update problem:

In Profile.php
You write:
'Skype' => array('name' => empty($user_profile[$memID]['Skype'])
'Skype' => array(
'name' => empty($_POST['Skype']) ? '' : stripslashes($_POST['Skype'])


You should write:
'skype' => array('name' => empty($user_profile[$memID]['Skype'])
'skype' => array(
'name' => empty($_POST['Skype']) ? '' : stripslashes($_POST['Skype'])


Skype is the DB field but skype is the variable.
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on March 05, 2006, 03:31:14 PM
Thank you for that bit of info...I am still very new to all of this php stuff and I am finding case can really affect teh context of things...I will update this tutorial as soon as I can.
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: phil_roy on March 28, 2006, 04:24:25 AM
Hey there,

How are you going with this mod? I just downloaded the mod from the downloads section and get the following...
QuoteType     Action     Description
1.    Execute Modification    ./Themes/default/index.template.php    Test failed
2.    Execute Modification    ./Themes/default/Who.template.php    Test successful
3.    Execute Modification    ./Themes/default/Memberlist.template.php    Test successful
4.    Execute Modification    ./Sources/Load.php    Test successful
5.    Execute Modification    ./Sources/Memberlist.php    Test successful
6.    Execute Modification    ./Sources/Profile.php    Test successful
7.    Execute Modification    ./Themes/default/Profile.template.php    Test successful
8.    Extract File    ./Themes/default/images/Ventrilo.gif    
9.    Execute Code    imscript.php    
Phil
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on March 28, 2006, 08:17:15 AM
do you have any other mods installed?
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: phil_roy on March 28, 2006, 08:23:30 AM
None....but it's a SMF forum bridged into Joomla...although my understanding is the forum still runs as a seprate entity?

Phil
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on March 28, 2006, 08:31:08 AM
Quote from: phil_roy on March 28, 2006, 08:23:30 AM
None....but it's a SMF forum bridged into Joomla...although my understanding is the forum still runs as a seprate entity?

Phil
my first question would be are you using RC2 of SMF?  if so then look in that file (index.template.php) around line 78...
Find:
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.

That is the code that should be there....if not then that is why it is failing...most likely joomla changed that line...if it is there or not, you may have to manually edit the file...
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: phil_roy on March 28, 2006, 08:36:18 AM
Yes it is RC2 and yes that code is there....but that template file is also hacked to stop repetition of tags such as head and body tags that Joomla "wraps" around it....so that maybe what is causing it.

I can access the forum unwrapped so that may be a way around applying the mod...but will it work after that I wonder?

Phil
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on March 28, 2006, 09:14:38 AM
well, you could try that, or you could take the long route and manually install the mod...lol
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: willi1 on April 02, 2006, 06:22:47 AM
Hello,

i have a big problem i have make all the things of a tutorial
but now i become the following error message


Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/default/index.template.php on line 83

74: var smf_scripturl = "', $scripturl, '";
75: // ]]></script>
76: <title>', $context['page_title'], '</title>';
77:
78: // The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
79: echo '
80: <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">
81: </script>
82: echo '

83: [color=red]<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">[/color]

84: </script>
85: echo '
86: <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc2" /'>
87: <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" media="print" />';


has anybody a idea please i´m very confused

best regards

André
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on April 02, 2006, 10:21:03 AM
according to your little snippet, this is what you have:
78: // The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
79: echo '
80: <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">
81: </script>
82: echo '

83: [color=red]<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">[/color]

84: </script>


This is what it should be:
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">
</script>
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: willi1 on April 02, 2006, 03:00:02 PM
thank you i have make what i schould do but now i have this error message when i start the page

www.alko-hohl.de


Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

and the other error

Parse error: syntax error, unexpected '<' in .../Themes/default/index.template.php on line 83

74:       var smf_scripturl = "', $scripturl, '";
75:    // ]]></script>
76:    <title>', $context['page_title'], '</title>';
77:
78:    // The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
79:    echo '
80: <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">
81: </script>
82:    <link rel="stylesheet" type="text/css" href="', $settings['theme,url'], '/style.css?rc2" />';
83:    <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" media="print" />';84:
85:    /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
86:       Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
87:       Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.


You can also try refreshing this page.


please help me

best regards

willi1
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on April 02, 2006, 04:49:35 PM
Quote82:    <link rel="stylesheet" type="text/css" href="', $settings['theme,url'], '/style.css?rc2" />';
83:    <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" media="print" />';

remove the '; at the end of line 82
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: willi1 on April 03, 2006, 12:39:23 AM
verry thanks,
but now my problem is when i want fill in the skype name he doesn´t save it and then when i locked out the tamplate is crsahed.

you can test it. please

user: test
paßword: testtest

http://www.alko-hohl.de

<?php
// Version: 1.1 RC2; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1 RC2';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?rc2p"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">
</script>
<link rel="stylesheet" type="text/css" href="'
$settings['theme,url'], '/style.css?rc2" />';
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don'
do font sizes properly. (they are big...)
Thusin Internet Explorer 45, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if notit will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
</head>
<body>'
;

echo '
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">'
;

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">'
$context['forum_name'], '</span>';
else
echo '
<img src="'
$settings['header_logo_url'], '" style="margin: 4px;" alt="'$context['forum_name'], '" />';

echo '
</td>
<td align="right" class="catbg">
<img src="'
$settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>'
;


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>'
;

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
</td>'
;

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' 
$context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>'
;

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> <br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - send them a lovely greating...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="302400">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
</td>'
;
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="'
$scripturl'?action=search2" method="post" style="margin: 0;">
<a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>'
;


// Show the menu here, according to the menu sub template.
template_menu();


// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
</td>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' 
$first '">&nbsp;</td>';

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back' '">
<a href="'
$scripturl'">' $txt[103] , '</a>
</td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'help' 'active_back' 'back' '">
<a href="'
$scripturl'?action=help">' $txt[119] , '</a>
</td>' 
$current_action == 'help' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
<a href="'
$scripturl'?action=search">' $txt[182] , '</a>
</td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back' '">
<a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
</td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back' '">
<a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
</td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back' '">
<a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
</td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
</td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
<a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
</td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back' '">
<a href="'
$scripturl'?action=login">' $txt[34] , '</a>
</td>' 
$current_action == 'login' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back' '">
<a href="'
$scripturl'?action=register">' $txt[97] , '</a>
</td>' 
$current_action == 'register' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back' '">
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
</td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The end of tab section.
echo '
<td class="maintab_' 
$last '">&nbsp;</td>
</tr>
</table>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>



please help me sorry for my english it´s not so good

best regards

willi1

Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on April 03, 2006, 01:11:31 AM
Whoa...that was hard to navigate (my foreign language skills are REALLY not good at all)

What I want to know is if you added the two fields for skype and ventrilo to your database?  That would most likely be the cause for the information not being saved.
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: willi1 on April 03, 2006, 06:41:49 AM
Hej Hej,

thanks for the answer, now i send you two links with database picture

you can see the the adjustment.

http://www.alko-hohl.de/temp/database.bmp
http://www.alko-hohl.de/temp/database1.bmp

but the forum don´t save these settings

i total confused  ;)

best regards

willi1
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on April 03, 2006, 09:10:19 AM
ok...i see the problem...those two fields are supposed to be added to the smf_members table
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: willi1 on April 03, 2006, 10:05:18 AM
sorry i forgot, when i logged out my template is crashed have you
any idea?

and the other problem what can i do ?

i don´t understand the last answer so good schould i make new tables?

Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on April 03, 2006, 10:29:11 AM
Quote from: willi1 on April 03, 2006, 10:05:18 AM
sorry i forgot, when i logged out my template is crashed have you
any idea?

and the other problem what can i do ?

i don´t understand the last answer so good schould i make new tables?



no, in phpmyadmin, open up the smf_members table and create those two fiels in there
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: willi1 on April 03, 2006, 10:53:21 AM
Hej Hej,

but that is in the table smf_members

you can see it

http://www.alko-hohl.de/temp/database2.bmp

or i can´t undertand you what you mean sorry sorry 
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: TechnoDragon on April 03, 2006, 09:50:31 PM
hmmm....looking at it and thinking, it may be an issue that the mod was for the english version...so honestly if you did it exactly as it is supposed to be per the instructions, then it may boil down to a language issue.
Title: Re: Tutorial: How to COMPLETELY integrate Skype and Ventrillo into SMF.
Post by: willi1 on April 04, 2006, 01:43:12 PM
and now  :'(

Who can help me

i m total confused

greetings

André