Advertisement:

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

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #100 on: December 31, 2012, 01:15:10 PM »
You mean notification on new replies/posts? members using that option will receive an email every new thing they had...
But using a daily newsletter option they will receive just one daily digest, about new topics, etc...
Or... people is a bit silly, and do not set ups notifications... with daily digests they have another option to use... they may use the one they prefer
They can select daily or weekly digests using the SMF notification system.
Quote
BTW, one question... subscribed users can change they settings somewhere? (weekly, fortnightly, etc)
No settings are needed as it's very easy just to unsubscribe and re-subscribe again with different settings.
Quote
BTW2, It could be implemented an option to include a random news fade item, instead always the latest one?
(we have quotes in there)
Then it wouldn't be new news but could be old or duplicate news that they get. - not what would be expected from a newsletter IMO.
Quote
BTW3, where to touch to change the topic image, to the user avatar? it would be nicer that way
BTW4, where to touch to send only new topics, instead new messages (replies on topics) + new topics?
See posts below in this thread - it would need a change to the SQL query.

Thanks for the Spanish translation!

Offline luuuciano

  • SMF Hero
  • ******
  • Posts: 2,978
    • http://cbasites.net/
Re: Automatic Newsletter for SMF2
« Reply #101 on: January 06, 2013, 01:04:03 AM »
wow... I have no idea why this happened, but I have instaled this mod 3 or 4 days ago...
Then the mysql server started to go down like 4 to 6 times a day........ I was just restarting it (mysqld)
Then I uninstalled it... all normal, all ok...
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Offline ro-lkw

  • Semi-Newbie
  • *
  • Posts: 30
Re: Automatic Newsletter for SMF2
« Reply #102 on: January 08, 2013, 12:12:22 PM »
Doesn't work on my forum.I have theme WHITEBOX.

Can help me someone ?

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #103 on: January 08, 2013, 12:30:12 PM »
Doesn't work on my forum.I have theme WHITEBOX.

Can help me someone ?
Not unless you can provide a bit more information than "it doesn't work"  ::).  Exactly what doesn't work?  Did it install properly?  Does it work with the standard Curve theme?  Are the configuration options available? Does the sign-up info appear on the forum page?  Etc, etc.

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #104 on: January 08, 2013, 12:42:58 PM »
wow... I have no idea why this happened, but I have instaled this mod 3 or 4 days ago...
Then the mysql server started to go down like 4 to 6 times a day........ I was just restarting it (mysqld)
Then I uninstalled it... all normal, all ok...
The mod only makes one very simple SQL query for each board index page load - if that's causing your SQL server to choke then you've got other more serious issues I'm afraid  :(.

Offline scvoyager

  • Semi-Newbie
  • *
  • Posts: 20
Re: Automatic Newsletter for SMF2
« Reply #105 on: January 21, 2013, 08:58:30 AM »
I downloaded this mod yesterday and so far it is great. I have reworked much of it to fit my forums needs and the first newsletter turned out almost perfect showing everything as expected plus the latest youtube videos and photos. I did make a change so members can pick daily, weekly and monthly. I did this for testing reasons and also members may like to get the latest daily changes to the forum.

The one thing I can't get working completely is having the form show up on the simple portal page. I have had a lot of parse errors and currently have all the buttons showing but no text yet.

This is kind of out of my league and could use some help on how to make a php block for this mod.

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #106 on: January 21, 2013, 09:22:13 AM »
You don't say which portal you are using - this is what I've used with EzPortal:
Code: [Select]
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 {db_prefix}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" />';

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 scvoyager

  • Semi-Newbie
  • *
  • Posts: 20
Re: Automatic Newsletter for SMF2
« Reply #107 on: January 21, 2013, 09:39:47 AM »
I put the portal (simple portal) in the second paragraph but I have found most php blocks interchange between most of the portals. Your php block works perfect and only had to make a few changes that had nothing to do with your great work.

Thanks much.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 784
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Automatic Newsletter for SMF2
« Reply #108 on: January 25, 2013, 01:53:22 PM »
Can you help? I tried upgrading to today's version, but I get this error when I try to access the settings:

Quote
Table 'wikiforum.smf_gallery_cat' doesn't exist
File: /path...forum/Sources/ManageSettings.php
Line: 2658

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.3, while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.

SELECT id_cat, title FROM smf_gallery_cat ORDER BY roworder ASC

needless to say, it worked fine before and I haven't had that message before... my 2.03 upgrade worked fine and upgrade.php has been deleted as usually, so not sure that's the problem. Any feedback?

Thanks!

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #109 on: January 25, 2013, 02:14:33 PM »
It's a bug  :-[ -I'll upload an update shortly.  Thanks for the testing  ;)

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 784
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Automatic Newsletter for SMF2
« Reply #110 on: January 25, 2013, 02:18:36 PM »
Phew. For a few minutes I got panicked, because I had just done some major tuning on my server and I thought I broke something - been looking in my db backups :D

Thanks, can wait :)

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 784
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Automatic Newsletter for SMF2
« Reply #111 on: January 25, 2013, 02:24:11 PM »
Oh yeah. Working perfectly now!

Offline assemblytube

  • Semi-Newbie
  • *
  • Posts: 27
Re: Automatic Newsletter for SMF2
« Reply #112 on: January 28, 2013, 11:20:14 AM »
Installed Automatic Newsletter version 121 and it is causing me problems.
Previously had version 114 and it was working well.
I uninstalled 114 and installed 121. The install seemed to go OK and I can see a sample Newsletter with the new features.
However, I now get this chunk of text at the top of my forum pages:

SendNews(); return true; } function scheduled_send_email_campaign() { global $smcFunc, $sourcedir; global $sourcedir; require $sourcedir . '/NewsPro2.php'; // Loop though all the pending campaigns $curTime = time(); $result = $smcFunc['db_query']('', "SELECT ID_CAMPAIGN FROM {db_prefix}newspro_campaigns WHERE removed = 0 AND status = 0 AND scheduledate < $curTime"); while ($row = $smcFunc['db_fetch_assoc']($result)) { SendCampaign($row['ID_CAMPAIGN']); } // Return for the log... return true; } ?>


And in additon this has affected the display of items on my SimplePortal front page.

I uninstalled 121 and I still have the chunk of text showing at the top of my forum pages.

Can you advise me on where I might look to fix this please.
Thanks for your help.

Offline HoverClub

  • Jr. Member
  • **
  • Posts: 198
  • hoverclub.org.uk
    • The Hovercraft Cruising Club
Re: Automatic Newsletter for SMF2
« Reply #113 on: January 28, 2013, 11:42:58 AM »
Its the end of the Newsletter mod (up to the return true;) followed by another mod's code.  Both bits of code should be in Sources/ScheduledTasks.php - how they got to the top of the forum page I've no idea!  Might be a good idea to do a full code restore?

Offline assemblytube

  • Semi-Newbie
  • *
  • Posts: 27
Re: Automatic Newsletter for SMF2
« Reply #114 on: January 29, 2013, 04:35:01 AM »
Thanks for the advice.
Site now working properly.
I believe I had a conflict between this Newsletter mod and another Newsletter mod I have.
Thanks.

Offline b0tze

  • Semi-Newbie
  • *
  • Posts: 19
Re: Automatic Newsletter for SMF2
« Reply #115 on: February 09, 2013, 09:41:38 AM »
Thank you very much for this mod!

I had the preview/compression issue as well, but figured it out by reading through this thread ;-)
Now I am excited to see the actual mail, but I guess I have to wait 7 days now... How about a "send preview to webmaster" button? Might have the advantage to be able to check if it's working, in case there are other issues. Or a welcome-newsletter after signing up... Just ideas, I love it already :-D

Thanks again!
b0tze

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 #116 on: February 10, 2013, 07:26:52 AM »
Hi Hoverclub,

Is this version has a update for the preview/compression issues . Because as said in 6th page by other user. When i enable compression, our 140 users were getting email. But server is overloading and i have got my MySQL freezed several times a day.

So over month the mod is working and not sending to anyone.Got 140 subscribes as shown in admin page.

If this version has the fix for preview / compression issues. Then i will use it . Kindly advice.
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 #117 on: February 10, 2013, 08:25:46 AM »
The HTML part of the newletter has been tidied up but there is no fix for the compression issue as that's handled by SMF. 

Enabling compression increases server load - disabling it decreases load (either way it has no effect on MySQL load!).   Compression reduces bandwidth but that's all - if your server is already compressing the data then enabling it in SMF just wastes server resources.

b0tze
I don't understand how you know you have a compression issue if you haven't received any newsletters yet?  The admin preview lets you check the newsletter looks OK - provided your SMF email/scheduled tasks settings work with other forum emails then the newsletter will get sent.

Offline b0tze

  • Semi-Newbie
  • *
  • Posts: 19
Re: Automatic Newsletter for SMF2
« Reply #118 on: February 14, 2013, 06:28:54 AM »
no problems, just saying i had the compression issues (preview-error) until i disabled the compression output at server settings and now it works, so now i'm looking forward to receiving the first newsletter-mail :-)

Offline b0tze

  • Semi-Newbie
  • *
  • Posts: 19
Re: Automatic Newsletter for SMF2
« Reply #119 on: February 17, 2013, 12:57:44 PM »
Now I do have problems, my first newsletter was due yesterday but did not go out. I have following errors in the log:

8: Undefined variable: videos
2: Invalid argument supplied for foreach()

each error 3 times. I have set number of videos to 0 (don't need any). The preview seems to work, but only shows this:

Forum [as a link to the forum]
Latest News:
[content: the latest news i entered]
Forumstatistiken
[statistical content]

There is no content about any threads or posts (from the last days).

Would be great to get it working, thanks a lot for any advice!

cheers, b0tze