Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Am I being dense?
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Am I being dense?
#3244
Am I being dense? 14 Years, 3 Months ago Karma: 0
Just testing a new installation of Jtablesort.

Coding is very simple:-

<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
{arijtablesorter defaultSorting="0:ASC"}
<table cellpadding="0" cellspacing= "10">
<thead>
<tr>
<th>Name</th>
<th>Level</th>
</tr>
</thead>
<tbody>
<?php
foreach ($this->rows as $row)
{
?>
<tr>
<td><?php echo $row['name']; ?></td>
<td><?php echo $row['misc']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
{/arijtablesorter}

plugin is enabled and all parameters except width are set to yes.

But no result!!


Am I missing something fundamental?
The administrator has disabled public write access.
 
#3245
Re:Am I being dense? 14 Years, 3 Months ago Karma: 748
Hello,

Provide the following information, please. Where you type this code in article or in another place? You have entered license for correct domain? If you try this on your local machine, send screenshot of 'License' page on the component backend and HTML source of your page from frontend (open this page in browser, click 'View Source' in browser menu and save page source as text file) by email please.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#3246
Re:Am I being dense? 14 Years, 3 Months ago Karma: 0
The coding is the default.php file, setting the template of a view in a joomla mvc component triggered by a menu item at the front end and therefore not an article.
The administrator has disabled public write access.
 
#3247
Re:Am I being dense? 14 Years, 3 Months ago Karma: 748
By default the component works in articles. If you want to use plugins from the component anywhere, install 'System - ARI Smart Content' plugin which you can find on ARI Smart Content page on F.A.Q. tab. Download it, install and enable.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#3248
Re:Am I being dense? 14 Years, 3 Months ago Karma: 0
Thank you for the solution, it will help me a great deal in future developments.

In the meantime I had thought that might be the case and had come up with an alternative based on an article.

{arijtablesorter notSortableCols="0" sortableCols="2:text,1:text" defaultSorting="2:ASC,1:ASC"}
{arisqltable}
{arisqltablecolumns}
{arisqltablecolumn id="NAME" alias="Name" width="20%"}
{arisqltablecolumn id="LEVEL" alias="Level" width="10%"}
{arisqltablecolumn id="SORTFIELD" alias="Sortfield" hidden="true"}
{/arisqltablecolumns}
{arisqltablequery}
SELECT name AS NAME, misc AS LEVEL, yahoo_msg AS SORTFIELD
FROM #__qcontacts_details WHERE catid != 126
{/arisqltablequery}
{/arisqltable}
{/arijtablesorter}

What I am trying to achieve is a paged list with a major sort key on the hidden field (2) and a secondary one on the 'LEVEL' field (1) with the 'NAME' field ignored for sorting purposes.

With the parameters shown above I get a headed list with the two visible columns both sortable but no paging.

If I remove 'sortableCols="2:text,1:text"' I get the same result.

If I also remove 'defaultSorting="2:ASC,1:ASC"' I get a paged list but still both visible columns are sortable.

If I remove all parameters I get the same result.

I realise that I can get to a default sorting position using ORDER BY in my SELECT statement but I am unclear as to why the 'notSortableCols' parameter doesn't appear to work

It would appear that the instruction on the plugin contain two typo's.

"sorters - Indicate sorting method for selected colums. Value: the string of following type: notSortableCols="N1:sortingMethod,N2:sortingMethod,..." where N1, N2 - column index to sort by (zero-based) Example: notSortableCols="0:percent,2:currency,...". You can use the following sorting methods: text,digit,currency,ipAddress,url,isoDate,percent,usLongDate,shortDate,time;"

Surely this should say "sortableCols" not "notSortableCols" in this paragraph.

I would be most grateful for a clearer explanation of the sorting parameters.

I apologise for such a lengthy question.
The administrator has disabled public write access.
 
#3251
Re:Am I being dense? 14 Years, 3 Months ago Karma: 748
Hello,

Hidden columns are available only for 'ARI SQL Table' plugin and can be used for creating virtual column and this means that you can't sort data in 'ARI JTableSorter' by hidden columns. If you want to set default sorting by hidden column, you can use 'ORDER BY' SQL clause. We also found a bug in 'ARI JTableSorter' plugin when 'notSortableCols' parameter is set to "0", but we fixed it and you can download updated component in 'Member Area' on our site. We also updated plugin description and now it contains correct description for "sorters" parameter. Install updated version of the component, please, and use the following code:

Code:


{arijtablesorter notSortableCols="0" sorters="1:text" defaultSorting="1:ASC"}
{arisqltable}
{arisqltablecolumns}
{arisqltablecolumn id="NAME" alias="Name" width="20%"}
{arisqltablecolumn id="LEVEL" alias="Level" width="10%"}
{/arisqltablecolumns}
{arisqltablequery}
SELECT name AS NAME, misc AS LEVEL
FROM #__qcontacts_details WHERE catid != 126 ORDER BY yahoo_msg DESC
{/arisqltablequery}
{/arisqltable}
{/arijtablesorter}



Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 12