============================================================================================================================
Modification Name: Flickr Link

Version: 1.0

Author: GuldantheWarlock (GuldantheWarlock@xmbgarage.com)

Description:
This modificaton will allow you to specify your Flickr Username in your profile settings
This modificaton will add a flickr button to your posts that will open a new window with your flickr profile

Supported Version: XMB 1.9.5 SP1

Notes:
This modificaton is released under the GPL v3. A copy is provided with this software package.

Please backup your files before installing this modificaton.
Neither XMBGarage nor the author can be held responsible if your board stops functioning properly due to you installing this modificaton.
============================================================================================================================
=======
Step 1:
=======
====================================
Go To Administration Panel --> Insert Raw SQL
====================================
===================================
Paste The Following Code and Submit Changes:
===================================

ALTER TABLE `$table_members` ADD `flickr` VARCHAR(32) NOT NULL default '';

============================================================================================================================
=======
Step 2:
=======
=======================
Edit File: lang/English.lang.php
=======================
========================
Add To End Of File Above  ?>
========================

// Flickr Link Mod Begin
$lang['flickr'] = 'Flickr URL:';
$lang['flickralt'] = 'This User has a Flickr Playlist';
// Flickr Link Mod End

============================================================================================================================
=======
Step 3:
=======
=================
Edit File: member.php
=================
==========
Find Code:
==========

        $sig           = isset($sig) ? checkInput($sig, '', $SETTINGS['sightml'], '', false) : '';

===============
Add Code Below:
==============

        // Flickr Link Mod Begin
        $flickr = isset($flickr) ? checkInput($flickr, '', '', 'javascript', false) : '';
        // Flickr Link Mod End

==========
Find Code:
==========

        $sig           = addslashes($sig);

===============
Add Code Below:
===============

        // Flickr Link Mod Begin
        $flickrname = addslashes($flickrname);
        // Flickr Link Mod End

==========
Find Code:
==========

        $db->query("INSERT INTO $table_members (uid,

========================
Find Code In Above Statement:
========================

) VALUES ('', '$username',

================
Replace Code With:
================

, flickr) VALUES ('', '$username',

=========================
Find Code At End Of Statement:
=========================

)");

================
Replace Code With:
================

, '$flickr')");

==========
Find Code:
==========

            if ($memberinfo['email'] != "" && $memberinfo['showemail'] == "yes") {
                $email = $memberinfo['email'];
            } else {
                $email = '';
            }

===============
Add Code Below:
===============

             // Flickr Link Mod Begin
            if (strpos($memberinfo['flickr'], 'http') === false) {
                $memberinfo['flickr'] = "http://$memberinfo[flickr]";
            }
            $flickrblock = '';
            if ($memberinfo['flickr'] != 'http://') {
                $flickr = $memberinfo['flickr'];
                eval('$flickrblock = "'.template('member_profile_flickr').'";');
            }
            // Flickr Link Mod End

============================================================================================================================
=======
Step 4:
=======
=================
Edit File: memcp.php
=================
==========
Find Code:
==========

        $sig            = isset($newsig) ? checkInput($newsig, '', $SETTINGS['sightml'], '', false) : '';

===============
Add Code Below:
===============

        // Flickr Link Mod Begin
        $flickr = isset($flickr) ? checkInput($flickr, '', '', 'javascript', false) : '';
        // Flickr Link Mod End

==========
Find Code:
==========

        $sig            = addslashes($sig);

===============
Add Code Below:
===============

        // Flickr Link Mod Begin
        $flickr = addslashes($flickr);
        // Flickr Link Mod End

==========
Find Code:
==========

$db->query("UPDATE $table_members SET $pwtxt email='$email',

===================================================
Add To End Of Statement BEFORE  WHERE username='$xmbuser'");
===================================================

, flickr='$flickr'

============================================================================================================================
=======
Step 5:
=======
===================
Edit File: viewthread.php
===================
==========
Find Code:
==========

loadtemplates(

===============
Add Code Below:
===============

'viewthread_post_flickr',

=====
Find:
=====

            $yahoo = '';
            if ($post['yahoo'] != '') {
                eval('$yahoo = "'.template('viewthread_post_yahoo').'";');
            }

===============
Add Code Below:
===============

            // Flickr Link Mod Begin
            $flickr = '';
            if ($post['flickr'] != '') {
                eval('$flickr = "'.template('viewthread_post_flickr').'";');
            }
            // Flickr Link Mod End
            
==========
Find Code:
==========

            $location = '';
            $mood = '';
            
===============
Add Code Below:
===============

            // Flickr Link Mod Begin
            $flickr = '';
            // Flickr Link Mod End
            
============================================================================================================================
=======
Step 6:
=======
===============================
Go To Administration Panel --> Templates
===============================
=====================
Edit template: member_reg
=====================
==========
Find Code:
==========

<tr>
<td bgcolor="$altbg1" class="tablerow" width="22%">$lang[textlocation]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="text" name="locationnew" size="25" /></td>
</tr>

==========
Add Below:
==========

<tr class="tablerow">
<td bgcolor="$altbg1" width="22%">$lang[flickr]</td>
<td bgcolor="$altbg2"><input type="text" name="flickrname" size="25" /></td>
</tr>

============================================================================================================================
=======
Step 7:
=======
===============================
Go To Administration Panel --> Templates
===============================
=======================
Edit Template: memcp_profile
=======================
==========
Find Code:
==========

<tr>
<td bgcolor="$altbg1" width="22%" class="tablerow">$lang[textlocation]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="text" name="newlocation" size="25" value="$member[location]" /></td>
</tr>

===============
Add Code Below:
===============

<tr class="tablerow">
<td bgcolor="$altbg1" width="22%">$lang[flickr]</td>
<td bgcolor="$altbg2"><input type="text" name="flickr" size="25" value="$member[flickr]" /></td>
</tr>

============================================================================================================================
=======
Step 8:
=======
===============================
Go To Administration Panel --> Templates
===============================
======================
Edit template: member_profile
======================
==========
Find Code:
==========

<tr>
<td bgcolor="$altbg1" class="tablerow">$lang[textwebcam]</td>
<td bgcolor="$altbg2" class="tablerow"><a href="$webcam" target="_blank">$webcam</a></td>
</tr>

===============
Add Code Below:
===============

$flickrblock

============================================================================================================================
=======
Step 9:
=======
===============================
Go To Administration Panel --> Templates
===============================
=================================
Create New Template: member_profile_flickr
=================================
========================
Add Code and Submit Changes:
========================

<tr class="tablerow">
<td bgcolor="$altbg1">$lang[flickr]</td>
<td bgcolor="$altbg2"><a href="$flickr" target="_blank">$flickr</a></td>
</tr>

============================================================================================================================
========
Step 10:
========
===============================
Go To Administration Panel --> Templates
===============================
=======================
Edit template: viewthread_post
=======================
==========
Find Code:
==========

$yahoo

==============
Add Code After:
==============

$flickr

============================================================================================================================
=======
Step 9:
=======
===============================
Go To Administration Panel --> Templates
===============================
==================================
Create New Template: viewthread_post_flickr
==================================
========================
Add Code and Submit Changes:
========================

<a href="http://www.flickr.com/photos/$post[flickr]" title="$lang[flickralt]" onclick="window.open(this.href);return false;"><img src="$imgdir/flickr.gif" alt="$lang[flickralt]" border="0" /></a>

============================================================================================================================
========
Step 10:
========

Upload 'flickr.gif' from the 'Contents' folder to your forum's theme directories.

============================================================================================================================
Enjoy!