Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News and Comments Plugin
#1
Upload a new plugin: News & Comments.

Upload a new version (v0_041211_2227) in: http://get-simple.info/forum/post/20362/#p20362

Test Web: http://cumbe.no-ip.biz/gs_30/list_news/

Please test, before upload to extend.



///////////////////////////////////////////////////
OBSOLETE
//////////////////////////////////////////////////

FEATURES:
* I test in GS30 and GS31beta
* Include comments in pages.
* To do List of Pages or News.
* From Admin > plugins, settings system.
* Backup system.
* CSS system. CSS file is in /plugins/news_comments/nc.css. Thanks to Oleg06 for you good job in to do CSS.
List of news still isn't in css; style directly in news_comments.php
* Works with fancy url on and off.
* Internationalization system: the language of plugins is the same language that admin.

Instrucctions:
1) unzip in folder plugins.

FIRST TO DO:
a) To have pages created.
a) Create a group, or more... (view button Group options).
b) Add page to news in groups created...by default when you add page to news, ALWAYS is in group 1. Then you must EDIT the options of this news created, putting the group correct, type of order, nº of order or priority in group,...(view button Page to News).


c) if you want COMMENTS IN PAGE
- copy and paste you template.php and rename like, for example nw_comments.php
- inside this nw_comments.php, you must put, after of <?php get_page_content(); ?>:
<?php sv_news('nameofuser'); ?>
- create a new page and choose this template.
- Put this page like News (view button Page to News). If the page isn't like News, will not appear the form, nor comments.

Comments are created in data/other/news_comments, 1 file for page: name of page.log.
If a page changes the url, too is changed the log of comments, and the url in data/other/news_comments/nc_manager.xml.

d) If you want LIST OF NEWS or LIST of PAGES:
To see a list of news in a page, you must put in template (or better in content of a page, with exec_plugin installed):
<?php ls_news(groupofnews, true or false); ?>,
* group of news or pages (view button Group Options)
* true, cause a 'echo', and shown the list of pages for group choosed.
* false, cause a 'return', for that the string can to be treated later.
for example: <?php ls_news('1', true); ?>
we will see the news for group 1.


e) In Admin > Plugins, you have a button News & comments.
The settings of News are saved in data/other/news_comments/nc_manager.xml
The setting of groups are saved in data/other/news_comments/nc_group.xml

Buttons:
- NEWS, to see the pages are news, and the settings by page.
* Edit news, click in url or image 'pencil', to choose if you want to use captcha, emoticons,...
In comments, you can put emoticons. The emoticons are in /plugins/news_comments/img_emots . If you want add more emoticons, only you have to paste *.gif in this folder. If you want delete some emoticons, only you have to delete it from folder.
* Comments, to see comments of each news. If a New has comments, will appear a binoculars; click in one you can see, remove, moderate the comments, and create a backup of comments log.
* Image, if the new has a image, will appear a 'Y' with link to image. If you want that appear a image in list of news, you must put folder + image where is one. For example, if you image(image.jpg) is in /images then mut put: 'image/image.jpg'
* Delete Page from News. Click in image 'x', you can remove only the page from News, or page + comments of this page.
It NEVER remove the page of 'PAGES'.

The news can to be joined by groups, by default, only there is one group: '1'.


- PAGE TO NEWS:
Will see all pages created; and that page are News. We can to do:
* to add the pages to News, click in image (+).
* Edit news, to choice if you want to use captcha, emoticons,...

When add a page to News, is created in group 1 by default; you must edit it, and put the settings right.

- GROUP OPTIONS:
Will see all groups created. You can Add groups and edit it.
Edit group:
* Name of group: can be a number, name,...
* Caption: label that will appear in the list of news.
* Nº news in list: pagination, is the number of news that will appear in the list.
* Order: D(decrease): first, the last news, ...
I(increase): first, the first news ...
* Type of order:
+ by entry: in the order the page are saved like news.
+ by field order of news: is possible put a number like has to appear the news. It order can not be repeated inside of the same group.


- BACKUPs:
Will see the list of backup of logs (comments). These backups are created in View Comments (binocular).
Every time that a log is created, the name of backup is: name of log + date + time.bak. It is possible recover this log, and remove it. When a log is recovered, always is done a copy of current log.
The backups are saved in data/other/news_comments/news_comments_bak.



I'm sorry for my english.

Regards.
Reply
#2
Cumbe,

I am just translating the language file and I saw, that "ndel" exists 2 times in the en_US.php, once in the form section and one time in the backup-section, is that correct?

When I am ready, I will attach the german file here
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#3
plug-in is good, but after trying to leave comments in Russian, I saw it, but everything is normal in English
Code:
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 2: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0x8B 0x26 0x4E 0x74 in D:\home\0getsimple.ru\www\admin\inc\basic.php on line 219

Warning: simplexml_load_string() [function.simplexml-load-string]: y id="3"><Id><![CDATA[3]]></Id><SubId><![CDATA[0]]></SubId><Nb><![CDATA[&Ntilde; in D:\home\0getsimple.ru\www\admin\inc\basic.php on line 219

Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in D:\home\0getsimple.ru\www\admin\inc\basic.php on line 219

Warning: DOMDocument::load() [domdocument.load]: Input is not proper UTF-8, indicate encoding ! Bytes: 0x8B 0x26 0x4E 0x74 in file:///D:/home/0getsimple.ru/www/data/other/news_comments/news1.log, line: 2 in D:\home\0getsimple.ru\www\plugins\news_comments.php on line 443

Notice: Trying to get property of non-object in D:\home\0getsimple.ru\www\plugins\news_comments.php on line 459
also in the title in admin in Russian is written
Code:
УЯравленШе ннвнстяУШ Ш ЪнУУентарШяУШ
in the file of the Russian language is
Code:
Управление новостями и комментариями
Reply
#4
so there must be a character code problem, I will check with german tomorrow, didn't notice that

spakolny noche
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#5
Hello,

Yes is a character code problem...

It´fixed, later update it: http://cumbe.no-ip.biz/gs_30/news-parent/mi-4-news/

Thanks and regards
Reply
#6
Hi,
Upload a new version, fixed problems with cirillics characters and new land: de_DE, thanks Connie.

Regards.
Reply
#7
thanks, it works
Only the title of this in admin
Code:
УЯравленШе ннвнстяУШ Ш ЪнУУентарШяУШ
instead of
Code:
Управление новостями и комментариями
how to change the date display in the news
Reply
#8
Oleg06 Wrote:thanks, it works
Only the title of this in admin
Code:
УЯравленШе ннвнстяУШ Ш ЪнУУентарШяУШ
instead of
Code:
Управление новостями и комментариями
I think that it is fixed, at least it does not now occur me. Check ru_RU.php saved like utf-8 without BOOM, by say something... clean cache too...

Quote:how to change the date display in the news
In line 909, it is date, $pubdate is variable that contain date.

Thanks oleg06 for you test.
Reply
#9
some corrections, it works, how is it possible to do something, that the date appears in different languages, or even be in the format dd.mm.Y
Reply
#10
I can think of that could put the format to choose within the group, as an option...

but of moment you can put fotmat dd.mm.yyyy in line 909, writes this line so:

Code:
$mostrar.= '<span style="float: right; font-style: oblique; font-size: 11px;">'.i18n_r('news_comments/pubd').' '.strftime('%d.%m.%Y', strtotime(substr($pubdate,0, -6))).'</span><br />';
Reply
#11
Wow, after seeing demo of this awesome plugin I am even too afraid to install it. I have just dared to attach translation into Polish, as this is the only language I speak natively. It is 99% complete, I left out some in English as they were nor clear neither correct enough to translate them, so I think some native English could polish English version as well, but for current development stage it is enough in my opinion.

Could you please in next versions:
Quote:anglicise css classes an make them plugin-unique
instead of
<div class="tabla">
put
<div class="nc_main_table">

include proper indenting of html output
Quote: instead of
<div class="tabla"><dl class="hello"><dt class="thr"><span class="number">
put
<div class="tabla">
<dl class="hello">
<dt class="thr">
<span class="number">

This plugin is very close to final stage, I think it will be most useful to most of my GSpowered sites. Feel free to ask for any help.
Reply
#12
Can you give a possibility to edit the post date?
Reply
#13
Hi andyash;
In this moment, use a function of getsimple lngDate, that is in admin/inc/basic.php. You can modify format date of post in lines +-526 to 530 and lines 590 to 594:
Code:
else if ($n == 'date'){
                    $d = substr($d,0,strpos($d,'+')-1);
                      $d = lngDate($d);
                    $lin .= '</span> <span class="data">'.htmlentities(i18n_r('news_comments/Ps'), ENT_QUOTES, "UTF-8").' '.stripslashes($d).'</span></dt>';
                    echo $lin;
                  }

You have to put format date in $d= lngDate($d), replace lngDate what you want.

Regards.

PD: in the next version, will try put format date of comments and news in setting, lang and email...
Reply
#14
Sounds good. Can there also be a possibility to add social sharing scripts from AddThis etc. to give access to Facebook, Twitter, LinkedIn, GooglePlus etc. and a whole variety of networking buttons?
Reply
#15
Can there also be a possibility to switch on/off social sharing scripts?
Reply
#16
How do I decide the number of posts to show for a group? For group A I want to show 6 posts and for group B I want to show only 2 posts? How do I manage this?

One thing is sorely missing. When you click on a post excerpt and go to the full post there is no link to go back to News main page.
Reply
#17
Hi andyash.


- GROUP OPTIONS:
Will see all groups created. You can Add groups and edit it.
Edit group:
* Name of group: can be a number, name,...
* Caption: label that will appear in the list of news.
* Nº news in list: pagination, is the number of news or pages or posts that will appear in the list.
* Order: D(decrease): first, the last news, ...
I(increase): first, the first news ...
* Type of order:
+ by entry: in the order the page are saved like news.
+ by field order of news: is possible put a number like has to appear the news. It order can not be repeated inside of the same group.
--------

Regards.

PD: in next version, there are a backlink, choose in that page appears comments, ....
Reply
#18
Hi,
upload a new version of news and comments.

Test Web: http://cumbe.no-ip.biz/gs_30/list_news/

Please test, before upload to extend.

FEATURES:
* I test in GS30 and GS31beta
* Include comments in pages.
* To do List of Pages or News.
* From Admin > plugins, settings system.
* Backup system.
* CSS system. CSS file is in /plugins/news_comments/nc.css. Thanks to Oleg06 for you good job in to do CSS.
* Works with fancy url on and off.
* Support bbcode
* Backlink from page to list of news.


Instrucctions:
1) unzip in folder plugins.

FIRST TO DO:
a) To have pages created.
a) Create a group, or more... (view button Group options).
b) Add page to news in groups created...by default when you add page to news, ALWAYS is in group 1. Then you must EDIT the options of this news created, putting the group correct, type of order, nº of order or priority in group,...(view button Page to News).
c) General configuration in settings button: choose lang, email, format date publication,...(view button Settings)

d) if you want COMMENTS IN PAGE
- you can choose in that pages want comments from 'edit News'-> pencil image in button News.
Too (but it is not necessary), copy and paste you template.php and rename like, for example nw_comments.php; if you want inside this nw_comments.php, you must put, after of <?php get_page_content(); ?>: <?php sv_news('nameofuser'); ?> ; create a new page and choose this template.

- Put this page like News (view button Page to News). If the page isn't like News, will not appear the form, nor comments.

Comments are created in data/other/news_comments, 1 file for page: name of page.log.
If a page changes the url, too is changed the log of comments, and the url in data/other/news_comments/nc_manager.xml.

e) If you want LIST OF NEWS or LIST of PAGES:
To see a list of news in a page, you must put in template (or better in content of a page, with exec_plugin installed):
<?php ls_news(groupofnews, true or false); ?>,
* group of news or pages (view button Group Options)
* true, cause a 'echo', and shown the list of pages for group choosed.
* false, cause a 'return', for that the string can to be treated later.
for example: <?php ls_news('1', true); ?>
we will see the news for group 1.

f) In Admin > Plugins, you have a button News & comments.
The general configuration is saved in data/other/news_comments/nc_settgs.xml
The settings of News are saved in data/other/news_comments/nc_manager.xml
The setting of groups are saved in data/other/news_comments/nc_group.xml

Buttons:
- NEWS, to see the pages are news, and the settings by page.
* Edit news, click in url or image 'pencil', to choose if you want show comments, to use captcha, emoticons,...
In comments, you can put emoticons. The emoticons are in /plugins/news_comments/img_emots . If you want add more emoticons, only you have to paste *.gif in this folder. If you want delete some emoticons, only you have to delete it from folder.

Important: for a same group, you should never put the same number of order of other page; if already exist this number of order then error.

* Comments, to see comments of each news. If a New has comments, will appear a binoculars; click in one you can see, remove, moderate the comments, and create a backup of comments log.
* Image, if the new has a image, will appear a 'Y' with link to image. If you want that appear a image in list of news, you must put folder + image where is one. For example, if you image(image.jpg) is in /images then mut put: 'image/image.jpg'
* Delete Page from News. Click in image 'x', you can remove only the page from News, or page + comments of this page.
It NEVER remove the page of 'PAGES'.

The news can to be joined by groups, by default, only there is one group: '1'.

- PAGE TO NEWS:
Will see all pages created; and that page are News. We can to do:
* to add the pages to News, click in image (+).
* Edit news, to choice if you want to use captcha, emoticons,...

When add a page to News, is created in group 1 by default; you must edit it, and put the settings right.

- GROUP OPTIONS:
Will see all groups created. You can Add groups and edit it.
Edit group:
* Name of group: can be a number, name,...
* Caption: label that will appear in the list of news.
* Nº news in list: pagination, is the number of news that will appear in the list.
* Order: D(decrease): first, the last news, ...
I(increase): first, the first news ...
* Type of order:
+ by entry: in the order the page are saved like news.
+ by field order of news: is possible put a number like has to appear the news. It order can not be repeated inside of the same group.

- BACKUPs:
Will see the list of backup of logs (comments). These backups are created in View Comments (binocular).
Every time that a log is created, the name of backup is: name of log + date + time.bak. It is possible recover this log, and remove it. When a log is recovered, always is done a copy of current log.
The backups are saved in data/other/news_comments/news_comments_bak.

-SETTINGS or Configuration general, you have to choose:
* Language to use.
* Email: email that received notices from comments...
* Post date format: there 5 formats to date publication in comments.
* News date format: there 5 formats to date publication in list of news or pages.
* Social shareSadit still does not work)
* Free 1: still free.
* Free 2: still free.

BBCODE
Supports:
* [ br ]
* [ b ]Bold[ /b ]
* [ i ]Italic[ /i ]
* [ u ]Underline[ /u ]
* [img]url image[/img]
* [ color=colourthatyouwant ]text[ /color ]
* Linking with no link title: [ url ]link to url[ /url ]
* Linking to a named site: [ url=urlthatyouwant ]title[ /url ]

no spaces between [ and...

I'm sorry for my english.

Regards.
Reply
#19
Cumbe: is there a possibility of having settings per news group ?
For example in two news columns, one should show only date and header, while second column would show date, header, thumbnail and intro text.
Addons: blue business theme, Online Visitors, Notepad
Reply
#20
Yojoe, there is already a settings for groups.

Quote:- GROUP OPTIONS:
Will see all groups created. You can Add groups and edit it.
Edit group:
* Name of group: can be a number, name,...
* Caption: label that will appear in the list of news.
* Nº news in list: pagination, is the number of news that will appear in the list.
* Order: D(decrease): first, the last news, ...
I(increase): first, the first news ...
* Type of order:
+ by entry: in the order the page are saved like news.
+ by field order of news: is possible put a number like has to appear the news. It order can not be repeated inside of the same group.


yojoe Wrote:For example in two news columns, one should show only date and header, while second column would show date, header, thumbnail and intro text.

But, i don't understand good this. You want to say that you can choose between show: "only date and header," or "or date, header(caption), thumbnail and intro text" for the header of group.
Reply




Users browsing this thread: 1 Guest(s)