TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 09:43:35 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 82
  • Total: 82

TP Reviews module

Started by Megaforum, May 24, 2008, 04:25:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dragooon

OK Here is my next module, Its a Reviews system for TP 1.

It supports category system, got permissions and also custom fields to rate as(Like Graphics, action for games). Also supports critic and user rating for each rate field/criteria.

Also newly added features such as notifications, previewing reviews etc.

Attached is the package for TP 1.

Currently at Rev. 6

Using RSS/XML feeds
RSS/XML Feeds can be accessed by http://site.com/index.php?action=tpmod;rvws;sa=xml.
Initially it'll show 5 latest reviews in XML format, for RSS add ;type=rss or ;type=rss2 in the URL, to set the limit add ;limit=x in the URL, to show from specific category, add ;cats=1 or something like ;cats=1,2,3 for multiple categories.

For example, to get RSS feed for 10 latest reviews in categories 1,2,3
http://yoursite.com/index.php?action=tpmod;rvws;sa=xml;type=rss;limit=10;cats=1,2,3

Any help you provide for helping me testing it will be greatly appreciated.




Team Edit:
Team Edit 2: added my link... Ken.

I have been testing the Reviews module, suggesting changes and additions and some bug hunting.

Here are two Live working Demos'
http://www.slayingsteel.com/index.php?action=tpmod;rvws
http://www.ourfamilyforum.org/FamilyForum/index.php?action=tpmod;rvws

A How-To Made by Ken


Staff Edit #3: 10/15/09
The copy of the TP Reviews Module now attached to this post will work with SMF 1.1.10 & TinyPortal v1.0 beta 4.
Latest update http://www.tinyportal.net/index.php/topic,24109.msg249108.html#msg249108


Installing the TP Reviews Module:
... always do a db backup for your forum before installing packages and set your forum to the SMF Core Default theme.

  • Download the attached 'TPReviews.zip'.
  • Upload the zip file to your site using the SMF Package manager and install.
  • Go to your... Admin>TinyPortal>Modules and Tags>and check to be sure the TP Reviews is set to 'On'.
  • You should now see 'TPReviews' in your TP admin block, use those controls to do your Reviews Module setup's.

Accessing your Reviews pages:
To link to your Reviews main page use the address code as seen here:
?action=tpmod;rvws

Any questions or issues can be posted to this topic.

Smoky

will add this in the morning dragooon.. thanks!! ;)

Zetan

It's an excellent module.. I'll post a link to ours later as Ken and I have been helping Dragooon test it.
Unfortunately my site is down at the mo as my host conveniently decided to move us to a different server.. 

Dragooon

Thanks ZTN(And sorry to hear that), also will you mind adding the demo links to my first post whenever you feel its OK?

Zetan

I have updated your first post Dragooon with a link to our Reviews page.

If at any time the site is down, we are aware of it and it's beyond our control.
We are about to update the Reviews module to the latest version, but with the problems our host is currently having.. that may not be today.


Also note, that the Reviews Tabs in the theme we use are displayed vertically, rather than horizontally.. this is a theme issue and not an issue of the module.. again, this will be fixed as soon as our host has moved us to a new server.. Which I think they have now.

Dragooon


Zetan

Quote from: Dragooon on May 24, 2008, 09:03:19 AM
Thanks ZTN!

Thank you for all the work you've put into it  :up:

And for letting us test it first  ;)


Ken has been testing too, so he may post a link to his Reviews.

Dragooon

OK here's a "Recent Reviews" PHP Block code snippet, I made for ZTN & Ken, but thought I would share it.
global $context, $db_prefix, $scripturl;
$tp_prefix = $context['tp_prefix'];
$cat = array();
$request = db_query("
SELECT r.title, mem.realName, r.id, mem.ID_MEMBER, r.posted_on
FROM {$tp_prefix}reviews AS r
INNER JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = r.posted_by)
WHERE r.approved = 1
".(!empty($cat) && is_array($cat) ? 'AND r.category IN ('.implode(',',$cat).')' : (!empty($cat) && is_numeric($cat) ? 'AND r.category = '.$cat : ''))."
       AND r.type = 'item'
ORDER BY r.id DESC
LIMIT 10",__FILE__,__LINE__);
$reviews = array();
while($row = mysql_fetch_assoc($request)) {
$reviews[] = array(
'id' => $row['id'],
'title' => $row['title'],
'mem_link' => '<a href="'.$scripturl.'?action=profile;u='.$row['ID_MEMBER'].'">'.$row['realName'].'</a>',
              'posted_on' => timeformat($row['posted_on']),
);
}
mysql_free_result($request);
$total = count($reviews);
$i = 0;
foreach($reviews AS $review) {
$i++;
echo '<div class="smalltext"><a href="',$scripturl,'?action=tpmod;rvws;sa=viewitem;id='.$review['id'].'">'.$review['title'].'</a><br />['.$review['posted_on'].']<br /> by ',$review['mem_link'],'</div>';
if($i < $total)
echo '<hr />';
}


To show from specific categories, use the $cats array, like $cats = array(1); Or $cats = array(1,2,3);

Zetan

I forgot to mention that snippet.. I gave Dragooon a nudge to post it here  :P

If you navigate to my Home Page, you will see the latest Reviews in two blocks near the bottom on the left, one for Albums and one for Gigs.

Ken.

#9
This is indeed a very nice Module, great job Dragooon!  :up:

Most of the features have been covered already so I'll just post my links.
You'll find that the reviews on ZTN's site are more 'in depth' than the ones on mine are, but mine should give you a good comparison between the two sites.

Link to my Reviews Index

Link to my Reviews 'How-To' Page
... I've put together a short how-to for my members and should anyone wish to copy it please feel free to do so, just do not link to my images... copy them and host them yourself if you want to use them.  :)

EDIT: Added my link to Dragooons OP.
You can see my block with the Recent Reviews snippet on my 'Forum' page.
EDIT# 2: for spelling.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.