+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / export the newsletter subscribers

export the newsletter subscribers

12 posts, 0 answered
  1. Siva
    Siva avatar
    6 posts
    Registered:
    27 Sep 2012
    11 Mar 2010
    Link to this post

    How can we export the newsletter subscribers off of the site?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    11 Mar 2010
    Link to this post
    Hello Siva,

    You can get all subscribers using Newsletters API. Below is a sample code that will return all subscribers for  a give group. The list returns IGroupSubscriber objects.

    DataManager dManager = new DataManager();
    Guid ID = new Guid("783024RR-AECE-56Y3-8043-269A73BA53CE");
    IList allsubs = dManager.GetSubscribersOfGroup(ID, string.Empty);


    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Charles
    Charles avatar
    36 posts
    Registered:
    18 Apr 2011
    30 Sep 2011
    Link to this post
    Could this be put into the back-end somewhere? Say for a non-programmer kind of administrator?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    30 Sep 2011
    Link to this post
    Hi Charles,

    You can create a control that will represent the value that GetSubscribersOfGroup returns. You can add a new basic module or just a page under Sitefinity/Admin like the other RadTabStrip tabs.
    You can implement an interface ITool in a custom class which will add a new tab under Tools menu.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Charles
    Charles avatar
    36 posts
    Registered:
    18 Apr 2011
    05 Oct 2011
    Link to this post
    Hi, figured it out. Put it into the admin control template Subscribers.ascx

    Thank you....


    BUT.... I found how to get subscribers by group... but how do we reference what group we are currently viewing?

    Right now I can get all subscribers, or subscribers by group (guid) but there must be a .getCurrentNewletterGuid method that I can call that'll let me pass that to the byGroup method.

    What is said method?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    06 Oct 2011
    Link to this post
    Hi Charles,

    The ID of the newsletter is passed though newsletters control panel

    ( ( ControlPanel ) this.Parent ).TempNewsletterObject;

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Charles
    Charles avatar
    36 posts
    Registered:
    18 Apr 2011
    06 Oct 2011
    Link to this post

    var subscribers = manager.GetSubscribersOfGroup(groupId, sortExp);



    does this take the newsletter id? if not, where do i get the groupId?
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    07 Oct 2011
    Link to this post
    Hi Charles,

    You can get all newsletters using GetNewsletters method

    http://www.sitefinity.com/help/developer-manual/telerik.notifications-telerik.notifications.newsletters.provider-getnewsletters.html

    GroupID has relation with the user.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Charles
    Charles avatar
    36 posts
    Registered:
    18 Apr 2011
    07 Oct 2011
    Link to this post
    DataManager dManager = new DataManager();
    Guid ID = new Guid("783024RR-AECE-56Y3-8043-269A73BA53CE");
    IList allsubs = dManager.GetSubscribersOfGroup(ID, string.Empty);


    Can you please provide me the class object and method that i need to call to get this guid?
    Just something like how to declare the object, then of course what method will give me the guid?
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    10 Oct 2011
    Link to this post
    Hi Charles,

    To get a group ID you can use GetGroups method.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  11. Charles
    Charles avatar
    36 posts
    Registered:
    18 Apr 2011
    11 Oct 2011
    Link to this post
    I'm sorry, but I need to know what class and how to instantiate this class.

    I need to determine the current guid for the current subscriber group that the user is viewing. This code will be placed into
    \Sitefinity\Admin\ControlTemplates\Notifications\SubscribersTemplate.ascx
     I'm working providing an export functionality. But I keep having more questions just when I think I get an answer.

    Can I please have some code, more complete to provide an example how I can get the current subscriber guid that is being viewed by a user when the button to export is clicked??? Please, a more complete example. I asked what classes do I need to use and then an example of it's instantiation would be very helpful.

    Telerik.Notifications.Newsletters.

     

    DataManager manager = new Telerik.Notifications.Newsletters.DataManager();

    Guid groupId = Guid.NewGuid();

    String sortExp = "";

    var subscribers2 = manager.GetSubscribersOfGroup(groupId, sortExp);

    Please help me complete this functionality.

     

  12. Charles
    Charles avatar
    36 posts
    Registered:
    18 Apr 2011
    14 Oct 2011
    Link to this post
    Hey guys, I STILL would love to know how to get the current subscriber group that the user is viewing ....... on the page I mentioned above......

    BUT I managed to do a work around where on the parent subscriber group I created a drop box, that is populated by all the groups and their respective guids, and a button that simply calls the getSubscribersByGroup using the drop downs specified guid.....

    BUT I still feel this could be automated if someone I could extract this guid......

    Is there any ideas on this?

    Resolved but not content
    Charles
Register for webinar
12 posts, 0 answered