Hi
Could you in a future version of Rquotes, add a new integer field to _rquotes table, something like 'sortby', and then put this in the component so admin can specify the order of the quotes?
Another thing that would be nice to see is the Published field moved up below the Category field in the form.
Just to make it more visible in the form, and maybe optionally set it published by default.
User is Offline
I have just made some changes to mod_rquotes on my system.
Changed the xml file, and now it works in Joomla 1.6 Beta 6
I have not yet made any changes to the component, just created the nessesary rquotes tables in the database, and inserted rows using phpmyadmin.
And it works very good.
I'll probably try to do the same with the component in the next days, unless you have allready done it.... have you?
If you are interested I can send you the changed xml file for mod_rquotes and eventually the changes for the component (if I can make the component work that is).
I would very much like to see a module and component here that support 1.6 natively.
User is Offline
Hi
Do you have a version of Rquotes that is installable in Joomla 1.6 ?
User is Offline
Nice to hear that you liked it.
Hope you can include the fix for the published field as well in same version.
And would be cool if you could post here when the new version is published so I can
get it.
One more thing.
I'm sure you noticed that I only used one query in the function i wrote.
You can improve other queries in your code as well...
In this function: getRandomRquote
You use two queries... they can be merged into one by using inner join...
better to have fewer db calls.
There might be other places as well, but I do not have time to look through them... just happened to use getRandomRquote as basis for my function.
Last thing.
I see that in many of your functions e.g. this function: getRandomRquote
you use this two times:
$db =& JFactory::getDBO();
I do not understand why.... one should be enough...
calling it more will only use more cpu than needed.
Anyway, if do not get it to work ... please tell me...
Regards
User is Offline
Hi
I just made some simple changes to three files within rquotes so it now has support for sequential display of quotes within a category.
I really would like to see next version having support for this.
So I just post it here to make it ultra simple for the author of rquotes to implement it, or eventually users of rquotes to make these quick changes themselves.
After the changes, and if you are using the rquotes module, then you can make rquotes order the display of the quotes using the field: "Daily Order", by setting the "Rotate_quotes(s)" (in the module) to "Sequential".
To work the client must have enabled cookies in his browser.
If he has not then it will display the quotes randomly.
How to implement for old users of rquotes (and for the author if he wants):
For it to work you need to change 3 files in this Joomla directory:
/modules/mod_rquotes/
*******************
1. file: helper.php
******************
After this function: getRandomRquote
Add this function:
Code
function getSequentialRquote($category){
// by PD, not yet implemented
// make use of cookie to store last displayed rquote
// if cookies not enabled then fetch randomly
$db =& JFactory::getDBO();
$query = "select #__rquotes_categories.name, #__rquotes.*
from #__rquotes_categories
inner join #__rquotes on (#__rquotes.category=#__rquotes_categories.name and #__rquotes.published='1')
WHERE #__rquotes_categories.id='$category'
order by #__rquotes.catid";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$numRows = count($rows) - 1;
if (isset($_COOKIE['rquote'])){
$i = intval($_COOKIE['rquote']);
if ($i < $numRows)
$i++;
else
$i = 0;
setcookie('rquote',"$i");
$row = array( $rows[$i] );
} else {
// pick a random value
$i = rand(0, $numRows);
setcookie('rquote',"$i");
$row = array( $rows[$i] );
}
return $row;
}
elseif($rotate=='daily')
{
$list= getDailyRquote($category);
}
elseif($rotate=='sequential')
{
$list = modRquotesHelper::getSequentialRquote($category);
}
<param name="rotate" ....>
<option value ="daily">Daily</option>
<option value ="page_load">Every page load</option>
</param>
<option value ="sequential">Sequential</option>
User is Offline
Any idea when the new version will be available then?
Regards
User is OfflineCode
This change will be written into next version of the component. I have been very busy lately but will release a new version end of summer or sooner.
User is Offline
Hi.
RQuotes is cool, but I miss one feature:
Has anyone changed it so it can show quotes in a sequential order instead of random?
If not, some information on how this could be done would be very interesting.
I'm using a module to display the quotes.
Regards
User is OfflineThe Final Draft
Unknown
Mother Teresa
Mark Twain