Facebook 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4291
Latest: Robertqt
New This Month: 5
New This Week: 1
New Today: 0
Stats
Total Posts: 43721
Total Topics: 7586
Most Online Today: 43
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 47
Total: 47

Author Topic: Request for admin notification  (Read 6201 times)

0 Members and 1 Guest are viewing this topic.

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 191
    • View Profile
    • Quizland
Request for admin notification
« on: January 28, 2024, 02:36:03 am »
Hi VB,

I have another request.

When someone reports a download the only notification I get (as admin) is an email and at the bottom of the downloads settings window.

Is there anyway you could add the notification to be sent to the admin on the website in the form of an alert or PM please?

The reason I ask is that, at the moment, the email is sent to the webmaster email address but that only eventually comes to me, none of the other admins get to know about the report

thanks

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16643
    • View Profile
Re: Request for admin notification
« Reply #1 on: January 28, 2024, 10:03:06 pm »
The system should email all the admins but a pm is easy to do

Try this change
Open Downloads2.PHP
Find
Code: [Select]
// Then send the actual email.
sendmail($row['email_address'], $subject, $body, null, 'downloads', false, 1);

Change or add the following
Code: [Select]
// Send PM to the member
$pm_recipients = array(
'to' => array($row['id_member']),
'bcc' => array(),
);
global $txt;
$pm_from = array(
'id' => 0,
'username' => $txt['downloads_txt_pmbot'] ,
'name' => $txt['downloads_txt_pmbot'],
);

sendpm($pm_recipients,  , $subject,$body,,false,$pm_from);



« Last Edit: January 28, 2024, 10:06:55 pm by SMFHacks »
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/
Like Like x 1 View List

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 191
    • View Profile
    • Quizland
Re: Request for admin notification
« Reply #2 on: January 29, 2024, 01:26:34 am »
Thanks VB, I'll let you know how it goes

Well unfortunately that code added had an effect on the tiny portal blocks for some reason. It also stopped the footer from showing, I tested both the default theme and others and it's the same

footer.png shows what happens with the code added, the bottom of the image is the bottom of the portal page, as you can see no footer.

the other 2 show with the code removed
« Last Edit: January 29, 2024, 02:29:20 am by davejo »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16643
    • View Profile
Re: Request for admin notification
« Reply #3 on: January 29, 2024, 08:13:37 am »
Strange... Anything in your error log? Does the store still work at all?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 191
    • View Profile
    • Quizland
Re: Request for admin notification
« Reply #4 on: January 29, 2024, 09:02:06 am »
Strange... Anything in your error log? Does the store still work at all?

Nothing in the error log and the Store is not used.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16643
    • View Profile
Re: Request for admin notification
« Reply #5 on: January 29, 2024, 09:30:03 am »
Sorry still early meant the downloads system
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 191
    • View Profile
    • Quizland
Re: Request for admin notification
« Reply #6 on: January 29, 2024, 11:03:27 am »
Sorry still early meant the downloads system

I just put the code in again and no the downloads didn't work either. I tried the change option this time but it still didn't work

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16643
    • View Profile
Re: Request for admin notification
« Reply #7 on: January 29, 2024, 11:21:45 am »
Attach your sources/Downloads2.php
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 191
    • View Profile
    • Quizland
Re: Request for admin notification
« Reply #8 on: January 29, 2024, 11:57:15 am »
Here you go

It has been modified but those came from your suggestions

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16643
    • View Profile
Re: Request for admin notification
« Reply #9 on: January 29, 2024, 01:47:36 pm »
I had some typos try this file with your edits.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 191
    • View Profile
    • Quizland
Re: Request for admin notification
« Reply #10 on: January 29, 2024, 04:15:03 pm »
I had some typos try this file with your edits.
Ok thanks, I'll let you know tomorrow as it's bedtime here ;)

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 191
    • View Profile
    • Quizland
Re: Request for admin notification
« Reply #11 on: January 30, 2024, 01:43:15 am »
Morning VB

I tested it this morning and it worked...but

The link that is sent to the PM, when clicked on, does not take you to the reported files, it takes you to the 'Moderation' page.

Images attached

reports1 = the PM
reports2 = where the link takes you
reports3 = shows you the admin panel at the bottom of the page
reports4 = after clicking on the 'Files reported' link

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16643
    • View Profile
Re: Request for admin notification
« Reply #12 on: January 30, 2024, 01:51:36 pm »
So probably need two links in the email/pm. One to the file itself and one to moderation center to review the comment then take action.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 191
    • View Profile
    • Quizland
Re: Request for admin notification
« Reply #13 on: January 30, 2024, 03:52:16 pm »
So probably need two links in the email/pm. One to the file itself and one to moderation center to review the comment then take action.

The last image in my previous post shows the comment and the link to the download, so all we really need is the PM link to point to that, if that's possible VB

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 191
    • View Profile
    • Quizland
Re: Request for admin notification
« Reply #14 on: February 06, 2024, 08:34:00 am »
Any more thoughts on this VB?

 

Related Topics

  Subject / Started by Replies Last post
9 Replies
10931 Views
Last post January 20, 2007, 12:39:51 am
by marcbkk
5 Replies
9013 Views
Last post June 28, 2008, 09:38:39 pm
by SMFHacks
1 Replies
3289 Views
Last post March 04, 2011, 03:26:39 pm
by simibill
1 Replies
1643 Views
Last post August 19, 2021, 05:57:38 pm
by SMFHacks
2 Replies
2150 Views
Last post August 25, 2022, 06:41:00 pm
by Shades

+- Recent Topics

ST Shop integration by SMFHacks
March 17, 2025, 08:28:26 pm

Contact Us by SMFHacks
March 16, 2025, 07:49:23 pm

HTTP 500 error during install by SMFHacks
March 13, 2025, 10:44:31 am

Site upgrade to 2.1 by SMFHacks
March 12, 2025, 09:29:43 pm

[Mod]WebP and AVIF File Support for SMF 2.1 by SMFHacks
March 10, 2025, 04:32:57 pm

Pretty URL's Pro support/help by [chrisB]
March 03, 2025, 10:18:09 am

More RSS feeds by melon
February 28, 2025, 08:23:21 am

SMF Shop / ST Shop Credits? by SMFHacks
February 22, 2025, 06:13:10 pm

Down_sendpm Error by Senkusha
February 22, 2025, 07:49:24 am

Additional Recommendations for SMF Store by SMFHacks
February 20, 2025, 03:40:50 pm

Powered by EzPortal