[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: Welcome Mod 1.0.0

Postby stitch626 » 03 Mar 2008, 19:05

sbdanielb wrote:This happened out of the blue, it only shows like this for guests, why?

Can see it in screenshot below.

newproblem.jpg

Hi sbdanielb,
I am not sure why you would be experiencing this problem with the Guest view Only, unless you have misplaced or modified the code. Can you provide me with a link to your board and a test account?

As for changing the color of the block you would first have to create a new class: So lets open up your common.css file in your themes folder and find this code:
Code: Select all
.navbar {
   background-color: #ebebeb;
   padding: 0 10px;
}

After add:
Code: Select all
.navbar1 {
   background-color: #ebebeb;
   padding: 0 10px;
}


Now I do not know what color you want this block to be so change #ebebeb to your desired color.
Now let's go to your index.html file and find that code you pasted to install the mod:
Should be this block:
Code: Select all
<div id="page-body" class="navbar">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="linklist">
<li>
<!-- IF S_USER_LOGGED_IN -->
{S_TIME} {WELCOME_REGISTERED}
<li class="rightside">[{LAST_VISIT_DATE}]&nbsp;&nbsp;&nbsp;[{CURRENT_TIME}]</li></span>
<!-- ELSE -->{S_TIME} {WELCOME_GUEST}<li class="rightside">[{CURRENT_TIME}]<!-- ENDIF -->
</li></li>
<li class="rightside">
</li>
</ul>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->

Changed the very first line of that block:
Code: Select all
<div id="page-body" class="navbar">

to
Code: Select all
<div id="page-body" class="navbar1">

make sure you purge your cache after this change but first I would advise you fix that little template problem first.
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: Welcome Mod 1.0.0

Postby stitch626 » 03 Mar 2008, 21:05

lefty74 wrote:hi stitch,
great job on reworking this mod :)

Code: Select all
INSERT INTO `phpbb_config` VALUES ('time_afternoon', 'Good Afternoon', '0');
INSERT INTO `phpbb_config` VALUES ('time_early', 'Good morning, you\'re up early', '0');
INSERT INTO `phpbb_config` VALUES ('time_evening', 'Good evening', '0');
INSERT INTO `phpbb_config` VALUES ('time_late', 'Good gosh you\'re up late ', '0');
INSERT INTO `phpbb_config` VALUES ('time_morning', 'Well good morning', '0');


I think this would work better
Code: Select all
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('time_afternoon', 'Good Afternoon');
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('time_early', 'Good morning, you\'re up early');
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('time_evening', 'Good evening');
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('time_late', 'Good gosh you\'re up late ');
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('time_morning', 'Well good morning');


i hope you do not mind me suggesting something:
have the language variables in from the previous version and if the $config data is empty use the the vars in the language file, this way it can be customised(into one language) but still be used for multi-language boards. something like
Code: Select all
            'TIME_AFTERNOON'                           => (!empty($config['time_afternoon'])) ? $config['time_afternoon'] : $user->lang['TIME_AFTERNOON'],


One of the major changes was: The time of day messages were called upon using a java script code. I was told that is a no no.
I still don't understand why Javascript could not be used here as it now takes the message from a personalised message to a standard guest user message, regardless of what time it is for the visitor (not logged in).
anyway, one suggestion i would have (not sure whether this is MODDB approved) is to use the JS and put a <noscript></noscript> part that uses the php code in case JS is disabled/not supported.

This is not meant to be negative, just some food for thought ;)

Keep up the good work mate

Hi ya Lefty,
Thank you very much for your comments and suggestions. This is what I am looking for. Ways to improve this mod before I submit it again. I like the lang variables idea, but as for the java no script part I am not sure how to set this up and the mod team would probably frown upon it. They already did once and rejected the mod because of it.
lefty74 wrote:takes the message from a personalised message to a standard guest user message, regardless of what time it is for the visitor (not logged in).

This is my biggest GRIPE!. I agree 100% with this and to tell you the truth I am very disappointed that th mod team is forcing me to develop my mod this way. This is actually the main point of this mod. (To recognize the users time of day) I myself will use the java script on my own board. I am just going to reference the script rather than clutter up the template with a bunch of code.
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: Welcome Mod 1.0.0

Postby lefty74 » 04 Mar 2008, 15:36

stitch626 wrote:as for the java no script part I am not sure how to set this up and the mod team would probably frown upon it. They already did once and rejected the mod because of it.


i will be using the javascript part as well.
one suggestion for the javascript would be to stick this in the overall_header where all the other javascript is.
Code: Select all
   function gettimeofday()
   {
   today = new Date();

   switch (true)
   {
   case (today.getHours() < 4):
     var time = document.write("{L_TIME_MIDNIGHT}");
     break;
   case (today.getHours() < 7):
     var time = document.write("{L_TIME_EARLY}");
     break;
   case (today.getHours() < 12):
     var time = document.write("{L_TIME_MORNING}");
     break;
   case (today.getHours() < 17):
     var time = document.write("{L_TIME_AFTERNOON}");
     break;
   default:
     var time = document.write("{L_TIME_EVENING}");
   }
   return time;
   }


and this in the section where the time of day message appears.

Code: Select all
<script type="text/javascript">
// <![CDATA[
gettimeofday()
// ]]>
</script>
<noscript>{VAR_TIME_OF_DAY}<noscript>

now, that is not quite 100% how it shoudl be as this probably throws an error message when trying to validate this with XHTML but it gives the idea I think. I personally am not bothered about the noscript part. there are other mods approved that use javascripts so i dont understand why this could not be accepted.
anyway, this is kinda what i had in mind when i mentioned it ;)
lefty74
Crewman
Crewman
 
Posts: 8
Joined: 28 May 2007, 11:24
Gender: Male
phpBB Knowledge: 6

Re: Welcome Mod 1.0.0

Postby stitch626 » 15 Mar 2008, 14:25

Mod Updated to Version 1.0.1.

    Fixed bug that was causing script error on Registration Page.
    modified the sprint arguments functions (Removed code that was not needed)

See first post for updated download
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: Welcome Mod 1.0.0

Postby Ladysarajane » 15 Mar 2008, 14:56

Uh, Stitch...I can't find your first post. WHERE DID YOU HIDE IT? :scratch:

Umm seems like jdh made the first post. Did you accidently delete your post? :P
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: Welcome Mod 1.0.1

Postby Ladysarajane » 15 Mar 2008, 15:03

Here it is! Thought you could hide on me didn't you Mike! :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: Welome_Mod

Postby stitch626 » 15 Mar 2008, 15:25

David or Handayman...Help!

I have accidentally deleted my first post of this topic when I was meaning to delete the attachment to download my new one. I created a new one as you can see. Is there a way you can bump my post back to the top and make me the author again?
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: Welome_Mod

Postby Ladysarajane » 15 Mar 2008, 20:18

Stitch, is there an SQL for the update? The XML instructions refer to one, but I cannot find it.
And I am having trouble with the update on my localhost. I cannot change the settings in the ACP. I make them and submit it, It says the change is successful, but on the board, it does not change.
I have cleared the files from the cache. :scratch:
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: Welome_Mod

Postby stitch626 » 15 Mar 2008, 20:58

LSJ,

As long as you are just updating and you already have run the DB queries from the previos version then you should be good to go. Nothing has changed in that aspect. As for you not being able to change the messages I do not know ATM why this would be. I have the new version running on my testboard and my main live board and I can change the messages on both. The only thing I can think of right now is make sure you did the template changes.
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: Welome_Mod

Postby Ladysarajane » 15 Mar 2008, 21:05

I did do the template changes...but I am tired. I will retry tommorrow to make sure I get it right. It is a copy of my live forum on my localhost, so it isn't a major problem for me right now.

I will probably hound you tomorrow if I can't get it working. :P
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

PreviousNext

Return to Miscellaneous MODs, Hacks and Downloads

Who is online

Users browsing this forum: Ezooms Bot and 2 guests