Support Forums

Old 10-10-2006, 07:31 PM   #1
DVM
Junior Member
 
Join Date: Mar 2006
Posts: 13
Rep Power: 13
DVM is on a distinguished road
Default Email Admin When Listings Change

I would like to know if it's possible to email the Admin when the listing was changed.

Reason:
I need to know when the user makes a change to one of the Extra fields
let say " fID=16 " for example. If this is option drop down menu is changed when user modifies listing, I would like to be Emailed this change.

Is this possible? Or something similar?
DVM is offline  
Old 10-11-2006, 10:14 AM   #2
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,847
Rep Power: 111
Eric Barnes is a jewel in the rough
Default

I don't believe this is possible however you could change the setting to change the listing status when they modify a listing which would allow you to double check the ad and make sure it is correct.
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 10-11-2006, 11:04 AM   #3
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,182
Rep Power: 59
juven14 is a jewel in the rough
Default

You could do this with a module, there are already hooks in place when the listing is modified.

You'd just need to add in to that hooks function to email if this field is changed. On the template you'd need a new hidden field to record the inital value and then compare that field's input against it, if it is different send email otherwise do nothing.

Edit: Sorry, I didn't see that this was in the 3.0 forum, my above statement only applies to 3.1 versions.
__________________
TemplateCodes.com
juven14 is offline  
Old 10-11-2006, 11:16 AM   #4
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,847
Rep Power: 111
Eric Barnes is a jewel in the rough
Default

I didn't relize that either. But I think what I described will work with v3.0
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 10-11-2006, 02:18 PM   #5
DVM
Junior Member
 
Join Date: Mar 2006
Posts: 13
Rep Power: 13
DVM is on a distinguished road
Default Modify Email

I knew I could set it up that when the listing is changed I could have the program set to Admin approval. Which would work, but I didn't want to disrupt the ads from being online.

I know in thanks.php it setups and mails the admin when the listing is made.
Is there a way to have this code implimented in usermodifylisting.php?

PHP Code:

//now display the template
    
if($continue == true)
    {
        
//should mail the admin?
        
if($emailnotify != "N")
        {
            
$sSQL="SELECT checkoutNotification FROM ".PREFIX."checkout_settings WHERE checkoutID=1";
            
$result=$db->query($sSQL);
            
$rs=$result->fetch();
            if(
$rs['checkoutNotification']=="Y")
            {
                
//get the mail template
                
$sSQL="SELECT eID, eName, eSubject, eHTML, eText FROM ".PREFIX."email_templates WHERE eID=6";
                    
$result=$db->query($sSQL);
                    
$rs=$result->fetch();
                    
$subject=$rs['eSubject'];
                    
$htmlContent=$rs['eHTML'];
                    
$textContent=$rs['eText'];
                    
$sSQL="SELECT title,price FROM ".PREFIX."products WHERE id=".$lid;
                    
$result=$db->query($sSQL);
                    
$rs=$result->fetch();
                    
$emailmessage.= $htmlContent.'<br>'LANG_TITLE.": ".safeStripSlashes($rs['title'])."<br>\n";
                    
$emailmessage.= LANG_PRICE .": ".FormatCurrency($rs['price'])."<br>\n";
                    
$emailmessage.= "<a href='".URL."/viewlisting.php?view=".$lid."'>".URL."/viewlisting.php?view=".$lid."</a><br>\n";
                    
$emailmessage.= "<a href='".URL."/administration/listinginfo.php?view=".trim($lid)."'>".URL."/administration/listinginfo.php?view=".trim($lid)."</a>";
                
// Instantiate mail class
                
$mail = new PHPMailer();
                
$mail->From     ADMIN_EMAIL;
                
$mail->FromName 'Admin';
                
$mail->Mailer   "mail";
                
$mail->IsHTML(true);
                
$mail->Subject $subject;
                
$mail->Body    $emailmessage;
                
$mail->AltBody strip_tags($emailmessage);
                
$mail->AddAddress(ADMIN_EMAIL);
                    if(!
$mail->Send())
                    {
                        
$class_tpl->assign('title',LANG_ERROR);
                        
$class_tpl->assign('pPageContent',LANG_ERROR_MAIL .' '$mail->ErrorInfo);
                        
$class_tpl->assign('body','content.tpl.php');
                    }
            }
        } 
DVM is offline  
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Browse Listings in Admin? garysr v3.1 Questions & Support 3 12-29-2006 08:14 PM
Admin Member's Browse Listings doug-gb v3.0 Questions & Support 2 10-03-2006 02:23 PM
Is this an ADMIN panel change or mod? dawyatt v3.1 Questions & Support 2 08-29-2006 11:11 PM
Mod for checkout and admin control DVM v3.0 Questions & Support 0 08-22-2006 07:28 AM
Editing listings from admincp can automatically change their status civ v3.1 Questions & Support 1 06-05-2006 01:04 PM


All times are GMT -4. The time now is 11:34 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0