Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 4 Years, 3 Months ago Send PM/Email for awaiting approval
#11
Solved: 4 Years, 3 Months ago
(07-13-2015, 11:26 AM)Ad Bakker Wrote: OK, I understand. I don't think is matters for the plugin, because I simply look at the visibility of a post. I will have a look how the plugin handles this.

The 1st version of the plugin is attached. Unzip the file and copy the contents (2 files, 1 to inc/plugin and 1 to inc/languages/english) to your forum.
I did some tests and it seems to work, but you never know Sad .

Try this out, and when it works satisfactory, it could also be integrated in the plugin you mentioned before. Then it can also be arranged that the group for the additional mods is defined in AdminCP.

A mail came through to the group 11 member, but the links went to 404s an there were some errors.

New Thread Email sent this link: http://MY URL/thread-.html

New Post Email sent: http://MY URL/thread-191.html&pid=498#498

Errors:

Your copy of MyBB running on ******* (http://MY URL) has experienced an error. Details of the error include:
---
Type: 2
File: inc/plugins/mod_mail.php (Line no. 36)
Message
fwrite() expects parameter 1 to be resource, null given

AND

ur copy of MyBB running on ******* (http://MY URL) has experienced an error. Details of the error include:
---
Type: 2
File: inc/plugins/mod_mail.php (Line no. 68)
Message
fwrite() expects parameter 1 to be resource, null given
Reply
#12
Solved: 4 Years, 3 Months ago
OK, these are debugging writes, I thought I deleted them. Remove lines 36 and 68 (starting with fwrite).

Can you show what the links look like?

Perhaps you use a SEO plugin?

Trry these:

Line 40 (after removing the fwrite statements):

$post_link = $mybb->settings['bburl']."/showthread.php?tid=".$tid."&pid=".$pid."#".$pid;

Line 71:

$post_link = $mybb->settings['bburl']."/showthread.php?tid=".$tid;

When this does not work, you can perhaps show me an example of the link in a email where a new post is announced. I use no SEO plugin because my forums are all private.
Regards, Ad Bakker (NL)
Reply
#13
Solved: 4 Years, 3 Months ago
(07-13-2015, 02:18 PM)Ad Bakker Wrote: OK, these are debugging writes, I thought I deleted them. Remove lines 36 and 68 (starting with fwrite).

Can you show what the links look like?

OK done that and no errors this time, but the links in the Emails still give 404s. (I don't want to publish the links on here as I'm testing it on a private forum so I have replaced my URL with ****.com)

New thread link in the Email is:
"http://****.com/thread-.html"

Should be:
"http://****.com/thread-225.html"

AND

New post link in Email is
"http://****.com/thread-191.html&pid=502#502"

Should be:
"http://****.com/thread-191-post-502.html#pid502"
Reply
#14
Solved: 4 Years, 3 Months ago
(07-13-2015, 02:52 PM)sarisisop Wrote: New thread link in the Email is:
"http://****.com/thread-.html"

Should be:
"http://****.com/thread-225.html"

AND

New post link in Email is
"http://****.com/thread-191.html&pid=502#502"

Should be:
"http://****.com/thread-191-post-502.html#pid502"

OK, then the lines given before can also be:

Line 40:

$post_link = $mybb->settings['bburl']."/thread-".$tid."-post-".$pid.".html#pid".$pid;

Line 71:

$post_link = $mybb->settings['bburl']."/thread-".$tid.".html";

But I think that the ones given in my previous mail should also work, and these are SEO independent.
Regards, Ad Bakker (NL)
Reply
#15
Solved: 4 Years, 3 Months ago
(07-13-2015, 03:07 PM)Ad Bakker Wrote:
(07-13-2015, 02:52 PM)sarisisop Wrote: New thread link in the Email is:
"http://****.com/thread-.html"

Should be:
"http://****.com/thread-225.html"

AND

New post link in Email is
"http://****.com/thread-191.html&pid=502#502"

Should be:
"http://****.com/thread-191-post-502.html#pid502"

OK, then the lines given before can also be:

Line 40:

$post_link = $mybb->settings['bburl']."/thread-".$tid."-post-".$pid.".html#pid".$pid;

Line 71:

$post_link = $mybb->settings['bburl']."/thread-".$tid.".html";

But I think that the ones given in my previous mail should also work, and these are SEO independent.


Got for new thread
"http://****.com/thread-.html

Should be:
http://****.com/thread-227.html

AND

Got for new post
http://****.com/thread--post-506.html#pid506

Should be:
http://****.com/thread-191-post-506.html#pid506
Reply
#16
Solved: 4 Years, 3 Months ago
(07-13-2015, 03:19 PM)sarisisop Wrote: Got for new thread"http://****.com/thread-.html

Should be:
http://****.com/thread-227.html

AND

Got for new post
http://****.com/thread--post-506.html#pid506

Should be:
http://****.com/thread-191-post-506.html#pid506

OK, my fault.

Line 40:

$post_link = $mybb->settings['bburl']."/thread-".$thread['tid']."-post-".$pid.".html#pid".$pid;


line 71:

$post_link = $mybb->settings['bburl']."/thread-".$new_thread['tid'].".html";

I think we are converging to the right result Big Grin .
Regards, Ad Bakker (NL)
Reply
#17
Solved: 4 Years, 3 Months ago
(07-13-2015, 03:26 PM)Ad Bakker Wrote: OK, my fault.

Line 40:

$post_link = $mybb->settings['bburl']."/thread-".$thread['tid']."-post-".$pid.".html#pid".$pid;


line 71:

$post_link = $mybb->settings['bburl']."/thread-".$new_thread['tid'].".html";

I think we are converging to the right result Big Grin .

Half way there.

New post worked fine.

New thread gave:
"http://****.com/thread-.html"

Should be:
"http://****.com/thread-228.html"

*Must be your dinner time soon?
Reply
#18
Solved: 4 Years, 3 Months ago
There is something strange in newthread.php, and that may cause it. But I thought we already tried for line 71:


$post_link = $mybb->settings['bburl']."/thread-".$tid.".html";


But this should work, else I read the code wrong. Please try it.

Dinner time!! Big Grin .

Almost 18:00h here, after 19:00h I'll be gone for this evening. Hope this last one works, at the end I send you an updated version because I see it also needs some optimization.
Regards, Ad Bakker (NL)
Reply
#19
Solved: 4 Years, 3 Months ago
(07-13-2015, 03:55 PM)Ad Bakker Wrote: There is something strange in newthread.php, and that may cause it. But I thought we already tried for line 71:


$post_link = $mybb->settings['bburl']."/thread-".$tid.".html";


But this should work, else I read the code wrong. Please try it.

Dinner time!! Big Grin .

Almost 18:00h here, after 19:00h I'll be gone for this evening. Hope this last one works, at the end I send you an updated version because I see it also needs some optimization.

Hello Ad sorry for delay in getting back to you, I got called away.

I changed it to the above, but it's still not giving the correct link on new thread.

Email link:
"http://****.com/thread-.html"

Correct link:
"http://****.com/thread-229.html"

I'm not sure when I will be about tomorrow, but I will get back to you as soon as possible if you have answered.

Thank you for your patience, I appreciate it.
Reply
#20
Solved: 4 Years, 3 Months ago
Stupid mistake, it is always wrong to do these kind of things in a hurry. Replace line 58 with:

global $db, $mybb, $visible, $lang, $debug_file, $cache, $forum, $new_thread, $tid;

This works, I've tested it.
Regards, Ad Bakker (NL)
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)