Author Topic: move-xtra.php script...  (Read 3863 times)

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
move-xtra.php script...
« on: March 01, 2007, 12:07:10 pm »
Hi,

DW, please help here, it seems I may be able to get what I wanted to work, BUT, there's one little thing missing.  I need a script to run every time a user is being MOVED from one list to the other using this List Settings option:

Code: [Select]
Move users who reach end of followup sequence to list

I need this to make everything work with promoting multiple products, you can read more about it in this thread:
http://listmailpro.com/forum/index.php?topic=1439.msg7123#msg7123

Read the last two paragraphs of the thread above, you'll see what is needed...  

I really think the best way to handle this is with a move-xtra.php script, can you please insert a call to a move-xtra.php script every time a user is being moved from one list to another?
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
move-xtra.php script...
« Reply #1 on: March 01, 2007, 11:22:10 pm »
Brett,

The section you want is around line 585 of dailymail.php
Quote
   // check if moving to a new list/seq/del

You'll add something like this:
Code: [Select]
  if(file_exists('./fups-move-xtra.php')){
    include('./fups-move-xtra.php'); // can contain $link2 database connection
    mysql_select_db($sqldb,$link);
   }

Right after this:
Code: [Select]
   if($listopts[8]=='1'){
I take it you are moving to a multiple list setup - one list per product. What I wonder is if you could instead simply update your payment processing software to automatically move the user to the "end of sequence" on the list for that product.  Then you wouldn't need an xtra.php script - you could use the "move users..." option as-is to move the user to the next list.

Here's how to put the user at the end of sequence for a list:
Code: [Select]
// first, connect to the LM DB... then
list($lastseq)=mysql_fetch_row(mysql_query("select seq from lm_follow where list = '$list' order by seq desc limit 1"));
// turn lastseq into eos (end of sequence)
$lastseq = $lastseq + 1;
mysql_query("update lm_users set cseq = '$lastseq' where list = '$list' and email like '".addslashes($email)."';");

Should you use an xtra script and get it working as you like let me know and I'll add the inclusion permanently.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting