Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pages and comments plugin
#74
Hi,

I did a small update to make comments working with plugins like News Manager and GS Blog where all posts content is displayed in a page with the same slug.
Example: for News Manager I define a page with a slug 'news'. Current pages & comments version rely on slug to store and show comments. Therefore all comments for all news are stored in news.xml, i.e. we cannot have separate comments for different news.

The update is to store news related comments to separated xml files like 'newspost1.xml', 'newspost2.xml, etc.
1. In pages_comments.php, function sv_pages_first, line 249
PHP Code:
$fich=return_page_slug();
$log_name $fich.'.log'
change to
PHP Code:
$fich=return_page_slug();
$post = isset($_GET['post']) ? $_GET['post'] : '';
$log_name $fich.$post.'.log'

2. In pages_comments.php, function sv_pages, line 309
PHP Code:
$fich=return_page_slug();
$log_name $fich.'.log'
change to
PHP Code:
$fich=return_page_slug();
$post = isset($_GET['post']) ? $_GET['post'] : '';
$log_name $fich.$post.'.log'

In addition, if we don't need comments on search page (slug 'news' without 'post' parameter) we have to disable comments in code
3. In pages_comments.php, function sv_pages_first, line 277
PHP Code:
if ($com =='Y') { 
change to
PHP Code:
if ($com =='Y' && isset($_GET['post'])) { 

Note that point 3 disables comments on all regular pages which do not manage parameter 'post', therefore it can be ignored.

If you find it useful you may add this beahviour in next version.

Best regards,
Zhivko

P.S. I forgot to mention that this update works with Friendly URL disable. I'll try to figure out how to make it wuork with Friendly URL soon.
Reply


Messages In This Thread
Pages and comments plugin - by cumbe - 2012-04-10, 05:24:35
RE: Pages and comments plugin - by mprofitl - 2012-12-10, 07:51:11
RE: Pages and comments plugin - by inteltone - 2013-02-25, 21:13:50
RE: Pages and comments plugin - by cumbe - 2013-02-27, 17:20:31
RE: Pages and comments plugin - by inteltone - 2013-03-02, 13:25:28
RE: Pages and comments plugin - by Thomas_ - 2013-03-05, 05:23:45
RE: Pages and comments plugin - by cumbe - 2013-03-06, 02:49:39
RE: Pages and comments plugin - by cumbe - 2013-03-17, 05:21:43
RE: Pages and comments plugin - by Oleg06 - 2013-03-17, 17:24:57
RE: Pages and comments plugin - by Christian - 2013-04-22, 04:44:28
RE: Pages and comments plugin - by cumbe - 2013-04-22, 16:27:28
RE: Pages and comments plugin - by Christian - 2013-04-22, 18:05:08
RE: Pages and comments plugin - by cumbe - 2013-04-22, 20:32:15
RE: Pages and comments plugin - by Christian - 2013-04-22, 20:38:17
RE: Pages and comments plugin - by virtù - 2013-06-10, 19:34:10
RE: Pages and comments plugin - by cumbe - 2013-06-14, 00:24:20
RE: Pages and comments plugin - by shawn_a - 2013-06-14, 03:19:55
RE: Pages and comments plugin - by shawn_a - 2013-06-14, 04:44:38
RE: Pages and comments plugin - by Oleg06 - 2013-06-14, 06:08:17
RE: Pages and comments plugin - by shawn_a - 2013-06-14, 06:11:29
RE: Pages and comments plugin - by cumbe - 2013-06-14, 21:45:53
RE: Pages and comments plugin - by shawn_a - 2013-06-15, 01:37:37
RE: Pages and comments plugin - by Oleg06 - 2013-06-15, 03:20:40
RE: Pages and comments plugin - by suntrop - 2013-06-15, 03:44:31
RE: Pages and comments plugin - by cumbe - 2013-06-16, 02:47:31
RE: Pages and comments plugin - by suntrop - 2013-06-16, 08:32:46
RE: Pages and comments plugin - by shawn_a - 2013-06-15, 11:52:16
RE: Pages and comments plugin - by cumbe - 2013-06-16, 17:25:44
RE: Pages and comments plugin - by karel - 2013-07-03, 07:06:44
RE: Pages and comments plugin - by cumbe - 2013-07-04, 06:54:54
RE: Pages and comments plugin - by karel - 2013-07-05, 01:15:21
RE: Pages and comments plugin - by cumbe - 2013-07-05, 07:20:40
RE: Pages and comments plugin - by cumbe - 2013-07-05, 08:11:17
RE: Pages and comments plugin - by karel - 2013-07-05, 17:17:42
RE: Pages and comments plugin - by cumbe - 2013-07-06, 00:35:34
RE: Pages and comments plugin - by Oleg06 - 2013-07-06, 01:23:18
RE: Pages and comments plugin - by Schamass - 2013-07-18, 22:05:51
RE: Pages and comments plugin - by zhivko - 2013-09-14, 04:23:44
RE: Pages and comments plugin - by cumbe - 2013-09-16, 06:46:17
RE: Pages and comments plugin - by JaceX - 2013-10-28, 04:19:51
RE: Pages and comments plugin - by cumbe - 2013-10-30, 04:01:10
RE: Pages and comments plugin - by kasztelan - 2013-11-18, 01:16:48
RE: Pages and comments plugin - by cumbe - 2013-11-18, 03:05:34
RE: Pages and comments plugin - by kasztelan - 2013-11-18, 04:38:30
RE: Pages and comments plugin - by TeeJay - 2013-11-24, 04:53:09
RE: Pages and comments plugin - by cumbe - 2013-11-25, 01:46:02
RE: Pages and comments plugin - by TeeJay - 2013-11-25, 04:45:15
RE: Pages and comments plugin - by cumbe - 2013-12-14, 23:16:18
RE: Pages and comments plugin - by cumbe - 2013-12-16, 03:29:50
RE: Pages and comments plugin - by xxdex - 2014-04-05, 19:39:14
RE: Pages and comments plugin - by Timbow - 2014-04-06, 02:28:31
RE: Pages and comments plugin - by cumbe - 2014-04-06, 18:52:33
RE: Pages and comments plugin - by TeeJay - 2014-04-06, 04:12:40
RE: Pages and comments plugin - by leeyo - 2014-04-14, 23:54:15
RE: Pages and comments plugin - by cumbe - 2014-04-15, 02:54:03
RE: Pages and comments plugin - by Christian - 2014-04-23, 06:32:11
RE: Pages and comments plugin - by leeyo - 2014-04-15, 05:39:19
RE: Pages and comments plugin - by leeyo - 2014-04-16, 08:26:00
RE: Pages and comments plugin - by leeyo - 2014-04-23, 16:00:59
RE: Pages and comments plugin - by Christian - 2014-04-23, 17:33:51
RE: Pages and comments plugin - by leeyo - 2014-04-30, 02:44:47
RE: Pages and comments plugin - by cumbe - 2014-04-23, 17:35:21
RE: Pages and comments plugin - by cumbe - 2014-04-23, 18:22:26
RE: Pages and comments plugin - by Christian - 2014-04-23, 18:29:53
RE: Pages and comments plugin - by cumbe - 2014-04-23, 18:45:50
RE: Pages and comments plugin - by Christian - 2014-04-23, 18:55:17
RE: Pages and comments plugin - by cumbe - 2014-04-23, 19:56:27
RE: Pages and comments plugin - by Christian - 2014-04-23, 20:04:28
RE: Pages and comments plugin - by Christian - 2014-04-24, 02:13:58
RE: Pages and comments plugin - by cumbe - 2014-05-02, 07:01:51
RE: Pages and comments plugin - by cumbe - 2014-05-05, 01:52:03
RE: Pages and comments plugin - by wakh - 2014-07-31, 04:36:49
RE: Pages and comments plugin - by wakh - 2014-07-31, 05:10:20
color name of poster - by mrwislr - 2014-11-21, 03:11:13
RE: Pages and comments plugin - by Riianna - 2015-02-14, 04:07:01
RE: Pages and comments plugin - by TeeJay - 2015-05-28, 21:23:46
RE: Pages and comments plugin - by datiswous - 2015-05-30, 21:54:02
RE: Pages and comments plugin - by cumbe - 2015-05-31, 03:55:11
RE: Pages and comments plugin - by cumbe - 2015-05-31, 04:26:48
RE: Pages and comments plugin - by datiswous - 2015-05-31, 07:53:07
RE: Pages and comments plugin - by datiswous - 2015-06-08, 19:10:23
RE: Pages and comments plugin - by cumbe - 2015-06-09, 16:21:37
RE: Pages and comments plugin - by datiswous - 2015-06-09, 20:35:54
RE: Pages and comments plugin - by Tyblitz - 2015-06-17, 09:39:54
RE: Pages and comments plugin - by Carlos - 2015-06-18, 00:27:26
RE: Pages and comments plugin - by Carlos - 2015-06-18, 01:29:00
RE: Pages and comments plugin - by cumbe - 2015-06-18, 05:18:42
RE: Pages and comments plugin - by Carlos - 2015-08-14, 18:22:59
RE: Pages and comments plugin - by Charpy1 - 2016-02-16, 22:43:12
RE: Pages and comments plugin - by cumbe - 2016-03-14, 04:31:11
RE: Pages and comments plugin - by Riianna - 2016-09-03, 05:41:08
RE: Pages and comments plugin - by cumbe - 2017-03-14, 05:42:32
RE: Pages and comments plugin - by cumbe - 2017-03-14, 22:38:42
RE: Pages and comments plugin - by ostryweb.cz - 2017-07-11, 17:19:51
Edit Comments possible? - by Jupiter1 - 2017-10-17, 18:07:21
RE: Pages and comments plugin - by zouknet - 2018-04-02, 03:51:52
RE: Pages and comments plugin - by Oleg06 - 2018-04-02, 04:45:29
RE: Pages and comments plugin - by zouknet - 2018-04-02, 15:07:19
RE: Pages and comments plugin - by Oleg06 - 2018-04-02, 18:39:31
RE: Pages and comments plugin - by Carlos - 2018-04-02, 18:23:06
RE: Pages and comments plugin - by zouknet - 2018-04-02, 22:40:00
RE: Pages and comments plugin - by zouknet - 2018-04-03, 03:58:36
RE: Pages and comments plugin - by Sergey12 - 2019-06-29, 05:04:50
RE: Pages and comments plugin - by Knobbles - 2022-11-03, 23:00:58
RE: Pages and comments plugin - by trister - 2020-12-04, 03:52:51
RE: Pages and comments plugin - by ragou - 2021-05-05, 05:44:09
Pages and comments plugin - by lucamusolesi - 2012-04-11, 17:26:24
Pages and comments plugin - by Carlos - 2012-04-11, 18:14:27
Pages and comments plugin - by lucamusolesi - 2012-04-11, 18:47:51
Pages and comments plugin - by Kovalj - 2012-04-15, 21:05:51
Pages and comments plugin - by yojoe - 2012-04-15, 21:32:51
Pages and comments plugin - by Draxeiro - 2012-04-16, 04:58:04
Pages and comments plugin - by yojoe - 2012-04-16, 05:39:15
Pages and comments plugin - by Carlos - 2012-04-17, 01:08:29
Pages and comments plugin - by yojoe - 2012-04-17, 04:14:13
Pages and comments plugin - by cumbe - 2012-04-19, 05:01:14
Pages and comments plugin - by itsjustme - 2012-04-23, 02:47:32
Pages and comments plugin - by cumbe - 2012-04-23, 22:18:02
Pages and comments plugin - by itsjustme - 2012-04-23, 22:57:00
Pages and comments plugin - by yojoe - 2012-04-26, 04:57:58
Pages and comments plugin - by cumbe - 2012-04-28, 07:02:17
Pages and comments plugin - by cumbe - 2012-04-28, 07:09:59
Pages and comments plugin - by shawn_a - 2012-04-28, 12:08:16
Pages and comments plugin - by cumbe - 2012-04-29, 04:37:06
Pages and comments plugin - by cumbe - 2012-04-29, 08:06:09
Pages and comments plugin - by revonet - 2012-05-07, 18:34:26
Pages and comments plugin - by cumbe - 2012-05-08, 02:25:59
Pages and comments plugin - by revonet - 2012-05-09, 00:08:34
Pages and comments plugin - by Boz - 2012-05-09, 17:02:14
Pages and comments plugin - by cumbe - 2012-05-09, 22:07:29
Pages and comments plugin - by richard2233 - 2012-05-17, 00:22:15
Pages and comments plugin - by richard2233 - 2012-05-17, 00:24:28
Pages and comments plugin - by cumbe - 2012-05-21, 02:20:05
Pages and comments plugin - by cumbe - 2012-05-21, 02:24:40
Pages and comments plugin - by kinata - 2012-06-02, 17:18:45
RE: Pages and comments plugin - by kinata11 - 2013-12-14, 23:00:11
Pages and comments plugin - by cumbe - 2012-06-02, 17:33:19
Pages and comments plugin - by kinata - 2012-06-02, 18:41:49
Pages and comments plugin - by cumbe - 2012-06-03, 19:15:54
Pages and comments plugin - by kinata - 2012-06-04, 19:04:58
Pages and comments plugin - by legko - 2012-09-21, 20:05:10
Pages and comments plugin - by yojoe - 2012-09-22, 05:15:05



Users browsing this thread: 2 Guest(s)