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

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 2 Guests are viewing this topic.

KyleClarkeNZ

Hi

Is this plugin still in active development or is it just by contribution? If it is, is there a list of work items that i can at least attempt to work on? (my skill base is very basic) I've implemented this forum on two sites and am pretty keen to have some the planned features completed. Specifically the new posts indicators and pming.

Would love to help in any way i can.

Kyle

KyleClarkeNZ

I've been playing around with using the PMS plug-in to plug the hole in the forum plug-in. However now I was wondering if someone could help me move the "forum profile" back in to the normal profile.php.

I read on the 1.4.x version's forum topic that the original author didn't want to implement this change as it edited core files. However, I'm sure that this can be done by modding the plug-in and avoiding the core profile.php all together. Can someone please help?

mahdi1234

Quote from: KyleClarkeNZ on May 17, 2012, 03:53:26 AM
Specifically the new posts indicators and pming.

Don't know if you've already started anything on this or not, anyway, I have implemented new posts notification on my site. Though it's very highly customized site, and I've changed lots of things, if you're interested I can share with you either high-level how I did it or even details (I've also made sort-order of posts user-defined to be asc/desc).

As for PM's - I'm using PMS plugin, don't use forum profile at all. I've linked that basically to the user profile (as does PMS on its own), so it points to the same location both from gallery/forum for the same user experience.

cheers ...

KyleClarkeNZ

I'd love to see what you've done with the new posts since last login indicators. It would be good if someone who really knows what they're doing can incorporate your solution back in to the forum plugin itself.

I've also incorporated the pms plugin. I think I've got it all hacked together quite nicely (just waiting on some help in another thread to hack together a custom indicator for it)

I'd love if we could cross pollinate our ideas.

Im typing this on my phone at work, but when I get home I can pm your some screens of my solutions (non of my changes are live yet)

Cheers,

Kyle

mahdi1234

Basically my solution is built on few prerequisites -

- I have only one board and completely dumped forum front page and linking directly to forum.php?c=board&id=1 for all forum interaction
- I have limited number of users (~70), not sure how my solution would work with thousands users and then I guess it would not be the best for sure
- I have limited number of threads, more or less, meaning user can create new topic, but I try to moderate and move related stuff to existing topics, again with thousands or maybe even hundreds of topics, db desing shall probably be different.

For DB part - I've extended cpg_fr_topics with following

- each topic has additional columns `id_x` where x = UID and it holds `last_msg_id` of topic when user last visited topic
- additional row `topic_id` = 0 which holds in `last_msg_id` time of absolute last message and each `id_x` holds time of last visit to forum.php?c=board&id=1

Now, if `id_x` < `last_msg_id` for `topic_id` = 0 then main gallery menu is highlighted so user knows new posts are present in the forums - see forum_highlight.png

Once main menu is clicked, those topics with new post are marked with red icon - see forum_unread.png ... also users is the redirected to the first unread post in the particular topic.

I can post the code as well, but as I mentioned it's quite mess and I made it for my needs, but should be able to go through git and find relevant parts in few days once I have some more time.

cheers

Αndré

Version 2.1-beta9 (attached to initial post) includes now a captcha feature. It depends on the Coppermine config setting "Display Captcha (Visual Confirmation) for adding comments".

sharpo

I have a test coppermine gallery with the forum installed, it was beta7.

Just updated to 1.5.20 and was making sure everything worked, then I noticed that some forum links did not work - those that included "board" in the url. Checking this topic I noticed beta9 had been released, so installed that.

Problem solved, until I tried adding a post which included an apostrophe. Kept getting an error message. Tried a simple post with the word test as subject and test as message. That worked fine, so tried another simple post which included the word "can't". It gives an error - doesn't like the apostrophe. Remove the apostrophe and type "cant" and it works.

Hope I have explained the problem well enough?

http://www.sharpo.co.uk/cpg15test/forum.php?c=topic&id=22
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

sharpo

Following on from the previous post, I have set it so that guests can post, then you can see what the error message is.
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

Αndré

Undo that changes: http://coppermine.svn.sourceforge.net/viewvc/coppermine?view=revision&revision=8174

Apply that changes as soon as possible, as your gallery is currently vulnerable because of the unescaped strings. It seems that I need to find a better solution with the escape_str function.

sharpo

Quote from: Αndré on June 26, 2012, 09:24:20 AM
Undo that changes: http://coppermine.svn.sourceforge.net/viewvc/coppermine?view=revision&revision=8174

Apply that changes as soon as possible, as your gallery is currently vulnerable because of the unescaped strings. It seems that I need to find a better solution with the escape_str function.
I'll uninstall the forum plugin for now. Will that make it safe until you find a solution?
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

Αndré

Don't expect a short fix. If you read this thread you'll see that there has been already a lot of trouble with the escape_str function. Instead of uninstalling the forum plugin, I'd suggest to use the following fix, as get_magic_quotes_gpc() seems to return a wrong value or magic_quotes_gpc doesn't work as expected at your server.

Open forum/libraries/Database.php, find
        if (get_magic_quotes_gpc()) {
            return $str;
        }

and remove it completely. Please report if that works as expected.

sharpo

Quote from: Αndré on June 26, 2012, 11:41:10 AM
Don't expect a short fix. If you read this thread you'll see that there has been already a lot of trouble with the escape_str function. Instead of uninstalling the forum plugin, I'd suggest to use the following fix, as get_magic_quotes_gpc() seems to return a wrong value or magic_quotes_gpc doesn't work as expected at your server.

Open forum/libraries/Database.php, find
        if (get_magic_quotes_gpc()) {
            return $str;
        }

and remove it completely. Please report if that works as expected.
Just tried it and the apostrophe (') is now accepted, thanks.

Do I still need to do that editing as detailed in revision 8174?
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

Αndré


KyleClarkeNZ

my page: http://nzgc.co.nz

I was wondering if anyone could help me adding the users forum avatar next to their post in the "last post info" part on the main page there.

As you can see, i've gotten pretty far with figuring out different parts of this plugin and coppermine in general. But I don't really understand that whole something->somethingElse syntax. Any help would be appreciated.

I promise I'm not just here to ask support (I have contributed some code, albeit it answered my own query on a different thread, but at least I contributed my solution back to the community)

One last request, is there any indication as to when the "new posts" feature will be worked on? This one is doing my head in. I just can't even begin to think of a solution to this.

thank you for your help, and your contribution to the community.

Kyle

Αndré

Quote from: KyleClarkeNZ on July 23, 2012, 11:33:23 AM
my page: http://nzgc.co.nz
You should upgrade your outdated gallery asap.


Quote from: KyleClarkeNZ on July 23, 2012, 11:33:23 AM
I was wondering if anyone could help me adding the users forum avatar next to their post in the "last post info" part on the main page there.
Where exactly (left, right, ...)?


Quote from: KyleClarkeNZ on July 23, 2012, 11:33:23 AM
I don't really understand that whole something->somethingElse syntax
See http://en.wikipedia.org/wiki/Object-oriented_programming


It seems that you already found the corresponding code part? If so, please post which file/line.


Quote from: KyleClarkeNZ on July 23, 2012, 11:33:23 AM
is there any indication as to when the "new posts" feature will be worked on?
Honestly, I haven't worked on this plugin in the last months and I don't think that I'll do in the next months (if at all).

KyleClarkeNZ

Quote from: Αndré on July 23, 2012, 12:17:50 PM
You should upgrade your outdated gallery asap.
new features, or security?

Quote from: Αndré on July 23, 2012, 12:17:50 PM
Where exactly (left, right, ...)?

on the left, ideally like this: http://www.tgforums.co.uk/forum/

as for the code, it seems to be here: plugins/forum/forum/templates/classic/home/index_view.php
foreach ($categories as $k => $category) {
    echo table::open();
    echo table::td(html::category_anchor($category['id'], $category['name']), 5);
    echo table::tds(array(
        array('class'=>'tableh2', 'width'=>'0%', 'align'=>'center', 'text'=>'&nbsp;'),
        array('class'=>'tableh2', 'width'=>'50%', 'text'=>html::bold(Lang::item('home.forum_name'))),
        array('class'=>'tableh2', 'width'=>'5%',' align'=>'center', 'text'=>html::bold(Lang::item('home.topics'))),
        array('class'=>'tableh2', 'width'=>'5%',' align'=>'center', 'text'=>html::bold(Lang::item('home.replies'))),
        array('class'=>'tableh2', 'width'=>'40%', 'text'=>html::bold(Lang::item('home.l_post_info'))),
    ));
    foreach ($category['boards'] as $board) {
        echo table::tds(array(
            array('class'=>'tableb', 'align'=>'center', 'text'=>html::img($board['icon'])),
            array('class'=>'tableb', 'valign'=>'top', 'text'=>html::board_anchor($board['id'], $board['name']).'<br />'.($board['description'] ? html::span($board['description']) : '')),
            array('class'=>'tableb', 'align'=>'center', 'text'=>$board['topics']),
            array('class'=>'tableb', 'align'=>'center', 'text'=>$board['replies']),
            array('class'=>'tableb', 'text'=>($board['last_post_title'] ? html::span(sprintf(Lang::item('home.last_post_title'), html::message_anchor($board['last_post_id'], $board['last_post_title']), time::decode($board['last_post_time']), html::profile_anchor($board['last_post_author_id'], $board['last_post_author_name']))) : '')),
        ));
        if ($board['childs']) {
            echo table::td(html::span(html::bold(Lang::item('home.child_boards')).forum::child_board_list($board['childs'])), 5, 'tablef');
        }
    }
    if (count($category['boards']) == 0) {
        echo table::td(Lang::item('home.no_board'), 5, 'tableb');
    }
    echo table::close();
    echo html::spacer();
}


Quote from: Αndré on July 23, 2012, 12:17:50 PM
Honestly, I haven't worked on this plugin in the last months and I don't think that I'll do in the next months (if at all).

real shame, it's quite a good plugin, sans the missing features. Well thank you for the work you have done. I have faith someone will pick it up. I'll check out that link, and experiment with my own installation. Maybe I can contribute something back.

Αndré

Quote from: KyleClarkeNZ on July 23, 2012, 12:41:06 PM
new features, or security?
First of all for security reasons. See the announcements threads for more detailed information, or just install the currently latest stable release, cpg1.5.20.

KyleClarkeNZ

if anyone is able to work on the unread posts feature. I've found this post about popular methods of handling this kind of query. There's also some examples.

http://stackoverflow.com/questions/2288814/php-forums-how-to-cope-with-unread-discussions-topics-posts

allvip

I am the admin of the forum,but in forum manager I can not delete topics.I can delete only category and bords.

1.How can I delete a topic?
2.Why I can not Insert ',? and other like this in the topic name?
3.How can I remove confirmation lettters.I want users to post topics and reply without confirmation letters.

my forum:


http://allvip.us/gallery/forum.php

Thanks

ninouee

Hello,

Excuse me for the mistake i can do in english, il dont speack or write withe your langage for 10 years.  ;)

I instal the forum plugin in my gallery in 1.5.20 version and the file of the forum was the file in the first message.

Withe the forum plugin i can't create message, subjecte, i juste see the last message.

You can find the adress of the forum => http://ddstvavatarland.free.fr/forum.php

And a picture of my screen:

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fi75.servimg.com%2Fu%2Ff75%2F10%2F06%2F29%2F69%2Fforum_10.png&hash=82759906c4c0075a2af2873f723a0ddb4232e791)

Thank you for reading my message

Good by and thank you for the plugin.