jReviews Support Forum

jReviews 1.x => Templates => Topic started by: sky on March 19, 2008, 11:40:12 PM



Title: How to change my listing display like this?
Post by: sky on March 19, 2008, 11:40:12 PM

I just installed Jreview, and want to know wow to change my listing display like this site?

image on the right, and rating and hits on the top of description.

http://www.qristoranti.it/recensioni/list/jr_riconoscimenti,Gambero+Rosso+3+Forchette/


Title: Re: How to change my listing display like this?
Post by: Alejandro on March 20, 2008, 03:20:11 PM
This is the default template's blogview which you can select in config settings, items list tab.


Title: Re: How to change my listing display like this?
Post by: rollen on March 21, 2008, 01:08:08 PM
is there any way to set it up like this http://mmorpg.com/gamelist.cfm/gameId/0


Title: Re: How to change my listing display like this?
Post by: Alejandro on March 21, 2008, 06:15:12 PM
Only with a lot of work on your end to customize the template and even then with some limitations unless you customize the code as well. For example, changing the color of the rating bard based on the number requires custom work. Putting everything in multiple columns, including custom fields is all template work.


Title: Re: How to change my listing display like this?
Post by: rollen on March 23, 2008, 11:00:37 AM
If I wanted to set up the tableview template to having it show like this for example:

Title - Release Date - Price - Rating - Etc

reading from left to right with the responding contents underneath. Do I have to edit English.php in order to add titles such as Release date, Price, Publisher, Genre?


Title: Re: How to change my listing display like this?
Post by: Alejandro on March 23, 2008, 03:21:59 PM
If you are only using english language you can put the text directly in tableview. Otherwise you can add new constant definitions in the language file.


Title: Re: How to change my listing display like this?
Post by: rollen on March 24, 2008, 04:23:47 AM
Quote
<patTemplate:tmpl name="listing" unusedvars="strip">
<!--  tableview.html  -->
<table id="tableview" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left"><patTemplate:translate>_JR_GAME</patTemplate:translate></td>
<td align="left"><patTemplate:translate>_JR_GENRE</patTemplate:translate></td>
<td align="left"><patTemplate:translate>_JR_DEVELOPER</patTemplate:translate></td>
<td align="left"><patTemplate:translate>_JR_DATE</patTemplate:translate></td>
<td align="left"><patTemplate:translate>_JR_PVP</patTemplate:translate></td>
<td align="left"><patTemplate:translate>_JR_DIST</patTemplate:translate></td>
<td align="left"><patTemplate:translate>_JR_PAY</patTemplate:translate></td>
<td align="left"><patTemplate:translate>_JR_FEE</patTemplate:translate></td>
<td align="left"><patTemplate:translate>_JR_USER_RATING</patTemplate:translate></td>
</tr>
<tr>
<td align="left"><a href="{ITEM_TITLE_URL}">{ITEM_TITLE}</a></span></td>
<td align="left">{JR_GENRE}</td>
<td align="left">{JR_DEVELOPER}</td>
<td align="left">{JR_DATE}</td>
<td align="left">{JR_PVP}</td>
<td align="left">{JR_DIST}</td>
<td align="left">{JR_RETAIL}</td>
<td align="left">{JR_MONTHLY}</td>
<td align="left"><div id="tableview_userratingstar">{ITEM_RATING}</div></td>
</tr>
</table>
</patTemplate:tmpl>

This is what i have so far just wondering if i'm going along good i'm getting errors though.

pat-Warning: Template 'actionbox' does not exist.

pat-Warning: Template 'author_rating' does not exist.

pat-Warning: Template 'single_item' does not exist.


Title: Re: How to change my listing display like this?
Post by: Alejandro on March 24, 2008, 08:30:13 AM
The errors say a lot ;) You can't just delete everything that was in there. You need to start with the existing template and test as you do your changes. You can remove any variable in curly braces, but you can't remove all of the existing patTemplate tags.


Title: Re: How to change my listing display like this?
Post by: rollen on March 24, 2008, 09:40:57 AM
what about things like JR_Read_more, I don't want them to show up I just want a simple table view. like in the link i gave.


Title: Re: How to change my listing display like this?
Post by: Alejandro on March 24, 2008, 09:53:52 AM
You can either disable those in the settings or remove them from the template. I am not saying you have to leave everything in the template, just don't remove the patTemplate tags, only what's inside of them. And if you do remove a patTemplate tag, then save and reload the page to make sure you haven't created an error.


Title: Re: How to change my listing display like this?
Post by: rollen on March 24, 2008, 10:44:27 AM
awesome no errors and its displaying what i want. but for one of the custom fields it says *fanta* when it should say fantasy any idea whats that about?


EDIT: nvm i got it working. just need to know how to make make it so that users can organize it depending on field. like how do i make it so that the people can click Date and organize it to the latest date or the oldest date.


Title: Re: How to change my listing display like this?
Post by: Alejandro on March 24, 2008, 11:18:31 AM
That's not really a feature, but you can you can try hardcoding the links for ordering using images or whatever you can come up with. Try reordering a regular list and look at the url. If you take a look at the store template you'll see I have hardcoded a few ordering links. You can see this on the demo site, and you can do something similar.

http://demo.reviewsforjoomla.com/review_component/amazon-store/camcorders/digital-camcorders/order/rating/


Title: Re: How to change my listing display like this?
Post by: rollen on March 24, 2008, 11:40:37 AM
awesome thanks a lot. I got yet another problem lol im good at screwing up. when I place a new item it shows the field titles at the top again instead of just once and just placing the item underneath. no idea how to get it to work with out it showing the field titles everytime i make a new item.

Quote
<patTemplate:tmpl name="listing" unusedvars="strip">
<!--  tableview.html  -->
<table id="tableview" width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td align="left"><patTemplate:translate>_JR_GAME</patTemplate:translate></td>
<patTemplate:tmpl name="tv1" type="simplecondition" requiredvars="item_rating_col" varscope="listing">
<td align="left"><patTemplate:translate>_JR_GENRE</patTemplate:translate></td>
      </patTemplate:tmpl>
      <patTemplate:tmpl name="tv2" type="simplecondition" requiredvars="item_hits_col" varscope="listing">
<td align="left"><patTemplate:translate>_JR_DEVELOPER</patTemplate:translate></td>
      </patTemplate:tmpl>
           <patTemplate:comment>** Custom fields can be added inside the single_item template below**</patTemplate:comment>

   <patTemplate:tmpl name="single_item" unusedvars="strip" autoclear="yes">
<td align="left"><patTemplate:translate>_JR_DATE</patTemplate:translate>
         <br />
         <patTemplate:tmpl name="author_rating" type="simplecondition" requiredvars="author_rating" varscope="single_item">
         </patTemplate:tmpl>

         <patTemplate:tmpl name="infobox" visibility="hidden" varscope="single_item">
            <div id="tableview_infobox">
               <patTemplate:tmpl name="item_date" type="simplecondition" requiredvars="item_date" varscope="single_item"></patTemplate:tmpl>
               <patTemplate:tmpl name="tv4" type="simplecondition" requiredvars="item_author,item_date" varscope="single_item"></patTemplate:tmpl>
               <patTemplate:tmpl name="item_author" type="simplecondition" requiredvars="item_author" varscope="single_item">
                  <patTemplate:tmpl type="condition" conditionvar="cb_url" varscope="single_item,item_author">
                  </patTemplate:tmpl>
               </patTemplate:tmpl>
            </div>
         </patTemplate:tmpl>

         <patTemplate:comment>** CONTENT **</patTemplate:comment>
         <div style="clear: both;"></div>
         <div>
            <div id="tableview_content">
               <patTemplate:tmpl name="tv5" type="simplecondition" requiredvars="item_img" varscope="single_item">
                  <div id="tableview_thumbshot">
                  </div>
               </patTemplate:tmpl>

               <patTemplate:tmpl name="tv6" type="simplecondition" requiredvars="custom_fields" varscope="single_item">
               </patTemplate:tmpl>

               <patTemplate:tmpl name="item_intro" type="simplecondition" requiredvars="item_intro" varscope="single_item">
               </patTemplate:tmpl>
            </div>
         </div>
         <div style="clear: both;></div>

         <patTemplate:comment>** ACTION BOX **</patTemplate:comment>

         <patTemplate:tmpl name="actionbox" visibility="hidden" varscope="single_item">
         <div id="tableview_actionbox" class="tableview_actionbox" >
            <patTemplate:tmpl name="tv7" type="simplecondition" requiredvars="item_readmore_url" varscope="single_item">
            </patTemplate:tmpl>
            <patTemplate:tmpl name="tv8" type="simplecondition" requiredvars="item_readmore_url,item_readreviews_url" varscope="single_item">
            </patTemplate:tmpl>
            <patTemplate:tmpl name="tv9" type="simplecondition" requiredvars="item_readreviews_url" varscope="single_item">
            </patTemplate:tmpl>
            <patTemplate:tmpl name="tv10" type="simplecondition" requiredvars="item_readreviews_url,item_newreview_url" varscope="single_item">
            </patTemplate:tmpl>
            <patTemplate:tmpl name="tv11" type="simplecondition" requiredvars="item_newreview_url" varscope="single_item">
            </patTemplate:tmpl>
         </div>
         </patTemplate:tmpl>
      </td>
         <patTemplate:comment>** USER RATINGS & HITS COLUMNS **</patTemplate:comment>

      <patTemplate:tmpl name="tv12" type="simplecondition" requiredvars="item_rating_col" varscope="listing,single_item">
<td align="left"><patTemplate:translate>_JR_PVP</patTemplate:translate>
<patTemplate:tmpl type="condition" conditionvar="item_rating" varscope="single_item">
            <patTemplate:sub condition="__empty">
            </patTemplate:sub>
            <patTemplate:sub condition="__default">
            </patTemplate:sub>
         </patTemplate:tmpl>
</td>
      </patTemplate:tmpl>
      <patTemplate:tmpl name="tv13" type="simplecondition" requiredvars="item_hits_col" varscope="listing,single_item">
<td align="left"><patTemplate:translate>_JR_DIST</patTemplate:translate></td>
<td align="left"><patTemplate:translate>_JR_PAY</patTemplate:translate></td>
<td align="left"><patTemplate:translate>_JR_FEE</patTemplate:translate></td>
<td align="left"><patTemplate:translate>_JR_USER_RATING</patTemplate:translate></td>
</tr>
<tr>
<td align="left"><a href="{ITEM_TITLE_URL}">{ITEM_TITLE}</a></span></td>
<td align="left">{JR_GENRE}</td>
<td align="left">{JR_DEVELOPER}</td>
<td align="left">{JR_DATE}</td>
<td align="left">{JR_PVP}</td>
<td align="left">{JR_DIST}</td>
<td align="left">{JR_RETAIL}</td>
<td align="left">{JR_MONTHLY}</td>
<td align="left"><div id="tableview_userratingstar">{ITEM_RATING}</div><div id="tableview_userratingval">&nbsp;{ITEM_RATING_VALUE}</div>
</td>
      </patTemplate:tmpl>
   </tr>
   </patTemplate:tmpl>
</table>
</patTemplate:tmpl>

This is what i have so far.


Title: Re: How to change my listing display like this?
Post by: Alejandro on March 24, 2008, 08:09:59 PM
Sorry, I don't understand what you mean. Maybe an image of the output would be helpful.