Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 26, 2012, 06:59:15 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
155534
Posts in
21713
Topics by
7737
Members
Latest Member:
chris85
WebsiteBaker Community Forum
English
Modules
(Moderator:
Argos
)
News comments with name and email
Pages: [
1
]
Go Down
Author
Topic: News comments with name and email (Read 1131 times)
Argos
Moderator
Offline
Posts: 2161
News comments with name and email
«
on:
June 22, 2010, 04:46:36 PM »
Is it possible to add name and email fields to the News comment function, just like the Feedback module has?
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
pcwacht
AddOn Development
Offline
Posts: 2859
Re: News comments with name and email
«
Reply #1 on:
June 22, 2010, 05:49:49 PM »
yups it is.
can be coded into the core, wouldn't be to hard.
John
edit -> core is newsodule
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
Argos
Moderator
Offline
Posts: 2161
Re: News comments with name and email
«
Reply #2 on:
June 22, 2010, 06:11:28 PM »
Even better: visitors should register before being able to add a comment, but all comments are visiible to everyone. Like descibed in
http://www.websitebaker2.org/forum/index.php/topic,10764.0.html
. I don't know how to apply the fix that is described there upon the current News module. It's different code.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
pcwacht
AddOn Development
Offline
Posts: 2859
Re: News comments with name and email
«
Reply #3 on:
June 22, 2010, 06:15:49 PM »
Hmm code seems incomplete
starts with an if, the ending } seems missing
But now I know what you mean.
Hold on
John
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
pcwacht
AddOn Development
Offline
Posts: 2859
Re: News comments with name and email
«
Reply #4 on:
June 22, 2010, 07:26:54 PM »
replace modules/news/view.php with attached one
What I did around line 426
Code:
// Show comments section if we have to
// Original line:
//
if(($post['commenting'] == 'private' AND isset($wb) AND $wb->is_authenticated() == true) OR $post['commenting'] == 'public')
// New line
if($post['commenting'] != 'disabled')
{
// New Lines!!! added by PCWacht - see forum -> http://www.websitebaker2.org/forum/index.php/topic,10764.0.html
// Print comments header
if ((($post['commenting'] == 'private') AND (isset($wb) AND $wb->is_authenticated() == true)) OR ($post['commenting'] == 'public'))
{
$values = array(WB_URL.'/modules/news/comment.php?post_id='.POST_ID.'&section_id='.$section_id.'hier', $MOD_NEWS['TEXT_COMMENTS']);
} else {
$values = array(WB_URL.'/account/signup.php', $MOD_NEWS['TEXT_COMMENTS']);
}
// End News Lines!!!
// Print comments header
$vars = array('[ADD_COMMENT_URL]','[TEXT_COMMENTS]');
// Original line!!!
//
$values = array(WB_URL.'/modules/news/comment.php?post_id='.POST_ID.'&section_id='.$section_id, $MOD_NEWS['TEXT_COMMENTS']);
// End Original Line!!!
Have fun,
John
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
Argos
Moderator
Offline
Posts: 2161
Re: News comments with name and email
«
Reply #5 on:
June 22, 2010, 11:16:07 PM »
Great John, thanks very much!! I appreciate it!
I'll try it out tomorrow
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Argos
Moderator
Offline
Posts: 2161
Re: News comments with name and email
«
Reply #6 on:
June 23, 2010, 04:23:10 PM »
Hi John, it doesn work. I don't see any difference with the regular situation, except that the link for posting comment is wrong. In the code I see the word "hier", maybe that's causing trouble?
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
pcwacht
AddOn Development
Offline
Posts: 2859
Re: News comments with name and email
«
Reply #7 on:
June 23, 2010, 07:34:21 PM »
Hmmm the 'hier' is a debug issue wich I forgot to remove, sorry.
Code:
$values = array(WB_URL.'/modules/news/comment.php?post_id='.POST_ID.'&section_id='.$section_id.'hier', $MOD_NEWS['TEXT_COMMENTS']);
must be changed to:
Code:
$values = array(WB_URL.'/modules/news/comment.php?post_id='.POST_ID.'&section_id='.$section_id, $MOD_NEWS['TEXT_COMMENTS']);
What it should do (and it does so on my test xampp) is done in this litle bit, the rest of the changes is merely to let this bit do it's work:
Code:
if ((($post['commenting'] == 'private') AND (isset($wb) AND $wb->is_authenticated() == true)) OR ($post['commenting'] == 'public'))
{
$values = array(WB_URL.'/modules/news/comment.php?post_id='.POST_ID.'&section_id='.$section_id.'hier', $MOD_NEWS['TEXT_COMMENTS']);
} else {
$values = array(WB_URL.'/account/signup.php', $MOD_NEWS['TEXT_COMMENTS']);
}
if comments is set to private AND user is logged in OR comments is set to public, show the add comments link, else it should set the link to login.
It shouldn't do more then this, cause showing other texts etc , then those texts should be baked into the view.php, wich I am not fond of, but can be done ofcourse.
change for example
Code:
$values = array(WB_URL.'/account/signup.php', $MOD_NEWS['TEXT_COMMENTS']);
to
Code:
$values = array(WB_URL.'/account/signup.php', 'You need to be logged in to post comments');
John
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
Argos
Moderator
Offline
Posts: 2161
Re: News comments with name and email
«
Reply #8 on:
June 23, 2010, 11:07:04 PM »
Sorry John, doesn't work on my install. The comment link is shown regardless of the settings in the backend (what is the difference between the comments switch in the news settings, and in the news item settings, by the way?). Besides that, the comment link that is shown within a comment allready given is incorrect.
But don't feel obliged to spend more time on this, my client just emailed me that work on the comments function is not needed anyway. We will leave is as it is.
Thanks for your effort.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
pcwacht
AddOn Development
Offline
Posts: 2859
Re: News comments with name and email
«
Reply #9 on:
June 24, 2010, 07:24:51 AM »
should work when commenting is PRIVATE, hmmm, news module 3.5?
difference between comments switch settings and post
the switch from settings is used to set deafult for post I think
In view the switch from the post is used.
John
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
Argos
Moderator
Offline
Posts: 2161
Re: News comments with name and email
«
Reply #10 on:
June 24, 2010, 10:07:29 AM »
Quote from: pcwacht on June 24, 2010, 07:24:51 AM
should work when commenting is PRIVATE, hmmm, news module 3.5?
Yes.
Quote
difference between comments switch settings and post
the switch from settings is used to set deafult for post I think
In view the switch from the post is used.
Ah, sounds logical indeed. Thanks.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
tkche
Offline
Posts: 12
Re: News comments with name and email
«
Reply #11 on:
April 14, 2011, 06:13:55 AM »
it didnt worked for me so i double checked it, just a small fix needed...
the following line:
Code:
if($post['commenting'] != 'disabled')
should be
Code:
if($post['commenting'] != 'none')
Logged
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...