obey-robots.txt
  

pHpFusion-Nederlands


 Nederlands-, Vlaamstalige pHp-Fusion support site voor België en Nederland.


 PHP-Fusion is een open-source "Content Magagement System" (CMS) geschreven in PHP en MySQL.
 Het beheren van uw site gaat met een eenvoudig en begrijpbaar administratie systeem.
 PHP-Fusion bevat o.a. een forum, shoutbox, enquêtes, profielpagina's, nieuws, fotogalerij, weblinks enz.
 Uiteraard is de standaardinstallatie nog uit te breiden met infusies (modules) en andere thema's (skins).

Navigatie
Shoutbox
You must login to post a message.

28 december 2018, 21:42
ROFL

01 januari 2018, 10:29
Gelukkig en gezond 2018 toegewenst iedereen

09 november 2016, 23:46
Groeten vanuit Belgie, ondertussen weer een aantal jaartjes geleden Wink

29 maart 2016, 09:44
Hey haggis, sup

28 maart 2016, 22:34
Hi there.

Shoutbox Archive
RSS Feeds
Populaire Fusion sites
» CaiWay Gebruikers.
» KPN Gebruikers.
» Online Gebruikers.
» Tele2 Gebruikers.
» Ziggo Gebruikers.
pHp-Fusion sites
Inloggen
Geef gebruikersnaam

Wachtwoord



Nog geen lid?

» Registreer «
Als geregistreerd lid kunt u reageren en alle extra functies gebruiken.

Wachtwoord vergeten?
Verzoek nieuw wachtwoord.
Gebruikers Online
» Gasten online: 4

» Leden online: 0
» Nieuwste lid: Bridgeschool Karin Poppelaars
Recent Online
» Wanabo01:23:59
Doneren

Promoot je website
Ad-Vertise hoe werkt het? Registreer, selecteer "Advertenties Nederland" en maak een eigen tekst advertentie. Kies een ad formaat, pas de kleuren aan en plaats html code op je eigen website. Nu worden jouw advertenties vertoont op alle deelnemende websites die óók voor Advertenties Nederland hebben gekozen. Bekijk advertentie formaten.
Hieronder "Advertenties België", deze advertenties worden vertoont op alle deelnemende websites die óók voor Advertenties België hebben gekozen. Bekijk advertentie formaten..
Laatste Downloads
Onderwerp bekijken
 Onderwerp afdrukken
Autonews Infusion
afoster
Trying to adapt the autonews infusion to php-fusion 8.00.xx and after some trial and error was able to infuse it. I still can't get it to send out emails but at the moment, I am getting the following error message in the error log.

Error
autonews/autonews_include.php
mysql_result() expects parameter 1 to be resource, object given Line: 393

line: 393 shows


$rtn = mysql_result($result, 0);


Can anyone tell me how to fix it?
 
douwe_yntema
mysql_result is deprecated in php5.6 and removed in php 7.0, so it is not recommend to use this function


You should use the function dbcount from maincore

It should be something like:

$rtn = dbcount("somefield", DB_USERS, "autonews='1'")


**
 * Count the number of rows in a table filtered by conditions
 *
 * @global int   $mysql_queries_count
 * @global array $mysql_queries_time
 *
 * @param string $field      Parenthesized field name
 * @param string $table      Table name
 * @param string $conditions conditions after "where"
 *
 * @return boolean
 */
function dbcount($field, $table, $conditions = "") {
    $cond = ($conditions ? " WHERE ".$conditions : "");
    $sql = "SELECT COUNT".$field." FROM ".$table.$cond;
    try {
        $statement = dbconnection()->prepare($sql);
        $statement->execute();
        return $statement->fetchColumn();
    } catch (PDOException $e) {
        trigger_error($e->getMessage(), E_USER_ERROR);
        echo $e;
        return FALSE;
    }
}

Gewijzigd door douwe_yntema op 24 februari 2019, 16:31
 
afoster

Quote

douwe_yntema schreef:

mysql_result is deprecated in php5.6 and removed in php 7.0, so it is not recommend to use this function


You should use the function dbcount from maincore

It should be something like:

$rtn = dbcount("somefield", DB_USERS, "autonews='1'")


**
 * Count the number of rows in a table filtered by conditions
 *
 * @global int   $mysql_queries_count
 * @global array $mysql_queries_time
 *
 * @param string $field      Parenthesized field name
 * @param string $table      Table name
 * @param string $conditions conditions after "where"
 *
 * @return boolean
 */
function dbcount($field, $table, $conditions = "") {
    $cond = ($conditions ? " WHERE ".$conditions : "");
    $sql = "SELECT COUNT".$field." FROM ".$table.$cond;
    try {
        $statement = dbconnection()->prepare($sql);
        $statement->execute();
        return $statement->fetchColumn();
    } catch (PDOException $e) {
        trigger_error($e->getMessage(), E_USER_ERROR);
        echo $e;
        return FALSE;
    }
}


Thank you so much for your help.
 
douwe_yntema
You are welcome.

Please let me know if you get the infusion working. I am interested in it.
 
afoster

Quote

douwe_yntema schreef:

You are welcome.

Please let me know if you get the infusion working. I am interested in it.


No I still can't send any emails and making the change you suggested gave me all kinds of error messages that I do not know how to fix. I am attaching the infusion to this message in the hope you can figure out how get it working. I have it working on php-fusion 7.02.07 but it will not send emails on php-fusion 8.00.21
afoster voegde bij, bestand:
autonews_infusion1.zip [54.49KB / 11 Downloads]
 
douwe_yntema
Without looking in the code my first guess the source of the problem lies in the php-version in stead of the php-fusion version.

I will take a look at your attached files. But not whitin this week.
 
douwe_yntema
On what configuration have you tested the autonews infusion?

I tested it on PHP-Fusion 8.0.20 on PHP 5.6.40 and 5.5.5-10.1.38-MariaDB

It is not running at all.

And next question: On what configuration are you planning to use it?

Just to make sure.
 
afoster

Quote

douwe_yntema schreef:

On what configuration have you tested the autonews infusion?

I tested it on PHP-Fusion 8.0.20 on PHP 5.6.40 and 5.5.5-10.1.38-MariaDB

It is not running at all.

And next question: On what configuration are you planning to use it?

Just to make sure.


I have been using it on two sites running php-fusion 7.02.07 and am trying to adapt it to a site running php-fusion 8.00.21 using php version 5.6.3. I have been able to get it infused but can't get it to send out any email. I am attaching a zip file that contains all the original files of the infusion and I thank you for your offer to help.
afoster voegde bij, bestand:
autonews_infusion1_1.zip [54.49KB / 4 Downloads]
 
douwe_yntema
I Got your infusion working and sending mail.

In file autonews_include.php line 393 must be changed to:


$rtn = dbrows($result);


Furthermore to send mail, it is file autonews_cronjob.php that says:

// To activate this file, set $locale['AN042'] to TRUE and insert a password below
// Use 'http://wwww.mysite.com/infusion/autonews/autonews_cronjob.php?pw=mypassword' from cronjob

But, $locale['AN042'] does not exist. You need to change in file autonews_param.php, line 30 to:

$autonews_params['cronjob'] = TRUE;    // TRUE if cronjob is used - FALSE otherwise


and enter a password in file autonews_cronjob.php in line 24.

Then call the cronjob as state as:
http://wwww.mysite.com/infusion/autonews/autonews_cronjob.php?pw=mypassword

where the password is from autonews_cronjob.php line 24.

of course you need to set up PHP-Fusion correctly for sending mail.

There are some warnings about shoutbox, I infused the shoutbox, but not set it up. Don't know if this need to be digged out deeper.
douwe_yntema voegde bij, afbeelding: (Klik het plaatje voor vergroting!)
schermafdruk_van_2019-03-02_20-50-35.png
 
afoster

Quote

douwe_yntema schreef:

I Got your infusion working and sending mail.

In file autonews_include.php line 393 must be changed to:


$rtn = dbrows($result);


Furthermore to send mail, it is file autonews_cronjob.php that says:

// To activate this file, set $locale['AN042'] to TRUE and insert a password below
// Use 'http://wwww.mysite.com/infusion/autonews/autonews_cronjob.php?pw=mypassword' from cronjob

But, $locale['AN042'] does not exist. You need to change in file autonews_param.php, line 30 to:

$autonews_params['cronjob'] = TRUE;    // TRUE if cronjob is used - FALSE otherwise


and enter a password in file autonews_cronjob.php in line 24.

Then call the cronjob as state as:
http://wwww.mysite.com/infusion/autonews/autonews_cronjob.php?pw=mypassword

where the password is from autonews_cronjob.php line 24.

of course you need to set up PHP-Fusion correctly for sending mail.

There are some warnings about shoutbox, I infused the shoutbox, but not set it up. Don't know if this need to be digged out deeper.


Thanks for your response again douwe_yntema. I was never running a cron job on my other sites, but if that is what it takes to make this work with this version of autonews, then I will do so. I will follow your suggestions and get back to you.
 
Spring naar forum:
Nieuw onderwerp Antwoorden
Gebruik BBcode of HTML om naar; 'Autonews Infusion', te verwijzen!
BBcode:
HTML:
Vergelijkbare onderwerpen
Onderwerp Forum         Laatste bericht
infusion aanpassen via phpmyadmin Infusions : 12 19 feb 2017, 08:28
nieuwe infusion Infusions : 1 18 feb 2017, 23:05
nieuw infusion shoutchat Infusions : 2 01 feb 2015, 15:34
Versie infusion Modificaties : 5 24 sep 2014, 19:59
infusion of mod Infusions : 4 08 dec 2013, 13:57