Hoşgeldin Misafir

(MOD)Recommend Forum/Kullanıcı davet et

MiRaT

13 Kas 2017
2,077 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
Kod:
############################################################## 
## MOD Title: Recommend Forum 
## MOD Author: acoolwelshbloke < [email protected] > (Paul Norman) http://www.tec2spec.co.uk 
## MOD Description: Allows members to recommend your forum to a friend.
## MOD Version: 1.0.2
##
## Installation Level: (easy)
## Installation Time: 5 Minutes 
## Files To Edit:       index.php,
##            includes/constants.php,
##            viewonline.php,
##            admin/index.php,
##            templates/subSilver/index_body.tpl,
##            language/lang_english/lang_main.php
##
## Included Files:       recommend.php,
##            recommend_body.tpl,
##            recommend_email.tpl
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
############################################################## 
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
############################################################## 
## Author Notes:
## 
## THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY 
## EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 
## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
## FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL 
## THE AUTHOR OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
## INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
## ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
## ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
##
############################################################## 
## MOD History:
##
##   2006-05-09 - Version 1.0.2
##         - Fixed Senders Email Address 
##         - Fixed Email Reply Address
##         - Unlocked Message Box
##
##   2006-01-28 - Version 1.0.1
##         - Added Name Verification 
##         - Added Email Verification
##         - Added Message Verification
##         - Added Email Validation
##         - Fixed "Friends Name" Bug
##         - Locked Message box
##
##   2005-04-18 - Version 1.0.0  
##         - First release
##                
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ COPY ]------------------------------------------------ 
# 
copy recommend.php to / 
copy recommend_body.tpl to templates/subSilver/ 
copy recommend_email.tpl to language/lang_english/email/

# 
#-----[ OPEN ]------------------------------------------------ 
# 
index.php 

# 
#-----[ FIND ]------------------------------------------------ 
# 
      'L_ONLINE_EXPLAIN' => $lang['Online_explain'],

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
      
      'L_RECOMMEND_FORUM' => $lang['Recommend_Forum'],
      'U_RECOMMEND_FORUM' => append_sid("recommend.$phpEx"),

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/constants.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
define('PAGE_TOPIC_OFFSET', 5000);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
define('PAGE_RECOMMEND', -8004);

# 
#-----[ OPEN ]------------------------------------------------ 
# 
viewonline.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
            default:
               $******** = $lang['Forum_index'];
   
# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#
            case PAGE_RECOMMEND:
               $******** = $lang['Viewing_Recommend'];
               $********_url = "recommend.$phpEx";
               break;

# 
#-----[ OPEN ]------------------------------------------------ 
# 
admin/index.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
                  default:
                     $******** = $lang['Forum_index'];
   
# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#
                  case PAGE_RECOMMEND:
                     $******** = $lang['Viewing_Recommend'];
                     $********_url = "index.$phpEx?pane=right";
                     break;

# 
#-----[ FIND ]------------------------------------------------ 
# 
               default:
                  $******** = $lang['Forum_index'];

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#
               case PAGE_RECOMMEND:
                  $******** = $lang['Viewing_Recommend'];
                  $********_url = "index.$phpEx?pane=right";
                  break;      
      
# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/index_body.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
  <tr> 
   <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
rowspan="2"

# 
#-----[ IN-LINE REPLACE WITH ]-------------------------------- 
# 
rowspan="3"

# 
#-----[ FIND ]------------------------------------------------ 
#
  <tr> 
   <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
  </tr>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
<!-- BEGIN switch_user_logged_in -->
<tr>
   <td colspan="2" class="row1" align="left"><span class="gensmall"><b><a href="{U_RECOMMEND_FORUM}">{L_RECOMMEND_FORUM}</a></b></span></td>     
</tr>
<!-- END switch_user_logged_in -->

# 
#-----[ OPEN ]------------------------------------------------ 
# 
language/lang_english/lang_main.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
$lang['Viewing_FAQ'] = 'Viewing FAQ';

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
$lang['Viewing_Recommend'] = 'Recommends the forum';

# 
#-----[ FIND ]------------------------------------------------ 
# 
//
// That's all Folks!

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
# Please change the last entry to reflect your forum URL!

//
// Recommend forum
//
$lang['Recommend_Forum'] = "Recommend this forum to a friend";
$lang['Recommend_Forum_Sender_User'] = "Your Name:";
$lang['Recommend_Forum_Sender_Email'] = "Your Email:";
$lang['Recommend_Forum_Reciever_User'] = "Your Friend's Name:";
$lang['Recommend_Forum_Reciever_Email'] = "Your Friend's Email:";
$lang['Recommend_Forum_Msg'] = "Your message:";
$lang['Recommend_Forum_Body'] = "Hi,\n\nI just visited the %s forum board and thought you might be interested in what is happening there. Here is the link: %s"; // %s is replaced by sitename and the forum's url
$lang['Recommend_Forum_error'] = "You have not entered a (valid) email address";
$lang['Recommend_Forum_URL'] = "http://www.tec2spec.co.uk/forum/"; // change this to your forum URL

# 
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------- 
# 
# EoM