DISQUS

Joomlatools Blog: Joomla Developers Challenge

  • torkil · 1 year ago
    Using the Joomla framework would mean just using JTable->reorder in my opinion, since this function does exactly what you are describing.

    Do you want a rewrite of the reorder-function maybe?
  • Mathias · 1 year ago
    JTable::reorder() allows to reorder a specific set of rows, which is outside of scope for this challenge. It also has a query inside a loop, which is generally considered bad practice.

    For clarity, I'm not asking for something like this:
    function cleanup_ordering($table_name, $where).
    The only goal is to compact all rows in one specific table, namely jos_contents.
    You need to use the framework's db object, not php's mysql_* functions.
  • torkil · 1 year ago
    I understand... And I might just be very very tired... but JTables reorder function seems to reorder all rows in a table, doesn't it?

    If so, this challenge is alot like trying to rewrite that function, but then again; My 4 month old son has given me some sleep deprivation lately so please excuse any stupidities :)
  • Mathias · 1 year ago
    @Richard Greset: The solution you posted is indeed the one. I removed your comment for now, so others can have a go. I'll put it back in a week or so.

    @All: please _email_ your solution, as stated in the post, don't post it here.
  • severdia · 1 year ago
    The solution is also one that was recently added to Joomla 1.5.6 (I believe) to fix the same problem with menu item ordering, so the answer is there for those who look in the right place.
  • Thomas · 1 year ago
    Hi, when do you want to show the solutions?

    Thomas
  • Mathias · 1 year ago
    I posted it http://blog.joomlatools.org/2008/11/solution-fo...
    Congratulations Thomas.