Author Topic: News - reorganize tables  (Read 108 times)

Offline Vlob

  • Posts: 53
News - reorganize tables
« on: November 19, 2022, 01:37:25 AM »
Can anyone explain what the [reorganize tables] buttons does in the newsmodule?


Offline sternchen8875

  • Posts: 15
Re: News - reorganize tables
« Reply #1 on: November 19, 2022, 03:03:52 AM »
this function works only in the sort mode "Order by position, ASC"
if you work with the news-module, you add news and delete news. If you have a longer list of news, you have spaces in the position list, everytime, when you delete a old news. the normal position list ist for example 1,2,3,4,5,6,7,8,9, but if you delete every second, the row is 1,3,5,7,9

The reorganize tables link builds a new order for the position field in the table, so that you've then the new position order like 1,2,3,4,5 instead of 1,3,5,7,9

the idea behind... the the scrollable-overview-list from all news in the modify.php show's 15 news. if you have only 15 news, you dont need this function, but if you've 50 or 100 news and you delete 30%, you cannot remember all the position numbers and you scroll up and down, to search a special position number. And dont forget: everytime, when you change a position from a news via arrows or Drag&Drop, the system reloads the page, and your seach in the news list starts again. the reorg-function build now new position numbers, based on the actual position in the database table. it doesn't change any position

Offline Vlob

  • Posts: 53
Re: News - reorganize tables
« Reply #2 on: November 22, 2022, 12:54:07 AM »
thanks

 

postern-length