[Add-on] Welcome Mod 2.0.0 (Beta)

Misc MOD Downloads for phpBB3 -- Any MOD that does not fit into any other category
Forum rules
Image Please feel free to download any MOD's here, support for each MOD is located it's own thread.

To post your own MOD, please first read the MOD Guidelines

Re: [Add-on] Welcome Mod 1.1.2

Postby stitch626 » 30 May 2008, 22:38

Mod Version updated. See first post for new download.

Version 1.1.2 phpBB3.0.1 Compatible
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: [Add-on] Welcome Mod 1.1.2

Postby Ladysarajane » 31 May 2008, 01:02

When I first read your post...I said "WHAT an update?" And I hurried up and downloaded the file...then I read the contrib upgrade.... and I thought OH, that. I forgot about that! :rotfl:
On thing in the update. You have the instructions in the contrib file in a Microsoft Word Document. I couldn't open that. (I don't have any office software).

Glad you finally were able to find a few minutes to put that together. Things might be slowing a bit for you?
Warning: Stay away from Deck 15 if you don't have security clearance level 6 or above! Unauthorized access is prohibited.
Image
User avatar
Ladysarajane
STG Moderator
STG Moderator
 
Posts: 1962
Joined: 21 Mar 2007, 23:35
Favorite Team: Bengals
Gender: Female
phpBB Knowledge: 5

Re: [Add-on] Welcome Mod 1.1.2

Postby stitch626 » 31 May 2008, 10:03

Hi Jenice,

That is just an explanation on how the mod works and an where the settings are located. The actual update is in XML. The word doc isn't really needed.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: [Add-on] Welcome Mod 1.1.2

Postby Ladysarajane » 31 May 2008, 11:49

No, I know it isn't neccessary, but nosey people like me like to read "eeverything" in a file. I guess we get paranoid or something when we can't read things. :shock: :rotfl:
Warning: Stay away from Deck 15 if you don't have security clearance level 6 or above! Unauthorized access is prohibited.
Image
User avatar
Ladysarajane
STG Moderator
STG Moderator
 
Posts: 1962
Joined: 21 Mar 2007, 23:35
Favorite Team: Bengals
Gender: Female
phpBB Knowledge: 5

Re: [Add-on] Welcome Mod 1.1.2

Postby Jamonte » 05 Jun 2008, 12:22

Can i change this mod for this period of time

6:00AM ~ 12:00PM
12:00PM ~ 18:00PM
18:00PM ~ 6:00AM

????
Jamonte    
Cadet III
Cadet III
 
Posts: 33
Joined: 24 Feb 2008, 15:39
Gender: Male
phpBB Knowledge: 1

Re: [Add-on] Welcome Mod 1.1.2

Postby stitch626 » 06 Jun 2008, 22:23

Jamonte wrote:Can i change this mod for this period of time

6:00AM ~ 12:00PM
12:00PM ~ 18:00PM
18:00PM ~ 6:00AM

????

Hi Jamonte,
Try this:

Warning!! I have no tested this out. Make sure you back up your files first before doing anything.

First remove the queries for this mod from your DB

Then install this query:
Code: Select all
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('time_first', 'Good Afternoon');
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('time_second', 'Good morning, you're up early');
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('time_third', 'Good evening');

Note: you can adjust your greeting messages in the ACP.

Open: includes/functions.php
FIND:
Code: Select all
//--Welcome_Mod--get the hour number---------------------------------

$date = $user->format_date(time(), 'H');

switch (true)
    {
        case ($date == 0):
            // If the hour is '0' it is midnight
            $s_welcome = $config['time_late'];
        break;
       
        case ($date < 4):
            // if the hour is 1-3 am
            $s_welcome = $config['time_late'];
        break;
       
        case ($date < 8):
            // if the hour is 4-7 am
            $s_welcome = $config['time_early'];
        break;
       
        case ($date < 12):
            // if the hour is 8-11 am
            $s_welcome = $config['time_morning'];
        break;
       
        case ($date < 18):
            // if the hour is 12-5pm (12-17)
            $s_welcome = $config['time_afternoon'];
        break;
       
        case ($date < 24):
            // if the hour is 6pm-11pm (18-23_
            $s_welcome = $config['time_evening'];
        break;

REPLACE WITH:
Code: Select all
//--Welcome_Mod--get the hour number---------------------------------

$date = $user->format_date(time(), 'H');

switch (true)
    {
        case ($date == 13):
            // If the hour is '6am-12pm' it is midnight
            $s_welcome = $config['time_first'];
        break;
       
        case ($date < 19):
            // if the hour is 1pm-1800
            $s_welcome = $config['time_second'];
        break;
       
        case ($date < 6):
            // if the hour is 1900-5am
            $s_welcome = $config['time_third'];
        break;


FIND:
Code: Select all
//Welcome_Mod Variables-------------------------------------------------------------->
            'TIME_AFTERNOON'                           => $config['time_afternoon'],
            'TIME_EARLY'                               => $config['time_early'],
            'TIME_EVENING'                             => $config['time_evening'],
            'TIME_LATE'                                => $config['time_late'],
            'TIME_MORNING'                             => $config['time_morning'],
//Welcome_Mod Variables------------------------------------------------------------->

REPLACE WITH:
Code: Select all
//Welcome_Mod Variables-------------------------------------------------------------->
            'TIME_FIRST'                           => $config['time_first'],
            'TIME_SECOND'                               => $config['time_second'],
            'TIME_THIRD'                             => $config['time_third'],
//Welcome_Mod Variables------------------------------------------------------------->

OPEN: includes/acp/acp_board.php
FIND:
Code: Select all
//If other mods are installed you may have to change legend3 to the next available legend number.
//--Welcome_Mod Legend----------------------------------------------------------------------------------------------------------------------------------------
'legend3'                                     => 'TIME_OF_DAY_MESSAGE',
'time_afternoon'               => array('lang' => 'TIME_AFTERNOON',         'validate' => 'string',   'type' => 'text:40:255', 'explain' => true),
'time_early'                  => array('lang' => 'TIME_EARLY',            'validate' => 'string',   'type' => 'text:40:255', 'explain' => true),
'time_evening'                  => array('lang' => 'TIME_EVENING',            'validate' => 'string',   'type' => 'text:40:255', 'explain' => true),
'time_late'                  => array('lang' => 'TIME_LATE',            'validate' => 'string',   'type' => 'text:40:255', 'explain' => true),
'time_morning'                  => array('lang' => 'TIME_MORNING',            'validate' => 'string',   'type' => 'text:40:255', 'explain' => true),
//--End-Welcome_Mod Legend-------------------------------------------------------------------------------------------------------------------------------------

REPLACE WITH:
Code: Select all
//If other mods are installed you may have to change legend3 to the next available legend number.
//--Welcome_Mod Legend----------------------------------------------------------------------------------------------------------------------------------------
'legend3'                                     => 'TIME_OF_DAY_MESSAGE',
'time_first'               => array('lang' => 'TIME_FIRST',         'validate' => 'string',   'type' => 'text:40:255', 'explain' => true),
'time_second'                  => array('lang' => 'TIME_SECOND',            'validate' => 'string',   'type' => 'text:40:255', 'explain' => true),
'time_third'                  => array('lang' => 'TIME_THIRD',            'validate' => 'string',   'type' => 'text:40:255', 'explain' => true),
//--End-Welcome_Mod Legend-------------------------------------------------------------------------------------------------------------------------------------

Open: language/en/acp/board.php
FIND:
Code: Select all
//Welcome_Mod language settings------------------------------------------------------------------------------------->
      'TIME_OF_DAY_MESSAGE'               => 'Time of day Messages',
      'TIME_AFTERNOON'                    => 'Time afternoon',
      'TIME_AFTERNOON_EXPLAIN'        => 'Message to be displayed to users between the hours of 12:00PM ~ 5:59PM',
      'TIME_EARLY'                        => 'Time Early',
      'TIME_EARLY_EXPLAIN'        => 'Message to be displayed to users between the hours of 5:00AM ~ 7:59AM',
      'TIME_EVENING'                      => 'Time Evening',
      'TIME_EVENING_EXPLAIN'              => 'Message to be displayed to users between the hours of 6:00PM ~ 11:59PM',
      'TIME_LATE'                         => 'Time Late',
      'TIME_LATE_EXPLAIN'                 => 'Message to be displayed to users between the hours of 12:00AM ~ 4:59AM',
      'TIME_MORNING'                      => 'Time Morning',
      'TIME_MORNING_EXPLAIN'              => 'Message to be displayed to users between the hours of 8:00AM ~ 11:59AM',
//End-Welcome_Mod language settings--------------------------------------------------------------------------------->

REPLACE WITH:
Code: Select all
//Welcome_Mod language settings------------------------------------------------------------------------------------->
      'TIME_OF_DAY_MESSAGE'               => 'Time of day Messages',
      'TIME_FIRST'                    => 'Time first',
      'TIME_FIRST_EXPLAIN'        => 'Message to be displayed to users between the hours of 6:00AM ~ 12:00PM',
      'TIME_'                        => 'Time second',
      'TIME_SECOND_EXPLAIN'        => 'Message to be displayed to users between the hours of 12:00PM ~ 18:00PM',
      'TIME_THIRD'                      => 'Time third',
      'TIME_THIRD_EXPLAIN'              => 'Message to be displayed to users between the hours of 18:00PM ~ 6:00AM',
//End-Welcome_Mod language settings--------------------------------------------------------------------------------->

Be sure to purge your cache after install.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: [Add-on] Welcome Mod 1.1.2

Postby AngelArvil » 29 Jun 2008, 03:12

hi bro

Do you have release available for Olympus?

I badly need it.

But Thx Btw

:good: Good Job!
AngelArvil
Ensign
Ensign
 
Posts: 62
Joined: 25 May 2008, 03:44
Gender: Male
phpBB Knowledge: 1

Re: [Add-on] Welcome Mod 1.1.2

Postby stitch626 » 29 Jun 2008, 08:33

See first post for the latest release, and all mods here at STG are for Olympus.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: [Add-on] Welcome Mod 1.1.2

Postby The Bad Toad » 29 Jun 2008, 15:49

I've just installed this on prosilver and subsiler2. Works fantastic :grin: I will try it on the other two styles I have at some point this week when I have more time.

This is the first MOD I have installed using SQL edits.

Many many thank's for this stitch626

And also to battye from phpBB.com for the tutorial. :D
User avatar
The Bad Toad
Cadet III
Cadet III
 
Posts: 36
Joined: 07 May 2008, 08:12
Location: United Kingdom
Gender: Male
phpBB Knowledge: 1

Re: [Add-on] Welcome Mod 1.1.2

Postby stitch626 » 29 Jun 2008, 21:16

Thanks Bad Toad for your feedback. I am happy your enjoying the mod. :)
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

PreviousNext

Return to Miscellaneous MODs, Hacks and Downloads

Who is online

Users browsing this forum: MSNbot Media and 12 guests