Codoforum related discussions

Post all your questions and problems related to codoforum here .

384
1

Hello all,

I'm running the excellent @nguoianphu's XML Sitemap Generator .

Unfortunatly, the script takes more time than my host's mysql_timeout setting. So MySQL server goes away...

Here is the log of the script:

Start crawling your website ...
Crawling ...
It may take a long time. Please wait ...
Openning [...]/sitemap.xml
Created [...]/sitemap.xml

Warning: PDO::prepare(): MySQL server has gone away in [...]/sys/CODOF/Session/Session.php on line 57

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in [...]/sys/CODOF/Session/Session.php:57 Stack trace: #0 [...]/sys/CODOF/Session/Session.php(57): PDO->prepare('SELECT session_... ' ) #1 [...]/sys/CODOF/Session/Session.php(76): CODOF\Session\Session->read('a3743d6ea0487d4...' ) #2 [internal function]: CODOF\Session\Session->write('a3743d6ea0487d4...', '5572dbc932d50_c...' ) #3 [internal function]: session_write_close() #4 {main} thrown in [...]/sys/CODOF/Session/Session.php on line 57

Crawled and Created sitemap.xml
Pinging sitemap to Google, Bing, Yandex ...
Pinging Google ...
Pinging Bing ...
Pinging Yandex ...
Done

I've found several idea but I don't know how to implement the workaround, please check here for example: http://stackoverflow.com/questions/23244462/how-do-i-ping-the-mysql-db-and-reconnect-using-pdo
I guess the exception should be caught, but how and where?

Please help,

Reynald

183
2
Trams posted Aug 9 '15 at 5:39 pm

Hi.
If you choose notification level 1-4 in category. Then in the profile.
55c7812567129.png
go to the link you will get the result
55c7815750b29.png

55c7816978c62.png

should be a link - codologic.com/forum/index.php?u=/category/news-and-announcements ?

and cannot be removed.

recent by RolluS  ·  Aug 10 '15 at 9:22 pm
245
1
stekendak posted Aug 3 '15 at 8:56 am

Hi, when i try to access to my forum i get the below error and i don't know why....


Warning: file_put_contents(/home/u109713535/public_html/cache/HB/compiled/f26a61d95cfcc4520a30e85c1b927d2d.php): failed to open stream: No such file or directory in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 113

Warning: include(/home/u109713535/public_html/cache/HB/compiled/f26a61d95cfcc4520a30e85c1b927d2d.php): failed to open stream: No such file or directory in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 116

Warning: include(): Failed opening '/home/u109713535/public_html/cache/HB/compiled/f26a61d95cfcc4520a30e85c1b927d2d.php' for inclusion (include_path='.:/opt/php-5.5/pear') in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 116

Fatal error: Function name must be a string in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 117

I'm not sure to have do something that can allow this

here is my Render.php file code and i have never edit it

<?php

/*
 * @CODOLICENSE
 */

namespace CODOF\HB;

class Render {

    /**
     * Gets Handlebars template for required page
     * @param string $tpl
     * @return string
     */
    public static function get_template_contents($tpl) {

        $path = CURR_THEME_PATH . 'templates/' . $tpl . '.html';

        if (!file_exists($path)) {

            $path = DEF_THEME_DIR . 'templates/' . $tpl . '.html';
        }

        return file_get_contents($path);
    }

    /**
     * Get data for building DOM from Handlebars template
     * @param string $tpl
     * @return array
     */
    public static function get_template_data($tpl) {

        $i18ns = array("find topics tagged", "new", "new replies", "replies", "views", "posted", "read more", "recent by", "Edit", "Delete", "Mark as spam");

        switch ($tpl) {

            case 'forum/topics' :
                $i18ns[] = "new topic";
                break;
            case 'forum/category' :
                break;
            case 'forum/topic' :
                $i18ns[] = 'reply';

            case 'moderation/queue':
                $i18ns[] = 'Approve';
                $i18ns[] = 'Delete';
        }

        $trans = array();
        foreach ($i18ns as $i18n) {

            $trans[$i18n] = _t($i18n);
        }


        return array(
            "const" => self::get_required_constants(),
            "i18n" => $trans
        );
    }

    /**
     * Get required constants for javascript
     * @return array
     */
    public static function get_required_constants() {

        return array(
            "RURI" => RURI,
            "DURI" => DURI,
            "CAT_IMGS" => CAT_IMGS,
            "CAT_ICON_IMGS" => CAT_ICON_IMGS,
            //"DEF_AVATAR" => DEF_AVATAR,
            "CURR_THEME" => CURR_THEME,
            "DEF_THEME_PATH" => DEF_THEME_PATH
        );
    }

    /**
     * Generate HTML from Handlebars template
     * @param string $tpl
     * @param array $data
     */
    public static function tpl($tpl, $data) {

        $raw = self::get_template_contents($tpl);
        $hash = md5($raw);

        $cachedPath = ABSPATH . 'cache/HB/compiled/' . $hash . '.php';

        if (!file_exists($cachedPath)) {

            $contents = \LightnCandy::compile($raw, array(
                        'flags' => \LightnCandy::FLAG_ERROR_LOG | \LightnCandy::FLAG_STANDALONE | \LightnCandy::FLAG_HANDLEBARS,
                        "helpers" => array(
                            "const" => function($args) {
                                //single argument call
                                return constant($args[0]);
                            },
                            "i18n" => function($args) {

                                return _t($args[0]);
                            },
                            "hide" => function($args) {
                                return "";
                            }
                        )
            ));

            file_put_contents($cachedPath, $contents);
        }

        $renderer = include $cachedPath;
        return $renderer($data);
    }

}
429
7

I have set up codoforum (version 3.3.1) in a hosted environment and am trying (and failing) to have it send out mails using ssl.

My test scenario is the reset password token page.

When I enter a username (or email address) and klick on the "E-mail reset token" button, the ajax loader appears but nothing else happens - no error messages, no email delivery.

mail_type: smtp
smtp_protocol: ssl
smtp_port: [port given by provider]
smtp_username: [username given by provider]
smtp_password: [password given by provider]

I have tested the combination of [password], [username] and [port] with a normal email client and they work fine there.

Any suggestions as to how to solve this?

What are other available options for the value of smtp_protocol that I could test?

Thx.

Update: The solution is to use

smtp_protocol: tls
recent by Biggles  ·  Aug 4 '15 at 11:20 am
334
10

Hi,

When I try to upload the picture and post the topic, the picture uploads fine but when I click the post button, it just waits for ever and ever and the topic is not posted.

I have an important presentation tomorrow and this is not working! OMG!

I checked in the DB and the image is uploaded and topic is created in the topics table, but not in the posts table.

the documentation says:

The PHP gd extension is required to support avatar uploading.

My installation has php_gd2, is that the same?
Also - is php_opcache required?

Any Ideas?

Thanks,

Avinoam

recent by Avinoam  ·  Aug 3 '15 at 9:51 am
449
9
RolluS posted Jul 27 '15 at 11:41 pm

Hello,

I've set up Codoforum for production, and I'm very please with the result, thank you very much for this product!

On my website, a lot of technical stuff is presented in posts, please check an exemple here.

My main concern at the moment is table representation.

Here is a table in Markdown:

|     | A   | B   |
| --- | --- | --- |
| 1   | A1  | B1  |
| 2   | A2  | B2  |
| 3   | A3  | B3  |

Result:

Here is another one:

| Blank | Column A | Column B |
| ----- | -------- | -------- |
| Row 1 | Cell A1  | Cell B1  |
| Row 2 | Cell A2  | Cell B2  |
| Row 3 | Cell A3  | Cell B3  |

Result:

Blank Column A Column B
Row 1 Cell A1 Cell B1
Row 2 Cell A2 Cell B2
Row 3 Cell A3 Cell B3

Line aren't drawn, this is difficult to read smile

It is not as bad in preview:
55b6b296ab31e.png
55b6b29af280b.png

(hum, that would be nice to click the picture to have it opened in a new windows in its saved resolution)

Here is one in BBCode:
Oups, BBCode seems not parsed, that's not an issue for me as Markdown suits my needs (the tip in the editor may be updated).

I don't know if I'm doing something wrong, but I would be very pleased to be able to draw nice tables..

Keep up the good work!

Reynald

A B
1 A1 B1
2 A2 B2
3 A3 B3
3 A3 B3
recent by RolluS  ·  Aug 2 '15 at 9:50 pm
119
0

Si vous avez choisi la langue française

Vous remarqueriez que le champ "Créer un nouveau sujet" ne fonctionne pas normalement comme il se doit.

La solution:
/sites/default/locale/fr_FR/fr_FR.php
ligne 163, changer par :

'No more topics to display!' => 'Pas d\\\'autre sujet à afficher!',

Il faut ajouter les deux autres antislash, pour qu'il s'affiche un antislash dans le code javascript qui génère la variable : CODOFVAR

339
1

I install the folder codoforum in my server and and try to install about the browser as it schould be. But i get that information when i was fill up in step 2 and go forward.
Unable to require /www/htdocs/xxxxxxx/dj-blogs.com/codoforum/sys//JsonSerializable.php

after i was reading here in forum that i need newest php versin 5.4 i check it and i have 5.4 so i read more and i finde out that any user wrote i need 5.5 so i update my php to new 5.5 i have and all is fine.
I was delete the folder and instal new on server and again in step 2 after i fill up all i get same error information

Unable to require /www/htdocs/xxxxxxx/dj-blogs.com/codoforum/sys//JsonSerializable.php
so what i did wrong or where is the problem that i cant install codoforum
Thanks for help

Update: i found the mistake!! i change the .htacces in top check the php number what is written down change to 5.4 or 5.5 importand what you use

909
4.41k
22
Sub Categories
Actions
Hide topic messages
Enable infinite scrolling
Previous
Next
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft