Coppermine forum plugin (cpgforum) for cpg1.5.x - Page 4 Coppermine forum plugin (cpgforum) for cpg1.5.x - Page 4
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Coppermine forum plugin (cpgforum) for cpg1.5.x

Started by Αndré, May 08, 2010, 09:51:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jmcreis

Here is the portuguese language for the foulu's forum plugin.

http://euroweblink.com/software/portuguese.zip

Unzip and upload for the languages folder under the plugin location (not the lang folder of the gallery)
Nothing need to do in Forum administration.
As you change the language of the gallery, the Forum changes automatically.

Feedback is apreciated
Grettings

TheOneAndOnly

Any change concerning the problem of newline characters?  :-[

Is it ok/good idea to comment out the escape-function in /libraries/Database.php, as someone mentioned?

    function escape_str($str) {   
        if (get_magic_quotes_gpc()) {
            return $str;
        }
        if (function_exists('mysql_real_escape_string')) {
            return mysql_real_escape_string($str, $this->conn_id);
        } elseif (function_exists('mysql_escape_string')) {
            return mysql_escape_string($str);
        } else {
            return addslashes($str);
        }
    }


The forum works otherwise very good, (apart from this single problem).
I have also created a Swedish translation.

Αndré

It's definitely no good idea to comment out the whole escape function. It would be better to add some checks to that function, so it works properly. As the error doesn't occur on my testbeds, it's hard to fix it. Ideally I'd need ftp access to someones gallery where I can create the fix. If someone is ready to do this, please let me know. I'll give you my contact details. Please don't post that data publicly!

Quote from: TheOneAndOnly on February 04, 2011, 06:08:51 PM
I have also created a Swedish translation.
Please attach it as zip file to your next reply.

TheOneAndOnly

I really need help with this, because I've already deleted my previous forum.
Are not sure how and what to change in the function, to get it to appear better.

Instead of:
Quote
QuoteHi
how
are you
.. i´m getting:
QuoteHi\r\nhow are you

(see attached picture)

P.s. I have very little left on the Swedish translation, before I can share it.

sharpo

Quote from: TheOneAndOnly on February 05, 2011, 02:53:10 PM
I really need help with this, because I've already deleted my previous forum.
Are not sure how and what to change in the function, to get it to appear better.
I've not had the problem with new lines.

My forum is version 2, which is the latest, and has not been modified in any way.

Just set it so guests can post - if you want to try it (will reset that option in a day or two)

http://www.sharpo.co.uk/cpg15test/forum.php?c=topic&id=13
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

TheOneAndOnly


TheOneAndOnly

One more thing ...
How can I make the forum a bit wider?  :-[

Αndré

Quote from: TheOneAndOnly on February 05, 2011, 02:53:10 PM
I really need help with this
Quote from: Αndré on February 05, 2011, 10:15:21 AM
As the error doesn't occur on my testbeds, it's hard to fix it. Ideally I'd need ftp access to someones gallery where I can create the fix.


Quote from: TheOneAndOnly on February 05, 2011, 09:45:09 PM
How can I make the forum a bit wider?
Adjust Config - Image view - Width of the table for file display to your needs.

klauswr

Quote from: Αndré on February 07, 2011, 11:52:45 AM
As the error doesn't occur on my testbeds, it's hard to fix it. Ideally I'd need ftp access to someones gallery where I can create the fix.

Hi André,

I have the save problem with \\r\\n\\r\\n in my forum.

It is not browser specific. Well - I could give you ftp access to my forum. What are you going to do then ;-)

First of all try out http://album.klauswr.de/forum.php?c=board&id=2  (I would not like to present the username and password here - so please let me know how to get to you more privately).

Klaus

Αndré

Hello Klaus,

I already got access to a gallery where the problem occurs, but unfortunately hadn't found time yet to work on the issue. Maybe I can do that today. I'll let you know as soon as I have a solution.

klauswr

Quote from: Αndré on February 14, 2011, 10:51:35 AM
Hello Klaus,

I already got access to a gallery where the problem occurs, but unfortunately hadn't found time yet to work on the issue. Maybe I can do that today. I'll let you know as soon as I have a solution.

What about:

// based on some wordpress code

$str = str_replace(array("\r\n", "\r"), "\n", $str); // cross-platform newlines

$str = preg_replace("/\n+/", "\n", $str); // take care of duplicates



// and then explode it

$arr = explode("\n", $str);

Αndré

Problem happens when magic_quotes_gpc is disabled. In that case the input will be escaped twice thanks to the use of getEscaped and escape_str.

All having this issue please apply the changes of svn revision 8174 and report if it works for you.

TheOneAndOnly

Quote from: Αndré on February 14, 2011, 03:34:35 PM
Problem happens when magic_quotes_gpc is disabled. In that case the input will be escaped twice thanks to the use of getEscaped and escape_str.

All having this issue please apply the changes of svn revision 8174 and report if it works for you.
That did the trick for me.  ;D
It works great. Thanks!

TheOneAndOnly

I just noticed a very strange thing.
When i edit/change a rather big/large post, over half the text gets deleted when i git the change-button.

I thought that it was a wrong type (varchar) for the "body" in the database, but it was correct "text".
How can it be that half of the text gets deleted when i change a post with much text/rows?

Αndré

It just happens when editing the post, not when you initially write the post, right? Can you please do some more testing, e.g. as from how much characters the issue occurs? Thanks.

TheOneAndOnly

Quote from: Αndré on February 14, 2011, 05:59:38 PM
It just happens when editing the post, not when you initially write the post, right?
Correct!

klauswr

Quote from: Αndré on February 14, 2011, 03:34:35 PM
Problem happens when magic_quotes_gpc is disabled. In that case the input will be escaped twice thanks to the use of getEscaped and escape_str.

All having this issue please apply the changes of svn revision 8174 and report if it works for you.

Seems to work ... switch of global magic quotes setting works as well.

Thanks!

klauswr


klauswr

Ooops, found it at the bottom aof the thread! Sorrry!

Αndré

Quote from: TheOneAndOnly on February 14, 2011, 05:16:34 PM
When i edit/change a rather big/large post, over half the text gets deleted when i git the change-button.

Please have a look at the forum setting
Quote from: forum.php?c=admin&m=settingMaximum character allowed in message (0 to disable)