You are not logged in! If you have not registered yet then click here to join the community!

TOLRA Community Forums


Go Back   TOLRA Community Forums > TOLRA Products (PHP Scripts) > Web Directory Script > Directory Script Mods

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 19-05-2007, 01:28 AM
beejay beejay is offline
Junior Member
 
Join Date: Mar 2007
Posts: 17
Listing Comment Mod

Has anyone done a mod that would allow visitors to submit reviews of the listings? (or did I just miss this in the very long list of features? Wouldn't be the first time . . . )

For instance, let's say this is a Restaurant Directory, and you want to be able to let folks post their reviews of the listed restaurants.

If it hasn't been done, it would be a nice extension. Reviews would need to be capable of moderation by admin prior to posting, and could function very similarly to the way comments work on blogposts.
Reply With Quote
Sponsored Links
  #2  
Old 19-05-2007, 08:44 AM
Paul's Avatar
Paul Paul is offline
Moderator
 
Join Date: May 2006
Location: UK
Posts: 568
Blog Entries: 3
We haven't done a mod like this yet and as far as I know no one else has.

The biggest fear people have with a mod like this is ending up with even more spam to wade through.
Reply With Quote
  #3  
Old 19-05-2007, 11:27 AM
Paul's Avatar
Paul Paul is offline
Moderator
 
Join Date: May 2006
Location: UK
Posts: 568
Blog Entries: 3
The attached simple mod that implements a very simple commenting system. It will not allow more than 1 comment from an IP, once you accept or discard the comment it will then allow another comment from the IP.

It requires V4.0.0 of the directory script and can be used with the trial version.

To install:
  • Create a folder called extensions if it doesn't already exist.
  • Unpack the attached zip file
  • Upload the comments folder from the archive to the extensions folder on the server.
  • Create a file called extensioninfo.php with the following:
    <?php
    $extBasePath = dirname(__FILE__) . '/';
    include($extBasePath . 'comments/init_comments.php');
    ?>
  • Upload extensioninfo.php to the extensions folder on the server.
  • With your web browser access www.yourdomain.com/extensions/comments/commentinst.php
  • Delete the file extensions/comments/commentinst.php
  • Edit t!wddetail.html and insert {$commentForm} where you want the comment form to show and {$comments} where you want the list of comments to show.

Note: If the file extensioninfo.php already exists on the server then edit it to add the following line just above ?>:

include($extBasePath . 'comments/init_comments.php');

In the admin interface you'll see a new comments option clicking it shows you the 1st comment available for moderation, you can edit the comment and choose to accept or discard it.
Attached Files
File Type: zip comments.zip (5.3 KB, 69 views)

Last edited by Paul; 12-03-2008 at 04:40 PM.
Reply With Quote
  #4  
Old 19-05-2007, 01:10 PM
beejay beejay is offline
Junior Member
 
Join Date: Mar 2007
Posts: 17
wow

Paul, you are truly an amazing guy. That was FAST!

I go to sleep, wake up, then find out the mod didn't exist but you've created it!

Looks like I better get to work on the template for the site I have in mind!
Reply With Quote
  #5  
Old 19-05-2007, 01:16 PM
Paul's Avatar
Paul Paul is offline
Moderator
 
Join Date: May 2006
Location: UK
Posts: 568
Blog Entries: 3
There should be some more mods appearing over the next few of days so you might want to keep an eye on this forum in case any are useful.

One of them should allow the business address to be submitted.
Reply With Quote
  #6  
Old 19-05-2007, 01:33 PM
beejay beejay is offline
Junior Member
 
Join Date: Mar 2007
Posts: 17
Thanks, Paul!

Since it's going to be a week or two before I get anything put together anyway, if you can eventually look at a better spam preventer than "one review per IP between mod sessions" I'd very much appreciate it. I can see some eventual problems with that, though for a quick solution it was pretty inspired.

Is it possible that instead of reinventing the wheel you can port Bad Behavior over for this purpose? It doesn't do the whole job but it for sure does most of it, and has been successfully integrated into many of these types of scripts. Just a thought.
Reply With Quote
  #7  
Old 19-05-2007, 01:40 PM
Paul's Avatar
Paul Paul is offline
Moderator
 
Join Date: May 2006
Location: UK
Posts: 568
Blog Entries: 3
You can change the number you will allow from an IP by editing comments.php and searching for:

// If not comments from this IP
if(!$row[0]) {

And changing it to:

// If not comments from this IP
if($row[0] < 3) {

Where 3 is the maximum number of comments to queue from any IP

I'll have a look at Bad Behavior but we're finding that rate or quantity limiting on IP works rather well if you set some limit more than 1.

I should have also said that this mod makes the user do a maths question before it'll accept the comment.
Reply With Quote
  #8  
Old 19-05-2007, 01:44 PM
beejay beejay is offline
Junior Member
 
Join Date: Mar 2007
Posts: 17
Well, cool, that should be fine!

Vkaryl was right, yours is definitely the script to work with.
Reply With Quote
  #9  
Old 19-05-2007, 01:59 PM
beejay beejay is offline
Junior Member
 
Join Date: Mar 2007
Posts: 17
Don't hit me for suggesting this.

It would be even more rad if the comments could be threaded ala a simple forum format!

And this would be great for product reviews too . . . I've already suggested this for a site a friend is building.
Reply With Quote
  #10  
Old 19-05-2007, 02:39 PM
Paul's Avatar
Paul Paul is offline
Moderator
 
Join Date: May 2006
Location: UK
Posts: 568
Blog Entries: 3
Quote:
It would be even more rad if the comments could be threaded ala a simple forum format!
I've noted the request in our bug/feature tracking system.
Reply With Quote
Reply

Bookmarks

Tags
comment, listing, mod

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:25 AM.