Coppermine Forum Plugin (cpgforum) - Page 9 Coppermine Forum Plugin (cpgforum) - Page 9
 

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)

Started by foulu, April 01, 2008, 07:46:11 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Αndré

#160
To give messages a link, so you can copy the url from it, open "adaptor/source/topic.view.php"

find:
'{TITLE}'        => $message['subject'],

and replace with:
'{TITLE}'        => "<a href=\"forum.php?topic=$topic_id&start=".floor(($count+$start-1)/$CONFIG['fr_msg_per_page'])*$CONFIG['fr_msg_per_page']."#{$message['msg_id']}\">".$message['subject']."</a>",

Αndré

Reffering to this post, you can extend the bbcode buttons i introduced here:

Quote from: eenemeenemuu on July 11, 2008, 09:14:14 AM
2. Open "adaptor/include/HTMLelement.class.php" and insert just before:
}
?>

function bbcode($form_name) {
$bbcode_tags = array(
"b",
"u",
"i",
"img",
"url",
"email",
);
$html = "";
foreach ($bbcode_tags as $tag)
        $html .= "<input type=\"button\" class=\"button\" value=\"$tag\" onClick=\"javascript:insert('[$tag]', '[/$tag]', '$form_name')\"> ";
return $html;
    }


Replace the function above with this:
function bbcode($form_name) {
$bbcode_tags = array(
"b",
"u",
"i",
"s", //new
"size", //new
"img",
"url",
"email",
"quote", //new
);
$html = "";
foreach ($bbcode_tags as $tag)
        $html .= "<input type=\"button\" class=\"button\" value=\"$tag\" onClick=\"javascript:insert('[$tag]', '[/$tag]', '$form_name')\"> ";
return $html;
    }

bulli

Hiho,

thx for this very fine plugin, but i have a question. You have placed the Forum button in the sys_menu. Is it possible to place the button in the sub_menu?


Best regards

Volker

Αndré

Quote from: bulli on July 28, 2008, 09:39:09 AM
You have placed the Forum button in the sys_menu. Is it possible to place the button in the sub_menu?

Open 'codebase.php', search:
adaptor_sys_user_button('forum.php','Forum','','Forum');
and replace with:
adaptor_sub_user_button('forum.php','Forum','','Forum');

bulli


streetart

Hello

is this forum now avaible with php4?

foulu

Sorry but I'm really not sure if my script can run in php4 platform or not ? May be you must give it a try. My script easy to install & uninstall.

foulu

=====
Notice
=====

I'm finished with this plugin. I don't release new 1.x.x version anymore even it have some addon in my localhost. Yesterday, I downloaded cpg1.5.x and found that my plugin will not work with the future version of coppermine. And after some more studying about PHP world, I will start coding a new forum plugin for cpg1.5.x from blank. But I still use the old database struct & will make a new upgrade script if need. My ideal about the new one is:

- Working in both php4 & php5 platform.
- Well optimizing, nice style.
- Faster than the old version.
- New template system (use pure php to accurate the speed).
- Have own avatar & PM & profile system.
- Have own website (may be ?).
- Not use much object and well separate function.

Well, that's all for now. Comment is welcome !

streetart

Hello

Ok.

I have this error in debug mode: While executing query "SELECT count(*) FROM `cpgx_fr_topics`;" on 0

mySQL error: Table 'db.cpgx_fr_topics' doesn't exist

The admin forum manager works, and I have a Link in the sys menu but only the forum.php are wrong..

the install.sql file

CREATE TABLE IF NOT EXISTS `CPG_fr_boards` (
  `board_id` smallint(5) NOT NULL auto_increment,
  `cat_id` tinyint(4) NOT NULL default '0',
  `child_level` tinyint(4) NOT NULL default '0',
  `parent_id` smallint(5) NOT NULL default '0',
  `board_order` smallint(5) NOT NULL default '0',
  `last_msg_id` int(10) NOT NULL default '0',
  `updated_msg_id` int(10) NOT NULL default '0',
  `name` tinytext NOT NULL,
  `description` text NOT NULL,
  `topics` mediumint(8) NOT NULL default '0',
  `posts` mediumint(8) NOT NULL default '0',
  PRIMARY KEY (`board_id`)
) TYPE=MyISAM COMMENT='forum boards' ;

CREATE TABLE IF NOT EXISTS `CPG_fr_categories` (
  `cat_id` tinyint(4) NOT NULL auto_increment,
  `cat_order` tinyint(4) NOT NULL default '0',
  `name` tinytext NOT NULL,
  PRIMARY KEY  (`cat_id`)
) TYPE=MyISAM COMMENT='forum categories' ;

CREATE TABLE IF NOT EXISTS `CPG_fr_message_icons` (
  `icon_id` smallint(5) NOT NULL auto_increment,
  `title` varchar(80) NOT NULL default '',
  `filename` varchar(80) NOT NULL default '',
  `icon_order` smallint(5) NOT NULL default '0',
  PRIMARY KEY (`icon_id`)
) TYPE=MyISAM COMMENT='forum message icons' AUTO_INCREMENT=14 ;

INSERT INTO `CPG_fr_message_icons`
(`icon_id`, `title`, `filename`, `icon_order`)
VALUES
(1,  'Post', 'icon1', 0),
(2,  'Smile', 'icon2', 1),
(3,  'Big smile', 'icon3', 2),
(4,  'Angry', 'icon4', 3),
(5,  'Cool', 'icon5', 4),
(6,  'Sad', 'icon6', 5),
(7,  'Wink', 'icon7', 6),
(8,  'Comment', 'icon8', 7),
(9,  'Magnify', 'icon9', 8),
(10, 'Icon', 'icon10', 9),
(11, 'Lamp', 'icon11', 10),
(12, 'Bug', 'icon12', 11),
(13, 'Wheel', 'icon13', 12);

CREATE TABLE `CPG_fr_messages` (
  `msg_id` int(10) NOT NULL auto_increment,
  `topic_id` mediumint(8) NOT NULL default '0',
  `board_id` smallint(5) NOT NULL default '0',
  `poster_time` int(10) NOT NULL default '0',
  `poster_id` mediumint(8) NOT NULL default '0',
  `modified_id` int(10) NOT NULL default '0',
  `subject` tinytext NOT NULL,
  `poster_name` tinytext NOT NULL,
  `poster_email` tinytext NOT NULL,
  `poster_ip` tinytext NOT NULL,
  `smileys_enabled` tinyint(4) NOT NULL default '1',
  `modified_time` int(10) NOT NULL default '0',
  `modified_name` tinytext NOT NULL,
  `body` text NOT NULL,
  `icon` varchar(16) NOT NULL default 'xx',
  PRIMARY KEY  (`msg_id`)
) TYPE=MyISAM COMMENT='forum messages' ;

CREATE TABLE `CPG_fr_topics` (
  `topic_id` mediumint(8) NOT NULL auto_increment,
  `is_sticky` tinyint(4) NOT NULL default '0',
  `board_id` smallint(5) NOT NULL default '0',
  `first_msg_id` int(10) NOT NULL default '0',
  `last_msg_id` int(10) NOT NULL default '0',
  `started_member_id` int(8) NOT NULL default '0',
  `updated_member_id` int((8) NOT NULL default '0',
  `poll_id` mediumint(8)  NOT NULL default '0',
  `replies` int(10) NOT NULL default '0',
  `views` int(10) NOT NULL default '0',
  `locked` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`topic_id`)
) TYPE=MyISAM COMMENT='forum topics' ;

INSERT INTO `CPG_config` (name, value) VALUES ('fr_installed', 1);
INSERT INTO `CPG_config` (name, value) VALUES ('fr_guest_browse', 1);
INSERT INTO `CPG_config` (name, value) VALUES ('fr_guest_post', 1);
INSERT INTO `CPG_config` (name, value) VALUES ('fr_display_ctime', 1);
INSERT INTO `CPG_config` (name, value) VALUES ('fr_hot_topic_msg', 20);
INSERT INTO `CPG_config` (name, value) VALUES ('fr_topic_per_page', 20);
INSERT INTO `CPG_config` (name, value) VALUES ('fr_max_msg_size', 20000);
INSERT INTO `CPG_config` (name, value) VALUES ('fr_msg_per_page', 15);


streetart

sry I found the mistake...is a install.txt in a post of you as attachment...thx


Joachim Müller

Quote from: foulu on July 31, 2008, 06:53:52 PM
Yesterday, I downloaded cpg1.5.x and found that my plugin will not work with the future version of coppermine.
Read up http://documentation.coppermine-gallery.net/en/dev_superglobals.htm - that's probably what keeps you from using the forum plugin. You need to sanitize the superglobals properly.

foulu

@Joachim Müller:

Thanks for your help. At first, I read the code to find how to use Inspekt class. But now it is much more easier with the document.

streetart

hello foulu


Topic             Stats             Lastpost
Test              12 Topics        test by test

streetart

sry...I click on enter and the post was posted ....(@cpg-admin:is there possible do make a edit function on this coppermine forum?)

Hey foulu...

Is there possible do display on board view stats only the topics..and not both (topics and posts) ?

foulu

open adaptor/source/index.view.php

find:

    '{STATS}'           => $board['posts'].$lang_fr_index['posts']."<br />".$board['topics'].$lang_fr_index['topics'],

replace with:

    '{STATS}'           => $board['topics'].$lang_fr_index['topics'],

streetart

ah oke...

they are all function in {} in this file?

thx

Joachim Müller

Quote from: streetart on August 02, 2008, 03:29:34 AM
@cpg-admin:is there possible do make a edit function on this coppermine forum?
Has deliberately been disabled due to abuse in the past. Won't come back. It's your task to compose your messages properly.

streetart

hello

@ joachim müller yes its my task, but everyone makes mistakes.. its better when we can edit the post.

@ foulu:
on the board_view: is there possible to display the {PAGE} only on the bottom and the NAvigation only on the top?

foulu

have a look at the template file: themes.inc.php


streetart

yes..but there are one PAGE and when I remove that, than is the page-numbers not showd.

I try do move the PAGE in the <---beginn board footer--> there its display only the word PAGE