Advertisement:

Author Topic: Automatic Newsletter for SMF2  (Read 92704 times)

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #120 on: February 17, 2013, 03:19:42 PM »
The videos error is a bug and will be fixed at the next update.

What settings do you have for the mod (are you sure you haven't disallowed ALL boards that may have new posts)?

Offline b0tze

  • Semi-Newbie
  • *
  • Posts: 19
Re: Automatic Newsletter for SMF2
« Reply #121 on: February 18, 2013, 03:00:25 AM »
ok, good to know and thanks in advanced!

a screenshot of my settings is attached, I excluded 2 out of many more, so there should be enough content left.

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #122 on: February 18, 2013, 05:14:19 AM »
The mod looks for the last posts anywhere on the forum - the only exceptions are the recycle board (if you have one) and any excluded boards you've selected in the mod settings.  The posts must be also be approved (or are auto-approved).  It's a simple SQL query and I can't see how it can fail to find any posts unless there aren't any  ???

If you can give me access (PM) to your test forum I can take a look.

Offline b0tze

  • Semi-Newbie
  • *
  • Posts: 19
Re: Automatic Newsletter for SMF2
« Reply #123 on: February 19, 2013, 01:28:06 PM »
I am such an idiot.
For everyone else reading this thread: I understood the opposite of the expanation of the "use guest permission". Reading more careful would have helped...

Thanks again, HoverClub, for the help and this great mod!
b0tze

Offline error_2

  • Newbie
  • *
  • Posts: 7
Re: Automatic Newsletter for SMF2
« Reply #124 on: February 20, 2013, 10:20:12 AM »
Hi,

I have installed this mod to my site. It introduced 15 errors on hxxp:validator.w3.org/check?uri=yoursitehere.com [nonactive]
Can you update your mod to complain with w3 validator?

Thanks!

Offline gpwizard

  • Newbie
  • *
  • Posts: 2
Re: Automatic Newsletter for SMF2
« Reply #125 on: March 11, 2013, 07:09:02 PM »
Hi,

I've installed the mod and get a successful preview. When I cut and paste the block code provided into a PHP block in Simple Portal I get a syntax error. On checking the code I get  - syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on line 13

Can you help with this please.

Cheers

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #126 on: March 12, 2013, 05:47:36 AM »
On checking the code I get  - syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on line 13
... in which file?

Offline gpwizard

  • Newbie
  • *
  • Posts: 2
Re: Automatic Newsletter for SMF2
« Reply #127 on: March 12, 2013, 06:28:57 AM »
In the portal_block.php file provided. The problem here maybe obvious but its not to me. Any help is appreciated.

Quote
<?php
   global $modSettings, $txt, $scripturl, $context;
   
   // make sure newletter is installed and enabled
   if (!empty($modSettings['newsltr_news']) OR !empty($modSettings['newsltr_events']) OR !empty($modSettings['newsltr_topic_count']))
   {
      $context['user']['newsltr'] = array('next_ltr_date'=>'', 'period'=>'', 'email'=>'',);
      if (!$context['user']['is_guest'])
      {
         global $smcFunc;
         $result = $smcFunc['db_query']('', '
            SELECT email, next_ltr_date, period
               FROM smf_hcb_newsletter
            WHERE email = '' . $context['user']['email'] . ''
               LIMIT 1'
         );

         if ($row = $smcFunc['db_fetch_assoc']($result))
            $context['user']['newsltr'] = $row;
         $smcFunc['db_free_result']($result);
      }
   
      echo '
   <div class="smalltext">
      <form action="',$scripturl,'?action=NewsSubscribe" method="post" accept-charset="',$context['character_set'],'" name="newsSubscriber">
         <input type="hidden" name="sc" value="', $context['session_id'], '" />
         <input type="hidden" name="lastaction" value="forum" />' . $context['forum_name'] . ' ' . $txt['newsubscribe_mod_title'];
      
      if ($context['user']['is_guest'])
         echo $txt['newsubscribe_mod_email'] . '<input type="text" clasa="input_text" maxlength="255" size="25" value="' . $context['user']['newsltr']['email'] . '" name="email" />';
      else
         echo '
            <input type="hidden" name="email" value="', $context['user']['email'], '" />';
      if ($context['user']['is_guest'] OR empty($context['user']['newsltr']['email']))
         echo '
         <input type="submit" class="button_submit" name="subscribe" value="' . $txt['newsubscribe_mod_subscribe'] .'"/>
         <br /><Input type="radio" name ="period" value="7"' . (($context['user']['newsltr']['period'] == 7) ? ' checked' :'')  . '>' .
         $txt['newsubscribe_mod_week'] . '
         <br /><Input type="radio" name ="period" value="14"' . (($context['user']['newsltr']['period'] == 14) ? ' checked' :'')  . '>' .
         $txt['newsubscribe_mod_fort'] . '
         <br /><Input type="radio" name ="period" value="30"' . ((empty($context['user']['newsltr']['period']) OR $context['user']['newsltr']['period'] == 30) ? ' checked' : '')  . '>' . $txt['newsubscribe_mod_month'];
      if ($context['user']['is_guest'] OR !empty($context['user']['newsltr']['email']))
         echo ($context['user']['is_guest'] ? '<br />' : $txt['newsubscribe_mod_next'] . date(' j F', $context['user']['newsltr']['next_ltr_date'])) . '<input type="submit" class="button_submit" name="unsubscribe"  value="' . $txt['newsubscribe_mod_unsubscribe'] .'"/>';
   echo '
      </form>
   </div>';
   }
?>

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #128 on: March 12, 2013, 06:38:33 AM »
change
Code: [Select]
WHERE email = '' . $context['user']['email'] . ''to
Quote
WHERE email = \'' . $context['user']['email'] . '\'

Offline shady18n

  • Newbie
  • *
  • Posts: 4
Re: Automatic Newsletter for SMF2
« Reply #129 on: March 27, 2013, 08:43:31 PM »
Hi, is it possible to autosubscribe all members to the newsletter (and then let them unsubscribe, if they wish)? i.e. opt-out rather than opt-in?

Offline Sudhakar Arjunan

  • Sophist Member
  • *****
  • Posts: 1,227
  • Gender: Male
  • SMF is the best forum tool
    • IT Acumens - Webdesigning & Webhositing services in Chennai
Re: Automatic Newsletter for SMF2
« Reply #130 on: March 28, 2013, 01:11:28 PM »
Hi, is it possible to autosubscribe all members to the newsletter (and then let them unsubscribe, if they wish)? i.e. opt-out rather than opt-in?

Good idea, think about the mails sent to spam if you have more than 500 emails in your site. If users have more than 40,000 users like us. Spam will be a bigger concern. And you will daily receive thousands and thousands of failure notice in your email if this option is done.

But idea sounds good.  8)
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Offline shady18n

  • Newbie
  • *
  • Posts: 4
Re: Automatic Newsletter for SMF2
« Reply #131 on: April 01, 2013, 05:52:12 AM »

Good idea, think about the mails sent to spam if you have more than 500 emails in your site. If users have more than 40,000 users like us. Spam will be a bigger concern. And you will daily receive thousands and thousands of failure notice in your email if this option is done.

But idea sounds good.  8)

It might not be appropriate to your site, but in my case, we have 500 invitation-only members. Some subscribed in the early days of the forum and we'd like to entice them back by showing them what they are missing.

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #132 on: April 01, 2013, 07:18:19 AM »
This has been discussed previously (see HERE).  If you want to send a single reminder to all members then you can use the SMF Admin News & Newsletter function to do that.

Offline shady18n

  • Newbie
  • *
  • Posts: 4
Re: Automatic Newsletter for SMF2
« Reply #133 on: April 02, 2013, 06:54:22 AM »
This has been discussed previously (see HERE).  If you want to send a single reminder to all members then you can use the SMF Admin News & Newsletter function to do that.

Yes, but that doesn't send a sample of this newsletter, does it? My issue is similar to that in the referenced post - I'd like to bring back in dormant members. I don't mind that being a one off send of a sample newsletter via the SMF newsletter function, but would like to be able to send the content of the newsletter mod. I'm not too worried about auto-subscribing people (I'd prefer to have it as an option, I can understand why others don't want it on their forums).

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #134 on: April 02, 2013, 09:15:20 AM »
Yes, but that doesn't send a sample of this newsletter, does it?
Preview the newsletter sample - > Right-click: View Page Source -> copy all -> paste into Admin newsletter and tick the "Send in HTML format..."

Offline Sudhakar Arjunan

  • Sophist Member
  • *****
  • Posts: 1,227
  • Gender: Male
  • SMF is the best forum tool
    • IT Acumens - Webdesigning & Webhositing services in Chennai
Re: Automatic Newsletter for SMF2
« Reply #135 on: April 02, 2013, 05:28:59 PM »
Yes, but that doesn't send a sample of this newsletter, does it?
Preview the newsletter sample - > Right-click: View Page Source -> copy all -> paste into Admin newsletter and tick the "Send in HTML format..."

Good but, honestly he would have not expected this kind of response from you. Yes it works but still we need in a mod format and not a manual process as shady18n said.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #136 on: April 03, 2013, 03:56:42 AM »
Good but, honestly he would have not expected this kind of response from you. Yes it works but still we need in a mod format and not a manual process as shady18n said.
Quote from: chady18n
I don't mind that being a one off send of a sample newsletter via the SMF newsletter function, but would like to be able to send the content of the newsletter mod. I'm not too worried about auto-subscribing people...
It's simply not worth the considerable effort required to develop and test mod code for something that takes 4 seconds to do and is only occasionally used - unless you want to volunteer to do it?

Offline shady18n

  • Newbie
  • *
  • Posts: 4
Re: Automatic Newsletter for SMF2
« Reply #137 on: April 17, 2013, 08:12:22 AM »
Sorry not to have responded earlier (must set notify on thread).

Actually, HoverClub's response is fine, that is basically what I need, and I wasn't aware of the option quoted. It would be great if it were part of the mod, but I don't mind running it manually.

Many thanks.

Offline error_2

  • Newbie
  • *
  • Posts: 7
Re: Automatic Newsletter for SMF2
« Reply #138 on: April 17, 2013, 08:39:56 PM »
I have removed your mod because you are ignoring my error report.

Quote
Hi,

I have installed this mod to my site. It introduced 15 errors on hxxp:validator.w3.org/check?uri=yoursitehere.com [nonactive]
Can you update your mod to complain with w3 validator?

Thanks!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: Automatic Newsletter for SMF2
« Reply #139 on: April 17, 2013, 09:00:43 PM »
Considering that you never actually bothered to say what the errors were... and the fact that they're probably caused by a combination of this mod (which doesn't seem to cause errors on the default theme) and your custom theme...

That, and the fact that I doubt the ignoring was intentional. You know people do occasionally miss things. Especially when it's someone who made something and was nice enough to share. You're *not required* to use it, just as HoverClub is *not required* to keep it up to date or anything.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.