This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Recent Comments Add On Help
#1

I apologize if this is in the wrong spot. I wasn't sure if I should post in integration or here.

I have the add on up and running great. I have 3 site templates I use (bands, clubs, restaurants). I want each template to display different recent activity ie: Band template only display from the band reviews, club template only from the club reviews and so on. I'm not sure if that is possible. What I have already done is uploaded the commentics folder to each subfolder of my website (bands, bars, restaurants) and changed the path on the recent_comments.php accordingly:

../restaurants/comments/includes/db/connect/.php
../clubspubs/comments/includes/db/connect/.php
../bands/comments/includes/db/connect/.php

With it this way all 3 templates are still displaying the same comments from all over the site.

Again, I'm not sure if it is even possible to do this. I apologize if I am not explaining very well. Thanks.
Reply
#2

Okay, hope I've understood it. It's a little late here so I had to read it a few times.

The comments for bands, clubs and restaurants are all in the same database.

On your homepage, where you have the add-on, the visitor can load any of 3 templates. Currently, when the visitor loads a template, it displays comments from all 3 templates, but you want it to display only the comments relating to the template that's loaded.

In the 'pages' database table, do you have a page for bands, a page for clubs and a page for restaurants?

On your homepage, do you have some type of variable that knows which template is loaded?

If so, I think what you would want, in pseudo code, is:

If the band template is loaded {
Select only the comments from page 'bands' in the pages database table
} else if the clubs template is loaded {
Select only the comments from page 'clubs' in the pages database table
} else {
Select only the comments from page 'restaurants' in the pages database table
}

Is that right?

Have you completed the interview?
Reply
#3

That is right.
Here is the links to the pages. I have uploaded the commentics folder into each subfolder ie: ../bands, ../restaurants, ../clubspubs and have given the recent_comments.php the path of ..bands/comments/includes/db/connect.php and so on
You will notice that all 3 pages are displaying the same recent activity
I do not actually have a database (which I am embarrassed to admit).
I am not to savvy with this kind of stuff so I apologize again if this does not make sense. Please excuse the mess on my website I am currently re designing and testing these pages.

http://eastsidevibe.com/bands/bandlist.html

http://eastsidevibe.com/restaurants/GrubGuide.html

http://eastsidevibe.com/clubspubs/clubpubbarguide.html
Reply
#4

I recommend uploading Commentics only once, at http://eastsidevibe.com/comments/

So, delete the ones at /bands/comments/ and /restaurants/comments/ and /clubspubs/comments/

What makes you think that you don't have a database? The database is where the comments are stored so if you can post a comment then you have a database.

Can you remove the following line from your pages. It's conflicting with the UTF-8 charset tag.
Code:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

Also, can you move the following to the very first line of your pages (even above the <!DOCTYPE line).
PHP Code:
<?php
session_start
();
ob_start();
?>

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
28-Mar-2023, 12:17 PM
Last Post by noblues
26-Sep-2013, 05:44 PM
Last Post by kooler
02-Aug-2013, 05:29 PM
Last Post by brande
23-Jan-2013, 07:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)