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

Prime Notify

will this work with 3.1.1 ? - Prime Notify

Re: will this work with 3.1.1 ?

by mircsicz » Sat Feb 20, 2016 12:10 am

Hi primehalo,

it works for me, few user's have tested and no one mentioned a problem. But I realized that the Author field is empty:

_____________________________________________________________________
Thema: Tri dra Trulala
Autor:
Nachricht:
Super, schön dass das Forum so langsam voll wird :-D :lol:
_____________________________________________________________________


The username on our forum is the member's Mailaddress, maybe that's the cause?
User avatar
mircsicz
Registered User
Posts: 20
Joined: Mon Dec 28, 2015 2:43 pm
Contact:

Re: will this work with 3.1.1 ?

by primehalo » Sat Feb 20, 2016 1:33 am

I'd say that's the likely cause if it's not stored in the same variable. If you look at the added code in pm.php (and it's basically the same for topic.php and post.php), the first code change is where it assigns the template variables that will get replaced in the email template - you can see it calling get_data(). The second code change at the bottom of the file is where it stores the data so that the first code change can access it - you can see it calling set_data(). But if you look back at the first change area, you'll see that for the AUTHOR_NAME template variable it doesn't use the get_data(), instead it uses $user_data['username'] for pm.php and $username for the other two files.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: will this work with 3.1.1 ?

by mircsicz » Sat Feb 20, 2016 1:37 am

There are no changes to the source-code... So what could we do to make it work?
User avatar
mircsicz
Registered User
Posts: 20
Joined: Mon Dec 28, 2015 2:43 pm
Contact:

Re: will this work with 3.1.1 ?

by primehalo » Sat Feb 20, 2016 1:51 am

I don't know, how did you get usernames to be mail addresses?
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: will this work with 3.1.1 ?

by mircsicz » Sat Feb 20, 2016 1:57 am

We're using LDAP-Auth, and uid in LDAP is set to be the same as the mail field... ;-)
User avatar
mircsicz
Registered User
Posts: 20
Joined: Mon Dec 28, 2015 2:43 pm
Contact:

Re: will this work with 3.1.1 ?

by primehalo » Sat Feb 20, 2016 2:17 am

I'm not familiar with LDAP. The original email templates used the AUTHOR_NAME variable. Did the notification emails ever display the author name? If you look at those original templates (forum_notify.txt, topic_notify.txt, newtopic_notify.txt) you'll see they contain this:

Code: Select all

<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> 

The privmsg_notify.txt template doesn't check so I'm guessing it should always display the AUTHOR_NAME.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: will this work with 3.1.1 ?

by mircsicz » Sat Feb 20, 2016 2:21 am

Just checked, luckily I got one old notification mail left in my inbox...

It contains the author's username, which is his mailaddress.
User avatar
mircsicz
Registered User
Posts: 20
Joined: Mon Dec 28, 2015 2:43 pm
Contact:

Re: will this work with 3.1.1 ?

by mircsicz » Sat Feb 20, 2016 2:25 am

Think I found it: In your ./ext/primehalo/primenotify/language/de/email/forum_notify.txt it's not AUTHOR_NAME it's AUTHOR...

Code: Select all

Autor: {AUTHOR}


guess it should be:

Code: Select all

Autor: {AUTHOR_NAME}


Edit: changed the file, but as it's 3:30AM in Germany I wont get feedback till tomorow...
User avatar
mircsicz
Registered User
Posts: 20
Joined: Mon Dec 28, 2015 2:43 pm
Contact:

Re: will this work with 3.1.1 ?

by primehalo » Sat Feb 20, 2016 7:23 am

Yep, that must be the problem. I just checked and several were like that, which is weird as I could have sworn I did a search/replace on all those. Anyway, I got those fixed and uploaded.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: will this work with 3.1.1 ?

by CarolC1 » Sat Feb 20, 2016 5:18 pm

Huge thanks for this. As soon as I get the test board converted I will try it.
Thank you Thank you Thank you!!!
CarolC1
Registered User
Posts: 653
Joined: Sat Dec 02, 2006 4:26 pm
Contact:

Re: will this work with 3.1.1 ?

by Ltb » Sun Feb 21, 2016 9:40 am

Wow, impossible, many thanks guys, many thanks primehalo!!

My users are asking about this mod since summer 2015 when I moved to 3.1.... its a great news that the port is finally here...
Ltb
User avatar
Ltb
Registered User
Posts: 220
Joined: Sat Dec 29, 2007 10:10 pm
Location: Prague / Czech Rep.
Contact:

Re: will this work with 3.1.1 ?

by mircsicz » Sun Feb 21, 2016 9:47 am

Thx I've upgraded and await the next notification...
User avatar
mircsicz
Registered User
Posts: 20
Joined: Mon Dec 28, 2015 2:43 pm
Contact:

Re: will this work with 3.1.1 ?

by mircsicz » Sun Feb 21, 2016 1:10 pm

I got another notification mail, but the "Author" field was empty again...

How could I test myself if that variable contains a string and which string that is?
User avatar
mircsicz
Registered User
Posts: 20
Joined: Mon Dec 28, 2015 2:43 pm
Contact:

Re: will this work with 3.1.1 ?

by primehalo » Sun Feb 21, 2016 6:17 pm

Create a test account, subscribe to the forum with that test account, and make posts with your main account. If this is a live board and you don't want everyone to see, create a hidden forum that only you and the test account can see and post in there.

Then clear the board cache and try a few times to make sure it's not just a cache that's causing the issue. If you're sure it's still a problem, you'll need to add debug code.

Something like this will add messages to a log file:

Code: Select all

file_put_contents("log.txt", '$username=' . var_export($username, true) . "\n",  FILE_APPEND);
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: will this work with 3.1.1 ?

by mircsicz » Sun Feb 21, 2016 7:56 pm

THX man your hint about the cache was the solution...

As this is my first Forum I wasn't aware of the cache!

Purged it and now I've the Author field filled...
User avatar
mircsicz
Registered User
Posts: 20
Joined: Mon Dec 28, 2015 2:43 pm
Contact: