PDA

View Full Version : To-Do List for Hotaru 0.8



Nick
10-27-2009, 09:30 PM
The Hotaru core consists of an install script, admin section, admin theme, default theme, class libraries and a few 3rd party extensions. Since plugins are updated separately, there isn't much that needs changing in the core itself. Nevertheless, here's my list so far for Hotaru 0.8:


Add an OR option for plugin requirements, i.e. this plugin requires "Plugin A" or "Plugin B" idea dropped (http://hotarucms.org/showthread.php?t=169)
Add a user_ip field to the Users table for storing the IP address of a user at registration. done
Find a way to make plugin setting pages (optionally) accessible to moderators without "can_access_admin" permissions. done
Add a function to the PluginFunctions class that activates or deactivates all plugins. This would make upgrading plugins much quicker. done
Make an upgrade script. done

If you have any other suggestions, please let me know.

carlo75
10-28-2009, 07:50 AM
- Some alert on Admin Dashboard, when an official plugin is upgraded (like Wordpress)

Nick
10-28-2009, 08:32 AM
- Some alert on Admin Dashboard, when an official plugin is upgraded (like Wordpress)

That's a pretty advanced feature. Do you know how it's done? If someone can point me to a guide or example file, I'll take a look.

carlo75
10-28-2009, 08:58 AM
in Wordpress:
wp-includes/update.php file there's the function that check local plugin version against latest updated plugin version hosted on wordpress.org...

btw, I'll search for some examples...

davidshq
10-29-2009, 01:18 AM
Nick - Perhaps SWCMS' module store would give some assistance in this area? I'd imagine the process could work something like this:
1. The local database has a column with the current version of a plugin and another column with its title.
2. A cron job runs to check what the latest version is of the plugin held in a database on a centralized server (e.g. hotarucms.org) and adds a 1 to another column on the local database if there is an update and adds the latest version number to yet another column.
Something along those lines. :)
Dave.

carlo75
10-30-2009, 08:16 AM
Nick've
thought about the possibility of moving the news older than 1 year to another table, 2 years to another table, and so on... with the options for administrators to decide if use or delete definitely a specific year?

Nick
10-30-2009, 01:15 PM
Thanks guys. I think I'll leave the "upgrade available" alerts for a later version of Hotaru as I find that feature quite daunting at the moment.

As for archiving old posts, it sounds like a nice idea, but in what situations do you use those extra tables? When a post is loaded directly? In search results?

carlo75
10-30-2009, 07:51 PM
Hi Nick,
I think extra tables will reduce load of DB in general.

I think, for a basic search (deafult) anyone can search on the last 365 days (like Digg), but if I can choose I'll search on news older than a year (extra tables)

People that hits news older than a year, probably coming from Google and other search engine, in this case you can load directly from extra tables. (?)

I think that 2/3 years are a reasonable limit for a news, and search engine, but if I want to collect more years can I have this possibility?

If yes: imagine a table with 5/6/7 years of news... against a single selectable year! Not unusual seen pligg site that return links old than 3/4 years (my site is a living example :()

Nick
10-31-2009, 06:51 AM
I think an archiving feature would have to go in the Submit plugin because that's where the current posts table is created.

What about comments, votes and tags? Those tables can get huge!

carlo75
10-31-2009, 01:43 PM
I think also vote, comments and tags, will have to go on a new table... a total swap... what do you think?

Nick
10-31-2009, 02:14 PM
To be honest, I like the idea, but am worried it would add layer of complexity to Hotaru that few sites would need. I'll talk to Jason (http://hotarucms.org/member.php?u=4) about it. He's the database guru.

nothingman
10-31-2009, 02:15 PM
Pagination for the comments, perhaps?

Nick
10-31-2009, 02:25 PM
Pagination for the comments, perhaps?

Not in the core. That would be for the Comments plugin, which reminds me, I'm currently working on a Sidebar Comments plugin.

nothingman
10-31-2009, 02:31 PM
- Contact form?
- Any plans of adding user points/karma? Yet again :D

Nick
10-31-2009, 03:11 PM
A contact form would be a plugin. It's not high priority for me though because I use a Wordpress blog on my site with its own contact form plugin.

Karma/points. Yes, definitely, but probably not in 0.8.

nothingman
10-31-2009, 04:32 PM
I'm currently working on a Sidebar Comments plugin.
As a suggestion, It'd be great to 'not show' the buried comments on the comments sidebar. Could this be done? (or maybe as an option for the site admin to enable/disable this).

As a side note, meneame displays only the top 10 comments or comments with the highest votes (and not the latest comments) on the comments sidebar. Oh well, but that wouldn't be applicable for sites that have low user activity. :)

Nick
10-31-2009, 04:55 PM
There's actually no voting on comments yet. :o

It shouldn't be too hard to show top comments in the sidebar, but I'll let someone else do that ;).

I'd like to add a pagination option for comments. I've done it for the "all comments" page on my own test site, but that was easy because it just showed latest comments. Paginating with parent-child comments will be more difficult.

Nick
11-01-2009, 04:42 AM
@nothingman I've finished pagination for the Comments plugin so you can expect that fairly soon, probably along with Hotaru 0.8.

@carlo & @david

I contacted Jason, and here's what he had to say about the idea of archiving posts:


Looking at this purely from a performance point of view, Carlo75 is correct
that splitting data across multiple tables will typically increase raw
performance. That said, in real-world applications, this is usually not the
case until you start getting tables with tens of millions of rows and
indexes that include darn near every column in a table. Properly monitored,
maintained, and tuned indexes will ensure any query is returned in an
acceptable amount of time (as my hero Joe Celko often says, there is no
order in a database, so indexes are what matters). MySQL 5 has done quite a
bit in terms of index management to bring it more in line with the raw power
of Microsoft's and Oracle's SQL capabilities.

I've worked with several companies that have had MySQL databases with tables
that contained over 40-million rows and, in almost every case, we rarely
split out data. Even then, the splitting of data was done by administrators
rather than the system itself. After removing a large number of records
from a table, it's always a good idea to rebuild the indexes (this is
especially true for MyISAM-based tables). Once an index begins to bloat,
performance is going to suffer.

Naturally, all of this could be done programmatically without a dedicated
administrator to perform all the tasks, but it introduces a greater level of
complexity into the system (e.g. -> how do you handle failed index rebuilds?
How do you decide when to run these procedures? How does a non-technical
administrator learn about these things? Etc.).

For the companies that I've worked with as either a developer or consultant,
the most common solution was to make use of specialized flags, usually in
the form of ENUMs, to mark certain records as archived. By doing this,
queries could have a single clause added (like isArchived = 'N') in order to
ensure newer information was always returned within a respectable amount of
time.

This isn't the only solution, of course, but it's the one that I've seen
implemented the most often and implemented myself most often over the last
five years.
I replied:


The ENUM archive flag sounds like a good way to go. I
assume it's much quicker than checking timestamps for posts within the last
year?to which he responded:


ENUMs are much faster to search than timestamp or date fields, as there is a
very limited number of possibilities. They're one of the most valuable (and
underused) fields in all of MySQL.Adding an ENUM field to determine if a post is archived is easy to do and can be done in the comments, votes and tags tables, too. So unless there's a counter-argument, I'll use ENUMs instead of extra tables.

carlo75
11-02-2009, 07:47 AM
Perfect Nick!
I think that an ENUM field is the better solution. Thank you very much, for interesting to this new feature!

rushnp774
11-27-2009, 01:15 AM
I read all the posts in this thread and think there are a lot of great ideas. Nick, do you think you could edit/update your original post in this thread (or make a new one) that summarizes the suggestions made thus far? It would help me (if no one else :P) keep track of everything since forum threads that go 2+ pages are hard to keep track of. Just a thought.

angolanmade
12-01-2009, 04:59 PM
how about the ability for admins/supermods to notify the user/member if their post is edited for either (wrong category, tags, etc). Quick an easily way to reach members!

angolanmade
12-01-2009, 05:08 PM
I just noticed that we dont the ability to add a "summary" to a post, currently u are only able to add a "description" when submitting a post. Any chances of adding this ability.

Description:
Write your own description of the news story you are submitting. It should be about 2 to 5 sentences long.

Summary
This text will appear when looking at this story in 'summary' mode, like when it's on the front page. Limit 275 characters.

Nick
12-01-2009, 11:50 PM
Hi angolanmade, both of your suggestions apply to the Submit plugin (http://hotarucms.org/showthread.php?54-Submit-1-8) rather than Hotaru 0.8, which is already released.

I made the Submit plugin, but I'm hoping people will fork it and add their own improvements. That's the great thing about Hotaru - you can just remove the Submit X plugin and put in Submit Y - no changes to the core necessary.

We all have our own personal wish lists of changes and additions that we want to see in Hotaru, so it's unlikely that someone will add your suggestions unless they are on his wish list, too. If you are you interested in learning how to make changes like these for yourself, I could probably help you (http://hotarucms.org/showthread.php?110-Give-a-Man-a-Fish).