Warning: The author of this contribution does not provide support for it anymore.

Red Blinking PM

problem linking, solution inside and tested on phpbb3.0.11 - Red Blinking PM

problem linking, solution inside and tested on phpbb3.0.11

by kistian » Mon Oct 08, 2012 1:01 am

hello

I've seen thats a problem, the tag a that's links to the private message exclude de number of new private message

I've solve it and install it with automod on 3.0.11, there's no problem except that I say above (problem of the mod, otherelse the phpBB version)

I attach the version repaired


DETAILS OF REPARATION:
wrong code of mod

Code: Select all

<!-- IF S_DISPLAY_PM --> &bull;
   <!-- IF S_RBPM_ENABLE and S_USER_NEW_PRIVMSG -->
   <!-- IF S_RBPM_INSC_ENABLE and S_USER_NEW_PRIVMSG -->
   <!-- IF S_RBPM_ENABLE_BACKGROUND -->
   <span style="background:rgba({S_RBPM_BACKGROUND_R},{S_RBPM_BACKGROUND_G},{S_RBPM_BACKGROUND_B},{S_RBPM_BACKGROUND_TRANSP}); padding: 3px 0px 3px 7px; border: {S_RBPM_BORDER_WIDTH} {S_RBPM_BORDER_STYLE} {S_RBPM_BORDER_COLOUR}; border-right: 0px; -webkit-border-radius: {S_RBPM_BORDER_RADIUS}; -khtml-border-radius: {S_RBPM_BORDER_RADIUS}; -moz-border-radius: {S_RBPM_BORDER_RADIUS}; border-radius: {S_RBPM_BORDER_RADIUS}; -webkit-border-radius-topright: 0px; -khtml-border-radius-topright: 0px; -moz-border-radius-topright: 0px; border-radius-topright: 0px; -webkit-border-radius-bottomright: 0px; -khtml-border-radius-bottomright: 0px; -moz-border-radius-bottomright: 0px; border-radius-bottomright: 0px;">
   <!-- ELSE -->
   <span style=" background-color: none">
   <!-- ENDIF -->
   <!-- ENDIF -->
   <span class="blink" style="color:{S_RBPM_COLOR}; font:{S_RBPM_ITALIC} {S_RBPM_BOLD} {S_RBPM_SIZE} {S_RBPM_FAMILY}; letter-spacing:{S_RBPM_SPACING}; text-transform:{S_RBPM_TRANSFORM}; text-shadow: {S_RBPM_SHADOWH} {S_RBPM_SHADOWV} {S_RBPM_SHADOW_BLUR} {S_RBPM_SHADOW_COLOUR}; text-decoration:{S_RBPM_DECORATION};">
      {S_USER_NEW_PRIVMSG}
   </span></span>
   <!-- ELSE -->
   <strong>{S_USER_NEW_PRIVMSG}</strong>
   <!-- ENDIF -->
   <a href="{U_PRIVATEMSGS}">
   <!-- IF S_RBPM_INSC_ENABLE and S_USER_NEW_PRIVMSG -->
   <!-- IF S_RBPM_ENABLE and S_USER_NEW_PRIVMSG -->
   <!-- IF S_RBPM_ENABLE_BACKGROUND -->
   <span style="background:rgba({S_RBPM_BACKGROUND_R},{S_RBPM_BACKGROUND_G},{S_RBPM_BACKGROUND_B},{S_RBPM_BACKGROUND_TRANSP}); padding: 3px 7px 3px 0px; border: {S_RBPM_BORDER_WIDTH} {S_RBPM_BORDER_STYLE} {S_RBPM_BORDER_COLOUR}; border-left: 0px; -webkit-border-radius:{S_RBPM_BORDER_RADIUS}; -khtml-border-radius:{S_RBPM_BORDER_RADIUS}; -moz-border-radius:{S_RBPM_BORDER_RADIUS}; border-radius:{S_RBPM_BORDER_RADIUS}; -webkit-border-radius-topleft: 0px; -khtml-border-radius-topleft: 0px; -moz-border-radius-topleft: 0px; border-radius-topleft: 0px; -webkit-border-radius-bottomleft: 0px; -khtml-border-radius-bottomleft: 0px; -moz-border-radius-bottomleft: 0px; border-radius-bottomleft: 0px;">
   <!-- ELSE -->
   <span style="background-color: none">
   <!-- ENDIF -->
   <!-- ENDIF -->
   <span class="blink" style="color:{S_RBPM_INSC_COLOR}; font:{S_RBPM_ITALIC} {S_RBPM_VARIANT} {S_RBPM_BOLD} {S_RBPM_SIZE} {S_RBPM_FAMILY}; letter-spacing:{S_RBPM_SPACING}; text-transform:{S_RBPM_TRANSFORM}; text-shadow: {S_RBPM_SHADOWH} {S_RBPM_SHADOWV} {S_RBPM_SHADOW_BLUR} {S_RBPM_INSC_SHADOW_COLOUR}; text-decoration:{S_RBPM_DECORATION};">
      {PRIVATE_MESSAGE_INFO}
   </span>
   <!-- IF S_RBPM_ENABLE_UNREAD and PRIVATE_MESSAGE_INFO_UNREAD -->
   <span style="color:{S_RBPM_UNREAD_COLOR}"><!-- IF S_RBPM_ENABLE_UNREAD_BLINK --><span class="blink">& {PRIVATE_MESSAGE_INFO_UNREAD}</span><!-- ELSE -->& {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></span>
   <!-- ENDIF -->
   </span>
   <!-- ELSE -->
   {PRIVATE_MESSAGE_INFO}
   <!-- IF S_RBPM_ENABLE_UNREAD and PRIVATE_MESSAGE_INFO_UNREAD --> & {PRIVATE_MESSAGE_INFO_UNREAD}
   <!-- ENDIF -->
   <!-- ENDIF --></a></span>
<!-- ENDIF -->


replace with:

Code: Select all

<!-- IF S_DISPLAY_PM --> &bull;
   <!-- IF S_RBPM_ENABLE and S_USER_NEW_PRIVMSG -->
   <!-- IF S_RBPM_INSC_ENABLE and S_USER_NEW_PRIVMSG -->
   <!-- IF S_RBPM_ENABLE_BACKGROUND -->
   <span style="background:rgba({S_RBPM_BACKGROUND_R},{S_RBPM_BACKGROUND_G},{S_RBPM_BACKGROUND_B},{S_RBPM_BACKGROUND_TRANSP}); padding: 3px 0px 3px 7px; border: {S_RBPM_BORDER_WIDTH} {S_RBPM_BORDER_STYLE} {S_RBPM_BORDER_COLOUR}; border-right: 0px; -webkit-border-radius: {S_RBPM_BORDER_RADIUS}; -khtml-border-radius: {S_RBPM_BORDER_RADIUS}; -moz-border-radius: {S_RBPM_BORDER_RADIUS}; border-radius: {S_RBPM_BORDER_RADIUS}; -webkit-border-radius-topright: 0px; -khtml-border-radius-topright: 0px; -moz-border-radius-topright: 0px; border-radius-topright: 0px; -webkit-border-radius-bottomright: 0px; -khtml-border-radius-bottomright: 0px; -moz-border-radius-bottomright: 0px; border-radius-bottomright: 0px;">
   <!-- ELSE -->
   <span style=" background-color: none">
   <!-- ENDIF -->
   <!-- ENDIF -->
   <span class="blink" style="color:{S_RBPM_COLOR}; font:{S_RBPM_ITALIC} {S_RBPM_BOLD} {S_RBPM_SIZE} {S_RBPM_FAMILY}; letter-spacing:{S_RBPM_SPACING}; text-transform:{S_RBPM_TRANSFORM}; text-shadow: {S_RBPM_SHADOWH} {S_RBPM_SHADOWV} {S_RBPM_SHADOW_BLUR} {S_RBPM_SHADOW_COLOUR}; text-decoration:{S_RBPM_DECORATION};">
      {S_USER_NEW_PRIVMSG}
   </span></span><a href="{U_PRIVATEMSGS}">
   <!-- ELSE -->
   <a href="{U_PRIVATEMSGS}"><strong>{S_USER_NEW_PRIVMSG}</strong>
   <!-- ENDIF -->
   <!-- IF S_RBPM_INSC_ENABLE and S_USER_NEW_PRIVMSG -->
   <!-- IF S_RBPM_ENABLE and S_USER_NEW_PRIVMSG -->
   <!-- IF S_RBPM_ENABLE_BACKGROUND -->
   <span style="background:rgba({S_RBPM_BACKGROUND_R},{S_RBPM_BACKGROUND_G},{S_RBPM_BACKGROUND_B},{S_RBPM_BACKGROUND_TRANSP}); padding: 3px 7px 3px 0px; border: {S_RBPM_BORDER_WIDTH} {S_RBPM_BORDER_STYLE} {S_RBPM_BORDER_COLOUR}; border-left: 0px; -webkit-border-radius:{S_RBPM_BORDER_RADIUS}; -khtml-border-radius:{S_RBPM_BORDER_RADIUS}; -moz-border-radius:{S_RBPM_BORDER_RADIUS}; border-radius:{S_RBPM_BORDER_RADIUS}; -webkit-border-radius-topleft: 0px; -khtml-border-radius-topleft: 0px; -moz-border-radius-topleft: 0px; border-radius-topleft: 0px; -webkit-border-radius-bottomleft: 0px; -khtml-border-radius-bottomleft: 0px; -moz-border-radius-bottomleft: 0px; border-radius-bottomleft: 0px;">
   <!-- ELSE -->
   <span style="background-color: none">
   <!-- ENDIF -->
   <!-- ENDIF -->
   <span class="blink" style="color:{S_RBPM_INSC_COLOR}; font:{S_RBPM_ITALIC} {S_RBPM_VARIANT} {S_RBPM_BOLD} {S_RBPM_SIZE} {S_RBPM_FAMILY}; letter-spacing:{S_RBPM_SPACING}; text-transform:{S_RBPM_TRANSFORM}; text-shadow: {S_RBPM_SHADOWH} {S_RBPM_SHADOWV} {S_RBPM_SHADOW_BLUR} {S_RBPM_INSC_SHADOW_COLOUR}; text-decoration:{S_RBPM_DECORATION};">
      {PRIVATE_MESSAGE_INFO}
   </span>
   <!-- IF S_RBPM_ENABLE_UNREAD and PRIVATE_MESSAGE_INFO_UNREAD -->
   <span style="color:{S_RBPM_UNREAD_COLOR}"><!-- IF S_RBPM_ENABLE_UNREAD_BLINK --><span class="blink">& {PRIVATE_MESSAGE_INFO_UNREAD}</span><!-- ELSE -->& {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></span>
   <!-- ENDIF -->
   </span>
   <!-- ELSE -->
   {PRIVATE_MESSAGE_INFO}
   <!-- IF S_RBPM_ENABLE_UNREAD and PRIVATE_MESSAGE_INFO_UNREAD --> & {PRIVATE_MESSAGE_INFO_UNREAD}
   <!-- ENDIF -->
   <!-- ENDIF --></a></span>
<!-- ENDIF -->


detail of the problem

Code: Select all

{S_USER_NEW_PRIVMSG}
   </span></span>
   <!-- ELSE -->
   <strong>{S_USER_NEW_PRIVMSG}</strong>
   <!-- ENDIF -->
   <a href="{U_PRIVATEMSGS}">


I think the simplest solution is do that

Code: Select all

{S_USER_NEW_PRIVMSG}
   </span></span><a href="{U_PRIVATEMSGS}">
   <!-- ELSE -->
   <a href="{U_PRIVATEMSGS}"><strong>{S_USER_NEW_PRIVMSG}</strong>
Attachments
red_blinking_pm_1_0_8b.zip
(254.88 KiB) Downloaded 182 times
kistian
Registered User
Posts: 14
Joined: Mon Sep 24, 2007 3:21 pm
Contact:

Re: problem linking, solution inside and tested on phpbb3.0.

by all4phone » Tue Oct 09, 2012 8:12 am

Thanks for being interested and for this solution, but when your package installed on pure phpbb 3.0.11 the result is:
rbpm1.PNG
rbpm1.PNG (5.34 KiB) Viewed 295 times


Such was the intention of this mod to link refer the words "new message" or "new messages" only, doesn't apply to the number of new PM.
User avatar
all4phone
Registered User
Posts: 593
Joined: Fri Mar 18, 2011 11:56 am
Location: Poland
Name: Piotr
Contact:

Re: problem linking, solution inside and tested on phpbb3.0.

by kistian » Tue Oct 09, 2012 6:43 pm

thank you very much for the answer

but, in my situation (I don't know if other people) I configure the mod without decoration, I use it for the "unread messages"

it's view like this:
RB_PM.png
RB_PM.png (6.48 KiB) Viewed 305 times


excluding the first number but including the word of new messages, unread messages and the number of unread messages, don't seem as good, but using decoration it can be great like you say

thanks for your time, the report end here with this information aported to you and now you have a wide vision of this and you can decide where goes the mod, including, excluding, modifing with another comparation fot this case,.. etc
kistian
Registered User
Posts: 14
Joined: Mon Sep 24, 2007 3:21 pm
Contact:

Re: problem linking, solution inside and tested on phpbb3.0.

by all4phone » Wed Oct 10, 2012 10:24 am

Thanks for the testing mod and for solution of the problem.
kistian wrote:but, in my situation (I don't know if other people) I configure the mod without decoration, I use it for the "unread messages"
looked it up, you are right and your solution is correct.
I think that in your case it's not necessary to use this mod, simply add some code from subsilver2 style to overall_header.htmlfile of your style (I hope that is based on prosilver ;) ).

To do this, uninstall mod, then
Open: styles/your_style/template/overall_header.html
Find:

Code: Select all

<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->

Replace with:

Code: Select all

<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a>)<!-- ENDIF -->

I checked on localhost, so it should work ;) .
User avatar
all4phone
Registered User
Posts: 593
Joined: Fri Mar 18, 2011 11:56 am
Location: Poland
Name: Piotr
Contact:

Re: problem linking, solution inside and tested

by kistian » Wed Oct 10, 2012 8:40 pm

thank you very much, I don't knew that's phpBB can say how many unread messages you have

it works very fine and I do in format modx for you, change the author and all you want and post it if you want
Attachments
new_and_unread_messages_notify.zip
(32.95 KiB) Downloaded 209 times
kistian
Registered User
Posts: 14
Joined: Mon Sep 24, 2007 3:21 pm
Contact:

Re: problem linking, solution inside and tested on phpbb3.0.

by all4phone » Sat Oct 13, 2012 8:47 am

kistian wrote:thank you very much, I don't knew that's phpBB can say how many unread messages you have
As I wrote, that option is available in subsilver2 style only.

kistian wrote:it works very fine and I do in format modx for you, change the author and all you want and post it if you want
I thought about it a long time before ;)
User avatar
all4phone
Registered User
Posts: 593
Joined: Fri Mar 18, 2011 11:56 am
Location: Poland
Name: Piotr
Contact: