Senest Online
ejvindh 1 Dag
Leif-M 3 Dage
helmuth 3 Dage
Kenneth 5 Dage
HenningS 6 Dage
Henrik Bendtsen 6 Dage
viklake 1 Uge
flj 1 Uge
Niller 1 Uge
Ken 2 Uger
Gæster online: 1

Brugere online: 0

Antal brugere: 183
Nyeste bruger: Michael Mogensen
Se indlæg
PHP-Fusion - Danmark » PHP-Fusion version 7 » MODs & Infusioner v7
 Udskriv debat
A while ago, I downloaded an infusion from this site called Autonews which I have been using on most of my 7.02.07 sites. I tried installing it on php-fusion version 8.0.19 and it would not infuse correctly. Does anyone know if it is still available (I could not find it here) and what is needed to make it work on version 8.0.19. Thank you.
I do not have any plans to update autonews to v8.


flj skrev:

I do not have any plans to update autonews to v8.

I'm sorry to hear that as it has become an invaluable tool for me.
It's probably a limited task for a php capable person to make it work.


flj skrev:

It's probably a limited task for a php capable person to make it work.

Unfortunately, I don't qualify as a php capable person.
Is the autonews infusion still avaliable for download? I can't seem to find it on the site. I believe the last version was 1.1
The only version I could find was this one:

It's version 1.1
"Når forandringens vinde blæser er der nogle der bygger læhegn, andre bygger vindmøller." - Gammel kinesisk visdom
Helmuth Mikkelsen, sprognørdisk folkepensionist
That is the one....thank you very much. I will see if I can find someone to help me adapt it to version 8.00.xx.
Once I uploaded the files in the latest download (v 1.1), I was able to infuse it and everything seems to be working except that no emails are sent. I checked the readme.txt file and tweaked the admin as suggested but it will not send the emails. when testing the email, I can see how it will look but that is it. Any suggestions?
Still can't get any emails sent although I seem to be making some progress. I am getting the following error message:
mysql_result() expects parameter 1 to be resource, object given Line: 393

Line 393 shows the following.
$rtn = mysql_result($result, 0);

Any suggestions?
Just a quick note to let everyone know that I was able to get autonews infusion to work on php-fusion version 8.00.21 without having to use a cronjob. I am running on a shared webhost using php version 5.6.3 in case you are wondering. I wonder if the infusion will work when I have to upgrade my php version to 7.x?
Could you share the working version here?
As requested, here are the files that I use on my php-fusion 8.00.21 site which uses php version 5.6.3. I have no idea if this infusion will work with php version 7.x and I suspect it will not. So if anyone is using php-fusion with php version 7.x and can get this to work, please be sure to let me know.
afoster tilknyttede følgende billede:fil: [27,55kB / 711 Downloads]
Thanx - maby someone will take up the challenge to make it work under v9 ?
The infusion is working well on version 8.00.21 except that after adding the following code to the autonews_data.php file, the email notification is being sent out every hour. I did set the timing for one hour in order to test it, but I was not aware that it would keep sending it every hour. What did I do wrong?

// Birthdays
  14 => array(
    'id'    => 14,
    'type'  => 'Birthdays',
    'text'  => '%2$s turns %3$s on %4$s. Congratulations from %6$s!',
    'type1' => 'birthday',
    'type2' => 'birthdays',
    'parse1'=> '{
                  $d = explode(\'-\', $data[\'item_text\']);
                  $bd = mktime(0, 0, 0, $d[0], $d[1], date(\'Y\'));
                  if ($bd < time()) $bd = mktime(0, 0, 0, $d[0], $d[1], date(\'Y\')+1);
                  return strftime(\'%e %b\', $bd);
    'parse2'=> 'return $settings[\'sitename\'];',
    'query' => "SELECT
                  NOW() AS timestamp,
                  0 AS item_id,
                  CASE WHEN
                    user_birthdate + INTERVAL(YEAR(CURDATE()) - YEAR(user_birthdate)) YEAR < CURDATE()
                    YEAR(CURDATE()) - YEAR(user_birthdate) + 1
                    YEAR(CURDATE()) - YEAR(user_birthdate)
                  END AS item_no,
                  DATE_FORMAT(user_birthdate, '%c-%d') AS item_text,
                  0 AS item2_id,
                  CASE WHEN
                    user_birthdate + INTERVAL(YEAR(CURDATE()) - YEAR(user_birthdate)) YEAR < CURDATE()
                    DATEDIFF(user_birthdate + INTERVAL(YEAR(CURDATE()) - YEAR(user_birthdate) + 1) YEAR, CURDATE())
                    DATEDIFF(user_birthdate + INTERVAL(YEAR(CURDATE()) - YEAR(user_birthdate)) YEAR, CURDATE())
                  END AS item2_no,
                  '' AS item2_text
                FROM ".DB_USERS."
                WHERE user_birthdate > 0
                HAVING item2_no <= 7
                ORDER BY item_no, user_name;"
And you cannot change it back to the value it was before your set it to 1 hour?
Yes, I can change it back to 4 hours or 8 hours etc. I thought however, that no matter what value I set, it would only go out one time. If what is happening is normal, then I will make the necessary changes.
No, items identified to be sent, will go again and again as long as they fulfill the other criteria set.

In the specific code, the line "item2_no <= 7" select users with less than or equal to 7 days to their birthday. To avoid double sendings that should be used with a weekly sending frequency, or they should both be adjusted.
Thanks flj, I think I now understand how it works.
Is it possible to use autonews to send out emails on a blog that is run outside of php-fusion, but is part of the infusions within php-fusion. To see the blog, please go to . I can set up users within the blog or use the php-fusion users table. thanks in advance for your help.
Yes, but it requires some amendments. There is an adding_more_news.txt file, which explains how this is done. It requires php and mysql coding skills.
Spring til debat: