Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for random ordering in mod_articles_category #6648

Closed
wants to merge 3 commits into from
Closed

Update for random ordering in mod_articles_category #6648

wants to merge 3 commits into from

Conversation

xaddict
Copy link

@xaddict xaddict commented Apr 3, 2015

I've added in random ordering in this module since it's something I think should be in the core and it's one of the first things I change in new Joomla installations.

I've added in random ordering in this module since it's something I think should be in the core and it's one of the first things I change in new Joomla installations.
@brianteeman
Copy link
Contributor

Please provide full test instructions otherwise people will just ignore it.

A good starting point would be to state which module it is that you have edited


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6648.

@xaddict
Copy link
Author

xaddict commented Apr 3, 2015

modules/mod_articles_category/mod_articles_category.xml

@xaddict xaddict changed the title Update for random ordering Update for random ordering in mod_articles_category Apr 3, 2015
@xaddict
Copy link
Author

xaddict commented Apr 3, 2015

There are no test instructions for previous state as there was no random ordering,

In the new situation one can choose "Random" (if it also gets pulled) in ordering at the backend and the selected articles from mod_articles_category will be shown randomly.

@xaddict
Copy link
Author

xaddict commented Apr 7, 2015

I added the other options into this one. It should now be sufficient to add the "Random" ordering option to the Articles Category module.

@@ -90,8 +90,9 @@ MOD_ARTICLES_CATEGORY_OPTION_ORDERINGFEATURED_VALUE="Featured Articles Order"
MOD_ARTICLES_CATEGORY_OPTION_RELATIVEDAY_VALUE="Relative Date"
MOD_ARTICLES_CATEGORY_OPTION_STARTPUBLISHING_VALUE="Start Publishing Date"
MOD_ARTICLES_CATEGORY_OPTION_FINISHPUBLISHING_VALUE="Finish Publishing Date"
MOD_ARTICLES_CAREGORY_OPTION_RANDOM_VALUE="Random"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct to say CATEGORY not caRegory

@brianteeman brianteeman added Feature Language Change This is for Translators labels Jun 17, 2015
@brianteeman
Copy link
Contributor

Sorry but I am confused. You have added an options called Random to an option

"Article Field to order by"

So that definitely isnt the correct place for it
Would it be better to place it in the field below

"Ordering Direction"

Although that would mean that it was renamed to just Ordering


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6648.

@brianteeman
Copy link
Contributor

Unfortunately this will not work in Postrges which does not have a rand function


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6648.

@brianteeman
Copy link
Contributor

@xaddict Thanks for your contribution. The last comment on this comes from myself stating that it cannot be accepted as is because the code doesnt work with Postgres.

Are you able to update the code so that it will? If not then this will have to be closed


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6648.

@xaddict
Copy link
Author

xaddict commented Nov 25, 2015

You can go ahead and close this. I'm doing this via a custom written module
now which supports random ordering, offset (take 10 items, but only show
the last 5) and splitting (one module shows items 1-3, another one 4-6, the
last shows random items but not 1-6)

On Thu, 12 Nov 2015 at 16:06 Brian Teeman notifications@github.com wrote:

@xaddict https://github.com/xaddict Thanks for your contribution. The
last comment on this comes from myself stating that it cannot be accepted
as is because the code doesnt work with Postgres.

Are you able to update the code so that it will? If not then this will

have to be closed

This comment was created with the J!Tracker Application
https://github.com/joomla/jissues at issues.joomla.org/joomla-cms/6648
https://issues.joomla.org/tracker/joomla-cms/6648.


Reply to this email directly or view it on GitHub
#6648 (comment).

@Bakual
Copy link
Contributor

Bakual commented Nov 25, 2015

Closing per request and since it has open issues anyway.

@Bakual Bakual closed this Nov 25, 2015
@zero-24
Copy link
Contributor

zero-24 commented Nov 25, 2015

If there is a willing to make it work on multi database you can use "random" as option value and implement it later with

case 'random' :
    $orderby = JFactory::getDbo()->getQuery(true)->Rand();
    break;

@alikon
Copy link
Contributor

alikon commented Nov 25, 2015

sorry @xaddict unable to send a pr to your branch
nice feature i think , i'll submit a new one, db portable as @zero-24 suggested

@zero-24
Copy link
Contributor

zero-24 commented Nov 25, 2015

👍

@alikon
Copy link
Contributor

alikon commented Nov 25, 2015

see #8538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants