Advanced search  

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]

Pages: 1 ... 5 6 7 8 [9] 10 11 12 13 ... 19   Go Down

Author Topic: Coppermine Forum Plugin (cpgforum)  (Read 513156 times)

0 Members and 3 Guests are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Coppermine Forum Plugin (cpgforum)
« Reply #160 on: July 14, 2008, 09:37:13 am »

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

find:
Code: [Select]
'{TITLE}'        => $message['subject'],
and replace with:
Code: [Select]
'{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>",
« Last Edit: July 14, 2008, 10:22:23 am by eenemeenemuu »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Coppermine Forum Plugin (cpgforum)
« Reply #161 on: July 18, 2008, 01:50:06 pm »

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

2. Open "adaptor/include/HTMLelement.class.php" and insert just before:
Code: [Select]
}
?>
Code: [Select]
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:
Code: [Select]
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;
    }
Logged

bulli

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Coppermine Forum Plugin (cpgforum)
« Reply #162 on: July 28, 2008, 09:39:09 am »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Coppermine Forum Plugin (cpgforum)
« Reply #163 on: July 28, 2008, 10:06:23 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:
Code: [Select]
adaptor_sys_user_button('forum.php','Forum','','Forum');and replace with:
Code: [Select]
adaptor_sub_user_button('forum.php','Forum','','Forum');
Logged

bulli

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Coppermine Forum Plugin (cpgforum)
« Reply #164 on: July 28, 2008, 03:24:56 pm »

thx again
Logged

streetart

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Coppermine Forum Plugin (cpgforum)
« Reply #165 on: July 31, 2008, 04:47:08 pm »

Hello

is this forum now avaible with php4?
Logged

foulu

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 236
  • uhm
Re: Coppermine Forum Plugin (cpgforum)
« Reply #166 on: July 31, 2008, 06:41:41 pm »

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

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 236
  • uhm
Re: Coppermine Forum Plugin (cpgforum)
« Reply #167 on: July 31, 2008, 06:53:52 pm »

=====
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Coppermine Forum Plugin (cpgforum)
« Reply #168 on: July 31, 2008, 07:43:08 pm »

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

Code: [Select]
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);
Logged

streetart

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Coppermine Forum Plugin (cpgforum)
« Reply #169 on: July 31, 2008, 07:45:43 pm »

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

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Coppermine Forum Plugin (cpgforum)
« Reply #170 on: August 01, 2008, 06:18: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.
Logged

foulu

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 236
  • uhm
Re: Coppermine Forum Plugin (cpgforum)
« Reply #171 on: August 01, 2008, 06:35:41 pm »

@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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Coppermine Forum Plugin (cpgforum)
« Reply #172 on: August 02, 2008, 03:27:15 am »

hello foulu


Topic             Stats             Lastpost
Test              12 Topics        test by test
Logged

streetart

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Coppermine Forum Plugin (cpgforum)
« Reply #173 on: August 02, 2008, 03:29:34 am »

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) ?
Logged

foulu

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 236
  • uhm
Re: Coppermine Forum Plugin (cpgforum)
« Reply #174 on: August 02, 2008, 06:51:27 am »

open adaptor/source/index.view.php

find:

Code: [Select]
    '{STATS}'           => $board['posts'].$lang_fr_index['posts']."<br />".$board['topics'].$lang_fr_index['topics'],
replace with:

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

streetart

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Coppermine Forum Plugin (cpgforum)
« Reply #175 on: August 02, 2008, 12:48:26 pm »

ah oke...

they are all function in {} in this file?

thx
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Coppermine Forum Plugin (cpgforum)
« Reply #176 on: August 02, 2008, 02:35:10 pm »

@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.
Logged

streetart

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Coppermine Forum Plugin (cpgforum)
« Reply #177 on: August 02, 2008, 04:18:42 pm »

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?
Logged

foulu

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 236
  • uhm
Re: Coppermine Forum Plugin (cpgforum)
« Reply #178 on: August 02, 2008, 04:57:20 pm »

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

streetart

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Coppermine Forum Plugin (cpgforum)
« Reply #179 on: August 02, 2008, 10:30:37 pm »

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
Logged
Pages: 1 ... 5 6 7 8 [9] 10 11 12 13 ... 19   Go Up
 

Page created in 0.041 seconds with 20 queries.