mytidbits.us

  • Increase font size
  • Default font size
  • Decrease font size
Home Rquotes Forum
MyTidBits Forum
Board Index
Posts from user bongobongo
Welcome, Guest

Would be nice if possible to set a number that seq. quotes are ordered by
Post Would be nice if possible to set a number that seq. quotes are ordered by
by bongobongo on Aug, 06.2010 17:14

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.


bongobongo

bongobongo

Joo!BB - Newie
Joo!BB - Newie
Registered

Posts: 8

Joined Board
Dec, 15.2009 09:49
Last Visit
Aug, 07.2010 16:16
Offline User is Offline

View all users posts


Re: Rquotes for Joomla 1.6 - When?
Post Re: Rquotes for Joomla 1.6 - When?
by bongobongo on Aug, 06.2010 12:11

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.


bongobongo

bongobongo

Joo!BB - Newie
Joo!BB - Newie
Registered

Posts: 8

Joined Board
Dec, 15.2009 09:49
Last Visit
Aug, 07.2010 16:16
Offline User is Offline

View all users posts


Rquotes for Joomla 1.6 - When?
Post Rquotes for Joomla 1.6 - When?
by bongobongo on Jul, 09.2010 04:29

Hi

Do you have a version of Rquotes that is installable in Joomla 1.6 ?


bongobongo

bongobongo

Joo!BB - Newie
Joo!BB - Newie
Registered

Posts: 8

Joined Board
Dec, 15.2009 09:49
Last Visit
Aug, 07.2010 16:16
Offline User is Offline

View all users posts


Re: Sequential hack - and feature request
Post Re: Sequential hack - and feature request
by bongobongo on Dec, 20.2009 17:08

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


bongobongo

bongobongo

Joo!BB - Newie
Joo!BB - Newie
Registered

Posts: 8

Joined Board
Dec, 15.2009 09:49
Last Visit
Aug, 07.2010 16:16
Offline User is Offline

View all users posts


Sequential hack - and feature request
Post Sequential hack - and feature request
by bongobongo on Dec, 19.2009 10:26

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;
}
 



***********************
2. file: mod_rquotes.php
**********************

after this block of code:

Code
 
elseif($rotate=='daily')
{
$list= getDailyRquote($category);
}
 


add this code:
Code
 
elseif($rotate=='sequential')
{
$list = modRquotesHelper::getSequentialRquote($category);
}
 


**********************
3. file: mod_rquotes.xml
**********************

find this parameter:
Code
 
<param name="rotate" ....>
<option value ="daily">Daily</option>
<option value ="page_load">Every page load</option>
</param>
 


Now add this third option after the last option in code above:
Code
 
<option value ="sequential">Sequential</option>
 



**************
DONE...
Time to test (remember to add a unique number in this field "Daily Order" for each quote within a category)
**************

Happy quoting!

Regards


bongobongo

bongobongo

Joo!BB - Newie
Joo!BB - Newie
Registered

Posts: 8

Joined Board
Dec, 15.2009 09:49
Last Visit
Aug, 07.2010 16:16
Offline User is Offline

View all users posts


Re: Is it possible to make it fetch quotes sequential instead of random?
Post Re: Is it possible to make it fetch quotes sequential instead of random?
by bongobongo on Dec, 19.2009 07:13

Any idea when the new version will be available then?

Regards


bongobongo

bongobongo

Joo!BB - Newie
Joo!BB - Newie
Registered

Posts: 8

Joined Board
Dec, 15.2009 09:49
Last Visit
Aug, 07.2010 16:16
Offline User is Offline

View all users posts


Re: Saving published state of quotes after editing
Post Re: Saving published state of quotes after editing
by bongobongo on Dec, 15.2009 10:03

Code

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. 

 


Hi.

I downloaded and installed Rquotes today.
Looks like this change has not been implemented.

Looks like this is an ultra tiny change to make.
Could you please make the changes and make some new zip-files?

Regards


bongobongo

bongobongo

Joo!BB - Newie
Joo!BB - Newie
Registered

Posts: 8

Joined Board
Dec, 15.2009 09:49
Last Visit
Aug, 07.2010 16:16
Offline User is Offline

View all users posts


Is it possible to make it fetch quotes sequential instead of random?
Post Is it possible to make it fetch quotes sequential instead of random?
by bongobongo on Dec, 15.2009 09:54

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


bongobongo

bongobongo

Joo!BB - Newie
Joo!BB - Newie
Registered

Posts: 8

Joined Board
Dec, 15.2009 09:49
Last Visit
Aug, 07.2010 16:16
Offline User is Offline

View all users posts


MyTidBits Forum

How you want to use Rquotes component

Rquotes component
 

Daily-Tidbit

Why do you have to 'put your two cents in'... but it's only a 'penny for your thoughts'?  Where's that extra penny going to?


How you want to use Rquotes module

Rrquotes Module
 

DB Sequential Quotes

" What do you call a hang glider's last run? "

The Final Draft


Welcome to www.mytidbits.us You are connected from 38.107.191.110 Have a great day!!

Random From Text File

"I don't know what's wrong with my television set. I was getting C-Span and the Home Shopping Network on the same station. I actually bought a congressman."--Bruce Baum

Daily from Text File

This line will be displayed on the 7th day of every mounth.

Forum Posts

Re: Rotate questions

by Lukum
on Sep, 01.2010 06:26

DB-Multy Random

" A wise man washes his hands after he pees. A wiser man doesn't pee on his hands. "

Unknown


" The world today is hungry not only for bread but hungry for love; hungry to be wanted, to be loved. "

Mother Teresa


DB Daily Quote

Quote4. This information will be displayed all day.


DB Single Random

" Go to Heaven for the climate, Hell for the company. "

Mark Twain