Site Warning

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28074
Joined: Sat Aug 16, 2003 7:36 am

Site Warning

Post by Extensions Robot »

Modification name: Site Warning
Author: A_O_C
Modification description: This MOD adds an ACP-configurable site-wide warning to the top of your board. You can display differennt messages for guests and registered users.
Modification version: 1.0.3
Tested on phpBB version: 3.0.5

Download file: site_warning.zip
File size: 58.36 KiB

Modification overview page: View

The phpBB Team is not responsible nor required to provide support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB Extensions Team may not be able to provide support.

-->Modification support<--
Last edited by Extensions Robot on Mon Mar 27, 2017 3:10 pm, edited 10 times in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Site Warning

Post by A_Jelly_Doughnut »

Modification validated/released

Notes:
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

User avatar
A_O_C
Registered User
Posts: 2383
Joined: Sun Jul 01, 2007 11:26 pm
Location: phpbb_

Site Warning

Post by A_O_C »

This post has been reserved
Last edited by A_O_C on Tue Jul 21, 2009 5:59 am, edited 6 times in total.

updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: Site Warning

Post by updown »

Guys, who has validated this? :roll:

There are missing If-clauses <!-- IF SITE_LINK --> in the overall_header for the closing </a>-Tag, also there's no correct UTF8-usage for special letters...

maybe this is fixable :P

User avatar
A_O_C
Registered User
Posts: 2383
Joined: Sun Jul 01, 2007 11:26 pm
Location: phpbb_

Re: Site Warning

Post by A_O_C »

updown wrote:There are missing If-clauses <!-- IF SITE_LINK --> in the overall_header for the closing </a>-Tag
where?
<!-- IF S_USER_LOGGED_IN -->
<div id="header_error" style="position:absolute;font-family:arial,sans-serif;background:{SITE_COLOR};color:white;font-size:12px;top:0;left:0;"><!-- IF SITE_LINK --><a href="{SITE_LINK}" style="color:white"><!-- ENDIF -->&nbsp;{SITE_WARNING}&nbsp;</a></div>
<!-- ELSE -->
<div id="header_error" style="position:absolute;font-family:arial,sans-serif;background:{SITE_COLOR_GUEST};color:white;font-size:12px;top:0;left:0;"><!-- IF SITE_LINK_GUEST --><a href="{SITE_LINK_GUEST}" style="color:white"><!-- ENDIF -->&nbsp;{SITE_WARNING_GUEST}&nbsp;</a></div>
<!-- ENDIF -->

updown wrote:also there's no correct UTF8-usage for special letters...

maybe this is fixable :P
can you expand?

updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: Site Warning

Post by updown »

When there's no SITE_LINK, then there will still be the closing-tag of the </a> in the code-output:

for correct coding it has to be:

Code: Select all

<!-- IF S_USER_LOGGED_IN -->
<div id="header_error" style="position:absolute;font-family:arial,sans-serif;background:{SITE_COLOR};color:white;font-size:12px;top:0;left:0;"><!-- IF SITE_LINK --><a href="{SITE_LINK}" style="color:white"><!-- ENDIF -->&nbsp;{SITE_WARNING}&nbsp;<!-- IF SITE_LINK --></a><!-- ENDIF --></div>
<!-- ELSE -->
<div id="header_error" style="position:absolute;font-family:arial,sans-serif;background:{SITE_COLOR_GUEST};color:white;font-size:12px;top:0;left:0;"><!-- IF SITE_LINK_GUEST --><a href="{SITE_LINK_GUEST}" style="color:white"><!-- ENDIF -->&nbsp;{SITE_WARNING_GUEST}&nbsp;<!-- IF SITE_LINK_GUEST --></a><!-- ENDIF --></div>
<!-- ENDIF --> 
When a Warning-message with e.g.: 'äöüßÄÖÜ' is entered, the output on site is not correct, instead there will be a '??' for every special letter. This is likely due to a missing utf8_encode of the out-/input.
Last edited by updown on Wed Jul 23, 2008 3:16 am, edited 1 time in total.

User avatar
A_O_C
Registered User
Posts: 2383
Joined: Sun Jul 01, 2007 11:26 pm
Location: phpbb_

Re: Site Warning

Post by A_O_C »

updown wrote:When there's no SITE_LINK, then there will still be the closing-tag of the </a> in the code-output:

for correct coding it has to be:

Code: Select all

<!-- IF S_USER_LOGGED_IN -->
<div id="header_error" style="position:absolute;font-family:arial,sans-serif;background:{SITE_COLOR};color:white;font-size:12px;top:0;left:0;"><!-- IF SITE_LINK --><a href="{SITE_LINK}" style="color:white"><!-- ENDIF -->&nbsp;{SITE_WARNING}&nbsp;<!-- IF SITE_LINK --></a><!-- ENDIF --></div>
<!-- ELSE -->
<div id="header_error" style="position:absolute;font-family:arial,sans-serif;background:{SITE_COLOR_GUEST};color:white;font-size:12px;top:0;left:0;"><!-- IF SITE_LINK_GUEST --><a href="{SITE_LINK_GUEST}" style="color:white"><!-- ENDIF -->&nbsp;{SITE_WARNING_GUEST}&nbsp;<!-- IF SITE_LINK_GUEST --></a><!-- ENDIF --></div>
<!-- ENDIF -->
ah, ok, i see what your saying. the funny thing is it still works without those additional IF statements. for the sake of "clean code", ill implement it in the next version.


updown wrote:When a Warning-message with e.g.: 'äöüßÄÖÜ' is entered, the output on site is not correct, instead there will be a '??' for every special letter. This is likely due to a missing utf8_encode of the out-/input.
ill look into it...

updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: Site Warning

Post by updown »

A_O_C wrote:ah, ok, i see what your saying. the funny thing is it still works without those additional IF statements. for the sake of "clean code", ill implement it in the next version.
Yes of course, every browser is filtering this so there's no change in viewing, but in XHTML 1.0 Strict validation ;)

The main-thing is the UTF8-support, so thanks for reviewing :!:

User avatar
Sunka
Registered User
Posts: 566
Joined: Wed Mar 26, 2008 2:48 pm
Location: Croatia, Zvoneca

Re: Site Warning

Post by Sunka »

Waiting for UTF8 fix :mrgreen:

User avatar
A_O_C
Registered User
Posts: 2383
Joined: Sun Jul 01, 2007 11:26 pm
Location: phpbb_

Re: Site Warning

Post by A_O_C »

patient my friend. im at work. will work on this MOD when i get home. :D

User avatar
A_O_C
Registered User
Posts: 2383
Joined: Sun Jul 01, 2007 11:26 pm
Location: phpbb_

Re: Site Warning

Post by A_O_C »

after working on this numerous hours, i have been unable to find a fix for the UTF-8 problem. i even went as far back as redoing every file and saving as UTF-8 without BOM. i am repacking this MOD with other fixes - thanks to updown for finding the missing IF statements in the closing tags.

anybody who gets this to work with UTF-8, let me know so i can include it in a future release.

updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: Site Warning

Post by updown »

A_O_C wrote:anybody who gets this to work with UTF-8, let me know so i can include it in a future release.

try this (STILL UNTESTED) in your acp_site_warning-include:

Code: Select all

//data sent by submit button
$data = array(
    'site_warning_post'            => utf8_normalize_nfc(request_var('site_warning_post', '', true)),
    'site_warning_link'            => request_var('site_warning_link', ''),
    'site_warning_color'        => request_var('site_warning_color', ''),
    'site_warning_guest_post'    => utf8_normalize_nfc(request_var('site_warning_guest_post', '', true)),
    'site_warning_guest_link'    => request_var('site_warning_guest_link', ''),
    'site_warning_guest_color'    => request_var('site_warning_guest_color', ''),
);
 

stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: Site Warning

Post by stokerpiller »

Did I miss the post with screenshoots?
:mrgreen:
I am done with phpBB

User avatar
A_O_C
Registered User
Posts: 2383
Joined: Sun Jul 01, 2007 11:26 pm
Location: phpbb_

Re: Site Warning

Post by A_O_C »

that was it. thanks. ill submit to the MODDB tonight.

stokerpiller, updated my first post with demo board. will post ACP screenshots tonight.

updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: Site Warning

Post by updown »

A_O_C wrote:that was it. thanks. ill submit to the MODDB tonight.
You're welcome!

For supporting special links with uft8-chars, do the same changes to 'site_warning_link' and 'site_warning_guest_link'.

Locked

Return to “[3.0.x] MOD Database Releases”